From b0c1a5c749dd135705f56a04696f15b91c9e6b29 Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 19 Dec 2009 23:28:13 +0000 Subject: [PATCH] fix credit application, at least in vedeya's case on HEAD, RT#6819, fallout from tax credits, RT#4729 --- FS/FS/cust_bill_ApplicationCommon.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/FS/FS/cust_bill_ApplicationCommon.pm b/FS/FS/cust_bill_ApplicationCommon.pm index 30243e210..cb21732ab 100644 --- a/FS/FS/cust_bill_ApplicationCommon.pm +++ b/FS/FS/cust_bill_ApplicationCommon.pm @@ -154,7 +154,10 @@ sub calculate_applications { $self->cust_bill->invnum. ": ". join(', ', @open). "\n" if $DEBUG; my $total = 0; - $total += $_->owed_setup + $_->owed_recur foreach @open; + foreach (@open) { + $total += $_->owed_setup if $_->setup; + $total += $_->owed_recur if $_->recur; + } $total = sprintf('%.2f', $total); if ( $self->amount > $total ) { -- 2.11.0