Skip to content

Commit a9987a7

Browse files
committed
enhanced template
1 parent c46d5aa commit a9987a7

File tree

1 file changed

+66
-20
lines changed

1 file changed

+66
-20
lines changed

Diff for: ZUGFeRD.Render/Simple.scriban

+66-20
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<div class="container-fluid">
1111
<div class="row">
1212
<div class="col-12">
13-
<h1>Invoice {{ InvoiceNo }}</h1>
13+
<h1>Invoice {{ Invoice.InvoiceNo }}, {{ Invoice.InvoiceDate | date.to_string("%Y-%m-%d") }}</h1>
1414
</div>
1515
</div>
1616
<div class="row">
@@ -58,6 +58,20 @@
5858
</div>
5959
</div>
6060
</div>
61+
62+
{{ if Invoice.DeliveryNoteReferencedDocument }}
63+
<div class="row">
64+
<div class="col-12">
65+
<div class="card">
66+
<div class="card-body">
67+
<h5 class="card-title">Delivery Note</h5>
68+
No: {{ Invoice.DeliveryNoteReferencedDocument?.ID }}<br />
69+
Date: {{ Invoice.DeliveryNoteReferencedDocument?.IssueDateTime | date.to_string("%Y-%m-%d") }}
70+
</div>
71+
</div>
72+
</div>
73+
</div>
74+
{{ end }}
6175

6276
<div class="row mt-4">
6377
<div class="col-12">
@@ -87,12 +101,12 @@
87101
{{ item.SellerAssignedID }}
88102
<br />
89103
{{ if item.BuyerAssignedID }}
90-
<small>Buy assigned id: {{ item.BuyerAssignedID }}</small>
104+
<small>Buyer assigned id: {{ item.BuyerAssignedID }}</small>
91105
{{ end }}
92106
<br />
93107
{{ if item.GlobalID }}
94108
{{ if item.GlobalID.SchemeID != "Unknown" }}
95-
<small>{{ item.GlobalID.SchemeID }}: {{ item.GlobalID.Id }}</small>
109+
<small>{{ item.GlobalID.SchemeID }}: {{ item.GlobalID.ID }}</small>
96110
{{ end }}
97111
{{ end }}
98112
</td>
@@ -129,25 +143,57 @@
129143
</div>
130144

131145
<div class="row">
132-
<div class="offset-8 col-4">
133-
<dl>
134-
<dt>Line Total</dt>
135-
<dd>{{ Invoice.LineTotalAmount | math.format("N2") }}</dd>
136-
<dt>Tax Total</dt>
137-
<dd>{{ Invoice.TaxTotalAmount | math.format("N2") }}</dd>
138-
<dt>Grand Total</dt>
139-
<dd>{{ Invoice.GrandTotalAmount | math.format("N2") }}</dd>
146+
<div class="col-6">
147+
<div class="card">
148+
<div class="card-body">
149+
<h5 class="card-title">Tax</h5>
150+
<table class="table">
151+
<thead>
152+
<tr>
153+
<th>Basis amount</th>
154+
<th>Percent</th>
155+
<th>Tax amount</th>
156+
</tr>
157+
</thead>
158+
<tbody>
159+
{{ for tax in Invoice.Taxes }}
160+
<tr>
161+
<td>{{ tax.BasisAmount }}</td>
162+
<td>{{ tax.Percent }}</td>
163+
<td>
164+
<b>{{ tax.TaxAmount }}</b>
165+
</td>
166+
</tr>
167+
{{ end }}
168+
</tbody>
169+
</table>
170+
</div>
171+
</div>
172+
</div>
173+
<div class="col-6">
174+
<div class="card">
175+
<div class="card-body">
176+
<h5 class="card-title">Totals</h5>
177+
<dl>
178+
<dt>Line Total</dt>
179+
<dd>{{ Invoice.LineTotalAmount | math.format("N2") }}</dd>
180+
<dt>Tax Total</dt>
181+
<dd>{{ Invoice.TaxTotalAmount | math.format("N2") }}</dd>
182+
<dt>Grand Total</dt>
183+
<dd>{{ Invoice.GrandTotalAmount | math.format("N2") }}</dd>
140184

141-
{{ if Invoice.TotalPrepaidAmount }}
142-
<dt>Prepaid Amount</dt>
143-
<dd>{{ Invoice.TotalPrepaidAmount | math.format("N2") }}</dd>
144-
{{ end }}
185+
{{ if Invoice.TotalPrepaidAmount }}
186+
<dt>Prepaid Amount</dt>
187+
<dd>{{ Invoice.TotalPrepaidAmount | math.format("N2") }}</dd>
188+
{{ end }}
145189

146-
{{ if Invoice.DuePayableAmount }}
147-
<dt>Due Payable</dt>
148-
<dd>{{ Invoice.DuePayableAmount | math.format("N2") }}</dd>
149-
{{ end }}
150-
</dl>
190+
{{ if Invoice.DuePayableAmount }}
191+
<dt>Due Payable</dt>
192+
<dd>{{ Invoice.DuePayableAmount | math.format("N2") }}</dd>
193+
{{ end }}
194+
</dl>
195+
</div>
196+
</div>
151197
</div>
152198
</div>
153199
</div>

0 commit comments

Comments
 (0)