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

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



Revision: 6706
          http://sourceforge.net/p/ledger-smb/code/6706
Author:   einhverfr
Date:     2014-01-29 14:08:04 +0000 (Wed, 29 Jan 2014)
Log Message:
-----------
reverse buttons now showing for overpayments.  Unfortunately they don't do anything yet.

Modified Paths:
--------------
    trunk/LedgerSMB/Report/Listings/Overpayments.pm
    trunk/LedgerSMB/Scripts/vouchers.pm

Modified: trunk/LedgerSMB/Report/Listings/Overpayments.pm
===================================================================
--- trunk/LedgerSMB/Report/Listings/Overpayments.pm	2014-01-29 09:44:41 UTC (rev 6705)
+++ trunk/LedgerSMB/Report/Listings/Overpayments.pm	2014-01-29 14:08:04 UTC (rev 6706)
@@ -119,8 +119,6 @@
 
 =item available
 
-=back
-
 =cut
 
 sub columns {
@@ -145,26 +143,37 @@
           name => LedgerSMB::Report::text('Available'),
           type => 'text',
     }];
-}     
+}
 
-=head1 METHODS
+=item set_buttons
 
-=head2 run_report
+If there is a batch_id, returns the the set of buttons.  Otherwise not.
 
 =cut
 
-sub run_report {
-    my ($self, $request) = @_;
-    if (ref $request){
-       $self->buttons([
+sub set_buttons {
+   my $self = shift;
+   return [
           { name => 'action',
             text => LedgerSMB::Report::text('Reverse'),
            value => 'reverse',
             type => 'submit',
            class => 'submit'
           },
-       ]) if $self->{batch_id};
-    }
+   ] if $self->batch_id;
+   return [];
+}
+  
+=back
+
+=head1 METHODS
+
+=head2 run_report
+
+=cut
+
+sub run_report {
+    my ($self, $request) = @_;
     my @rows = $self->exec_method({funcname => 'payment__overpayments_list'});
     for my $r (@rows){
        $r->{row_id} = $r->{payment_id};

Modified: trunk/LedgerSMB/Scripts/vouchers.pm
===================================================================
--- trunk/LedgerSMB/Scripts/vouchers.pm	2014-01-29 09:44:41 UTC (rev 6705)
+++ trunk/LedgerSMB/Scripts/vouchers.pm	2014-01-29 14:08:04 UTC (rev 6706)
@@ -136,7 +136,7 @@
 				my ($request) = @_;
 				$request->{account_class} = 1;
                                 if ($request->{overpayment}){
-                                    LedgerSMB::Scripts::reports::search_overpayments();
+                                    LedgerSMB::Scripts::reports::search_overpayments($request);
                                 } else {
 				    LedgerSMB::Scripts::payment::get_search_criteria($request, $custom_batch_types);
                                 }

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


------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits