From 75a1145585826d7c88eee5fd8d536d62176d1e6d Mon Sep 17 00:00:00 2001 From: einhverfr Date: Fri, 21 Nov 2008 22:02:08 +0000 Subject: 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 --- scripts/payment.pl | 4 ++-- 1 file 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(); -- cgit v1.2.3