[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[6869] trunk/LedgerSMB



Revision: 6869
          http://sourceforge.net/p/ledger-smb/code/6869
Author:   tshvr
Date:     2014-02-17 11:43:16 +0000 (Mon, 17 Feb 2014)
Log Message:
-----------
trying to mix in period from_month from_year interval

Modified Paths:
--------------
    trunk/LedgerSMB/Report.pm
    trunk/LedgerSMB/Scripts/journal.pm

Modified: trunk/LedgerSMB/Report.pm
===================================================================
--- trunk/LedgerSMB/Report.pm	2014-02-17 10:37:26 UTC (rev 6868)
+++ trunk/LedgerSMB/Report.pm	2014-02-17 11:43:16 UTC (rev 6869)
@@ -201,6 +201,7 @@
     my ($self, $request) = @_;
     my $template;
 
+
     my $testref = $self->rows;
     $self->run_report($request) if !defined $testref;
     # This is a hook for other modules to use to override the default
@@ -350,9 +351,9 @@
 
 sub prepare_input {
     my ($self, $request) = @_;
-    if ($request->{from_month} and $request->{year}){
+    if ($request->{from_month}){# and $request->{year}){tshvr4 year should be from_year!?
         my $interval = $self->get_interval_dates(
-                                                  $request->{year}, 
+                                                  $request->{from_year}, 
                                                   $request->{from_month}, 
                                                   $request->{interval}
         );
@@ -362,8 +363,8 @@
         $request->{from_date} = LedgerSMB::PGDate->from_input(
                                    $request->{from_date}
         );
-        $request->{date_to} = LedgerSMB::PGDate->from_input(
-                                   $request->{date_to}
+        $request->{to_date} = LedgerSMB::PGDate->from_input(
+                                   $request->{to_date}#date_to
         );
     }
     $request->{from_amount} = LedgerSMB::PGNumber->from_input(

Modified: trunk/LedgerSMB/Scripts/journal.pm
===================================================================
--- trunk/LedgerSMB/Scripts/journal.pm	2014-02-17 10:37:26 UTC (rev 6868)
+++ trunk/LedgerSMB/Scripts/journal.pm	2014-02-17 11:43:16 UTC (rev 6869)
@@ -130,6 +130,9 @@
          push @{$request->{business_units}}, $request->{"business_unit_$count"}
                if $request->{"business_unit_$count"};
     }
+    #tshvr4 trying to mix in period from_month from_year interval
+    my $tshvr4_report = LedgerSMB::Report->new(%$request);#tshvr4,seems i have to do this , to be able to call prepare_input
+    $tshvr4_report->prepare_input($request);
     my $report = LedgerSMB::Report::GL->new(%$request);
     $report->run_report;
     $report->render($request);

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits