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_longtable table { cellspacing: none }
7 .invoice_longtable TH { border-top: 2px solid #000000; border-bottom: 1px solid #000000; padding-left: none; padding-right: none; font-size: 10pt }
8 .invoice_desc TD { border-top: 2px solid #000000; font-weight: bold; font-size: 10pt }
9 .invoice_desc_more TD { font-weight: bold; font-size: 10pt }
10 .invoice_extdesc TD { font-size: 8pt }
11 .invoice_totaldesc TD { font-size: 10pt; empty-cells: show }
14 <table class="invoice" bgcolor="#ffffff" WIDTH=768 CELLSPACING=8><tr><td>
16 <table class="invoice_header" width="100%">
18 <td><img src="<%= $cid ? "cid:$cid" : "cust_bill-logo.cgi?$template" %>"></td>
19 <td align="left"><%= $returnaddress %></td>
21 <table CLASS="invoice_headerright" cellspacing=0>
37 <B><%= $custnum %></B>
42 <th colspan=3 align="center">
43 <FONT SIZE="+3">I</FONT><FONT SIZE="+2">NVOICE</FONT>
55 <b><%= $payname %></b><BR>
56 <%= join('<BR>', grep length($_), $company,
59 "$city, $state $zip",
64 <%= $ship_enable ? ('<td align="left">'.
65 join('<BR>',grep length($_), '<b>Service Address</b>',
69 "$ship_city, $ship_state $ship_zip",
74 ($agent_custid ? "<b>ID:</b> $agent_custid<BR>" : '').
75 ($ship_fax ? "<b>Fax:</b> $ship_fax<BR>" : '').
76 '</td><tr><td></td><td></td>'
81 Terms: <%= $terms %><BR>
89 foreach my $section ( @sections ) {
90 if ($section->{'pretotal'}) {
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 $OUT .= '<table><tr><td>';
101 if ($section->{'description'}) {
103 '<p><b><font size="+1">'. uc(substr($section->{'description'},0,1)).
104 '</font><font size="+0">'. uc(substr($section->{'description'},1)).
109 '<p><b><font size="+1">C</font><font size="+0">HARGES</font></b>'.
112 $OUT .= '</td></tr></table>';
115 '<table class="invoice_longtable" CELLSPACING=0 WIDTH="100%">'.
117 '<th align="center">Ref</th>'.
118 '<th align="left">Description</th>'.
120 ? '<th align="left">Unit Price</th>'.
121 '<th align="left">Quantity</th>'
124 '<th align="right">Amount</th>'.
129 grep { ( scalar(@sections) > 1
130 ? $section->{'description'} eq $_->{'section'}->{'description'}
136 '<tr class="invoice_desc'.
137 ( ($line->{'ref'} && $line->{'ref'} ne $lastref) ? '' : '_more' ).
139 '<td align="center">'.
140 ( $line->{'ref'} ne $lastref ? $line->{'ref'} : '' ). '</td>'.
141 '<td align="left">'. $line->{'description'}. '</td>'.
143 ? '<td align="left">'. $line->{'unit_amount'}. '</td>'.
144 '<td align="left">'. $line->{'quantity'}. '</td>'
148 '<td align="right">'. $line->{'amount'}. '</td>'.
151 $lastref = $line->{'ref'};
152 if ( @{$line->{'ext_description'} } ) {
153 $OUT .= '<tr class="invoice_extdesc"><td></td><td';
154 $OUT .= $unitprices ? ' colspan=3>' : '>';
155 $OUT .= '<table width="100%">';
156 foreach my $ext_desc ( @{$line->{'ext_description'} } ) {
158 '<tr class="invoice_extdesc">'.
159 '<td align="left"> '. $ext_desc. '</td>'.
162 $OUT .= '</table></td><td></td></tr>';
167 if (scalar(@sections) > 1) {
168 my $style = 'border-top: 3px solid #000000;'.
169 'border-bottom: 3px solid #000000;';
171 '<tr class="invoice_totaldesc">'.
172 qq(<td style="$style"> </td>).
173 qq(<td align="left" style="$style").
174 ( $unitprices ? ' colspan=3>' : '>' ).
175 $section->{'description'}. ' Total </td>'.
176 qq(<td align="right" style="$style">).
177 $section->{'subtotal'}. '</td>'.
182 if ($section->{'posttotal'}) {
183 $OUT .= '<tr><td align="right" colspan=5>';
185 '<p><font size="+1">'. $section->{'posttotal'}.
188 $OUT .= '</td></tr>';
193 my $style = 'border-top: 3px solid #000000;';
196 foreach my $line ( @total_items ) {
198 $style .= 'border-bottom: 3px solid #000000;'
199 if ++$linenum == scalar(@total_items);
202 '<tr class="invoice_totaldesc">'.
203 qq(<td style="$style"> </td>).
204 qq(<td align="left" style="$style").
205 ( $unitprices ? ' colspan=3>' : '>' ).
206 $line->{'total_item'}. '</td>'.
207 qq(<td align="right" style="$style">).
208 $line->{'total_amount'}. '</td>'.
222 <hr NOSHADE SIZE=2 COLOR="#000000">
223 <p align="center"><%= $footer %>