From 4125a128eaa40c751c89a69c2f9888463a78c6f3 Mon Sep 17 00:00:00 2001 From: jeff Date: Fri, 9 Apr 2010 08:09:48 +0000 Subject: modify total items for balance below line and current charges above line with configurable description. also bug fixes that might close 7896 --- conf/invoice_html | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'conf/invoice_html') diff --git a/conf/invoice_html b/conf/invoice_html index df4674b6a..fe2a9a976 100644 --- a/conf/invoice_html +++ b/conf/invoice_html @@ -86,8 +86,10 @@ <%= $summary %> <%= + my $notfirst = 0; foreach my $section ( grep { !$summary || $_->{description} ne $finance_section } @sections ) { if ($section->{'pretotal'} && !$summary) { + $OUT .= '' if $notfirst; $OUT .= '
'. '

'. @@ -95,9 +97,10 @@ ''. uc(substr($section->{'pretotal'},1)). ''. '

'. - '

'; + ''; } unless ($section->{'summarized'}) { + $OUT .= '' if ( $notfirst || $section->{'pretotal'} && !$summary ); $OUT .= ''; } - ''; + $OUT .= ''; my $lastref = 0; foreach my $line ( @@ -176,7 +179,7 @@ } - if (scalar(@sections) > 1) { + if ($section->{'description'} || $multisection) { my $style = 'border-top: 3px solid #000000;'. 'border-bottom: 3px solid #000000;'; $OUT .= @@ -203,6 +206,8 @@ $OUT .= ''; } + $notfirst++; + } my $style = 'border-top: 3px solid #000000;'; @@ -211,7 +216,7 @@ foreach my $line ( @total_items ) { $style .= 'border-bottom: 3px solid #000000;' - if ++$linenum == scalar(@total_items); + if ++$linenum == scalar(@total_items) - ( $balance_due_below_line ? 1 : 0 ); $OUT .= ''; -- cgit v1.2.1
'; if ($section->{'description'}) { $OUT .= @@ -128,7 +131,7 @@ ). 'Amount