X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=conf%2Finvoice_html;h=dfd87c79b9c645c4a3014f30eefa82ad16c06f04;hp=7a8b8594ee43d7c4a02d4b4734d5e15e4aeed545;hb=4ff12dc7e14232390daca2f14a278cde46a8e573;hpb=a859e1e18ebe73086ab5792a2eda05929ad19873 diff --git a/conf/invoice_html b/conf/invoice_html index 7a8b8594e..dfd87c79b 100644 --- a/conf/invoice_html +++ b/conf/invoice_html @@ -1,6 +1,18 @@ -
+
+ +
+ <%= $watermark %> +
@@ -23,26 +57,26 @@
- @@ -64,7 +98,7 @@ %> <%= $ship_enable ? (' @@ -111,18 +145,27 @@ unless ($section->{'summarized'}) { $OUT .= '
- Invoice date
+ <%= emt('Invoice date') %>
<%= $date %>
- Invoice #
+ <%= emt('Invoice #') %>
<%= $invnum %>
- Customer #
+ <%= emt('Customer #') %>
<%= $custnum %>
  - <%= $notice_name ? substr($notice_name, 0, 1) : 'I' %><%= $notice_name ? uc(substr($notice_name, 1)) : 'NVOICE' %> + + <%= substr(emt($notice_name),0,1) %><%= substr(emt($notice_name),1) %>  
'. - join('
',grep length($_), 'Service Address', + join('
',grep length($_), ''.emt('Service Address').'', $ship_company, $ship_address1, $ship_address2, @@ -86,7 +120,7 @@ $OUT .= qq!
!; } %> - <%= $terms ? "Terms: $terms" : '' %>
+ <%= $terms ? emt('Terms') . ": $terms" : '' %>
<%= $po_line %>
' 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 .= '

'; + my $sectionhead; + if ( $section->{'location'} ) { + $sectionhead .= $section->{'location'}{'label_prefix'}. ': ' + if length($section->{'location'}{'label_prefix'}); + $sectionhead = $section->{'location'}{'address1'}; + $sectionhead .= ', '.$section->{'location'}{'address2'} + if length($section->{'location'}{'address2'}); + $sectionhead .= ', ' . + $section->{'location'}{'city'} . ', ' . + $section->{'location'}{'state'} . ' ' . + $section->{'location'}{'zip'}; + $OUT .= $sectionhead; + } else { + $sectionhead = $section->{'description'} || emt('Charges'); + $OUT .= ''. substr($sectionhead,0,1). + ''. substr($sectionhead,1). + + ''; } - $OUT .= '

'; + $OUT .= '

'; $OUT .= ''. @@ -133,14 +176,13 @@ $OUT .= $header; $columncount = scalar(my @array = split /<\/th>'. - ( $unitprices - ? ''. - '' - : '' - ). - ''; + $OUT .= ''. + ''. + ( $unitprices + ? ''. + '' + : '' ). + ''; } $OUT .= ''; @@ -152,26 +194,28 @@ ) } @detail_items ) { - $OUT .= - '{description_generator}}($line); } else { - $OUT .= ( ($line->{'ref'} && $line->{'ref'} ne $lastref) ? '' : '_more' ). - '">'. - ''. - ''. - ( $unitprices - ? ''. - '' - : '' - ). - - ''; + my $class = 'invoice_desc_more'; + if ( ($line->{'ref'} || 0) ne $lastref ) { + # then it's a new package (not a continuation) + $class = 'invoice_desc'; + } + $OUT .= ' + + '; + if ( $unitprices ) { + $OUT .= + ''. + ''; + } + $OUT .= ''; } $OUT .= ''; - $lastref = $line->{'ref'}; + $lastref = $line->{'ref'} || 0; if ( @{$line->{'ext_description'} } ) { unless ( $section->{description_generator} ) { $OUT .= '{'description'} || $multisection) { + if ($section->{'description'} || $multisection and !$section->{no_subtotal}) { my $style = 'border-top: 3px solid #000000;'. 'border-bottom: 3px solid #000000;'; $OUT .= @@ -207,7 +251,7 @@ } else { $OUT .= qq('. + $section->{'description'}. ' ' . emt('Total') . ''. qq('; } @@ -268,4 +312,4 @@

><%= $footer %> -

DescriptionUnit PriceQuantityAmount' . emt('Description') . '' . emt('Unit Price') . '' . emt('Quantity') . '' . emt('Amount') . '
'. - ( $line->{'ref'} ne $lastref ? $line->{'ref'} : '' ). ''. $line->{'description'}. ''. $line->{'unit_amount'}. ''. $line->{'quantity'}. ''. $line->{'amount'}. '
'; + $OUT .= ''. $line->{'description'}. ''. $line->{'unit_amount'}. ''. $line->{'quantity'}. ''. $line->{'amount'}. '
' : '>' ). - $section->{'description'}. ' Total ). $section->{'subtotal'}. '
+