From 87ede25beca08a2737d72cc245e7c30cca8d3334 Mon Sep 17 00:00:00 2001 From: Serge Bazanski Date: Wed, 12 May 2021 21:05:53 +0000 Subject: [PATCH] bgpwtf/invoice: format for non-eu customers Change-Id: I42ec23d911cd69a310a6de8ffe5dca5ff1b30f00 --- bgpwtf/invoice/render.go | 6 +++++- bgpwtf/invoice/templates/invoice_en.html | 11 ++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/bgpwtf/invoice/render.go b/bgpwtf/invoice/render.go index c0eeca11..db5c1514 100644 --- a/bgpwtf/invoice/render.go +++ b/bgpwtf/invoice/render.go @@ -53,7 +53,11 @@ func renderInvoicePDF(i *pb.Invoice, language string) ([]byte, error) { if len(parts) > 0 { symbols = strings.Join(parts, ", ") + "." } else { - symbols = "brak." + if language == "en" { + symbols = "brak (none)." + } else { + symbols = "brak." + } } data := struct { diff --git a/bgpwtf/invoice/templates/invoice_en.html b/bgpwtf/invoice/templates/invoice_en.html index 976dbdfe..d4aa3fc7 100644 --- a/bgpwtf/invoice/templates/invoice_en.html +++ b/bgpwtf/invoice/templates/invoice_en.html @@ -143,21 +143,21 @@ div.symbols { {{ end }} {{ end }} {{ if .USCustomer }} -
  • EIN: {{ .InvoiceeVAT }}
  • -
  • (VAT zero rate)
  • +
  • {{ .InvoiceeVAT }}
  • +
  • VAT NP (zero rate)
  • {{ else if .InvoiceeVAT }}
  • NIP: {{ .InvoiceeVAT }}
  • {{ end }} {{ if .ReverseVAT }} -
  • (reverse charge / obciążenie odwrotne)
  • +
  • Obciążenie odwrotne (reverse charge)
  • {{ end }}
    - Oznaczenia: {{ .Symbols }} + Oznaczenia (JPK symbols): {{ .Symbols }}
    @@ -201,8 +201,5 @@ div.symbols {
    {{ .Total }}
    -