ease deployment of patched longtable
[freeside.git] / conf / invoice_html_statement
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_extdesc TD { font-size: 8pt }
10 .invoice_totaldesc TD { font-size: 10pt; empty-cells: show }
11 </STYLE>
12
13 <table class="invoice" bgcolor="#ffffff" WIDTH=768 CELLSPACING=8><tr><td>
14
15   <table class="invoice_header" width="100%">
16     <tr>
17      <td><img src="<%= $cid ? "cid:$cid" : "cust_bill-logo.cgi?$template" %>"></td>
18      <td align="left"><%= $returnaddress %></td>
19       <td align="right">
20         <table CLASS="invoice_headerright" cellspacing=0>
21           <tr>
22             <td align="right">
23               Invoice&nbsp;date<BR>
24               <B><%= $date %></B>
25             </td>
26             <td>
27             </td>
28             <td align="left">
29               Invoice&nbsp;number<BR>
30               <B><%= $invnum %></B>
31             </td>
32           </tr>
33           <tr>
34             <th>&nbsp;</th>
35             <th colspan=1 align="center">
36               <FONT SIZE="+3">S</FONT><FONT SIZE="+2">TATEMENT</FONT>
37             </th>
38             <th>&nbsp;</th>
39           </tr>
40         </table>
41       </td>
42     </tr>
43
44     <tr>
45       <td>
46       </td>
47       <td align="left">
48         <b><%= $payname %></b><BR>
49         <%= join('<BR>', grep length($_), $company,
50                                           $address1,
51                                           $address2,
52                                           "$city,&nbsp;$state&nbsp;&nbsp;$zip",
53                                           $country,
54                 )
55         %>
56       </td>
57       <td align="right">
58         Terms: <%= $terms %><BR>
59         <%= $po_line %>
60       </td>
61     </tr>
62
63   </table>
64
65   <p><b><font size="+1">C</font><font size="+0">HARGES</font></b>
66   <p>
67   <table class="invoice_longtable" CELLSPACING=0 WIDTH="100%">
68     <tr>
69       <th align="center">Ref</th>
70       <th align="left">Description</th>
71       <th align="right">Amount</th>
72     </tr>
73     <%=
74
75       foreach my $line ( @detail_items ) {
76         $OUT .=
77           '<tr class="invoice_desc">'.
78             '<td align="center">'. $line->{'ref'}. '</td>'.
79             '<td align="left">'. $line->{'description'}. '</td>'.
80             '<td align="right">'. $line->{'amount'}. '</td>'.
81           '</tr>'
82         ;
83         foreach my $ext_desc ( @{$line->{'ext_description'} } ) {
84           $OUT .=
85             '<tr class="invoice_extdesc">'.
86               '<td></td>'.
87               '<td align="left">-&nbsp;'. $ext_desc. '</td>'.
88               '<td></td>'.
89             '</tr>'
90         }
91       }
92
93       my $style = 'border-top: 3px solid #000000;';
94       my $linenum = 0;
95
96       foreach my $line ( @total_items ) {
97
98         $style .= 'border-bottom: 3px solid #000000;'
99           if ++$linenum == scalar(@total_items);
100
101         $OUT .=
102           '<tr class="invoice_totaldesc">'.
103             qq(<td style="$style">&nbsp;</td>).
104             qq(<td align="left" style="$style">).
105               $line->{'total_item'}. '</td>'.
106             qq(<td align="right" style="$style">).
107               $line->{'total_amount'}. '</td>'.
108           '</tr>'
109         ;
110
111         $style='';
112
113       }
114
115     %>
116   </table>
117   <br><br>
118
119 <%= $notes %>
120
121   <hr NOSHADE SIZE=2 COLOR="#000000">
122   <p align="center"><%= $footer %>
123
124 </td></tr></table>