-
Notifications
You must be signed in to change notification settings - Fork 15
/
professional.html
171 lines (167 loc) · 6.49 KB
/
professional.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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>{{document.number}}</title>
<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">
<style>
body {padding:20px; background:#fff; color:#000; font:normal 10pt Tahoma, Geneva, sans-serif}
h1 {font-size:150%; color:{{account.color_scheme}}; margin:10px 0}
p {margin:2px 0}
a:link, a:visited {color:#000; text-decoration:none}
a:hover {color:#000; text-decoration:none}
address {font-style:normal}
.txt {margin:0}
.w200 {width:200px}
.w10per {width:10%}
.w15per {width:15%}
.fs150per {font-size:150%}
table {width:100%; border:none}
table tr td {padding:5px}
table#items {margin:25px 0; border-collapse:collapse;}
table#items thead tr th {color:{{account.color_scheme}}; font-weight:normal; padding:5px; border-bottom:2px solid #666}
table#items tbody tr td {border-bottom:2px solid #666}
table#items tfoot tr td {text-align:right}
#details h4 {font-size:100%; font-weight:bold; color:{{account.color_scheme}}; text-transform:uppercase; margin-bottom:0}
#details p {margin:0}
#paid-stamp {margin:0 0 18px}
.right {text-align:right}
.center {text-align:center}
.paid {padding:5px 0; border-top:2px solid #666; border-bottom:2px solid #666; font-size:18px; font-weight:bold; text-transform:uppercase}
#legal {font-size:8pt}
#legal p {margin:40px 0 20px}
/* css rules for printing */
@media print {
body {-webkit-print-color-adjust:exact}
#items tr {page-break-inside:avoid}
#items tfoot {display:table-row-group}
}
</style>
</head>
<body>
<table>
<tr>
<td>{% if account.logo_url != blank %}<img src="{{ account.logo_url }}" class="w200" alt="Logo">{% endif %}</td>
<td class="right fs150per">
{% if document.state == "paid" %}
<!-- paid state -->
<p id="paid-stamp">
<span class="paid">{{ labels.paid }}</span>
</p>
{% endif %}
{{document.issue_date | date: 'default', contact.country}}
</td>
</tr>
<tr>
<td colspan="2">
<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>
</tr>
<tr>
<td colspan="2">
<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>
<tr>
<td colspan="2">
<h1>{{title}} {{{document.number}}</h1>
{% if document.po_number != blank %}<p><strong>{{labels.po_number}}: </strong>{{document.po_number}}</p>{% endif %}
{% if document.related_document_type != blank %}
<p><strong>{{labels.related_document}}:</strong>
{{document.related_document_type | localize_document_type: labels}} {{document.related_document_number}}
({{document.related_document_date | date: 'default', contact.country}})</p>
{% endif %}
{% if document.subject != blank %}<p><strong>{{labels.subject}}: </strong>{{ document.subject }}</p>{% endif %}
</td>
</tr>
<tr>
<td colspan="2">
<table id="items" style="font-size:100%">
<thead>
<tr>
<th scope="col">{{labels.description}}</th>
<th class="w10per">{{labels.quantity}}</th>
<th class="right w15per">{{labels.unit_price}}</th>
<th class="right w15per">{{labels.amount}}</th>
</tr>
</thead>
<tbody>
{% for item in document.items %}
<tr>
<td>{{item.description}}</td>
<td class="center w10per">{{item.quantity | precision}}</td>
<td class="right w15per">{{item.unit_price | money}}</td>
<td class="right">{{item.subtotal | money}}</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<tr>
<td colspan="4">
<p>{{labels.subtotal}}: {{document.subtotal | money}}</p>
{% if document.discount > 0 %}<p>{{labels.discount}}: {{document.discount | money}}</p>{% endif %}
{% for tax in document.taxes %}
<p>
{{tax.label}}: {{tax.amount | money}}
{% if tax.currency != document.currency %} ({{tax.local_amount | money}}){% endif %}
</p>
{% endfor %}
<p>{{labels.total}} ({{document.currency}}): {{document.total | money}}</p>
</td>
</tr>
</tfoot>
</table>
</td>
</tr>
<tr>
<td colspan="2" id="details">
{% if document.due_date != blank %}
<h4>{{labels.due_date}}</h4>
<p>{{document.due_date | date: 'default', contact.country}}<p>
{% endif %}
{% if document.valid_until != blank %}
<h4>{{labels.valid_until}}</h4>
<p>{{document.valid_until | date: 'default', contact.country}}<p>
{% endif %}
{% if document.payment_details != blank %}
<h4>{{labels.payment_details}}</h4>
{{document.payment_details | textilize}}
{% elsif document.state == "paid" %}
<h4>{{labels.payment_details}}</h4>
{% assign payment = document.payments | last %}{{ payment.payment_method_text | textilize }}
{% endif %}
{% if document.notes != blank %}
<h4>{{labels.notes}}</h4>
{{document.notes | textilize}}
{% endif %}
</td>
</tr>
<tr>
<td colspan="2" id="legal">
{% if document.legal != blank %}
<p>{{document.legal | textilize}}</p>
{% endif %}
</td>
</tr>
{% if document.verification_code %}
<tr>
<td class="right"> </td>
<td class="right">
{{document.verification_code}} <br><br><br>
{{document.verification_permalink}}
</td>
</tr>
{% endif %}
</table>
</body>
</html>