-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathdestijl.html
235 lines (232 loc) · 9.77 KB
/
destijl.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="pdfkit-page_size" content="A4">
<meta name="pdfkit-margin_top" content="13mm">
<meta name="pdfkit-margin_right" content="13mm">
<meta name="pdfkit-margin_bottom" content="13mm">
<meta name="pdfkit-margin_left" content="13mm">
<title>{{document.number}}</title>
<style>
body {padding:20px; background:#fff; color:#000; font:normal 100% Helvetica, Arial, sans-serif}
h1 {font-size:32px; margin:0 0 20px 0; line-height:1.1; color:{{account.color_scheme}}}
h2 {font-size:16px; font-weight:bold; margin:0}
h3 {margin:2px 0}
p {font-size:12px; margin:0}
address {font-style:normal}
a:link, a:visited {color:#000; text-decoration:none}
a:hover {color:#000; text-decoration:none}
abbr {border:none}
.label, .currency {font-size:11px; text-transform:uppercase; font-weight:normal}
.total-currency {font-size:16px}
.smalltxt {font-size:14px}
.txt {font-size:16px; font-weight:bold}
.w300 {width:300px}
.w18per {width:18%}
.w20per {width:20%}
.w38per {width:38%}
.w42per {width:42%}
.w47per {width:47%}
.w53per {width:53%}
.valign-bottom {vertical-align:bottom}
.valign-top {vertical-align:top}
#items th {font-size:13px}
table {width:100%; border:none; border-collapse:collapse}
table td {padding:5px 0; font-size:13px; line-height:16px}
#items-container { width: 80%; float: right}
#items { margin:30px 0 30px 0}
#items thead tr th {padding:8px 0 6px 0}
#items tbody {border-top:2px solid #000; border-bottom:2px solid #000}
#items tbody tr {border-bottom:1px solid #000}
#items tfoot .label, #items tfoot .right {border-bottom:1px solid #000}
#items tfoot .txt {border-bottom:1px solid {{account.color_scheme}}}
#items td {padding:8px 0}
#items td.topspace14 {padding-top:14px}
.border-first {border-top:4px solid {{account.color_scheme}}; margin-top:0; padding-top:5px}
.border-end {border-bottom:2px solid {{account.color_scheme}}}
.border2 {border-top:2px solid {{account.color_scheme}}}
.border1 {border-top:1px solid #000; margin-top:30px; padding-top:5px}
.space30 {padding-right:30px}
.space12 {padding-right:12px}
.left {text-align:left}
.right {text-align:right}
.center {text-align:center}
.paid {padding:5px 0; border-top:2px solid #000; border-bottom:2px solid #000; font-size:24px; font-weight:bold; text-transform:uppercase}
.legal {padding:40px 0 20px; font-size:14px; vertical-align:top; text-align:center}
/* css rules for printing */
@media print {
body {-webkit-print-color-adjust:exact}
#items tr {page-break-inside:avoid}
#items tfoot {display:table-row-group}
#items thead {display:table-row-group}
}
</style>
</head>
<body>
<table>
<!-- // Begin Template Header \\ -->
<tr>
<td colspan="2">
{% if account.logo_url != blank %}
<img src="{{ account.logo_url }}" class="w300" alt="Logo">
{% endif %}
</td>
<td class="valign-bottom">
<h1>{{title}}</h1>
{% if document.subject != blank %}
<p class="subject">{{ document.subject }}</p>
{% endif %}
</td>
</tr>
<!-- // End Template Header \\ -->
<!-- // Begin Template Body \\ -->
<tr>
<td rowspan="2" class="space12 w20per valign-top">
<h2 class="label border-first">{{labels.number}}</h2>
<p class="txt">{{ document.number }}</p>
<h2 class="label border1">{{labels.issue_date}}</h2>
<p class="txt">{{document.issue_date | date: 'default', contact.country}}</p>
{% if document.po_number != blank %}
<h2 class="label border1">{{labels.po_number}}</h2>
<p class="txt">{{ document.po_number }}</p>
{% endif %}
{% if document.due_date != blank %}
<h2 class="label border1">{{labels.due_date}}</h2>
<p class="txt">{{document.due_date | date: 'default', contact.country}}</p>
{% endif %}
{% if document.valid_until != blank %}
<h2 class="label border1">{{labels.valid_until}}</h2>
<p class="txt">{{document.valid_until | date: 'default', contact.country}}</p>
{% endif %}
{% if document.related_document_type != blank %}
<h2 class="label border1">{{labels.related_document}}</h2>
<p class="txt">{{document.related_document_type | localize_document_type: labels}} <br> {{document.related_document_number}}</p>
<p>{{document.related_document_date | date: 'default', contact.country}}</p>
{% endif %}
</td>
<td class="space12 w38per valign-top">
<h2 class="label border-first">{{labels.from}}</h2>
<h3 class="txt">{{ account.full_name }}</h3>
{% if account.tax_id != blank %}<p>{{labels.tax_id}}: {{account.tax_id}}</p>{% endif %}
<address>{{ account.formatted_address | newline_to_br }}</address>
{% if account.email != blank %}<p><a href="mailto:{{account.email}}">{{ account.email }}</a></p>{% endif %}
{% if account.web != blank %}<p><a href="{{account.web}}">{{ account.web }}</a></p>{% endif %}
</td>
<td class="w42per valign-top">
<h2 class="label border-first">{{labels.to}}</h2>
<h3 class="txt">{{ document.contact }}</h3>
{% if document.tax_id != blank %}<p>{{labels.tax_id}}: {{document.tax_id}}</p>{% endif %}
<address>{{ document.billing_address | newline_to_br }}</address>
</td>
</tr>
<!-- // End Template Body \\ -->
</table>
<div id="items-container">
<table id="items">
<thead>
<tr class="border-first">
<th scope="col" class="left">{{labels.description}}</th>
<th class="right w18per">{{labels.quantity}}</th>
<th class="right w20per">{{labels.unit_price}}</th>
<th class="right w20per">{{labels.amount}}</th>
</tr>
</thead>
<tbody>
{% for item in document.items %}
<tr>
<td>{{item.description}}</td>
<td class="right">{{item.quantity | precision}}</td>
<td class="right">{{item.unit_price | precision}}</td>
<td class="right"><strong>{{item.subtotal | money}}</strong></td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<tr>
<td colspan="2"> </td>
<td class="label">{{labels.subtotal}}</td>
<td class="right"><strong>{{ document.subtotal | money}}</strong></td>
</tr>
{% if document.discount > 0 %}
<tr>
<td colspan="2"> </td>
<td class="label">{{labels.discount}}</td>
<td class="right"><strong>{{ document.discount | money}}</strong></td>
</tr>
{% endif %}
{% for tax in document.taxes %}
<tr>
<td colspan="2"> </td>
<td class="label">{{tax.label}}</td>
<td class="right">
<strong>{{tax.amount | money}}</strong>
{% if tax.currency != document.currency %} ({{tax.local_amount | money}}){% endif %}
</td>
</tr>
{% endfor %}
<tr>
<td colspan="2"> </td>
<td class="border2 txt">{{labels.total}}</td>
<td class="border2 right txt"><strong>{{document.total | money}}</strong></td>
</tr>
{% if document.state == "paid" %}
<!-- paid state -->
<tr>
<td colspan="4" class="topspace14"> </td>
</tr>
<tr>
<td colspan="2"> </td>
<td colspan="2"><span class="paid">{{paid_stamp}}</span></td>
</tr>
{% endif %}
</tfoot>
</table>
<table id="footer">
<!-- // Begin Template Footer \\ -->
<tr>
<td> </td>
<td colspan="2" class="valign-top">
<table>
<tr>
{% if document.notes != blank %}
<td {% if document.payment_details != blank %} class="space12 w47per valign-top" {% endif %}>
<h2 class="label border-first">{{labels.notes}}</h2>
<div class="smalltxt">{{document.notes | textilize}}</div>
</td>
{% endif %}
{% if document.payment_details != blank %}
<td class="w53per valign-top">
<h2 class="label border-first">{{labels.payment_details}}</h2>
<div class="smalltxt">{{document.payment_details | textilize }}</div>
</td>
{% elsif document.state == "paid" %}
<td class="w53per valign-top">
<h2 class="label border-first">{{labels.payment_details}}</h2>
<div class="smalltxt">{% assign payment = document.payments | last %}{{ payment.payment_method_text | textilize }}</div>
</td>
{% endif %}
</tr>
</table>
</td>
</tr>
<!-- legal notes -->
{% if document.legal != blank %}
<tr>
<td colspan="3" class="legal">{{document.legal | textilize}}</td>
</tr>
{% endif %}
{% if document.verification_code %}
<tr>
<td colspan="2" class="right"> </td>
<td class="right">
{{document.verification_code}} <br><br><br>
{{document.verification_permalink}}
</td>
</tr>
{% endif %}
<!-- // End Template Footer \\ -->
</table>
</div>
</body>
</html>