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

SF.net SVN: ledger-smb:[5410] trunk



Revision: 5410
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5410&view=rev
Author:   einhverfr
Date:     2012-12-25 13:44:10 +0000 (Tue, 25 Dec 2012)
Log Message:
-----------
Payment reversal now works on 1.4

Modified Paths:
--------------
    trunk/LedgerSMB/Scripts/payment.pm
    trunk/UI/Reports/display_report.html

Modified: trunk/LedgerSMB/Scripts/payment.pm
===================================================================
--- trunk/LedgerSMB/Scripts/payment.pm	2012-12-25 06:20:44 UTC (rev 5409)
+++ trunk/LedgerSMB/Scripts/payment.pm	2012-12-25 13:44:10 UTC (rev 5410)
@@ -276,7 +276,11 @@
 sub get_search_results {
     my ($request) = @_;
     my $report = LedgerSMB::Report::Invoices::Payments->new(%$request);
-    $report->render;
+    $request->{hiddens} = { 
+        batch_id => $request->{batch_id},
+      cash_accno => $request->{cash_accno},
+    };
+    $report->render($request);
 }
 
 =item reverse_payments
@@ -289,9 +293,9 @@
     my ($request) = @_;
     $request->{account_class} = 1;
     my $payment = LedgerSMB::DBObject::Payment->new({base => $request});
-    for my $count (1 .. $payment->{rowcount}){
-        if ($payment->{"payment_$count"}){
-           $payment->{account_class} = $payment->{"account_class_$count"};
+    for my $count (1 .. $payment->{rowcount_}){
+        if ($payment->{"select_$count"}){
+           $payment->{account_class} = $payment->{"entity_class_$count"};
            $payment->{credit_id} = $payment->{"credit_id_$count"};
            $payment->{date_paid} = $payment->{"date_paid_$count"};
            $payment->{source} = $payment->{"source_$count"};

Modified: trunk/UI/Reports/display_report.html
===================================================================
--- trunk/UI/Reports/display_report.html	2012-12-25 06:20:44 UTC (rev 5409)
+++ trunk/UI/Reports/display_report.html	2012-12-25 13:44:10 UTC (rev 5410)
@@ -39,6 +39,13 @@
     value = request.form_id
      type = 'hidden'
 } ?>
+<?lsmb FOREACH K IN request.hiddens.keys;
+    PROCESS input element_data = {
+         name = K
+         type = 'hidden'
+        value = request.hiddens.$K
+    };
+    END; ?>
 <?lsmb PROCESS dynatable tbody = {rows = rows } 
                attributes = {class = 'report', order_url = order_url } ?>
 

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