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

SF.net SVN: ledger-smb:[4245] branches/1.3/scripts/payment.pl



Revision: 4245
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4245&view=rev
Author:   tshvr
Date:     2011-12-28 15:02:57 +0000 (Wed, 28 Dec 2011)
Log Message:
-----------
format paid amount

Modified Paths:
--------------
    branches/1.3/scripts/payment.pl

Modified: branches/1.3/scripts/payment.pl
===================================================================
--- branches/1.3/scripts/payment.pl	2011-12-28 14:41:38 UTC (rev 4244)
+++ branches/1.3/scripts/payment.pl	2011-12-28 15:02:57 UTC (rev 4245)
@@ -973,8 +973,9 @@
          #$request->{"topay_fx_$array_options[$ref]->{invoice_id}"} = "$due_fx";
          $request_topay_fx_bigfloat=$due_fx;
      } 
+ #print STDERR localtime()." payment.pl array=".Data::Dumper::Dumper($array_options[$ref])."\n";
+ my $paid_formatted=$Payment->format_amount(amount=>($array_options[$ref]->{amount} - $array_options[$ref]->{due} - $array_options[$ref]->{discount}));
 #Now its time to build the link to the invoice :)
-
 my $uri = $Payment->{account_class} == 1 ? 'ap' : 'ar';
 $uri .= '.pl?action=edit&id='.$array_options[$ref]->{invoice_id}.'&path=bin/mozilla&login='.$request->{login};
 
@@ -985,7 +986,7 @@
                                invoice_date      => "$array_options[$ref]->{invoice_date}",
                                amount            => $Payment->format_amount(amount=>$array_options[$ref]->{amount}),
                                due               => $Payment->format_amount(amount=>$request->{"optional_discount_$array_options[$ref]->{invoice_id}"}?  $array_options[$ref]->{due} : $array_options[$ref]->{due} + $array_options[$ref]->{discount}),
-                               paid              => "$array_options[$ref]->{amount}" - "$array_options[$ref]->{due}"-"$array_options[$ref]->{discount}",
+                               paid              => $paid_formatted,
                                discount          => $request->{"optional_discount_$array_options[$ref]->{invoice_id}"} ? "$array_options[$ref]->{discount}" : 0 ,
                                optional_discount =>  $request->{"optional_discount_$array_options[$ref]->{invoice_id}"},
                                exchange_rate     =>  "$array_options[$ref]->{exchangerate}",

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