blob: d661732db9271361243f99e8936c689a2e86c064 [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}
95 </style>
96 </head>
97 <body>
98 {{ if .Proforma }}
99 <div class="bgtext"><div>Proforma</div></div>
100 {{ end }}
101 <div class="rhs">
102 <div class="invoicer">
103 <ul>
104 {{ range $i, $e := .InvoicerBilling }}
105 {{ if eq $i 0 }}
106 <li><b>{{ $e }}</b></li>
107 {{ else }}
108 <li>{{ $e }}</li>
109 {{ end }}
110 {{ end }}
111 {{ if .InvoicerCompanyNumber }}
Sergiusz Bazanskic2d322c2019-05-01 13:14:32 +0200112 <li>{{ .InvoicerCompanyNumber }}</li>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200113 {{ end }}
Sergiusz Bazanskia818ef22019-06-07 10:37:22 +0200114 <li><b>Tax Number:</b> {{ .InvoicerVAT }}</li>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200115 </ul>
116 </div>
117 <div class="metadata">
118 <ul>
Sergiusz Bazanskia818ef22019-06-07 10:37:22 +0200119 <li><b>Invoice number:</b> {{ .InvoiceNumber }}</li>
120 <li><b>Date:</b> {{ .Date.Format "2006/01/02" }}</li>
121 <li><b>Due date:</b> {{ .DueDate.Format "2006/01/02" }}</li>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200122 <li><b>IBAN:</b> {{ .IBAN }}</li>
123 <li><b>SWIFT/BIC:</b> {{ .SWIFT }}</li>
124 </ul>
125 </div>
126 </div>
127 <div class="lhs">
128 <div class="invoicee">
129 {{ if .Proforma }}
Sergiusz Bazanskia818ef22019-06-07 10:37:22 +0200130 <h1>Proforma Invoice</h1>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200131 {{ else }}
Sergiusz Bazanskia818ef22019-06-07 10:37:22 +0200132 <h1>VAT Invoice</h1>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200133 {{ end }}
134 <ul>
135 {{ range $i, $e := .InvoiceeBilling }}
136 {{ if eq $i 0 }}
137 <li><b>{{ $e }}</b></li>
138 {{ else }}
139 <li>{{ $e }}</li>
140 {{ end }}
141 {{ end }}
142 {{ if .USCustomer }}
143 <li>EIN: {{ .InvoiceeVAT }}</li>
144 <li><b>(VAT zero rate)</b></li>
145 {{ else }}
Sergiusz Bazanskic2d322c2019-05-01 13:14:32 +0200146 <li><b>NIP:</b> {{ .InvoiceeVAT }}</li>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200147 {{ end }}
148
149 {{ if .ReverseVAT }}
Sergiusz Bazanskibc27e642019-06-20 16:11:07 +0200150 <li><b>(reverse charge / obciążenie odwrotne)</b></li>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200151 {{ end }}
152 </ul>
153 </div>
154 </div>
155 <div style="clear: both; height: 1em;"></div>
156 <table class="items">
157 <tr>
Sergiusz Bazanskibc27e642019-06-20 16:11:07 +0200158 <th style="width: 60%;">Name of goods / service</th>
159 <th>Unit price<br />(net)</th>
Sergiusz Bazanskia818ef22019-06-07 10:37:22 +0200160 <th>Qty</th>
Sergiusz Bazanskibc27e642019-06-20 16:11:07 +0200161 {{ if not .ReverseVAT }}
Sergiusz Bazanskia818ef22019-06-07 10:37:22 +0200162 <th>VAT rate</th>
Sergiusz Bazanskibc27e642019-06-20 16:11:07 +0200163 {{ end }}
164 <th>Goods value<br />(net)</th>
165 {{ if not .ReverseVAT }}
166 <th>Goods value<br />(gross)</th>
167 {{ end }}
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200168 </tr>
169 {{ range .Items }}
170 <tr>
171 <td style="text-align: left;">{{ .Title }}</td>
172 <td>{{ .UnitPrice }}</td>
173 <td>{{ .Qty }}</td>
Sergiusz Bazanskibc27e642019-06-20 16:11:07 +0200174 {{ if not $.ReverseVAT }}
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200175 <td>{{ .VATRate }}</td>
Sergiusz Bazanskibc27e642019-06-20 16:11:07 +0200176 {{ end }}
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200177 <td>{{ .TotalNet }}</td>
Sergiusz Bazanskibc27e642019-06-20 16:11:07 +0200178 {{ if not $.ReverseVAT }}
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200179 <td>{{ .Total }}</td>
Sergiusz Bazanskibc27e642019-06-20 16:11:07 +0200180 {{ end }}
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200181 </tr>
182 {{ end }}
Sergiusz Bazanskibc27e642019-06-20 16:11:07 +0200183 {{ if not .ReverseVAT }}
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200184 <tr>
Sergiusz Bazanskia818ef22019-06-07 10:37:22 +0200185 <td colspan="5" class="lhead">Subtotal without VAT</td>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200186 <td>{{ .TotalNet }}</td>
187 </tr>
188 <tr>
Sergiusz Bazanskibc27e642019-06-20 16:11:07 +0200189 <td colspan="5" class="lhead">VAT Total {{ if .USCustomer }}(VAT zero rate){{ end }}</td>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200190 <td>{{ .VATTotal }}</td>
191 </tr>
Sergiusz Bazanskibc27e642019-06-20 16:11:07 +0200192 {{ end }}
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200193 <tr>
Sergiusz Bazanskibc27e642019-06-20 16:11:07 +0200194 <td colspan="{{ if .ReverseVAT }}3{{ else }}5{{ end }}" class="lhead"><b>Total</b></td>
Sergiusz Bazanskic2d322c2019-05-01 13:14:32 +0200195 <td><b>{{ .Total }}</b></td>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200196 </tr>
197 </table>
198 </body>
199</html>