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);
40 vertical-align: middle;
47 <DIV CLASS="watermark-box"><DIV CLASS="watermark-content">
51 <table class="invoice_header" width="100%">
53 <td><img src="<%= $cid ? "cid:$cid" : "cust_bill-logo.cgi?invnum=$invnum;template=$template" %>"></td>
54 <td align="left"><%= $returnaddress %></td>
56 <table CLASS="invoice_headerright" cellspacing=0>
59 <%= emt('Invoice date') %><BR>
65 <%= emt('Invoice #') %><BR>
71 <%= emt('Customer #') %><BR>
72 <B><%= $custnum %></B>
77 <th colspan=3 align="center" class="allcaps">
78 <FONT SIZE="+3"><%= substr(emt($notice_name),0,1) %></FONT><FONT SIZE="+2"><%= substr(emt($notice_name),1) %></FONT>
90 <b><%= $payname %></b><BR>
91 <%= join('<BR>', grep length($_), $company,
94 "$city, $state $zip",
99 <%= $ship_enable ? ('<td align="left">'.
100 join('<BR>',grep length($_), '<b>'.emt('Service Address').'</b>',
104 "$ship_city, $ship_state $ship_zip",
109 '</td><tr><td></td><td></td>'
116 $OUT .= qq! <img src="cid:$barcode_cid"><br> !;
118 elsif($barcode_img) {
119 $OUT .= qq! <img src="cust_bill-barcode.cgi?invnum=$invnum;template=$template"><br> !;
122 <%= $terms ? emt('Terms') . ": $terms" : '' %><BR>
131 my $columncount = $unitprices ? 5 : 3;
132 foreach my $section ( grep { !$summary || $_->{description} ne $finance_section } @sections ) {
133 if ($section->{'pretotal'} && !$summary) {
134 $OUT .= '</table>' if $notfirst;
136 '<table width="100%"><tr><td>'.
137 '<p align="right"><b><font size="+1">'.
138 uc(substr($section->{'pretotal'},0,1)).
139 '</font><font size="+0">'. uc(substr($section->{'pretotal'},1)).
144 unless ($section->{'summarized'}) {
145 $OUT .= '</table>' if ( $notfirst || $section->{'pretotal'} && !$summary );
146 $OUT .= '<table><tr><td>';
147 $OUT .= '<p class="allcaps"><b>';
149 if ( $section->{'location'} ) {
150 $sectionhead .= $section->{'location'}{'label_prefix'}. ': '
151 if length($section->{'location'}{'label_prefix'});
152 $sectionhead = $section->{'location'}{'address1'};
153 $sectionhead .= ', '.$section->{'location'}{'address2'}
154 if length($section->{'location'}{'address2'});
155 $sectionhead .= ', ' .
156 $section->{'location'}{'city'} . ', ' .
157 $section->{'location'}{'state'} . ' ' .
158 $section->{'location'}{'zip'};
159 $OUT .= $sectionhead;
161 $sectionhead = $section->{'description'} || emt('Charges');
162 $OUT .= '<font size="+1">'. substr($sectionhead,0,1).
163 '</font><font size="+0">'. substr($sectionhead,1).
167 $OUT .= '</b></p></td></tr></table>';
170 '<table class="invoice_longtable" CELLSPACING=0 WIDTH="100%">'.
173 if ($section->{header_generator}) {
174 my $header = &{$section->{header_generator}}();
176 $columncount = scalar(my @array = split /<\/th><th/i, $header);
178 $OUT .= '<th align="center"></th>'.
179 '<th align="left">' . emt('Description') . '</th>'.
181 ? '<th align="right">' . emt('Unit Price') . '</th>'.
182 '<th align="right">' . emt('Quantity') . '</th>'
184 '<th align="right">' . emt('Amount') . '</th>';
190 grep { ( scalar(@sections) > 1
191 ? $section->{'description'} eq $_->{'section'}->{'description'}
196 if ( $section->{description_generator} ) {
197 $OUT .= '<tr class="invoice_desc' .
198 &{$section->{description_generator}}($line);
200 my $class = 'invoice_desc_more';
201 if ( ($line->{'ref'} || 0) ne $lastref ) {
202 # then it's a new package (not a continuation)
203 $class = 'invoice_desc';
205 $OUT .= '<tr class="'.$class.'">
206 <td align="center">';
208 <td align="left">'. $line->{'description'}. '</td>';
211 '<td align="right">'. $line->{'unit_amount'}. '</td>'.
212 '<td align="right">'. $line->{'quantity'}. '</td>';
214 $OUT .= '<td align="right">'. $line->{'amount'}. '</td>';
217 $lastref = $line->{'ref'} || 0;
218 if ( @{$line->{'ext_description'} } ) {
219 unless ( $section->{description_generator} ) {
220 $OUT .= '<tr class="invoice_extdesc"><td></td><td';
221 $OUT .= $unitprices ? ' colspan=3' : '';
222 $OUT .= '><table width="100%">';
224 foreach my $ext_desc ( @{$line->{'ext_description'} } ) {
226 '<tr class="invoice_extdesc">'.
227 ( $section->{'description_generator'} ? '<td></td>' : '' ).
229 ( $ext_desc =~ /<\/?TD>/i ? '' : 'colspan=99' ). '>'.
230 ' '. $ext_desc.
234 unless ( $section->{description_generator} ) {
235 $OUT .= '</table></td><td></td>';
242 if ($section->{'description'} || $multisection and !$section->{no_subtotal}) {
243 my $style = 'border-top: 3px solid #000000;'.
244 'border-bottom: 3px solid #000000;';
246 '<tr class="invoice_totaldesc">'.
247 qq(<td style="$style"> </td>);
248 if ($section->{total_generator}) {
249 $OUT .= &{$section->{total_generator}}($section);
251 $OUT .= qq(<td align="left" style="$style").
252 ( $unitprices ? ' colspan=3>' : '>' ).
253 $section->{'description'}. ' ' . emt('Total') . '</td>'.
254 qq(<td align="right" style="$style">).
255 $section->{'subtotal'}. '</td>';
260 if ($section->{'posttotal'}) {
261 $OUT .= '<tr><td align="right" colspan='. $columncount. '>';
263 '<p><font size="+1">'. $section->{'posttotal'}.
266 $OUT .= '</td></tr>';
273 my $style = 'border-top: 3px solid #000000;';
276 foreach my $line ( @total_items ) {
278 $style .= 'border-bottom: 3px solid #000000;'
279 if ++$linenum == scalar(@total_items) - ( $balance_due_below_line ? 1 : 0 );
282 '<tr class="invoice_totaldesc">';
283 if ($section->{total_line_generator}) {
284 $OUT .= &{$section->{total_line_generator}}($line);
286 $OUT .= qq(<td style="$style"> </td>).
287 qq(<td align="left" style="$style" colspan=").
288 ( $columncount - 2 ). '">'.
289 $line->{'total_item'}. '</td>'.
290 qq(<td align="right" style="$style">).
291 $line->{'total_amount'}. '</td>';
306 ? '<FONT SIZE="-1">'.$notes.'</FONT>'
311 <hr NOSHADE SIZE=2 COLOR="#000000">
312 <p align="center" <%= $smallerfooter ? 'STYLE="font-size:75%;"' : '' %>><%= $footer %>