blob: 15f5d0840dd3bf13632cc3e7923e9fb0d3b9b654 [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 Bazanskic2d322c2019-05-01 13:14:32 +0200114 <li><b>NIP:</b> {{ .InvoicerVAT }}</li>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200115 </ul>
116 </div>
117 <div class="metadata">
118 <ul>
Sergiusz Bazanskic2d322c2019-05-01 13:14:32 +0200119 <li><b>Numer faktury:</b> {{ .InvoiceNumber }}</li>
120 <li><b>Data wystawienia:</b> {{ .Date.Format "2006/01/02" }}</li>
121 <li><b>Termin płatności:</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 Bazanskia103f062019-05-18 16:23:58 +0200130 <h1>Faktura Proforma</h1>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200131 {{ else }}
Sergiusz Bazanskia103f062019-05-18 16:23:58 +0200132 <h1>Faktura VAT</h1>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200133 {{ end }}
Sergiusz Bazanskia103f062019-05-18 16:23:58 +0200134 <h2>nr. {{ .InvoiceNumber }}</h2>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200135 <ul>
136 {{ range $i, $e := .InvoiceeBilling }}
137 {{ if eq $i 0 }}
138 <li><b>{{ $e }}</b></li>
139 {{ else }}
140 <li>{{ $e }}</li>
141 {{ end }}
142 {{ end }}
143 {{ if .USCustomer }}
144 <li>EIN: {{ .InvoiceeVAT }}</li>
145 <li><b>(VAT zero rate)</b></li>
Sergiusz Bazanskide3d3fa2020-05-31 00:12:11 +0200146 {{ else if .InvoiceeVAT }}
Sergiusz Bazanskic2d322c2019-05-01 13:14:32 +0200147 <li><b>NIP:</b> {{ .InvoiceeVAT }}</li>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200148 {{ end }}
149
150 {{ if .ReverseVAT }}
Sergiusz Bazanskia103f062019-05-18 16:23:58 +0200151 <li><b>(nie podlega VAT)</b></li>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200152 {{ end }}
153 </ul>
154 </div>
155 </div>
156 <div style="clear: both; height: 1em;"></div>
157 <table class="items">
158 <tr>
Sergiusz Bazanskic2d322c2019-05-01 13:14:32 +0200159 <th style="width: 60%;">Nazwa towaru lub usługi</th>
160 <th>Cena<br />netto</th>
161 <th>Ilość</th>
162 <th>VAT (%)</th>
163 <th>Wartość<br />netto</th>
164 <th>Wartość<br />brutto</th>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200165 </tr>
166 {{ range .Items }}
167 <tr>
168 <td style="text-align: left;">{{ .Title }}</td>
169 <td>{{ .UnitPrice }}</td>
170 <td>{{ .Qty }}</td>
171 <td>{{ .VATRate }}</td>
172 <td>{{ .TotalNet }}</td>
173 <td>{{ .Total }}</td>
174 </tr>
175 {{ end }}
176 <tr>
Sergiusz Bazanskic2d322c2019-05-01 13:14:32 +0200177 <td colspan="5" class="lhead">RAZEM netto</td>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200178 <td>{{ .TotalNet }}</td>
179 </tr>
180 <tr>
Sergiusz Bazanskia103f062019-05-18 16:23:58 +0200181 <td colspan="5" class="lhead">VAT{{ if .ReverseVAT }} (nie podlega){{ end }} {{ if .USCustomer }}(nie podlega){{ end }}</td>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200182 <td>{{ .VATTotal }}</td>
183 </tr>
184 <tr>
Sergiusz Bazanskic2d322c2019-05-01 13:14:32 +0200185 <td colspan="5" class="lhead"><b>RAZEM brutto</b></td>
186 <td><b>{{ .Total }}</b></td>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200187 </tr>
188 </table>
189 </body>
190</html>