- '<tr class="invoice_desc'.
- ( ($line->{'ref'} && $line->{'ref'} ne $lastref) ? '' : '_more' ).
- '">'.
- '<td align="center">'.
- ( $line->{'ref'} ne $lastref ? $line->{'ref'} : '' ). '</td>'.
- '<td align="left">'. $line->{'description'}. '</td>'.
- ( $unitprices
- ? '<td align="left">'. $line->{'unit_amount'}. '</td>'.
- '<td align="left">'. $line->{'quantity'}. '</td>'
- : ''
- ).
-
- '<td align="right">'. $line->{'amount'}. '</td>'.
- '</tr>'
- ;
- $lastref = $line->{'ref'};
- if ( @{$line->{'ext_description'} } ) {
- $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">'.
- '<td align="left"> '. $ext_desc. '</td>'.
- '</tr>'
- }
- $OUT .= '</table></td><td></td></tr>';
+ '<table class="invoice_longtable" CELLSPACING=0 WIDTH="100%">'.
+ '<tr>';
+
+ if ($section->{header_generator}) {
+ my $header = &{$section->{header_generator}}();
+ $OUT .= $header;
+ $columncount = scalar(my @array = split /<\/th><th/i, $header);
+ } else {
+ $OUT .= '<th align="center">' . emt('Ref') . '</th>'.
+ '<th align="left">' . emt('Description') . '</th>'.
+ ( $unitprices
+ ? '<th align="left">' . emt('Unit Price') . '</th>'.
+ '<th align="left">' . emt('Quantity') . '</th>'
+ : '' ).
+ '<th align="right">' . emt('Amount') . '</th>';