- foreach my $ext_desc ( @{$line->{'ext_description'} } ) {
- $OUT .=
- '<tr class="invoice_extdesc">'.
- '<td></td>'.
- '<td align="left">- '. $ext_desc. '</td>'.
- '<td></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>/i ? '' : 'colspan=99' ). '>'.
+ ' '. $ext_desc.
+ '</td>'.
+ '</tr>'
+ }
+ $OUT .= '</table></td><td></td></tr>';