summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2008-11-21 22:02:08 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2008-11-21 22:02:08 +0000
commit75a1145585826d7c88eee5fd8d536d62176d1e6d (patch)
tree0b62dc838a8c60cc0efd92b65a3051cedd275b2c /scripts
parent695d7fd96eccb9a47b2bb44feaf475b65f3db138 (diff)
Correcting serious issue with check printing
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2413 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'scripts')
-rw-r--r--scripts/payment.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/payment.pl b/scripts/payment.pl
index 8007a175..1028cc49 100644
--- a/scripts/payment.pl
+++ b/scripts/payment.pl
@@ -305,7 +305,7 @@ sub print {
$inv_count = $LedgerSMB::Sysconfig::check_max_invoices;
}
- for my $inv (1 .. $inv_count){
+ for my $inv (1 .. $payment->{"invoice_count_$id"}){
my $invhash = {};
my $inv_id = $payment->{"invoice_${id}_$inv"};
for (qw(invnumber invdate)){
@@ -320,7 +320,7 @@ sub print {
}
$check->{amount} += $invhash->{paid};
$invhash->{paid} = $check->format_amount(amount => $invhash->{paid});
- push @{$check->{invoices}}, $invhash;
+ push @{$check->{invoices}}, $invhash if $inv <= $inv_count;
}
my $amt = $check->{amount}->copy;
$amt->bfloor();