X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=conf%2Finvoice_html;h=2073d7ff40b8205401f24f70db832c0c9d0266a5;hp=df4674b6a25f0644e22ce449bb7deed8b2a5cb1e;hb=74e058c8a010ef6feb539248a550d0bb169c1e94;hpb=40a7b3dc653e099f7bd0bd762b649b04c4432db2 diff --git a/conf/invoice_html b/conf/invoice_html index df4674b6a..2073d7ff4 100644 --- a/conf/invoice_html +++ b/conf/invoice_html @@ -86,8 +86,11 @@ <%= $summary %> <%= + my $notfirst = 0; + my $columncount = $unitprices ? 5 : 3; foreach my $section ( grep { !$summary || $_->{description} ne $finance_section } @sections ) { if ($section->{'pretotal'} && !$summary) { + $OUT .= '' if $notfirst; $OUT .= '
'. '

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

'. - '

'; + ''; } unless ($section->{'summarized'}) { + $OUT .= '' if ( $notfirst || $section->{'pretotal'} && !$summary ); $OUT .= ''; if ($section->{header_generator}) { - $OUT .= &{$section->{header_generator}}(); + my $header = &{$section->{header_generator}}(); + $OUT .= $header; + $columncount = scalar(my @array = split /<\/th>'. @@ -128,7 +134,7 @@ ). ''; } - ''; + $OUT .= ''; my $lastref = 0; foreach my $line ( @@ -159,24 +165,30 @@ $OUT .= ''; $lastref = $line->{'ref'}; if ( @{$line->{'ext_description'} } ) { - $OUT .= '' : '>'; - $OUT .= '
'; if ($section->{'description'}) { $OUT .= @@ -117,7 +121,9 @@ '
DescriptionAmount
'; + unless ( $section->{description_generator} ) { + $OUT .= '{'ext_description'} } ) { $OUT .= ''. + ( $section->{'description_generator'} ? '' : '' ). ''. '' } - $OUT .= '
/i ? '' : 'colspan=99' ). '>'. '  '. $ext_desc. '
'; + unless ( $section->{description_generator} ) { + $OUT .= ''; + } + $OUT .= ''; } } - if (scalar(@sections) > 1) { + if ($section->{'description'} || $multisection) { my $style = 'border-top: 3px solid #000000;'. 'border-bottom: 3px solid #000000;'; $OUT .= @@ -195,7 +207,7 @@ } } if ($section->{'posttotal'}) { - $OUT .= ''; + $OUT .= ''; $OUT .= '

'. $section->{'posttotal'}. ''. @@ -203,6 +215,8 @@ $OUT .= ''; } + $notfirst++; + } my $style = 'border-top: 3px solid #000000;'; @@ -211,7 +225,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 .= ''; @@ -219,8 +233,8 @@ $OUT .= &{$section->{total_line_generator}}($line); } else { $OUT .= qq( ). - qq(' : '>' ). + qq('. $line->{'total_item'}. ''. qq(). $line->{'total_amount'}. '';