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

SF.net SVN: ledger-smb:[3095] trunk/scripts/payment.pl



Revision: 3095
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3095&view=rev
Author:   einhverfr
Date:     2010-10-12 18:55:11 +0000 (Tue, 12 Oct 2010)

Log Message:
-----------
Correcting rounding order on payments screen

Modified Paths:
--------------
    trunk/scripts/payment.pl

Modified: trunk/scripts/payment.pl
===================================================================
--- trunk/scripts/payment.pl	2010-10-10 22:32:42 UTC (rev 3094)
+++ trunk/scripts/payment.pl	2010-10-12 18:55:11 UTC (rev 3095)
@@ -439,7 +439,9 @@
                                                     money  => 1);
             $invoice->[5] = $payment->format_amount(amount => $invoice->[5],
                                                     money  => 1);
-            $invoice->[6] = $payment->format_amount(amount => $invoice->[6],
+            $invoice->[6] = $payment->format_amount(amount => (
+                    $payment->parse_amount(amount => $invoice->[3]) 
+                    - $payment->parse_amount(amount => $invoice->[4])),
                                                     money  => 1);
             my $fld = "payment_" . $invoice->[0];
             if (!defined $payment->{"$fld"} ){


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