From fbe12cde0f7e97427693cb0607a5e28d89acf3f7 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Mon, 4 Feb 2013 00:48:19 -0800 Subject: better invoice summary, RT#20601 --- conf/invoice_htmlsummary | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'conf/invoice_htmlsummary') 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) %>
-- cgit v1.2.1