'.
@@ -125,14 +176,13 @@
$OUT .= $header;
$columncount = scalar(my @array = split /<\/th>Description | '.
- ( $unitprices
- ? 'Unit Price | '.
- 'Quantity | '
- : ''
- ).
- 'Amount | ';
+ $OUT .= ' | '.
+ '' . emt('Description') . ' | '.
+ ( $unitprices
+ ? '' . emt('Unit Price') . ' | '.
+ '' . emt('Quantity') . ' | '
+ : '' ).
+ '' . emt('Amount') . ' | ';
}
$OUT .= '';
@@ -144,26 +194,28 @@
) }
@detail_items )
{
- $OUT .=
- '{description_generator}}($line);
} else {
- $OUT .= ( ($line->{'ref'} && $line->{'ref'} ne $lastref) ? '' : '_more' ).
- '">'.
- ''.
- ( $line->{'ref'} ne $lastref ? $line->{'ref'} : '' ). ' | '.
- ''. $line->{'description'}. ' | '.
- ( $unitprices
- ? ''. $line->{'unit_amount'}. ' | '.
- ''. $line->{'quantity'}. ' | '
- : ''
- ).
-
- ''. $line->{'amount'}. ' | ';
+ my $class = 'invoice_desc_more';
+ if ( ($line->{'ref'} || 0) ne $lastref ) {
+ # then it's a new package (not a continuation)
+ $class = 'invoice_desc';
+ }
+ $OUT .= '
+ ';
+ $OUT .= ' |
+ '. $line->{'description'}. ' | ';
+ if ( $unitprices ) {
+ $OUT .=
+ ''. $line->{'unit_amount'}. ' | '.
+ ''. $line->{'quantity'}. ' | ';
+ }
+ $OUT .= ''. $line->{'amount'}. ' | ';
}
$OUT .= '
';
- $lastref = $line->{'ref'};
+ $lastref = $line->{'ref'} || 0;
if ( @{$line->{'ext_description'} } ) {
unless ( $section->{description_generator} ) {
$OUT .= ' | {'description'} || $multisection) {
+ if ($section->{'description'} || $multisection and !$section->{no_subtotal}) {
my $style = 'border-top: 3px solid #000000;'.
'border-bottom: 3px solid #000000;';
$OUT .=
@@ -199,7 +251,7 @@
} else {
$OUT .= qq( | ' : '>' ).
- $section->{'description'}. ' Total | '.
+ $section->{'description'}. ' ' . emt('Total') . ''.
qq().
$section->{'subtotal'}. ' | ';
}
@@ -260,4 +312,4 @@
><%= $footer %>
-