X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=conf%2Finvoice_html;h=fc553d5d53e81253df6621053398744d2ccd5c66;hp=32e5362f9d3385c81a6989191cb3a2e49e3254e7;hb=bc03d12fffd22153b5035bc021450387bacc17b8;hpb=673b9a458d9138523026963df6fa3b4683e09bae diff --git a/conf/invoice_html b/conf/invoice_html index 32e5362f9..fc553d5d5 100644 --- a/conf/invoice_html +++ b/conf/invoice_html @@ -3,37 +3,46 @@ .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 } +.invoice_desc_more TD { font-weight: bold; font-size: 10pt } .invoice_extdesc TD { font-size: 8pt } .invoice_totaldesc TD { font-size: 10pt; empty-cells: show } -
+'; + } + $OUT .= ''; + } + } + + + if ($section->{'description'} || $multisection) { + 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 .= ''. - ''. - ''. - ''. - '' + '

'. $section->{'posttotal'}. + ''. + '

'; + $OUT .= ''; } + + $notfirst++; + } my $style = 'border-top: 3px solid #000000;'; @@ -96,17 +233,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=''; @@ -116,16 +257,15 @@
- +
">"> <%= $returnaddress %> - - + + - @@ -54,40 +63,168 @@ ) %> + <%= $ship_enable ? ('' + ) + : '' + %>
+ Invoice date
<%= $date %>
- Invoice number
+
+ Invoice #
<%= $invnum %>
+ + Customer #
+ <%= $custnum %> +
  - INVOICE + + <%= $notice_name ? substr($notice_name, 0, 1) : 'I' %><%= $notice_name ? uc(substr($notice_name, 1)) : 'NVOICE' %>  
'. + join('
',grep length($_), 'Service Address', + $ship_company, + $ship_address1, + $ship_address2, + "$ship_city, $ship_state $ship_zip", + $ship_country, + ' ', + ' ', + ). + '
+ <%= + if($barcode_cid) { + $OUT .= qq!
!; + } + elsif($barcode_img) { + $OUT .= qq!
!; + } + %> Terms: <%= $terms %>
<%= $po_line %>
+ <%= $summary %> + <%= + my $notfirst = 0; + my $columncount = $unitprices ? 5 : 3; + foreach my $section ( grep { !$summary || $_->{description} ne $finance_section } @sections ) { + if ($section->{'pretotal'} && !$summary) { + $OUT .= '
' if $notfirst; + $OUT .= + ''; + } + unless ($section->{'summarized'}) { + $OUT .= '
'. + '

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

'. + '

' if ( $notfirst || $section->{'pretotal'} && !$summary ); + $OUT .= '
'; + if ($section->{'description'}) { + $OUT .= + '

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

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

CHARGES'. + '

'; + } + $OUT .= '

'; -

CHARGES -

- - - - - - - <%= + $OUT .= + '
RefDescriptionAmount
'. + ''; - foreach my $line ( @detail_items ) { - $OUT .= - ''. - ''. - ''. - ''. - '' - ; - foreach my $ext_desc ( @{$line->{'ext_description'} } ) { + if ($section->{header_generator}) { + my $header = &{$section->{header_generator}}(); + $OUT .= $header; + $columncount = scalar(my @array = split /<\/th>'. + ( $unitprices + ? ''. + '' + : '' + ). + ''; + } + $OUT .= ''; + + 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'} } ) { + unless ( $section->{description_generator} ) { + $OUT .= '{'ext_description'} } ) { + $OUT .= + ''. + ( $section->{'description_generator'} ? '' : '' ). + ''. + '' + } + unless ( $section->{description_generator} ) { + $OUT .= '
'. $line->{'ref'}. ''. $line->{'description'}. ''. $line->{'amount'}. '
DescriptionUnit PriceQuantityAmount
'. + ( $line->{'ref'} ne $lastref ? $line->{'ref'} : '' ). ''. $line->{'description'}. ''. $line->{'unit_amount'}. ''. $line->{'quantity'}. ''. $line->{'amount'}. '
/i ? '' : 'colspan=99' ). '>'. + '  '. $ext_desc. + '

 ' : '>' ). + $section->{'description'}. ' Total ). + $section->{'subtotal'}. '
'; $OUT .= - '
- '. $ext_desc. '
 ). - $line->{'total_item'}. '). - $line->{'total_amount'}. '
 '. + $line->{'total_item'}. '). + $line->{'total_amount'}. '


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

<%= $footer %> +

><%= $footer %>