<%=
foreach my $section ( @sections ) {
if ($section->{'pretotal'}) {
$OUT .=
''.
' '.
uc(substr($section->{'pretotal'},0,1)).
''. uc(substr($section->{'pretotal'},1)).
''.
' '.
' | ';
}
$OUT .= '';
if ($section->{'description'}) {
$OUT .=
' '. uc(substr($section->{'description'},0,1)).
''. uc(substr($section->{'description'},1)).
''.
' ';
}else{
$OUT .=
' CHARGES'.
' ';
}
$OUT .= ' | ';
$OUT .=
''.
''.
'Ref | '.
'Description | '.
'Amount | '.
' ';
foreach my $line (
grep { ( scalar(@sections) > 1
? $section->{'description'} eq $_->{'section'}->{'description'}
: 1
) }
@detail_items )
{
$OUT .=
''.
''. $line->{'ref'}. ' | '.
''. $line->{'description'}. ' | '.
''. $line->{'amount'}. ' | '.
' '
;
if ( @{$line->{'ext_description'} } ) {
$OUT .= ' | ';
foreach my $ext_desc ( @{$line->{'ext_description'} } ) {
$OUT .=
''.
'- '. $ext_desc. ' | '.
' '
}
$OUT .= ' | | ';
}
}
if (scalar(@sections) > 1) {
my $style = 'border-top: 3px solid #000000;'.
'border-bottom: 3px solid #000000;';
$OUT .=
''.
qq( | ).
qq().
$section->{'description'}. ' Total | '.
qq().
$section->{'subtotal'}. ' | '.
' '
;
}
if ($section->{'posttotal'}) {
$OUT .= '';
$OUT .=
' '. $section->{'posttotal'}.
''.
' ';
$OUT .= ' | ';
}
}
my $style = 'border-top: 3px solid #000000;';
my $linenum = 0;
foreach my $line ( @total_items ) {
$style .= 'border-bottom: 3px solid #000000;'
if ++$linenum == scalar(@total_items);
$OUT .=
''.
qq( | ).
qq().
$line->{'total_item'}. ' | '.
qq().
$line->{'total_amount'}. ' | '.
' '
;
$style='';
}
%>
<%= $notes %>
<%= $footer %>
|