diff options
author | jeff <jeff> | 2010-06-24 08:18:21 +0000 |
---|---|---|
committer | jeff <jeff> | 2010-06-24 08:18:21 +0000 |
commit | 368a18b893fef80720277b12342ca6d178a9fd31 (patch) | |
tree | a71e18e74a4c2cab9c75efbf2a6cdf4be5a53c13 /FS | |
parent | 4b2097a9bddecbfea9a5caa62b5c3607f335f288 (diff) |
get section subtotalling right
Diffstat (limited to 'FS')
-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 8c81d0cf4..cefbfac81 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -2621,6 +2621,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} ); @@ -2629,7 +2635,7 @@ sub print_generic { sprintf('%.2f', $section->{'subtotal'}) if $multisection; - # begin some normalization + # continue some normalization $section->{'amount'} = $section->{'subtotal'} if $multisection; |