diff options
Diffstat (limited to 'conf/invoice_html')
-rw-r--r-- | conf/invoice_html | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/conf/invoice_html b/conf/invoice_html index 2073d7ff4..fe2a9a976 100644 --- a/conf/invoice_html +++ b/conf/invoice_html @@ -87,7 +87,6 @@ <%= $summary %> <%= my $notfirst = 0; - my $columncount = $unitprices ? 5 : 3; foreach my $section ( grep { !$summary || $_->{description} ne $finance_section } @sections ) { if ($section->{'pretotal'} && !$summary) { $OUT .= '</table>' if $notfirst; @@ -121,9 +120,7 @@ '<tr>'; if ($section->{header_generator}) { - my $header = &{$section->{header_generator}}(); - $OUT .= $header; - $columncount = scalar(my @array = split /<\/th><th/i, $header); + $OUT .= &{$section->{header_generator}}(); } else { $OUT .= '<th align="center">Ref</th>'. '<th align="left">Description</th>'. @@ -165,25 +162,19 @@ $OUT .= '</tr>'; $lastref = $line->{'ref'}; if ( @{$line->{'ext_description'} } ) { - unless ( $section->{description_generator} ) { - $OUT .= '<tr class="invoice_extdesc"><td></td><td'; - $OUT .= $unitprices ? ' colspan=3' : ''; - $OUT .= '><table width="100%">'; - } + $OUT .= '<tr class="invoice_extdesc"><td></td><td'; + $OUT .= $unitprices ? ' colspan=3>' : '>'; + $OUT .= '<table width="100%">'; foreach my $ext_desc ( @{$line->{'ext_description'} } ) { $OUT .= '<tr class="invoice_extdesc">'. - ( $section->{'description_generator'} ? '<td></td>' : '' ). '<td align="left" '. ( $ext_desc =~ /<\/?TD>/i ? '' : 'colspan=99' ). '>'. ' '. $ext_desc. '</td>'. '</tr>' } - unless ( $section->{description_generator} ) { - $OUT .= '</table></td><td></td>'; - } - $OUT .= '</tr>'; + $OUT .= '</table></td><td></td></tr>'; } } @@ -207,7 +198,7 @@ } } if ($section->{'posttotal'}) { - $OUT .= '<tr><td align="right" colspan='. $columncount. '>'; + $OUT .= '<tr><td align="right" colspan=5>'; $OUT .= '<p><font size="+1">'. $section->{'posttotal'}. '</font>'. @@ -233,8 +224,8 @@ $OUT .= &{$section->{total_line_generator}}($line); } else { $OUT .= qq(<td style="$style"> </td>). - qq(<td align="left" style="$style" colspan="). - ( $columncount - 2 ). '">'. + qq(<td align="left" style="$style"). + ( $unitprices ? ' colspan=3>' : '>' ). $line->{'total_item'}. '</td>'. qq(<td align="right" style="$style">). $line->{'total_amount'}. '</td>'; |