X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=conf%2Finvoice_html;h=fe2a9a9763c27889688bd6cebb7ee8bdd7f76cb4;hp=026bc8b6b6fdea420bbfc630d2c664887eb23ccc;hb=ad7f49821d40ffd099a45acc32ba91e0e211aede;hpb=4c951501b14bf459fa039db9ef093cfea9e37db3 diff --git a/conf/invoice_html b/conf/invoice_html index 026bc8b6b..fe2a9a976 100644 --- a/conf/invoice_html +++ b/conf/invoice_html @@ -42,7 +42,7 @@   - INVOICE + <%= $notice_name ? substr($notice_name, 0, 1) : 'I' %><%= $notice_name ? uc(substr($notice_name, 1)) : 'NVOICE' %>   @@ -86,8 +86,10 @@ <%= $summary %> <%= + my $notfirst = 0; foreach my $section ( grep { !$summary || $_->{description} ne $finance_section } @sections ) { if ($section->{'pretotal'} && !$summary) { + $OUT .= '' if $notfirst; $OUT .= '
'. '

'. @@ -95,9 +97,10 @@ ''. uc(substr($section->{'pretotal'},1)). ''. '

'. - '

'; + ''; } unless ($section->{'summarized'}) { + $OUT .= '' if ( $notfirst || $section->{'pretotal'} && !$summary ); $OUT .= '
'; if ($section->{'description'}) { $OUT .= @@ -114,16 +117,21 @@ $OUT .= ''. - ''. - ''. - ''. - ( $unitprices - ? ''. - '' - : '' - ). - ''. - ''; + ''; + + if ($section->{header_generator}) { + $OUT .= &{$section->{header_generator}}(); + } else { + $OUT .= ''. + ''. + ( $unitprices + ? ''. + '' + : '' + ). + ''; + } + $OUT .= ''; my $lastref = 0; foreach my $line ( @@ -134,21 +142,24 @@ @detail_items ) { $OUT .= - ''. - ''. - ''. - ( $unitprices - ? ''. - '' - : '' - ). - - ''. - '' - ; + ''. + ''. + ''. + ( $unitprices + ? ''. + '' + : '' + ). + + ''; + } + $OUT .= ''; $lastref = $line->{'ref'}; if ( @{$line->{'ext_description'} } ) { $OUT .= ' 1) { + if ($section->{'description'} || $multisection) { my $style = 'border-top: 3px solid #000000;'. 'border-bottom: 3px solid #000000;'; $OUT .= ''. - qq(). - qq('. - qq('. - '' - ; + qq(); + if ($section->{total_generator}) { + $OUT .= &{$section->{total_generator}}($section); + } else { + $OUT .= qq('. + qq('; + } + $OUT .= ''; } } if ($section->{'posttotal'}) { @@ -192,6 +206,8 @@ $OUT .= ''; } + $notfirst++; + } my $style = 'border-top: 3px solid #000000;'; @@ -200,18 +216,21 @@ foreach my $line ( @total_items ) { $style .= 'border-bottom: 3px solid #000000;' - if ++$linenum == scalar(@total_items); + if ++$linenum == scalar(@total_items) - ( $balance_due_below_line ? 1 : 0 ); $OUT .= - ''. - qq(). - qq('. - qq('. - '' - ; + ''; + if ($section->{total_line_generator}) { + $OUT .= &{$section->{total_line_generator}}($line); + } else { + $OUT .= qq(). + qq('. + qq('; + } + $OUT .= ''; $style=''; @@ -221,9 +240,15 @@
RefDescriptionUnit PriceQuantityAmount
RefDescriptionUnit PriceQuantityAmount
'. - ( $line->{'ref'} ne $lastref ? $line->{'ref'} : '' ). ''. $line->{'description'}. ''. $line->{'unit_amount'}. ''. $line->{'quantity'}. ''. $line->{'amount'}. '
'. + ( $line->{'ref'} ne $lastref ? $line->{'ref'} : '' ). ''. $line->{'description'}. ''. $line->{'unit_amount'}. ''. $line->{'quantity'}. ''. $line->{'amount'}. '
 ' : '>' ). - $section->{'description'}. ' Total ). - $section->{'subtotal'}. '
 ' : '>' ). + $section->{'description'}. ' Total ). + $section->{'subtotal'}. '
 ' : '>' ). - $line->{'total_item'}. '). - $line->{'total_amount'}. '
 ' : '>' ). + $line->{'total_item'}. '). + $line->{'total_amount'}. '


-<%= length($summary) ? '' : $notes %> +<%= length($summary) + ? '' + : ( $smallernotes + ? ''.$notes.'' + : $notes + ) +%>
-

<%= $footer %> +

><%= $footer %>