go/svc/invoice: polishify
diff --git a/go/svc/invoice/render.go b/go/svc/invoice/render.go
index 47c6c6d..a433fa8 100644
--- a/go/svc/invoice/render.go
+++ b/go/svc/invoice/render.go
@@ -72,7 +72,10 @@
InvoiceeBilling: make([]string, len(i.CustomerBilling)),
}
- unit := "€"
+ unit := i.Unit
+ if unit == "" {
+ unit = "€"
+ }
for d, s := range i.InvoicerBilling {
data.InvoicerBilling[d] = s
diff --git a/go/svc/invoice/templates/invoice.html b/go/svc/invoice/templates/invoice.html
index e257a42..6bf2947 100644
--- a/go/svc/invoice/templates/invoice.html
+++ b/go/svc/invoice/templates/invoice.html
@@ -105,16 +105,16 @@
{{ end }}
{{ end }}
{{ if .InvoicerCompanyNumber }}
- <li><b>Company Registration Number:</b> {{ .InvoicerCompanyNumber }}</li>
+ <li>{{ .InvoicerCompanyNumber }}</li>
{{ end }}
- <li><b>Tax Number:</b> {{ .InvoicerVAT }}</li>
+ <li><b>NIP:</b> {{ .InvoicerVAT }}</li>
</ul>
</div>
<div class="metadata">
<ul>
- <li><b>Invoice number:</b> {{ .InvoiceNumber }}</li>
- <li><b>Date:</b> {{ .Date.Format "2006/01/02" }}</li>
- <li><b>Due date:</b> {{ .DueDate.Format "2006/01/02" }}</li>
+ <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>
@@ -123,9 +123,9 @@
<div class="lhs">
<div class="invoicee">
{{ if .Proforma }}
- <h1>Proforma Invoice:</h1>
+ <h1>Faktura proforma:</h1>
{{ else }}
- <h1>VAT Invoice:</h1>
+ <h1>Faktura VAT:</h1>
{{ end }}
<ul>
{{ range $i, $e := .InvoiceeBilling }}
@@ -139,7 +139,7 @@
<li>EIN: {{ .InvoiceeVAT }}</li>
<li><b>(VAT zero rate)</b></li>
{{ else }}
- <li>VAT Number: {{ .InvoiceeVAT }}</li>
+ <li><b>NIP:</b> {{ .InvoiceeVAT }}</li>
{{ end }}
{{ if .ReverseVAT }}
@@ -151,12 +151,12 @@
<div style="clear: both; height: 1em;"></div>
<table class="items">
<tr>
- <th style="width: 60%;">Description</th>
- <th>Price<br/>(ex. VAT)</th>
- <th>Qty</th>
- <th>VAT rate</th>
- <th>Total<br />(net)</th>
- <th>Total<br />(inc. VAT)</th>
+ <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>
@@ -169,16 +169,16 @@
</tr>
{{ end }}
<tr>
- <td colspan="5" class="lhead">Subtotal without VAT</td>
+ <td colspan="5" class="lhead">RAZEM netto</td>
<td>{{ .TotalNet }}</td>
</tr>
<tr>
- <td colspan="5" class="lhead">VAT Total{{ if .ReverseVAT }} (reverse charge applies){{ end }} {{ if .USCustomer }}(VAT zero rate){{ end }}</td>
+ <td colspan="5" class="lhead">VAT{{ if .ReverseVAT }} (reverse charge applies){{ end }} {{ if .USCustomer }}(VAT zero rate){{ end }}</td>
<td>{{ .VATTotal }}</td>
</tr>
<tr>
- <td colspan="5" class="lhead"><b>Total</b></td>
- <td>{{ .Total }}</td>
+ <td colspan="5" class="lhead"><b>RAZEM brutto</b></td>
+ <td><b>{{ .Total }}</b></td>
</tr>
</table>
</body>
diff --git a/proto/invoice/invoice.proto b/proto/invoice/invoice.proto
index e56253d..90fc874 100644
--- a/proto/invoice/invoice.proto
+++ b/proto/invoice/invoice.proto
@@ -29,6 +29,7 @@
int64 days_due = 8;
string iban = 9;
string swift = 10;
+ string unit = 13;
}
message CreateInvoiceRequest {