X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=conf%2Finvoice_html;h=df4674b6a25f0644e22ce449bb7deed8b2a5cb1e;hb=8d626f5da7303a4f860544579a895703bd00dc3a;hp=58d49563333f16fcfa4b81ea2a390326355e11a1;hpb=7ae002203388977c178ffbf0e2ceaea17ab46bce;p=freeside.git diff --git a/conf/invoice_html b/conf/invoice_html index 58d495633..df4674b6a 100644 --- a/conf/invoice_html +++ b/conf/invoice_html @@ -3,6 +3,8 @@ .invoice_header { font-size: 10pt } .invoice_headerright TH { border-top: 2px solid #000000; border-bottom: 2px solid #000000 } .invoice_headerright TD { font-size: 10pt; empty-cells: show } +.invoice_summary TH { border-bottom: 2px solid #000000 } +.invoice_summary TD { font-size: 10pt; empty-cells: show } .invoice_longtable table { cellspacing: none } .invoice_longtable TH { border-top: 2px solid #000000; border-bottom: 1px solid #000000; padding-left: none; padding-right: none; font-size: 10pt } .invoice_desc TD { border-top: 2px solid #000000; font-weight: bold; font-size: 10pt } @@ -11,11 +13,11 @@ .invoice_totaldesc TD { font-size: 10pt; empty-cells: show } -
+'; } - } - if (scalar(@sections) > 1) { - my $style = 'border-top: 3px solid #000000;'. - 'border-bottom: 3px solid #000000;'; - $OUT .= - ''. - qq(). - qq('. - qq('. - '' - ; - } - + if (scalar(@sections) > 1) { + my $style = 'border-top: 3px solid #000000;'. + 'border-bottom: 3px solid #000000;'; + $OUT .= + ''. + qq(); + if ($section->{total_generator}) { + $OUT .= &{$section->{total_generator}}($section); + } else { + $OUT .= qq('. + qq('; + } + $OUT .= ''; + } + } if ($section->{'posttotal'}) { $OUT .= ''. - qq(). - qq('. - qq('. - '' - ; + ''; + if ($section->{total_line_generator}) { + $OUT .= &{$section->{total_line_generator}}($line); + } else { + $OUT .= qq(). + qq('. + qq('; + } + $OUT .= ''; $style=''; @@ -217,9 +235,15 @@
- + '; } - $OUT .= '
">"> <%= $returnaddress %> @@ -40,7 +42,7 @@ @@ -71,8 +73,6 @@ ' ', ' ', ). - ($agent_custid ? "ID: $agent_custid
" : ''). - ($ship_fax ? "Fax: $ship_fax
" : ''). '' ) : '' @@ -84,10 +84,10 @@
  - INVOICE + <%= $notice_name ? substr($notice_name, 0, 1) : 'I' %><%= $notice_name ? uc(substr($notice_name, 1)) : 'NVOICE' %>  
- + <%= $summary %> <%= - foreach my $section ( @sections ) { - if ($section->{'pretotal'}) { + foreach my $section ( grep { !$summary || $_->{description} ne $finance_section } @sections ) { + if ($section->{'pretotal'} && !$summary) { $OUT .= '
'. '

'. @@ -97,88 +97,103 @@ '

'. '

'; } - $OUT .= '
'; - if ($section->{'description'}) { - $OUT .= - '

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

'; - }else{ - $OUT .= - '

CHARGES'. - '

'; - } - $OUT .= '

'; + unless ($section->{'summarized'}) { + $OUT .= '
'; + if ($section->{'description'}) { + $OUT .= + '

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

'; + }else{ + $OUT .= + '

CHARGES'. + '

'; + } + $OUT .= '

'; - $OUT .= - ''. - ''. - ''. - ''. - ( $unitprices - ? ''. - '' - : '' - ). - ''. - ''; - - my $lastref = 0; - foreach my $line ( - grep { ( scalar(@sections) > 1 - ? $section->{'description'} eq $_->{'section'}->{'description'} - : 1 - ) } - @detail_items ) - { $OUT .= - ''. - ''. - ''. - ( $unitprices - ? ''. - '' - : '' - ). - - ''. - '' - ; - $lastref = $line->{'ref'}; - if ( @{$line->{'ext_description'} } ) { - $OUT .= '' : '>'; - $OUT .= '
RefDescriptionUnit PriceQuantityAmount
'. - ( $line->{'ref'} ne $lastref ? $line->{'ref'} : '' ). ''. $line->{'description'}. ''. $line->{'unit_amount'}. ''. $line->{'quantity'}. ''. $line->{'amount'}. '
'; - foreach my $ext_desc ( @{$line->{'ext_description'} } ) { - $OUT .= - ''. - ''. - '' + '
  '. $ext_desc. '
'. + ''; + + if ($section->{header_generator}) { + $OUT .= &{$section->{header_generator}}(); + } else { + $OUT .= ''. + ''. + ( $unitprices + ? ''. + '' + : '' + ). + ''; + } + ''; + + my $lastref = 0; + foreach my $line ( + grep { ( scalar(@sections) > 1 + ? $section->{'description'} eq $_->{'section'}->{'description'} + : 1 + ) } + @detail_items ) + { + $OUT .= + ''. + ''. + ''. + ( $unitprices + ? ''. + '' + : '' + ). + + ''; + } + $OUT .= ''; + $lastref = $line->{'ref'}; + if ( @{$line->{'ext_description'} } ) { + $OUT .= '' : '>'; + $OUT .= '
RefDescriptionUnit PriceQuantityAmount
'. + ( $line->{'ref'} ne $lastref ? $line->{'ref'} : '' ). ''. $line->{'description'}. ''. $line->{'unit_amount'}. ''. $line->{'quantity'}. ''. $line->{'amount'}. '
'; + foreach my $ext_desc ( @{$line->{'ext_description'} } ) { + $OUT .= + ''. + ''. + '' + } + $OUT .= '
/i ? '' : 'colspan=99' ). '>'. + '  '. $ext_desc. + '
 ' : '>' ). - $section->{'description'}. ' Total ). - $section->{'subtotal'}. '
 ' : '>' ). + $section->{'description'}. ' Total ). + $section->{'subtotal'}. '
'; $OUT .= @@ -199,15 +214,18 @@ if ++$linenum == scalar(@total_items); $OUT .= - '
 ' : '>' ). - $line->{'total_item'}. '). - $line->{'total_amount'}. '
 ' : '>' ). + $line->{'total_item'}. '). + $line->{'total_amount'}. '


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

<%= $footer %> +

><%= $footer %>