1 <STYLE TYPE="text/css">
3 font-family: sans-serif;
7 border: 1px solid black;
8 background-color: white;
16 .invoice_headerright TH { border-top: 2px solid #000000; border-bottom: 2px solid #000000 }
17 .invoice_headerright TD { font-size: 10pt; empty-cells: show }
18 .invoice_summary TH { border-bottom: 2px solid #000000 }
19 .invoice_summary TD { font-size: 10pt; empty-cells: show }
20 .invoice_longtable table { cellspacing: none }
21 .invoice_longtable TH { border-top: 2px solid #000000; border-bottom: 1px solid #000000; padding-left: none; padding-right: none; font-size: 10pt }
22 .invoice_desc TD { border-top: 2px solid #000000; font-weight: bold; font-size: 10pt }
23 .invoice_desc_more TD { font-weight: bold; font-size: 10pt }
24 .invoice_extdesc TD { font-size: 8pt }
25 .invoice_totaldesc TD { font-size: 10pt; empty-cells: show }
26 .allcaps { text-transform:uppercase; font-size: 12pt }
32 filter: alpha(opacity=25);
41 vertical-align: middle;
48 <DIV CLASS="watermark-box"><DIV CLASS="watermark-content">
52 <table class="invoice_header" width="100%">
54 <td><img src="<%= $cid ? "cid:$cid" : "cust_bill-logo.cgi?invnum=$invnum;template=$template" %>"></td>
55 <td align="left"><%= $returnaddress %></td>
57 <table CLASS="invoice_headerright" cellspacing=0>
60 <%= emt('Invoice date') %><BR>
66 <%= emt('Invoice #') %><BR>
72 <%= emt('Customer #') %><BR>
73 <B><%= $custnum %></B>
78 <th colspan=3 align="center" class="allcaps">
79 <FONT SIZE="+3"><%= substr(emt($notice_name),0,1) %></FONT><FONT SIZE="+2"><%= substr(emt($notice_name),1) %></FONT>
91 <b><%= $payname %></b><BR>
92 <%= join('<BR>', grep length($_), $company,
95 "$city, $state $zip",
100 <%= $ship_enable ? ('<td align="left">'.
101 join('<BR>',grep length($_), '<b>'.emt('Service Address').'</b>',
105 "$ship_city, $ship_state $ship_zip",
110 '</td><tr><td></td><td></td>'
117 $OUT .= qq! <img src="cid:$barcode_cid"><br> !;
119 elsif($barcode_img) {
120 $OUT .= qq! <img src="cust_bill-barcode.cgi?invnum=$invnum;template=$template"><br> !;
123 <%= $terms ? emt('Terms') . ": $terms" : '' %><BR>
132 my $columncount = $unitprices ? 5 : 3;
133 foreach my $section ( grep { !$summary || $_->{description} ne $finance_section } @sections ) {
134 if ($section->{'pretotal'} && !$summary) {
135 $OUT .= '</table>' if $notfirst;
137 '<table width="100%"><tr><td>'.
138 '<p align="right"><b><font size="+1">'.
139 uc(substr($section->{'pretotal'},0,1)).
140 '</font><font size="+0">'. uc(substr($section->{'pretotal'},1)).
145 unless ($section->{'summarized'}) {
146 $OUT .= '</table>' if ( $notfirst || $section->{'pretotal'} && !$summary );
147 $OUT .= '<table><tr><td>';
148 $OUT .= '<p class="allcaps"><b>';
150 if ( $section->{'location'} ) {
151 $sectionhead .= $section->{'location'}{'label_prefix'}. ': '
152 if length($section->{'location'}{'label_prefix'});
153 $sectionhead = $section->{'location'}{'address1'};
154 $sectionhead .= ', '.$section->{'location'}{'address2'}
155 if length($section->{'location'}{'address2'});
156 $sectionhead .= ', ' .
157 $section->{'location'}{'city'} . ', ' .
158 $section->{'location'}{'state'} . ' ' .
159 $section->{'location'}{'zip'};
160 $OUT .= $sectionhead;
162 $sectionhead = $section->{'description'} || emt('Charges');
163 $OUT .= '<font size="+1">'. substr($sectionhead,0,1).
164 '</font><font size="+0">'. substr($sectionhead,1).
168 $OUT .= '</b></p></td></tr></table>';
171 '<table class="invoice_longtable" CELLSPACING=0 WIDTH="100%">'.
174 if ($section->{header_generator}) {
175 my $header = &{$section->{header_generator}}();
177 $columncount = scalar(my @array = split /<\/th><th/i, $header);
179 $OUT .= '<th align="center"></th>'.
180 '<th align="left">' . emt('Description') . '</th>'.
182 ? '<th align="right">' . emt('Unit Price') . '</th>'.
183 '<th align="right">' . emt('Quantity') . '</th>'
185 '<th align="right">' . emt('Amount') . '</th>';
191 grep { ( scalar(@sections) > 1
192 ? $section->{'description'} eq $_->{'section'}->{'description'}
197 if ( $section->{description_generator} ) {
198 $OUT .= '<tr class="invoice_desc' .
199 &{$section->{description_generator}}($line);
201 my $class = 'invoice_desc_more';
202 if ( ($line->{'ref'} || 0) ne $lastref ) {
203 # then it's a new package (not a continuation)
204 $class = 'invoice_desc';
206 $OUT .= '<tr class="'.$class.'">
207 <td align="center">';
209 <td align="left">'. $line->{'description'}. '</td>';
212 '<td align="right">'. $line->{'unit_amount'}. '</td>'.
213 '<td align="right">'. $line->{'quantity'}. '</td>';
215 $OUT .= '<td align="right">'. $line->{'amount'}. '</td>';
218 $lastref = $line->{'ref'} || 0;
219 if ( @{$line->{'ext_description'} } ) {
220 unless ( $section->{description_generator} ) {
221 $OUT .= '<tr class="invoice_extdesc"><td></td><td';
222 $OUT .= $unitprices ? ' colspan=3' : '';
223 $OUT .= '><table width="100%">';
225 foreach my $ext_desc ( @{$line->{'ext_description'} } ) {
227 '<tr class="invoice_extdesc">'.
228 ( $section->{'description_generator'} ? '<td></td>' : '' ).
230 ( $ext_desc =~ /<\/?TD>/i ? '' : 'colspan=99' ). '>'.
231 ' '. $ext_desc.
235 unless ( $section->{description_generator} ) {
236 $OUT .= '</table></td><td></td>';
243 if ($section->{'description'} || $multisection and !$section->{no_subtotal}) {
244 my $style = 'border-top: 3px solid #000000;'.
245 'border-bottom: 3px solid #000000;';
247 '<tr class="invoice_totaldesc">'.
248 qq(<td style="$style"> </td>);
249 if ($section->{total_generator}) {
250 $OUT .= &{$section->{total_generator}}($section);
252 $OUT .= qq(<td align="left" style="$style").
253 ( $unitprices ? ' colspan=3>' : '>' ).
254 $section->{'description'}. ' ' . emt('Total') . '</td>'.
255 qq(<td align="right" style="$style">).
256 $section->{'subtotal'}. '</td>';
261 if ($section->{'posttotal'}) {
262 $OUT .= '<tr><td align="right" colspan='. $columncount. '>';
264 '<p><font size="+1">'. $section->{'posttotal'}.
267 $OUT .= '</td></tr>';
274 my $style = 'border-top: 3px solid #000000;';
277 foreach my $line ( @total_items ) {
279 $style .= 'border-bottom: 3px solid #000000;'
280 if ++$linenum == scalar(@total_items) - ( $balance_due_below_line ? 1 : 0 );
283 '<tr class="invoice_totaldesc">';
284 if ($section->{total_line_generator}) {
285 $OUT .= &{$section->{total_line_generator}}($line);
287 $OUT .= qq(<td style="$style"> </td>).
288 qq(<td align="left" style="$style" colspan=").
289 ( $columncount - 2 ). '">'.
290 $line->{'total_item'}. '</td>'.
291 qq(<td align="right" style="$style">).
292 $line->{'total_amount'}. '</td>';
307 ? '<FONT SIZE="-1">'.$notes.'</FONT>'
312 <hr NOSHADE SIZE=2 COLOR="#000000">
313 <p align="center" <%= $smallerfooter ? 'STYLE="font-size:75%;"' : '' %>><%= $footer %>