blob: b09086bc109131f8020e9363206fcefba242d3b3 [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 Bazanskic2d322c2019-05-01 13:14:32 +0200117 <li><b>NIP:</b> {{ .InvoicerVAT }}</li>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200118 </ul>
119 </div>
120 <div class="metadata">
121 <ul>
Sergiusz Bazanskic2d322c2019-05-01 13:14:32 +0200122 <li><b>Numer faktury:</b> {{ .InvoiceNumber }}</li>
123 <li><b>Data wystawienia:</b> {{ .Date.Format "2006/01/02" }}</li>
124 <li><b>Termin płatności:</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 Bazanskia103f062019-05-18 16:23:58 +0200133 <h1>Faktura Proforma</h1>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200134 {{ else }}
Sergiusz Bazanskia103f062019-05-18 16:23:58 +0200135 <h1>Faktura VAT</h1>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200136 {{ end }}
Sergiusz Bazanskia103f062019-05-18 16:23:58 +0200137 <h2>nr. {{ .InvoiceNumber }}</h2>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200138 <ul>
139 {{ range $i, $e := .InvoiceeBilling }}
140 {{ if eq $i 0 }}
141 <li><b>{{ $e }}</b></li>
142 {{ else }}
143 <li>{{ $e }}</li>
144 {{ end }}
145 {{ end }}
146 {{ if .USCustomer }}
147 <li>EIN: {{ .InvoiceeVAT }}</li>
148 <li><b>(VAT zero rate)</b></li>
Sergiusz Bazanskide3d3fa2020-05-31 00:12:11 +0200149 {{ else if .InvoiceeVAT }}
Sergiusz Bazanskic2d322c2019-05-01 13:14:32 +0200150 <li><b>NIP:</b> {{ .InvoiceeVAT }}</li>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200151 {{ end }}
152
153 {{ if .ReverseVAT }}
Sergiusz Bazanskia103f062019-05-18 16:23:58 +0200154 <li><b>(nie podlega VAT)</b></li>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200155 {{ end }}
156 </ul>
157 </div>
158 </div>
159 <div style="clear: both; height: 1em;"></div>
Serge Bazanski772a1332021-02-17 20:28:51 +0100160 <div class="symbols">
161 <b>Oznaczenia</b>: {{ .Symbols }}
162 </div>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200163 <table class="items">
164 <tr>
Sergiusz Bazanskic2d322c2019-05-01 13:14:32 +0200165 <th style="width: 60%;">Nazwa towaru lub usługi</th>
166 <th>Cena<br />netto</th>
167 <th>Ilość</th>
168 <th>VAT (%)</th>
169 <th>Wartość<br />netto</th>
170 <th>Wartość<br />brutto</th>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200171 </tr>
172 {{ range .Items }}
173 <tr>
174 <td style="text-align: left;">{{ .Title }}</td>
175 <td>{{ .UnitPrice }}</td>
176 <td>{{ .Qty }}</td>
177 <td>{{ .VATRate }}</td>
178 <td>{{ .TotalNet }}</td>
179 <td>{{ .Total }}</td>
180 </tr>
181 {{ end }}
182 <tr>
Sergiusz Bazanskic2d322c2019-05-01 13:14:32 +0200183 <td colspan="5" class="lhead">RAZEM netto</td>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200184 <td>{{ .TotalNet }}</td>
185 </tr>
186 <tr>
Sergiusz Bazanskia103f062019-05-18 16:23:58 +0200187 <td colspan="5" class="lhead">VAT{{ if .ReverseVAT }} (nie podlega){{ end }} {{ if .USCustomer }}(nie podlega){{ end }}</td>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200188 <td>{{ .VATTotal }}</td>
189 </tr>
190 <tr>
Sergiusz Bazanskic2d322c2019-05-01 13:14:32 +0200191 <td colspan="5" class="lhead"><b>RAZEM brutto</b></td>
192 <td><b>{{ .Total }}</b></td>
Sergiusz Bazanskifb18c992019-05-01 12:27:03 +0200193 </tr>
194 </table>
195 </body>
196</html>