1
0
Fork 0

bgpwtf/invoice: format for non-eu customers

Change-Id: I42ec23d911cd69a310a6de8ffe5dca5ff1b30f00
master
q3k 2021-05-12 21:05:53 +00:00 committed by q3k
parent 8a572cd36a
commit 87ede25bec
2 changed files with 9 additions and 8 deletions

View File

@ -53,7 +53,11 @@ func renderInvoicePDF(i *pb.Invoice, language string) ([]byte, error) {
if len(parts) > 0 {
symbols = strings.Join(parts, ", ") + "."
} else {
symbols = "<i>brak</i>."
if language == "en" {
symbols = "<i>brak (none)</i>."
} else {
symbols = "<i>brak</i>."
}
}
data := struct {

View File

@ -143,21 +143,21 @@ div.symbols {
{{ end }}
{{ end }}
{{ if .USCustomer }}
<li>EIN: {{ .InvoiceeVAT }}</li>
<li><b>(VAT zero rate)</b></li>
<li>{{ .InvoiceeVAT }}</li>
<li style="margin-top: 2em;"><b>VAT NP</b> <i>(zero rate)</i></li>
{{ else if .InvoiceeVAT }}
<li><b>NIP:</b> {{ .InvoiceeVAT }}</li>
{{ end }}
{{ if .ReverseVAT }}
<li><b>(reverse charge / obciążenie odwrotne)</b></li>
<li><b>Obciążenie odwrotne</b> <i>(reverse charge)</ii></li>
{{ end }}
</ul>
</div>
</div>
<div style="clear: both; height: 1em;"></div>
<div class="symbols">
<b>Oznaczenia</b>: {{ .Symbols }}
<b>Oznaczenia</b> <i>(JPK symbols)</i>: {{ .Symbols }}
</div>
<table class="items">
<tr>
@ -201,8 +201,5 @@ div.symbols {
<td><b>{{ .Total }}</b></td>
</tr>
</table>
<div class="footer">
{{ .Footer }}
</div>
</body>
</html>