-
Notifications
You must be signed in to change notification settings - Fork 17
/
invoice.gtmpl
196 lines (183 loc) · 6.68 KB
/
invoice.gtmpl
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta charset="utf-8"/>
<meta name="generated by" content="{{ kraft.VERSION }}"/>
<meta name="author" content="{{ me.NAME }}"/>
<meta name="document type" content="{{ doc.docType }}"/>
<meta name="correspondent" content="{{ customer.organisation }}"/>
{% if doc.projectLabel %}
<meta name="correspondent's reference" content="{{ doc.buyerReference }}"/>
{% endif %}
<meta name="validity date" content="{{ doc.dateStrISO }}"/>
<meta name="document ID" content="{{ doc.ident }} {{ doc.docIDStr }} {{ doc.identifier }}"/>
{% if doc.predecessor %}
<meta name="predecessor" content="{{ doc.predecessor }}"/>
{% endif %}
{% if doc.projectLabel %}
<meta name="project" content="{{ doc.projectLabel }}"/>
{% endif %}
<style>
@charset "UTF-8";
/* Use google web fonts */
@import url("https://fonts.googleapis.com/css?family=Pacifico|Open+Sans+Pro:400,700");
/* @import url("https://fonts.googleapis.com/css?family=Roboto"); */
/* @import url("https://fonts.googleapis.com/css?family=Oxygen"); */
/* The CSS for printing */
@page {
size: A4;
margin-left: 2.4cm;
margin-top:27mm;
margin-right: 1.6cm;
margin-bottom: 2cm;
color: #2f590a;
@bottom-left {
font-family: Oxygen;
content: '{{ me.ORGANISATION }} | {{ label.PHONE }}: {{ me.PHONE }} | {{ label.EMAIL }}: {{ me.EMAIL }}';
font-size: 9pt;
}
@bottom-right {
content: "{{ label.PAGE }} " counter(page) " {{ label.PAGE_OF }} " counter(pages);
font-family: Oxygen;
font-size: 9pt;
}
}
{# Do not display the page number on first page, but the website. #}
@page :first {
margin-top: 46mm;
{% if me.URL %}
@bottom-right {
font-family: Oxygen;
font-size: 9pt;
content: '{{ label.WEBSITE }}: {{ me.URL }}';
}
{% endif %}
}
</style>
{# Include the stylesheet file. It will have to reside in the same dir as the template file #}
<link href="kraft.css" media="print" rel="stylesheet"/>
{# "Set to 1 to enable html in the texts - experimental! #}
{% with 0 as enableHtmlInTexts %}
<title>{{ doc.docType }} {{ doc.ident }}</title>
</head>
{% autoescape off %}
<body>
<p id="letterheader">
{{ me.ORGANISATION }} - {{ me.STREET }} - {{ me.POSTCODE }} {{ me.LOCALITY }}
</p>
<address id="to">{{ doc.address }}</address>
<dl id="information">
<dt>{{ label.TYPE }}</dt> <dd>{{ doc.docType }}</dd>
<dt>{{ label.DOC_NO }}</dt> <dd>{{ doc.ident }}</dd>
<dt>{{ label.DATE }}</dt> <dd>{{ doc.dateStr }}</dd>
{% if doc.projectLabel %}
<dt>{{ label.PROJECT }}</dt>
<dd>{{ doc.projectLabel }}</dd>
{% endif %}
{% if doc.predecessor > 0 %}
<dt>{{ label.PREDECESSOR }}</dt>
<dd>{{ doc.predecessor }}</dd>
{% endif %}
</dl>
<h1>{{ doc.docType }} {{ doc.ident }}</h1>
<p class="salut">{{ doc.salut }}</p>
{% if enableHtmlInTexts %}
{{ doc.preText|safe|linebreaks }}
{% else %}
{{ doc.preTextHtml|safe }}
{% endif %}
</p>
<table id="items">
<thead>
<th class="col-No col-left">{{ label.NO_SHORT }}</th>
<th class="col-Text col-left">{{ label.ITEM }}</th>
<th class="col-Amount col-center">{{ label.QUANTITY_SHORT }}</th>
<th class="col-Unit col-center">{{ label.UNIT }}</th>
<th class="col-SPrice col-center">{{ label.PRICE }}</th>
<th class="col-Sum col-center">{{ label.SUM }}</th>
<th></th>
</thead>
<tbody>
{% for item in doc.items %}
<tr>
<td class="col-No col-left">{{ item.itemNumber }}.</td>
<td class="col-Text col-left">
{% if item.kind == 'Alternative' or item.kind == 'Demand' %}
<i>
{% endif %}
{% if enableHtmlInTexts %}
{{ item.text|linebreaks }}
{% else %}
{{ item.htmlText|safe }}
{% endif %}
{% if item.kind == 'Alternative' or item.kind == 'Demand' %}
</i>
{% endif %}
</td>
<td class="col-Amount col-right">{{ item.amount }}</td>
<td class="col-Unit col-left">{{ item.unit }}</td>
<td class="col-SPrice col-right">{{ item.unitPrice }}</td>
<td class="col-Sum col-right">{{ item.nettoPrice }}</td>
<td class="col-Taxmarker col-right"><sup><small>{{ item.taxMarker }}</small></sup></td>
</tr>
{% endfor %}
</tbody>
<tfoot>
</tfoot>
</table>
<table id="total">
<tbody>
<tr>
<td>{{ label.NET }}</td>
<td class="col-TotalSum">{{ doc.nettoSumStr }}</td>
</tr>
<tr>
{% if doc.hasIndividualTaxation %}
{# This section is shown for documents with individual tax rates #}
<tr>
<td><sup><small>{{ doc.taxMarkerReduced }}</small></sup>
+{{ doc.reducedTaxPercentStr }}% {{ label.VAT }}</td>
<td class="col-TotalSum">{{ doc.reducedTaxSumStr }}</td>
</tr>
<tr>
<td><sup><small>{{ doc.taxMarkerFull }}</small></sup>
+{{ doc.fullTaxPercentStr }}% {{ label.VAT }}</td>
<td class="col-TotalSum">{{ doc.fullTaxSumStr }}</td>
</tr>
{% else %}
<tr>
{# This section is shown for documents with one consistent tax rate #}
{# Note: taxPercentStr can either be reduced or full, depending on #}
{# the tax settings of the document #}
<td>+{{ doc.taxPercentStr }}% {{ label.VAT }}</td>
<td>{{ doc.taxSumStr }}</td>
</tr>
{% endif %}
<tr>
<td><b>{{ label.SUM }}</b></td>
<td class="col-TotalSum">{{ doc.bruttoSumStr }}</td>
</tr>
</tbody>
</table>
<p class="bottomtext">
{% if enableHtmlInTexts %}
{{ doc.postText|linebreaks }}
{% else %}
{{ doc.postTextHtml|safe }}
{% endif %}
</p>
<p class="goodbye">
{{ doc.goodbye }}
</p>
{%if doc.isInvoice and epcqrcode.valid and epcqrcode.show %}
<p class="epcqrcode">
<img class="epc" src="file://{{ epcqrcode.svgfilename }}" alt="EPC QR Code" />
Dieser QR Code ermöglicht einfaches, sicheres und schnelles Begleichen dieser Rechnung via GiroPay:
Diesen Code mit dem Smartphone scannen und Überweisung per Banking App aufgeben.
</p>
{% endif %}
</body>
{% endautoescape %}
{% endwith %}
</html>