forked from hswaw/hscloud
go/svc/invoice: polishify
This commit is contained in:
parent
fb18c99df3
commit
c2d322c504
3 changed files with 23 additions and 19 deletions
|
@ -72,7 +72,10 @@ func renderInvoicePDF(i *pb.Invoice, number string, proforma bool) ([]byte, erro
|
|||
InvoiceeBilling: make([]string, len(i.CustomerBilling)),
|
||||
}
|
||||
|
||||
unit := "€"
|
||||
unit := i.Unit
|
||||
if unit == "" {
|
||||
unit = "€"
|
||||
}
|
||||
|
||||
for d, s := range i.InvoicerBilling {
|
||||
data.InvoicerBilling[d] = s
|
||||
|
|
|
@ -105,16 +105,16 @@ div.bgtext div {
|
|||
{{ 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.bgtext div {
|
|||
<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 @@ div.bgtext div {
|
|||
<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.bgtext div {
|
|||
<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 @@ div.bgtext div {
|
|||
</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>
|
||||
|
|
|
@ -29,6 +29,7 @@ message Invoice {
|
|||
int64 days_due = 8;
|
||||
string iban = 9;
|
||||
string swift = 10;
|
||||
string unit = 13;
|
||||
}
|
||||
|
||||
message CreateInvoiceRequest {
|
||||
|
|
Loading…
Reference in a new issue