diff options
author | jeff <jeff> | 2010-06-24 08:17:55 +0000 |
---|---|---|
committer | jeff <jeff> | 2010-06-24 08:17:55 +0000 |
commit | 2577ec64e83b09acf9058205fc02c2323aea30dc (patch) | |
tree | a1177d79052ade7427e79bdd2f0f95a162bed9c9 | |
parent | 9f0a2d6b88789a9eb940ff2a1d6b121ccb8083bc (diff) |
get section subtotalling right
-rw-r--r-- | FS/FS/cust_bill.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index 46c591ecf..13937c651 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -2575,6 +2575,12 @@ sub print_generic { foreach my $section (@sections, @$late_sections) { + # begin some normalization + $section->{'subtotal'} = $section->{'amount'} + if $multisection + && !exists($section->{subtotal}) + && exists($section->{amount}); + $invoice_data{finance_amount} = sprintf('%.2f', $section->{'subtotal'} ) if ( $invoice_data{finance_section} && $section->{'description'} eq $invoice_data{finance_section} ); @@ -2583,7 +2589,7 @@ sub print_generic { sprintf('%.2f', $section->{'subtotal'}) if $multisection; - # begin some normalization + # continue some normalization $section->{'amount'} = $section->{'subtotal'} if $multisection; |