projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4b2097a
)
get section subtotalling right
author
jeff
<jeff>
Thu, 24 Jun 2010 08:18:21 +0000
(08:18 +0000)
committer
jeff
<jeff>
Thu, 24 Jun 2010 08:18:21 +0000
(08:18 +0000)
FS/FS/cust_bill.pm
patch
|
blob
|
history
diff --git
a/FS/FS/cust_bill.pm
b/FS/FS/cust_bill.pm
index
8c81d0c
..
cefbfac
100644
(file)
--- 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) {
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} );
$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;
sprintf('%.2f', $section->{'subtotal'})
if $multisection;
- #
begin
some normalization
+ #
continue
some normalization
$section->{'amount'} = $section->{'subtotal'}
if $multisection;
$section->{'amount'} = $section->{'subtotal'}
if $multisection;