@@ -21,17 +21,32 @@ table thead th { background-color: #EEEEEE;
21
21
.items td .blanktotal {
22
22
background-color : #EEEEEE ;
23
23
border : 0.1mm solid #000000 ;
24
- background-color : #FFFFFF ;
25
24
border : 0mm none #000000 ;
26
25
border-top : 0.1mm solid #000000 ;
27
26
border-right : 0.1mm solid #000000 ;
28
27
}
28
+ .items td .subtotaltitle {
29
+ background-color : {{ SUBTOTAL_TITLE_BACKGROUNDCOLOR }};
30
+ border: 0.1mm solid #000000 ;
31
+ border: 0mm none #000000 ;
32
+ border-top : 0.1mm solid #000000 ;
33
+ border-bottom : 0.1mm solid #000000 ;
34
+ border-right : 0.1mm solid #000000 ;
35
+ }
36
+ .items td .subtotalsubtotal {
37
+ background-color : {{ SUBTOTAL_SUBTOTAL_BACKGROUNDCOLOR }};
38
+ border: 0.1mm solid #000000 ;
39
+ border: 0mm none #000000 ;
40
+ border-top : 0.1mm solid #000000 ;
41
+ border-bottom : 0.1mm solid #000000 ;
42
+ border-right : 0.1mm solid #000000 ;
43
+ }
29
44
.items td .totals {
30
45
text-align : right ;
31
46
border : 0.1mm solid #000000 ;
32
47
}
33
48
.items td .cost {
34
- text-align : " ." center ;
49
+ text-align : " ." right ;
35
50
}
36
51
</style >
37
52
</head >
@@ -41,20 +56,34 @@ table thead th { background-color: #EEEEEE;
41
56
<htmlpageheader name="myheader">
42
57
<table width="100%">
43
58
<tr>
44
- <td><img src="{{ logo }}" height="80px"/></td>
59
+ <td align="center" ><img src="{{ logo }}" height="80px"/></td>
45
60
<td width="40%" style="color:#0000BB; ">
46
61
<span style="font-weight: bold; font-size: 14pt;">{{ mysoc .name | e }}</span><br />
47
62
{{ mysoc .address | e }}<br />
48
63
{{ mysoc .zip | e }} {{ mysoc .town | e }}<br />
49
- <span style="font-family:dejavusanscondensed;">☎ </span>{{ mysoc .phone | e }}</td>
50
- <td width="40%" style="text-align: right;">{{ doctitle | e }}<br /><span style="font-weight: bold; font-size: 12pt;">{{ object .ref | e }}</span></td>
64
+ <img src="{{ mysoc .flag }}"> {{ mysoc .country | e }}<br />
65
+ <span style="font-family:dejavusanscondensed;">☎ </span>{{ mysoc .phone | e }}<br />
66
+ <span style="font-family:dejavusanscondensed;">✉ </span>{{ mysoc .email | e }}<br />
67
+ {{ mysoc .tvanumber | e }}<br />
68
+ </td>
69
+ <td width="40%" style="text-align: right;">
70
+ <span style="font-weight: bold; font-size: 12pt;">{{ doctitle | e }}: {{ object .ref | e }}</span>
71
+ <br /><span style="font-weight: bold; font-size: 12pt;">{{ date | e }}: {{ object .date | e }}</span>
72
+ {% if object .ref_customer %}
73
+ <br /><span style="font-weight: bold; font-size: 12pt;">{{ ref_customer | e }}: {{ object .ref_customer | e }}</span>
74
+ {% endif %}
75
+ {% if object .ref_project %}
76
+ <br /><span style="font-weight: bold; font-size: 12pt;">{{ ref_project | e }}: {{ object .ref_project | e }}</span>
77
+ {% endif %}
78
+ </td>
51
79
</tr>
52
80
</table>
53
-
54
81
</htmlpageheader>
55
82
56
83
<htmlpagefooter name="myfooter">
57
- <div style="border-top: 1px solid #000000; font-size: 9pt; text-align: center; padding-top: 3mm; ">
84
+ <div style="border-top: 1px solid #000000; font-size: 6pt; text-align: center; padding-top: 3mm; ">
85
+ {{ footerinfo .line3 | e }}<br />
86
+ {{ footerinfo .line4 | e }}<br />
58
87
Page {PAGENO} of {nb}
59
88
</div>
60
89
</htmlpagefooter>
@@ -63,208 +92,96 @@ Page {PAGENO} of {nb}
63
92
<sethtmlpagefooter name="myfooter" value="on" />
64
93
mpdf-->
65
94
66
- <div style =" text-align: right" >{{ object .date | e }}</div >
67
95
68
96
<table width =" 100%" style =" font-family: serif;" cellpadding =" 10" >
69
97
<tr >
70
- <td width =" 45%" style =" border: 0.1mm solid #888888; " ><span style =" font-size: 7pt; color: #555555; font-family: sans;" >SOLD TO:</span ><br /><br />345 Anotherstreet<br />Little Village<br />Their City<br />CB22 6SO</td >
71
- <td width =" 10%" > </td >
72
- <td width =" 45%" style =" border: 0.1mm solid #888888;" ><span style =" font-size: 7pt; color: #555555; font-family: sans;" >SHIP TO:</span ><br /><br />345 Anotherstreet<br />Little Village<br />Their City<br />CB22 6SO</td >
98
+ <td width =" 46%" style =" border: 0.1mm solid #888888; " >
99
+ <span style =" font-size: 7pt; color: #555555; font-family: sans;" >SOLD TO:</span ><br /><b >{{ thirdparty .name }}</b ><br />{{ thirdparty .address }}<br />{{ thirdparty .zip }} {{ thirdparty .town }}<br /><img src =" {{ thirdparty .flag }}" > {{ thirdparty .country }}<br />
100
+ {% if thirdparty .phone %}
101
+ <span style =" font-family:dejavusanscondensed;" >☎ </span >{{ thirdparty .phone | e }}<br />
102
+ {% endif %}
103
+ {% if thirdparty .email %}
104
+ <span style =" font-family:dejavusanscondensed;" >✉ </span >{{ thirdparty .email | e }}<br />
105
+ {% endif %}
106
+ </td >
107
+ <td width =" 8%" > </td >
108
+ <td width =" 46%" style =" border: 0.1mm solid #888888;" >
109
+ <span style =" font-size: 7pt; color: #555555; font-family: sans;" >SHIP TO:</span ><br /><b >{{ thirdparty .name }}</b ><br />{{ thirdparty .address }}<br />{{ thirdparty .zip }} {{ thirdparty .town }}<br /><img src =" {{ thirdparty .flag }}" > {{ thirdparty .country }}<br />
110
+ {% if thirdparty .phone %}
111
+ <span style =" font-family:dejavusanscondensed;" >☎ </span >{{ thirdparty .phone | e }}<br />
112
+ {% endif %}
113
+ {% if thirdparty .email %}
114
+ <span style =" font-family:dejavusanscondensed;" >✉ </span >{{ thirdparty .email | e }}<br />
115
+ {% endif %}
116
+ </td >
73
117
</tr >
74
118
</table >
75
119
76
120
<br />
121
+ <div style =" text-align: right" >{{ currencyinfo | e }}</div >
77
122
78
- <table class =" items" width =" 100%" style =" font-size: 9pt ; border-collapse: collapse; " cellpadding =" 8" >
123
+ <table class =" items" width =" 100%" style =" font-size: 7pt ; border-collapse: collapse; " cellpadding =" 8" >
79
124
<thead >
80
125
<tr >
81
- <th width =" 15%" >Ref. No.</th >
126
+ <th width =" 15%" >{{ ref | e }}</th >
127
+ <th width =" 40%" >{{ description | e }}</th >
128
+ <th width =" 10%" >{{ vat | e }}</th >
82
129
<th width =" 10%" >{{ qty | e }}</th >
83
- <th width =" 45%" >{{ description | e }}</th >
84
- <th width =" 15%" >Unit Price</th >
85
- <th width =" 15%" >Amount</th >
130
+ <th width =" 15%" >{{ unitprice_ht | e }}</th >
131
+ <th width =" 15%" >{{ total_ht | e }}</th >
86
132
</tr >
87
133
</thead >
88
134
<tbody >
89
135
<!-- ITEMS HERE -->
90
- <tr >
91
- <td align =" center" >MF1234567</td >
92
- <td align =" center" >10</td >
93
- <td >Large pack Hoover bags</td >
94
- <td class =" cost" >£ 2.56</td >
95
- <td class =" cost" >£ 25.60</td >
96
- </tr >
97
- <tr >
98
- <td align =" center" >MX37801982</td >
99
- <td align =" center" >1</td >
100
- <td >Womans waterproof jacket<br />Options - Red and charcoal.</td >
101
- <td class =" cost" >£ 102.11</td >
102
- <td class =" cost" >£ 102.11</td >
103
- </tr >
104
- <tr >
105
- <td align =" center" >MR7009298</td >
106
- <td align =" center" >25</td >
107
- <td >Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td >
108
- <td class =" cost" >£ 12.26</td >
109
- <td class =" cost" >£ 325.60</td >
110
- </tr >
111
- <tr >
112
- <td align =" center" >MF1234567</td >
113
- <td align =" center" >10</td >
114
- <td >Large pack Hoover bags</td >
115
- <td class =" cost" >£ 2.56</td >
116
- <td class =" cost" >£ 25.60</td >
117
- </tr >
118
- <tr >
119
- <td align =" center" >MX37801982</td >
120
- <td align =" center" >1</td >
121
- <td >Womans waterproof jacket<br />Options - Red and charcoal.</td >
122
- <td class =" cost" >£ 102.11</td >
123
- <td class =" cost" >£ 102.11</td >
124
- </tr >
125
- <tr >
126
- <td align =" center" >MR7009298</td >
127
- <td align =" center" >25</td >
128
- <td >Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td >
129
- <td class =" cost" >£ 12.26</td >
130
- <td class =" cost" >£ 325.60</td >
131
- </tr >
132
- <tr >
133
- <td align =" center" >MF1234567</td >
134
- <td align =" center" >10</td >
135
- <td >Large pack Hoover bags</td >
136
- <td class =" cost" >£ 2.56</td >
137
- <td class =" cost" >£ 25.60</td >
138
- </tr >
139
- <tr >
140
- <td align =" center" >MX37801982</td >
141
- <td align =" center" >1</td >
142
- <td >Womans waterproof jacket<br />Options - Red and charcoal.</td >
143
- <td class =" cost" >£ 102.11</td >
144
- <td class =" cost" >£ 102.11</td >
145
- </tr >
146
- <tr >
147
- <td align =" center" >MR7009298</td >
148
- <td align =" center" >25</td >
149
- <td >Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td >
150
- <td class =" cost" >£ 12.26</td >
151
- <td class =" cost" >£ 325.60</td >
152
- </tr >
153
- <tr >
154
- <td align =" center" >MF1234567</td >
155
- <td align =" center" >10</td >
156
- <td >Large pack Hoover bags</td >
157
- <td class =" cost" >£ 2.56</td >
158
- <td class =" cost" >£ 25.60</td >
159
- </tr >
160
- <tr >
161
- <td align =" center" >MX37801982</td >
162
- <td align =" center" >1</td >
163
- <td >Womans waterproof jacket<br />Options - Red and charcoal.</td >
164
- <td class =" cost" >£ 102.11</td >
165
- <td class =" cost" >£ 102.11</td >
166
- </tr >
167
- <tr >
168
- <td align =" center" >MR7009298</td >
169
- <td align =" center" >25</td >
170
- <td >Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td >
171
- <td class =" cost" >£ 12.26</td >
172
- <td class =" cost" >£ 325.60</td >
173
- </tr >
174
- <tr >
175
- <td align =" center" >MF1234567</td >
176
- <td align =" center" >10</td >
177
- <td >Large pack Hoover bags</td >
178
- <td class =" cost" >£ 2.56</td >
179
- <td class =" cost" >£ 25.60</td >
180
- </tr >
181
- <tr >
182
- <td align =" center" >MX37801982</td >
183
- <td align =" center" >1</td >
184
- <td >Womans waterproof jacket<br />Options - Red and charcoal.</td >
185
- <td class =" cost" >£ 102.11</td >
186
- <td class =" cost" >£ 102.11</td >
187
- </tr >
188
- <tr >
189
- <td align =" center" >MF1234567</td >
190
- <td align =" center" >10</td >
191
- <td >Large pack Hoover bags</td >
192
- <td class =" cost" >£ 2.56</td >
193
- <td class =" cost" >£ 25.60</td >
194
- </tr >
195
- <tr >
196
- <td align =" center" >MX37801982</td >
197
- <td align =" center" >1</td >
198
- <td >Womans waterproof jacket<br />Options - Red and charcoal.</td >
199
- <td class =" cost" >£ 102.11</td >
200
- <td class =" cost" >£ 102.11</td >
201
- </tr >
202
- <tr >
203
- <td align =" center" >MR7009298</td >
204
- <td align =" center" >25</td >
205
- <td >Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td >
206
- <td class =" cost" >£ 12.26</td >
207
- <td class =" cost" >£ 325.60</td >
208
- </tr >
209
- <tr >
210
- <td align =" center" >MR7009298</td >
211
- <td align =" center" >25</td >
212
- <td >Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td >
213
- <td class =" cost" >£ 12.26</td >
214
- <td class =" cost" >£ 325.60</td >
215
- </tr >
216
- <tr >
217
- <td align =" center" >MF1234567</td >
218
- <td align =" center" >10</td >
219
- <td >Large pack Hoover bags</td >
220
- <td class =" cost" >£ 2.56</td >
221
- <td class =" cost" >£ 25.60</td >
222
- </tr >
223
- <tr >
224
- <td align =" center" >MX37801982</td >
225
- <td align =" center" >1</td >
226
- <td >Womans waterproof jacket<br />Options - Red and charcoal.</td >
227
- <td class =" cost" >£ 102.11</td >
228
- <td class =" cost" >£ 102.11</td >
229
- </tr >
230
- <tr >
231
- <td align =" center" >MR7009298</td >
232
- <td align =" center" >25</td >
233
- <td >Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td >
234
- <td class =" cost" >£ 12.26</td >
235
- <td class =" cost" >£ 325.60</td >
236
- </tr >
136
+ {% if lines is iterable %}
137
+ {% for line in lines %}
138
+ <tr >
139
+ {% if line .special_code == 104777 %}
140
+ {% if line .qty == 1 %}
141
+ <!-- SUBTOTAL TITLE -->
142
+ <td class =" subtotaltitle" colspan =" 6" align =" left" >{{ line .label }}</td >
143
+ {% elseif line .qty == 50 %}
144
+ <!-- SUBTOTAL TEXT -->
145
+ <td class =" blanktotal" colspan =" 6" >{{ line .description }}</td >
146
+ {% elseif line .qty == 99 %}
147
+ <!-- SUBTOTAL SUBTOTAL -->
148
+ <td class =" subtotalsubtotal" colspan =" 6" align =" right" >{{ line .label }}: {{ line .total_ht | e }}</td >
149
+ {% else %}
150
+ <td class =" subtotal" colspan =" 6" align =" left" >{{ line .label }}{{ line .qty }}</td >
151
+ {% endif %}
152
+ {% else %}
153
+ <td align =" center" >{{ line .ref }}</td >
154
+ <td >{{ line .product_label }}<br />{{ line .product_description }}</td >
155
+ <td align =" right" >{{ line .vatrate }}</td >
156
+ <td align =" center" >{{ line .qty }}</td >
157
+ <td class =" cost" >{{ line .subprice | e }}</td >
158
+ <td class =" cost" >{{ line .total_ht | e }}</td >
159
+ {% endif %}
160
+ </tr >
161
+ {% endfor %}
162
+ {% else %}
163
+ {# lines is empty #}
164
+ No lines
165
+ {% endif %}
237
166
<!-- END ITEMS HERE -->
238
167
<tr >
239
- <td class =" blanktotal" colspan =" 3" rowspan =" 6" ></td >
240
- <td class =" totals" >Subtotal:</td >
241
- <td class =" totals cost" >£ 1825.60</td >
242
- </tr >
243
- <tr >
244
- <td class =" totals" >Tax:</td >
245
- <td class =" totals cost" >£ 18.25</td >
246
- </tr >
247
- <tr >
248
- <td class =" totals" >Shipping:</td >
249
- <td class =" totals cost" >£ 42.56</td >
250
- </tr >
251
- <tr >
252
- <td class =" totals" ><b >TOTAL:</b ></td >
253
- <td class =" totals cost" ><b >£ 1882.56</b ></td >
168
+ <td class =" blanktotal" colspan =" 4" rowspan =" 3" ></td >
169
+ <td class =" totals" >{{ total_ht | e }}</td >
170
+ <td class =" totals cost" >{{ object .total_ht | e }}</td >
254
171
</tr >
255
172
<tr >
256
- <td class =" totals" >Deposit: </td >
257
- <td class =" totals cost" >£ 100.00 </td >
173
+ <td class =" totals" >{{ total_tva | e }} </td >
174
+ <td class =" totals cost" >{{ object . total_tva | e }} </td >
258
175
</tr >
259
176
<tr >
260
- <td class =" totals" ><b >Balance due: </b ></td >
261
- <td class =" totals cost" ><b >£ 1782.56 </b ></td >
177
+ <td class =" totals" ><b >{{ total_ttc | e }} </b ></td >
178
+ <td class =" totals cost" ><b >{{ object . total_ttc | e }} </b ></td >
262
179
</tr >
263
180
</tbody >
264
181
</table >
265
182
266
183
267
- <div style =" text-align: center; font-style: italic;" >Payment terms: payment due in 30 days </div >
184
+ <div style =" text-align: center; font-style: italic;" >{{ paymentconditions | e }}: {{ labelpaymentconditions | e }} </div >
268
185
269
186
270
187
</body >
0 commit comments