X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=conf%2Finvoice_htmlsummary;h=a6ea1e9e31b94e95b77a56cce912cd051e3e4512;hb=55753aaf5b1189c06a99fe5e0791fc33316df06f;hp=a06c8ffea841c164d966995559381078be5f0fc3;hpb=fb4ab1073f0d15d660c6cdc4e07afebf68ef3924;p=freeside.git diff --git a/conf/invoice_htmlsummary b/conf/invoice_htmlsummary index a06c8ffea..a6ea1e9e3 100644 --- a/conf/invoice_htmlsummary +++ b/conf/invoice_htmlsummary @@ -34,7 +34,16 @@ <%= 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) and $_->{'description'} !~ /^\d+ $/ } @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) %>