blob: d4aa3fc739e0502c13f8edd8320a71135db7bcd8 [file] [log] [blame]
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +02001<!doctype html>
2<html lang="en">
3 <head>
4 <meta charset="UTF-8">
5 <title>Invoice 0001</title>
6 <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,700" rel="stylesheet">
7 <style type="text/css">
8body {
9 background-color: #fff;
10 font-family: 'Roboto', sans-serif;
11 font-size: 1em;
12
13 padding: 2em;
14}
15ul {
16 list-style: none;
17 padding: 0;
18}
19ul li {
20 margin-bottom: 0.2em;
21}
22
23@page {
24 size: A4;
25 margin: 0;
26}
27div.rhs {
28 float: right;
29 width: 50%;
30 text-align: right;
31}
32div.lhs {
33 float: left;
34 text-align: left;
35 width: 50%;
36 min-height: 35em;
37}
38div.metadata {
39 margin-top: 2em;
40}
41div.invoicee {
42 margin-top: 9em;
43}
44h1 {
45 font-size: 1.5em;
46 margin: 0;
47 text-transform: uppercase;
48}
Sergiusz Bazanskia103f062019-05-18 16:23:58 +020049h2 {
50 font-size: 1.2em;
51 margin: 0;
52}
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +020053table.items {
54 text-align: right;
55 border-spacing: 0px;
56 border-collapse: collapse;
57 border: 0;
58 width: 100%;
59}
60table.items td,th {
61 border: 1px solid black;
62}
63table.items tr:first-child {
64 background-color: #eee;
65 color: #111;
66 padding: 0.8em;
67 text-align: left;
68}
69table.items td {
70 background-color: #fff;
71}
72table.items td,th {
73 padding: 0.5em 1em 0.5em 1em;
74}
75td.lhead {
76 border: 0 !important;
77 text-align: right;
78 text-transform: uppercase;
79 background: rgba(0, 0, 0, 0) !important;
80}
81div.bgtext {
82 z-index: -10;
83 position: absolute;
84 top: 140mm;
85 left: 0;
86 width: 100%;
87}
88div.bgtext div {
89 text-align: center;
90 font-size: 10em;
91 color: #ddd;
92 -webkit-transform: rotate(-45deg);
93 text-transform: uppercase;
94}
Serge Bazanski772a1332021-02-17 20:28:51 +010095div.symbols {
96 padding: 0 0 0.5rem 0.1rem;
97}
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +020098 </style>
99 </head>
100 <body>
101 {{ if .Proforma }}
102 <div class="bgtext"><div>Proforma</div></div>
103 {{ end }}
104 <div class="rhs">
105 <div class="invoicer">
106 <ul>
107 {{ range $i, $e := .InvoicerBilling }}
108 {{ if eq $i 0 }}
109 <li><b>{{ $e }}</b></li>
110 {{ else }}
111 <li>{{ $e }}</li>
112 {{ end }}
113 {{ end }}
114 {{ if .InvoicerCompanyNumber }}
Sergiusz Bazanskic2d322c2019-05-01 13:14:32 +0200115 <li>{{ .InvoicerCompanyNumber }}</li>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200116 {{ end }}
Sergiusz Bazanskia818ef22019-06-07 10:37:22 +0200117 <li><b>Tax Number:</b> {{ .InvoicerVAT }}</li>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200118 </ul>
119 </div>
120 <div class="metadata">
121 <ul>
Sergiusz Bazanskia818ef22019-06-07 10:37:22 +0200122 <li><b>Invoice number:</b> {{ .InvoiceNumber }}</li>
123 <li><b>Date:</b> {{ .Date.Format "2006/01/02" }}</li>
124 <li><b>Due date:</b> {{ .DueDate.Format "2006/01/02" }}</li>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200125 <li><b>IBAN:</b> {{ .IBAN }}</li>
126 <li><b>SWIFT/BIC:</b> {{ .SWIFT }}</li>
127 </ul>
128 </div>
129 </div>
130 <div class="lhs">
131 <div class="invoicee">
132 {{ if .Proforma }}
Sergiusz Bazanskia818ef22019-06-07 10:37:22 +0200133 <h1>Proforma Invoice</h1>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200134 {{ else }}
Sergiusz Bazanskia818ef22019-06-07 10:37:22 +0200135 <h1>VAT Invoice</h1>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200136 {{ end }}
137 <ul>
138 {{ range $i, $e := .InvoiceeBilling }}
139 {{ if eq $i 0 }}
140 <li><b>{{ $e }}</b></li>
141 {{ else }}
142 <li>{{ $e }}</li>
143 {{ end }}
144 {{ end }}
145 {{ if .USCustomer }}
Serge Bazanski87ede252021-05-12 21:05:53 +0000146 <li>{{ .InvoiceeVAT }}</li>
147 <li style="margin-top: 2em;"><b>VAT NP</b> <i>(zero rate)</i></li>
Sergiusz Bazanskide3d3fa2020-05-31 00:12:11 +0200148 {{ else if .InvoiceeVAT }}
Sergiusz Bazanskic2d322c2019-05-01 13:14:32 +0200149 <li><b>NIP:</b> {{ .InvoiceeVAT }}</li>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200150 {{ end }}
151
152 {{ if .ReverseVAT }}
Serge Bazanski87ede252021-05-12 21:05:53 +0000153 <li><b>Obciążenie odwrotne</b> <i>(reverse charge)</ii></li>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200154 {{ end }}
155 </ul>
156 </div>
157 </div>
158 <div style="clear: both; height: 1em;"></div>
Serge Bazanski772a1332021-02-17 20:28:51 +0100159 <div class="symbols">
Serge Bazanski87ede252021-05-12 21:05:53 +0000160 <b>Oznaczenia</b> <i>(JPK symbols)</i>: {{ .Symbols }}
Serge Bazanski772a1332021-02-17 20:28:51 +0100161 </div>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200162 <table class="items">
163 <tr>
Sergiusz Bazanskibc27e642019-06-20 16:11:07 +0200164 <th style="width: 60%;">Name of goods / service</th>
165 <th>Unit price<br />(net)</th>
Sergiusz Bazanskia818ef22019-06-07 10:37:22 +0200166 <th>Qty</th>
Sergiusz Bazanskibc27e642019-06-20 16:11:07 +0200167 {{ if not .ReverseVAT }}
Sergiusz Bazanskia818ef22019-06-07 10:37:22 +0200168 <th>VAT rate</th>
Sergiusz Bazanskibc27e642019-06-20 16:11:07 +0200169 {{ end }}
170 <th>Goods value<br />(net)</th>
171 {{ if not .ReverseVAT }}
172 <th>Goods value<br />(gross)</th>
173 {{ end }}
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200174 </tr>
175 {{ range .Items }}
176 <tr>
177 <td style="text-align: left;">{{ .Title }}</td>
178 <td>{{ .UnitPrice }}</td>
179 <td>{{ .Qty }}</td>
Sergiusz Bazanskibc27e642019-06-20 16:11:07 +0200180 {{ if not $.ReverseVAT }}
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200181 <td>{{ .VATRate }}</td>
Sergiusz Bazanskibc27e642019-06-20 16:11:07 +0200182 {{ end }}
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200183 <td>{{ .TotalNet }}</td>
Sergiusz Bazanskibc27e642019-06-20 16:11:07 +0200184 {{ if not $.ReverseVAT }}
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200185 <td>{{ .Total }}</td>
Sergiusz Bazanskibc27e642019-06-20 16:11:07 +0200186 {{ end }}
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200187 </tr>
188 {{ end }}
Sergiusz Bazanskibc27e642019-06-20 16:11:07 +0200189 {{ if not .ReverseVAT }}
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200190 <tr>
Sergiusz Bazanskia818ef22019-06-07 10:37:22 +0200191 <td colspan="5" class="lhead">Subtotal without VAT</td>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200192 <td>{{ .TotalNet }}</td>
193 </tr>
194 <tr>
Sergiusz Bazanskibc27e642019-06-20 16:11:07 +0200195 <td colspan="5" class="lhead">VAT Total {{ if .USCustomer }}(VAT zero rate){{ end }}</td>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200196 <td>{{ .VATTotal }}</td>
197 </tr>
Sergiusz Bazanskibc27e642019-06-20 16:11:07 +0200198 {{ end }}
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200199 <tr>
Sergiusz Bazanskibc27e642019-06-20 16:11:07 +0200200 <td colspan="{{ if .ReverseVAT }}3{{ else }}5{{ end }}" class="lhead"><b>Total</b></td>
Sergiusz Bazanskic2d322c2019-05-01 13:14:32 +0200201 <td><b>{{ .Total }}</b></td>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200202 </tr>
203 </table>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200204 </body>
205</html>