X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=conf%2Finvoice_htmlsummary;h=47bdbfb7cac1d5d6ce2dcf6e5c3bcb2dce3e37db;hp=b158478e1441a2d5ee5d7b8eedca3143f6cea31f;hb=refs%2Fheads%2F37802;hpb=947c1f964f1304242f8a6ffabacccf040f1d505e diff --git a/conf/invoice_htmlsummary b/conf/invoice_htmlsummary index b158478e1..47bdbfb7c 100644 --- a/conf/invoice_htmlsummary +++ b/conf/invoice_htmlsummary @@ -32,9 +32,8 @@
<%= - my ($last) = grep { $_->{tax_section} || !$_->{summarized} and !($finance_section && $_->{'description'} eq $finance_section)} reverse @sections; - - foreach my $section ( grep { $_->{tax_section} || !$_->{summarized} and !($finance_section && $_->{'description'} eq $finance_section)} @sections ) { + my $last = $summary_subtotals[-1]; + foreach my $section (@summary_subtotals) { $OUT .= ''. ($section->{'description'} ? $section->{'description'} : 'Charges' ). ''; my $celltype = ($last == $section) ? 'th' : 'td'; $OUT .= qq(<$celltype align="right">). $section->{'subtotal'}. ""; @@ -63,9 +62,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) %>