blob: 15f5d0840dd3bf13632cc3e7923e9fb0d3b9b654 [file] [log] [blame]
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Invoice 0001</title>
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,700" rel="stylesheet">
<style type="text/css">
body {
background-color: #fff;
font-family: 'Roboto', sans-serif;
font-size: 1em;
padding: 2em;
}
ul {
list-style: none;
padding: 0;
}
ul li {
margin-bottom: 0.2em;
}
@page {
size: A4;
margin: 0;
}
div.rhs {
float: right;
width: 50%;
text-align: right;
}
div.lhs {
float: left;
text-align: left;
width: 50%;
min-height: 35em;
}
div.metadata {
margin-top: 2em;
}
div.invoicee {
margin-top: 9em;
}
h1 {
font-size: 1.5em;
margin: 0;
text-transform: uppercase;
}
h2 {
font-size: 1.2em;
margin: 0;
}
table.items {
text-align: right;
border-spacing: 0px;
border-collapse: collapse;
border: 0;
width: 100%;
}
table.items td,th {
border: 1px solid black;
}
table.items tr:first-child {
background-color: #eee;
color: #111;
padding: 0.8em;
text-align: left;
}
table.items td {
background-color: #fff;
}
table.items td,th {
padding: 0.5em 1em 0.5em 1em;
}
td.lhead {
border: 0 !important;
text-align: right;
text-transform: uppercase;
background: rgba(0, 0, 0, 0) !important;
}
div.bgtext {
z-index: -10;
position: absolute;
top: 140mm;
left: 0;
width: 100%;
}
div.bgtext div {
text-align: center;
font-size: 10em;
color: #ddd;
-webkit-transform: rotate(-45deg);
text-transform: uppercase;
}
</style>
</head>
<body>
{{ if .Proforma }}
<div class="bgtext"><div>Proforma</div></div>
{{ end }}
<div class="rhs">
<div class="invoicer">
<ul>
{{ range $i, $e := .InvoicerBilling }}
{{ if eq $i 0 }}
<li><b>{{ $e }}</b></li>
{{ else }}
<li>{{ $e }}</li>
{{ end }}
{{ end }}
{{ if .InvoicerCompanyNumber }}
<li>{{ .InvoicerCompanyNumber }}</li>
{{ end }}
<li><b>NIP:</b> {{ .InvoicerVAT }}</li>
</ul>
</div>
<div class="metadata">
<ul>
<li><b>Numer faktury:</b> {{ .InvoiceNumber }}</li>
<li><b>Data wystawienia:</b> {{ .Date.Format "2006/01/02" }}</li>
<li><b>Termin płatności:</b> {{ .DueDate.Format "2006/01/02" }}</li>
<li><b>IBAN:</b> {{ .IBAN }}</li>
<li><b>SWIFT/BIC:</b> {{ .SWIFT }}</li>
</ul>
</div>
</div>
<div class="lhs">
<div class="invoicee">
{{ if .Proforma }}
<h1>Faktura Proforma</h1>
{{ else }}
<h1>Faktura VAT</h1>
{{ end }}
<h2>nr. {{ .InvoiceNumber }}</h2>
<ul>
{{ range $i, $e := .InvoiceeBilling }}
{{ if eq $i 0 }}
<li><b>{{ $e }}</b></li>
{{ else }}
<li>{{ $e }}</li>
{{ end }}
{{ end }}
{{ if .USCustomer }}
<li>EIN: {{ .InvoiceeVAT }}</li>
<li><b>(VAT zero rate)</b></li>
{{ else if .InvoiceeVAT }}
<li><b>NIP:</b> {{ .InvoiceeVAT }}</li>
{{ end }}
{{ if .ReverseVAT }}
<li><b>(nie podlega VAT)</b></li>
{{ end }}
</ul>
</div>
</div>
<div style="clear: both; height: 1em;"></div>
<table class="items">
<tr>
<th style="width: 60%;">Nazwa towaru lub usługi</th>
<th>Cena<br />netto</th>
<th>Ilość</th>
<th>VAT (%)</th>
<th>Wartość<br />netto</th>
<th>Wartość<br />brutto</th>
</tr>
{{ range .Items }}
<tr>
<td style="text-align: left;">{{ .Title }}</td>
<td>{{ .UnitPrice }}</td>
<td>{{ .Qty }}</td>
<td>{{ .VATRate }}</td>
<td>{{ .TotalNet }}</td>
<td>{{ .Total }}</td>
</tr>
{{ end }}
<tr>
<td colspan="5" class="lhead">RAZEM netto</td>
<td>{{ .TotalNet }}</td>
</tr>
<tr>
<td colspan="5" class="lhead">VAT{{ if .ReverseVAT }} (nie podlega){{ end }} {{ if .USCustomer }}(nie podlega){{ end }}</td>
<td>{{ .VATTotal }}</td>
</tr>
<tr>
<td colspan="5" class="lhead"><b>RAZEM brutto</b></td>
<td><b>{{ .Total }}</b></td>
</tr>
</table>
</body>
</html>