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

SF.net SVN: ledger-smb: [211] trunk/bin/rc.pl



Revision: 211
          http://svn.sourceforge.net/ledger-smb/?rev=211&view=rev
Author:   tetragon
Date:     2006-10-13 09:55:11 -0700 (Fri, 13 Oct 2006)

Log Message:
-----------
Fix the array expansion in till closing

Modified Paths:
--------------
    trunk/bin/rc.pl

Modified: trunk/bin/rc.pl
===================================================================
--- trunk/bin/rc.pl	2006-10-13 16:44:55 UTC (rev 210)
+++ trunk/bin/rc.pl	2006-10-13 16:55:11 UTC (rev 211)
@@ -250,7 +250,7 @@
 function custom_calc_total(){
   |;
   my $subgen = 'document.forms[0].sub_sub.value = ';
-  foreach my $unit ($pos_config{'breakdown'}) {
+  foreach my $unit (@{$pos_config{'breakdown'}}) {
     # XXX Needs to take into account currencies that don't use 2 dp
     my $parsed = $form->parse_amount(\%pos_config, $unit);
     my $calcval = $parsed;
@@ -289,7 +289,7 @@
 
 <table>
 <col><col><col>|;
-  foreach my $unit ($pos_config{'breakdown'}) {
+  foreach my $unit (@{$pos_config{'breakdown'}}) {
     # XXX Needs to take into account currencies that don't use 2 dp
     my $calcval = $form->parse_amount(\%pos_config, $unit);
     $calcval = sprintf('%03d', $calcval * 100) if $calcval < 1;
@@ -381,7 +381,7 @@
   $head = "Closing Till $pos_config{till} for $form->{login}\n".
 	"Date: $form->{transdate}\n\n\n";
   my @cashlines = [$locale->text("Cash Breakdown:")];
-  foreach my $unit ($pos_config{'breakdown'}) {
+  foreach my $unit (@{$pos_config{'breakdown'}}) {
     # XXX Needs to take into account currencies that don't use 2 dp
     my $parsed = $form->parse_amount(\%pos_config, $unit);
     my $calcval = $parsed;


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