blob: 6bf2947e454495aa77cc90a4f67a7a6487ee2628 [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}
49table.items {
50 text-align: right;
51 border-spacing: 0px;
52 border-collapse: collapse;
53 border: 0;
54 width: 100%;
55}
56table.items td,th {
57 border: 1px solid black;
58}
59table.items tr:first-child {
60 background-color: #eee;
61 color: #111;
62 padding: 0.8em;
63 text-align: left;
64}
65table.items td {
66 background-color: #fff;
67}
68table.items td,th {
69 padding: 0.5em 1em 0.5em 1em;
70}
71td.lhead {
72 border: 0 !important;
73 text-align: right;
74 text-transform: uppercase;
75 background: rgba(0, 0, 0, 0) !important;
76}
77div.bgtext {
78 z-index: -10;
79 position: absolute;
80 top: 140mm;
81 left: 0;
82 width: 100%;
83}
84div.bgtext div {
85 text-align: center;
86 font-size: 10em;
87 color: #ddd;
88 -webkit-transform: rotate(-45deg);
89 text-transform: uppercase;
90}
91 </style>
92 </head>
93 <body>
94 {{ if .Proforma }}
95 <div class="bgtext"><div>Proforma</div></div>
96 {{ end }}
97 <div class="rhs">
98 <div class="invoicer">
99 <ul>
100 {{ range $i, $e := .InvoicerBilling }}
101 {{ if eq $i 0 }}
102 <li><b>{{ $e }}</b></li>
103 {{ else }}
104 <li>{{ $e }}</li>
105 {{ end }}
106 {{ end }}
107 {{ if .InvoicerCompanyNumber }}
Sergiusz Bazanskic2d322c2019-05-01 13:14:32 +0200108 <li>{{ .InvoicerCompanyNumber }}</li>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200109 {{ end }}
Sergiusz Bazanskic2d322c2019-05-01 13:14:32 +0200110 <li><b>NIP:</b> {{ .InvoicerVAT }}</li>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200111 </ul>
112 </div>
113 <div class="metadata">
114 <ul>
Sergiusz Bazanskic2d322c2019-05-01 13:14:32 +0200115 <li><b>Numer faktury:</b> {{ .InvoiceNumber }}</li>
116 <li><b>Data wystawienia:</b> {{ .Date.Format "2006/01/02" }}</li>
117 <li><b>Termin płatności:</b> {{ .DueDate.Format "2006/01/02" }}</li>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200118 <li><b>IBAN:</b> {{ .IBAN }}</li>
119 <li><b>SWIFT/BIC:</b> {{ .SWIFT }}</li>
120 </ul>
121 </div>
122 </div>
123 <div class="lhs">
124 <div class="invoicee">
125 {{ if .Proforma }}
Sergiusz Bazanskic2d322c2019-05-01 13:14:32 +0200126 <h1>Faktura proforma:</h1>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200127 {{ else }}
Sergiusz Bazanskic2d322c2019-05-01 13:14:32 +0200128 <h1>Faktura VAT:</h1>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200129 {{ end }}
130 <ul>
131 {{ range $i, $e := .InvoiceeBilling }}
132 {{ if eq $i 0 }}
133 <li><b>{{ $e }}</b></li>
134 {{ else }}
135 <li>{{ $e }}</li>
136 {{ end }}
137 {{ end }}
138 {{ if .USCustomer }}
139 <li>EIN: {{ .InvoiceeVAT }}</li>
140 <li><b>(VAT zero rate)</b></li>
141 {{ else }}
Sergiusz Bazanskic2d322c2019-05-01 13:14:32 +0200142 <li><b>NIP:</b> {{ .InvoiceeVAT }}</li>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200143 {{ end }}
144
145 {{ if .ReverseVAT }}
146 <li><b>(reverse charge applies)</b></li>
147 {{ end }}
148 </ul>
149 </div>
150 </div>
151 <div style="clear: both; height: 1em;"></div>
152 <table class="items">
153 <tr>
Sergiusz Bazanskic2d322c2019-05-01 13:14:32 +0200154 <th style="width: 60%;">Nazwa towaru lub usługi</th>
155 <th>Cena<br />netto</th>
156 <th>Ilość</th>
157 <th>VAT (%)</th>
158 <th>Wartość<br />netto</th>
159 <th>Wartość<br />brutto</th>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200160 </tr>
161 {{ range .Items }}
162 <tr>
163 <td style="text-align: left;">{{ .Title }}</td>
164 <td>{{ .UnitPrice }}</td>
165 <td>{{ .Qty }}</td>
166 <td>{{ .VATRate }}</td>
167 <td>{{ .TotalNet }}</td>
168 <td>{{ .Total }}</td>
169 </tr>
170 {{ end }}
171 <tr>
Sergiusz Bazanskic2d322c2019-05-01 13:14:32 +0200172 <td colspan="5" class="lhead">RAZEM netto</td>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200173 <td>{{ .TotalNet }}</td>
174 </tr>
175 <tr>
Sergiusz Bazanskic2d322c2019-05-01 13:14:32 +0200176 <td colspan="5" class="lhead">VAT{{ if .ReverseVAT }} (reverse charge applies){{ end }} {{ if .USCustomer }}(VAT zero rate){{ end }}</td>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200177 <td>{{ .VATTotal }}</td>
178 </tr>
179 <tr>
Sergiusz Bazanskic2d322c2019-05-01 13:14:32 +0200180 <td colspan="5" class="lhead"><b>RAZEM brutto</b></td>
181 <td><b>{{ .Total }}</b></td>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200182 </tr>
183 </table>
184 </body>
185</html>