1 <STYLE TYPE="text/css">
2 .invoice { font-family: sans-serif; font-size: 10pt }
3 .invoice_header { font-size: 10pt }
4 .invoice_headerright TH { border-top: 2px solid #000000; border-bottom: 2px solid #000000 }
5 .invoice_headerright TD { font-size: 10pt; empty-cells: show }
6 .invoice_summary TH { border-bottom: 2px solid #000000 }
7 .invoice_summary TD { font-size: 10pt; empty-cells: show }
8 .invoice_longtable table { cellspacing: none }
9 .invoice_longtable TH { border-top: 2px solid #000000; border-bottom: 1px solid #000000; padding-left: none; padding-right: none; font-size: 10pt }
10 .invoice_desc TD { border-top: 2px solid #000000; font-weight: bold; font-size: 10pt }
11 .invoice_desc_more TD { font-weight: bold; font-size: 10pt }
12 .invoice_extdesc TD { font-size: 8pt }
13 .invoice_totaldesc TD { font-size: 10pt; empty-cells: show }
16 <table class="invoice" bgcolor="#ffffff" WIDTH=625 CELLSPACING=8><tr><td>
18 <table class="invoice_header" width="100%">
20 <td><img src="<%= $cid ? "cid:$cid" : "cust_bill-logo.cgi?invnum=$invnum;template=$template" %>"></td>
21 <td align="left"><%= $returnaddress %></td>
23 <table CLASS="invoice_headerright" cellspacing=0>
39 <B><%= $custnum %></B>
44 <th colspan=3 align="center">
45 <FONT SIZE="+3"><%= $notice_name ? substr($notice_name, 0, 1) : 'I' %></FONT><FONT SIZE="+2"><%= $notice_name ? uc(substr($notice_name, 1)) : 'NVOICE' %></FONT>
57 <b><%= $payname %></b><BR>
58 <%= join('<BR>', grep length($_), $company,
61 "$city, $state $zip",
66 <%= $ship_enable ? ('<td align="left">'.
67 join('<BR>',grep length($_), '<b>Service Address</b>',
71 "$ship_city, $ship_state $ship_zip",
76 '</td><tr><td></td><td></td>'
81 Terms: <%= $terms %><BR>
89 foreach my $section ( grep { !$summary || $_->{description} ne $finance_section } @sections ) {
90 if ($section->{'pretotal'} && !$summary) {
92 '<table width="100%"><tr><td>'.
93 '<p align="right"><b><font size="+1">'.
94 uc(substr($section->{'pretotal'},0,1)).
95 '</font><font size="+0">'. uc(substr($section->{'pretotal'},1)).
100 unless ($section->{'summarized'}) {
101 $OUT .= '<table><tr><td>';
102 if ($section->{'description'}) {
104 '<p><b><font size="+1">'. uc(substr($section->{'description'},0,1)).
105 '</font><font size="+0">'. uc(substr($section->{'description'},1)).
110 '<p><b><font size="+1">C</font><font size="+0">HARGES</font></b>'.
113 $OUT .= '</td></tr></table>';
116 '<table class="invoice_longtable" CELLSPACING=0 WIDTH="100%">'.
119 if ($section->{header_generator}) {
120 $OUT .= &{$section->{header_generator}}();
122 $OUT .= '<th align="center">Ref</th>'.
123 '<th align="left">Description</th>'.
125 ? '<th align="left">Unit Price</th>'.
126 '<th align="left">Quantity</th>'
129 '<th align="right">Amount</th>';
135 grep { ( scalar(@sections) > 1
136 ? $section->{'description'} eq $_->{'section'}->{'description'}
142 '<tr class="invoice_desc';
143 if ( $section->{description_generator} ) {
144 $OUT .= &{$section->{description_generator}}($line);
146 $OUT .= ( ($line->{'ref'} && $line->{'ref'} ne $lastref) ? '' : '_more' ).
148 '<td align="center">'.
149 ( $line->{'ref'} ne $lastref ? $line->{'ref'} : '' ). '</td>'.
150 '<td align="left">'. $line->{'description'}. '</td>'.
152 ? '<td align="left">'. $line->{'unit_amount'}. '</td>'.
153 '<td align="left">'. $line->{'quantity'}. '</td>'
157 '<td align="right">'. $line->{'amount'}. '</td>';
160 $lastref = $line->{'ref'};
161 if ( @{$line->{'ext_description'} } ) {
162 $OUT .= '<tr class="invoice_extdesc"><td></td><td';
163 $OUT .= $unitprices ? ' colspan=3>' : '>';
164 $OUT .= '<table width="100%">';
165 foreach my $ext_desc ( @{$line->{'ext_description'} } ) {
167 '<tr class="invoice_extdesc">'.
169 ( $ext_desc =~ /<\/?TD>/i ? '' : 'colspan=99' ). '>'.
170 ' '. $ext_desc.
174 $OUT .= '</table></td><td></td></tr>';
179 if (scalar(@sections) > 1) {
180 my $style = 'border-top: 3px solid #000000;'.
181 'border-bottom: 3px solid #000000;';
183 '<tr class="invoice_totaldesc">'.
184 qq(<td style="$style"> </td>);
185 if ($section->{total_generator}) {
186 $OUT .= &{$section->{total_generator}}($section);
188 $OUT .= qq(<td align="left" style="$style").
189 ( $unitprices ? ' colspan=3>' : '>' ).
190 $section->{'description'}. ' Total </td>'.
191 qq(<td align="right" style="$style">).
192 $section->{'subtotal'}. '</td>';
197 if ($section->{'posttotal'}) {
198 $OUT .= '<tr><td align="right" colspan=5>';
200 '<p><font size="+1">'. $section->{'posttotal'}.
203 $OUT .= '</td></tr>';
208 my $style = 'border-top: 3px solid #000000;';
211 foreach my $line ( @total_items ) {
213 $style .= 'border-bottom: 3px solid #000000;'
214 if ++$linenum == scalar(@total_items);
217 '<tr class="invoice_totaldesc">';
218 if ($section->{total_line_generator}) {
219 $OUT .= &{$section->{total_line_generator}}($line);
221 $OUT .= qq(<td style="$style"> </td>).
222 qq(<td align="left" style="$style").
223 ( $unitprices ? ' colspan=3>' : '>' ).
224 $line->{'total_item'}. '</td>'.
225 qq(<td align="right" style="$style">).
226 $line->{'total_amount'}. '</td>';
241 ? '<FONT SIZE="-1">'.$notes.'</FONT>'
246 <hr NOSHADE SIZE=2 COLOR="#000000">
247 <p align="center" <%= $smallerfooter ? 'STYLE="font-size:75%;"' : '' %>><%= $footer %>