X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=conf%2Finvoice_htmlsummary;h=a6ea1e9e31b94e95b77a56cce912cd051e3e4512;hb=55753aaf5b1189c06a99fe5e0791fc33316df06f;hp=b158478e1441a2d5ee5d7b8eedca3143f6cea31f;hpb=0fb307c305e4bc2c9c27dc25a3308beae3a4d33c;p=freeside.git diff --git a/conf/invoice_htmlsummary b/conf/invoice_htmlsummary index b158478e1..a6ea1e9e3 100644 --- a/conf/invoice_htmlsummary +++ b/conf/invoice_htmlsummary @@ -32,9 +32,18 @@
<%= - my ($last) = grep { $_->{tax_section} || !$_->{summarized} and !($finance_section && $_->{'description'} eq $finance_section)} reverse @sections; + my ($last) = grep { $_->{tax_section} || !$_->{summarized} and !($finance_section && $_->{'description'} eq $finance_section) and $_->{'description'} !~ /^\d+ $/ } reverse @sections; - foreach my $section ( grep { $_->{tax_section} || !$_->{summarized} and !($finance_section && $_->{'description'} eq $finance_section)} @sections ) { + #false laziness w/invoice_latexsummary + foreach my $section ( + grep { + $_->{tax_section} || !$_->{summarized} + and ! $_->{adjust_section} + and !($finance_section && $_->{'description'} eq $finance_section) + and $_->{'description'} !~ /^\d+ $/ + } + @sections + ) { $OUT .= ''. ($section->{'description'} ? $section->{'description'} : 'Charges' ). ''; my $celltype = ($last == $section) ? 'th' : 'td'; $OUT .= qq(<$celltype align="right">). $section->{'subtotal'}. ""; @@ -63,9 +72,19 @@ New Charges <%= $dollar.$current_less_finance %> + + <%= + + #false laziness w/invoice_latexsummary and above + foreach my $section ( grep $_->{adjust_section}, @sections) { + $OUT .= ''. ($section->{'description'} ? $section->{'description'} : 'Charges' ). ''; + $OUT .= qq(). $section->{'subtotal'}. ""; + } + %> + Total Amount Due - <%= $dollar.sprintf('%.2f', $true_previous_balance + $current_charges - $balance_adjustments) %> + <%= $dollar.sprintf('%.2f', $balance) %>