"> <%= $returnaddress %>
Invoice date
<%= $date %>
Invoice #
<%= $invnum %>
Customer #
<%= $custnum %>
  INVOICE  
<%= $payname %>
<%= join('
', grep length($_), $company, $address1, $address2, "$city, $state  $zip", $country, ) %>
Terms: <%= $terms %>
<%= $po_line %>
<%= foreach my $section ( @sections ) { $OUT .= '
'; if ($section->{'description'}) { $OUT .= '

'. uc(substr($section->{'description'},0,1)). ''. uc(substr($section->{'description'},1)). ''. '

'; }else{ $OUT .= '

CHARGES'. '

'; } $OUT .= '

'; $OUT .= ''. ''. ''. ''. ''. ''; foreach my $line ( grep { ( scalar(@sections) > 1 ? $section->{'description'} eq $_->{'section'}->{'description'} : 1 ) } @detail_items ) { $OUT .= ''. ''. ''. ''. '' ; foreach my $ext_desc ( @{$line->{'ext_description'} } ) { $OUT .= ''. ''. ''. ''. '' } } if (scalar(@sections) > 1) { my $style = 'border-top: 3px solid #000000;'. 'border-bottom: 3px solid #000000;'; $OUT .= ''. qq(). qq('. qq('. '' ; } } 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('. qq('. '' ; $style=''; } %>
RefDescriptionAmount
'. $line->{'ref'}. ''. $line->{'description'}. ''. $line->{'amount'}. '
- '. $ext_desc. '
 ). $section->{'description'}. ' Total ). $section->{'subtotal'}. '
 ). $line->{'total_item'}. '). $line->{'total_amount'}. '


<%= $notes %>

<%= $footer %>