better error message for missing tables
[freeside.git] / sql-ledger / templates / Default-invoice.html
1
2 <body bgcolor=ffffff>
3
4 <table width=100%>
5 <tr valign=bottom>
6   <td width=10>&nbsp;</td>
7   <td>
8   
9   <table width=100%>
10   <tr>
11     <td>
12       <h4>
13       <%company%>
14       <br><%address%>
15       </h4>
16     </td>
17
18     <td align=right>
19       <h4>
20       Telephone: <%tel%>
21       <br>Facsimile: <%fax%>
22       </h4>
23     </td>
24   </tr>
25
26   <tr>
27     <th colspan=3>
28       <h4>I N V O I C E</h4>
29     </th>
30   </tr>
31
32   </table>
33
34
35   <table width=100% callspacing=0 cellpadding=0>
36     
37   <tr>
38     <td align=right>
39     <table>
40     <tr>
41       <th align=right>Invoice Date</th><td width=10>&nbsp;</td><td><%invdate%></td>
42     </tr>
43   
44     <tr>
45       <th align=right>Due Date</th><td width=10>&nbsp;</td><td><%duedate%></td>
46     </tr>
47
48     <tr>
49       <th align=right>Number</th><td>&nbsp;</td><td><%invnumber%></td></tr>
50     </tr>
51   
52 <!--
53     <tr>
54       <th align=right>Clerk:</th><td>&nbsp;</td><td><%employee%></td>
55     </tr>
56 -->
57
58     <tr>
59       <td>&nbsp;</td>
60     </tr>
61     </td>
62     </table>
63   </tr>
64
65   <tr>
66     <td>
67     <table width=100%>
68     <tr bgcolor=000000>
69       <th align=left><font color=ffffff>To:</th>
70       <th align=left><font color=ffffff>Ship To:</th>
71     </tr>
72
73 <!--
74      other variables which can be use:
75      contact, shiptocontact, shiptophone, shiptofax
76 -->
77
78     <tr valign=top>
79       <td><%name%>
80       <br><%addr1%>
81       <br><%addr2%>
82       <br><%addr3%>
83       <br><%addr4%>
84       </td>
85       
86       <td><%shiptoname%>
87       <br><%shiptoaddr1%>
88       <br><%shiptoaddr2%>
89       <br><%shiptoaddr3%>
90       <br><%shiptoaddr4%>
91       </td>
92     </tr>
93     </table>
94     </td>
95   </tr>
96
97   <tr>
98     <td>&nbsp;</td>
99   </tr>
100   
101   <tr>
102     <td>
103     <table width=100%>
104     <tr bgcolor=000000>
105 <!--      <th align=right><font color=ffffff>No.</th>  -->
106       <th align=left><font color=ffffff>Number</th>
107       <th align=left><font color=ffffff>Description</th>
108       <th><font color=ffffff>Qt'y</th>
109       <th>&nbsp;</th>
110       <th><font color=ffffff>Price</th>
111       <th><font color=ffffff>Disc</th>
112       <th><font color=ffffff>Amount</th>
113     </tr>
114
115 <%foreach number%>
116     <tr valign=top>
117 <!--      <td align=right><%runningnumber%>.</td>
118 adjust the colspan if you include this to shift subtotal one to the right
119 -->
120       <td><%number%></td>
121       <td><%description%></td>
122       <td align=right><%qty%></td>
123       <td><%unit%></td>
124       <td align=right><%sellprice%></td>
125       <td align=right><%discount%></td>
126       <td align=right><%linetotal%></td>
127     </tr>
128 <%end number%>
129
130 <!--
131 you can also use netprice instead of sellprice if you
132 don't want to show the discount
133 netprice = sellprice - discount
134 -->
135
136     <tr>
137       <td colspan=7><hr noshade></td>
138     </tr>
139     
140     <tr>
141 <%if taxincluded%>
142       <th colspan=5 align=right>Total</th>
143       <td colspan=2 align=right><%invtotal%></td>
144 <%end taxincluded%>
145 <%if not taxincluded%>
146       <th colspan=5 align=right>Subtotal</th>
147       <td colspan=2 align=right><%subtotal%></td>
148 <%end taxincluded%>
149     </tr>
150
151 <%foreach tax%>
152     <tr>
153       <th colspan=5 align=right><%taxdescription%> on <%taxbase%> @ <%taxrate%> %</th>
154       <td colspan=2 align=right><%tax%></td>
155     </tr>
156 <%end tax%>
157
158 <%if paid%>
159     <tr>
160       <th colspan=5 align=right>Paid</th>
161       <td colspan=2 align=right>- <%paid%></td>
162     </tr>
163 <%end paid%>
164
165     <tr>
166       <td colspan=3>&nbsp;</td>
167       <td colspan=4><hr noshade></td>
168     </tr>
169
170     <tr>
171       <td colspan=3>Terms Net <b><%terms%></b> days</td>
172       <th colspan=2 align=right>Outstanding</th>
173       <th colspan=2 align=right><%total%></th>
174     </tr>
175
176     <tr>
177       <td>&nbsp;</td>
178     </tr>
179
180     </table>
181     </td>
182   </tr>
183
184 <tr>
185   <td>
186   <table width=100%>
187     <tr valign=top>
188 <%if notes%>
189       <td>Notes</td>
190       <td><%notes%></td>
191 <%end notes%>
192       <td align=right>
193       All prices in <b><%currency%></b> Funds
194       <br><%shippingpoint%>
195       </td>
196     </tr>
197
198   </table>
199   </td>
200 </tr>
201
202 <tr><td>&nbsp;</td></tr>
203
204 <%if paid%>
205 <tr>
206   <td colspan=7>
207     <table width=60%>
208       <tr>
209         <th align=left>Payments</th>
210       </tr>
211       <tr>
212         <td colspan=4>
213           <hr noshade>
214         </td>
215       </tr>
216       <tr>
217         <th align=left>Date</th>
218         <th align=left>Account</th>
219         <th align=left>Source</th>
220         <th align=left>Amount</th>
221       </tr>
222 <%end paid%>
223
224 <%foreach payment%>
225       <tr>
226         <td><%paymentdate%></td>
227         <td><%paymentaccount%></td>
228         <td><%paymentsource%></td>
229         <td><%payment%></td>
230       </tr>
231 <%end payment%>
232
233 <%if paid%>
234     </table>
235   </td>
236 </tr>
237
238 <tr>
239   <td>&nbsp;</td>
240 </tr>
241 <%end paid%>
242
243 <tr>
244   <th colspan=7>
245   <br>Thank you for your valued business!
246   </th>
247 </tr>
248
249 <tr><td>&nbsp;</td></tr>
250
251 <tr>
252   <td>
253   <table width=100%>
254   <tr valign=top>
255     <td><font size=-3>
256     Payment due NET <%terms%> Days from date of Invoice.
257     Interest on overdue amounts will acrue at the rate of 1.5% per month
258     from due date until paid in full. Items returned are subject to
259     a 10% restocking charge. A return authorization must be obtained
260     from <%company%> before goods are returned. Returns must be shipped
261     prepaid and properly insured. <%company%> will not be responsible
262     for damages during transit.
263     </font>
264     </td>
265     <td width=150>
266     X <hr noshade>
267     </td>
268   </tr>
269   </table>
270   </td>
271 </tr>
272
273 <%foreach tax%>
274   <tr>
275     <th colspan=7 align=left><font size=-2><%taxdescription%> Registration <%taxnumber%></th>
276   </tr>
277 <%end tax%>
278
279 <%if taxincluded%>
280   <tr>
281     <th colspan=7 align=left><font size=-2>Taxes shown are included in price.</th>
282   </tr>
283 <%end taxincluded%>
284
285 <!-- business number
286   <tr>
287     <th colspan=7 align=left><font size=-2>Business Number: <%businessnumber%></font></th>
288   </tr>
289 -->
290
291 <!-- banking information
292   <tr>
293     <th colspan=7 align=left>Banking Information:
294     <br>Bank
295     <br>Transit No.
296     <br>Account No.
297     </td>
298   </tr>
299 -->
300
301 </table>
302
303 </td>
304 </tr>
305 </table>
306
307 </body>
308 </html>
309