fix replacement in edge case with NULL integer fields in a table without a primary key
[freeside.git] / sql-ledger / templates / Service-ar_transaction.html
1
2 <body bgcolor=ffffff>
3
4 <table width=100%>
5   <tr>
6     <td width=10>&nbsp;</td>
7
8     <td>
9       <table width=100%>
10         <tr>
11           <td>
12             <h4>
13             <%company%>
14         <br><%address%>
15             </h4>
16           </td>
17
18           <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
19
20           <td align=right>
21             <h4>
22             Tel: <%tel%>
23         <br>Fax: <%fax%>
24             </h4>
25           </td>
26         </tr>
27
28         <tr>
29           <th colspan=3>
30             <hr noshade><br>
31             <h4>A R - T R A N S A C T I O N</h4>
32           </th>
33         </tr>
34       </table>
35     </td>
36   </tr>
37
38   <tr>
39     <td>&nbsp;</td>
40
41     <td>
42       <table width=100% callspacing=0 cellpadding=0>
43         <tr valign=top>
44           <td><%name%>
45           <br><%address1%>
46           <%if address2%>
47           <br><%address2%>
48           <%end address2%>
49           <br><%city%> <%state%> <%zipcode%>
50           <%if country%>
51           <br><%country%>
52           <%end country%>
53           <br>
54
55           <%if contact%>
56           <br><%contact%>
57           <br>
58           <%end contact%>
59
60           <%if customerphone%>
61           <br>Tel: <%customerphone%>
62           <%end customerphone%>
63
64           <%if customerfax%>
65           <br>Fax: <%customerfax%>
66           <%end customerfax%>
67
68           <%if email%>
69           <br><%email%>
70           <%end email%>
71           </td>
72    
73           <td align=right>
74             <table>
75               <tr>
76                 <th align=left nowrap>Invoice #</th>
77                 <td><%invnumber%></td>
78               </tr>
79               <tr>
80                 <th align=left nowrap>Date</th>
81                 <td><%invdate%></td>
82               </tr>
83               <tr>
84                 <th align=left nowrap>Due</th>
85                 <td><%duedate%></td>
86               </tr>
87               <tr>
88                 <th align=left>Order #</th>
89                 <td><%ordnumber%>&nbsp;</td>
90               </tr>
91               <tr>
92                 <th align=left nowrap>Salesperson</th>
93                 <td><%employee%>&nbsp;</td>
94               </tr>
95             </table>
96           </td>
97         </tr>
98       </table>
99     </td>
100   </tr>
101
102   <tr height=5></tr>
103   
104   <tr>
105     <td>&nbsp;</td>
106   
107     <td>
108       <table width=100%>
109         <tr valign=top>
110           <td width=50%>
111             <table>
112               <%foreach account%>
113               <tr valign=top>
114                 <td><%accno%></td>
115                 <td><%account%></td>
116                 <td align=right><%amount%></td>
117                 <td><%projectnumber%></td>
118               </tr>
119               <%end account%>
120
121               <tr>
122                 <%if taxincluded%>
123                 <th colspan=2 align=right>Total</th>
124                 <td align=right><%invtotal%></td>
125                 <%end taxincluded%>
126
127                 <%if not taxincluded%>
128                 <th colspan=2 align=right>Subtotal</th>
129                 <td align=right><%subtotal%></td>
130                 <%end taxincluded%>
131               </tr>
132
133               <%foreach tax%>
134               <tr>
135                 <th colspan=2 align=right><%taxdescription%> @ <%taxrate%> %</th>
136                 <td align=right><%tax%></td>
137               </tr>
138               <%end tax%>
139               
140               <%if not taxincluded%>
141                 <th colspan=2 align=right>Total</th>
142                 <td align=right><%invtotal%></td>
143               <%end taxincluded%>
144
145             </table>
146           </td>
147           <td width=50%>
148             <%notes%>
149           </td>
150         </tr>
151       </table>
152     </td>
153   <tr>
154     <td>&nbsp;</td>
155     
156   </tr>
157
158   <tr>
159     <td>&nbsp;</td>
160
161     <td>
162       <%text_amount%> ***** <%decimal%>/100 <%currency%>
163     </td>
164   </tr>
165
166   <%if paid%>
167   <tr>
168     <td>&nbsp;</td>
169
170     <td>
171       <table>
172         <tr>
173           <th>Payments</th>
174         </tr>
175
176         <tr>
177           <td>
178           <hr noshade>
179           </td>
180         </tr>
181
182         <tr>
183           <td>
184             <table>
185               <tr>
186                 <th align=left>Date</th>
187                 <th align=left>Account</th>
188                 <th align=left>Source</th>
189                 <th align=left>Memo</th>
190                 <th align=left>Amount</th>
191               </tr>
192   <%end paid%>
193
194         <%foreach payment%>
195               <tr>
196                 <td><%paymentdate%></td>
197                 <td><%paymentaccount%></td>
198                 <td><%paymentsource%></td>
199                 <td><%paymentmemo%></td>
200                 <td><%payment%></td>
201               </tr>
202         <%end payment%>
203
204   <%if paid%>
205             </table>
206           </td>
207         </tr>
208       </table>
209     </td>
210   </tr>
211   <%end paid%>
212
213   <tr height=10></tr>
214
215   <%foreach tax%>
216   <tr>
217     <td>&nbsp;</td>
218
219     <th colspan=9 align=left><font size=-2><%taxdescription%> Registration <%taxnumber%></th>
220   </tr>
221   <%end tax%>
222
223   <%if taxincluded%>
224   <tr>
225     <td>&nbsp;</td>
226   </tr>
227
228   <tr>
229     <th colspan=3 align=left><font size=-2>Taxes shown are included in price.</th>
230   </tr>
231   <%end taxincluded%>
232
233 </table>
234
235 </body>
236 </html>
237