diff --git a/go/svc/invoice/render.go b/go/svc/invoice/render.go index 47c6c6d8..a433fa84 100644 --- a/go/svc/invoice/render.go +++ b/go/svc/invoice/render.go @@ -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 diff --git a/go/svc/invoice/templates/invoice.html b/go/svc/invoice/templates/invoice.html index e257a421..6bf2947e 100644 --- a/go/svc/invoice/templates/invoice.html +++ b/go/svc/invoice/templates/invoice.html @@ -105,16 +105,16 @@ div.bgtext div { {{ end }} {{ end }} {{ if .InvoicerCompanyNumber }} -
  • Company Registration Number: {{ .InvoicerCompanyNumber }}
  • +
  • {{ .InvoicerCompanyNumber }}
  • {{ end }} -
  • Tax Number: {{ .InvoicerVAT }}
  • +
  • NIP: {{ .InvoicerVAT }}
  • @@ -123,9 +123,9 @@ div.bgtext div {
    {{ if .Proforma }} -

    Proforma Invoice:

    +

    Faktura proforma:

    {{ else }} -

    VAT Invoice:

    +

    Faktura VAT:

    {{ end }}
      {{ range $i, $e := .InvoiceeBilling }} @@ -139,7 +139,7 @@ div.bgtext div {
    • EIN: {{ .InvoiceeVAT }}
    • (VAT zero rate)
    • {{ else }} -
    • VAT Number: {{ .InvoiceeVAT }}
    • +
    • NIP: {{ .InvoiceeVAT }}
    • {{ end }} {{ if .ReverseVAT }} @@ -151,12 +151,12 @@ div.bgtext div {
      - - - - - - + + + + + + {{ range .Items }} @@ -169,16 +169,16 @@ div.bgtext div { {{ end }} - + - + - - + +
      DescriptionPrice
      (ex. VAT)
      QtyVAT rateTotal
      (net)
      Total
      (inc. VAT)
      Nazwa towaru lub usługiCena
      netto
      IlośćVAT (%)Wartość
      netto
      Wartość
      brutto
      Subtotal without VATRAZEM netto {{ .TotalNet }}
      VAT Total{{ if .ReverseVAT }} (reverse charge applies){{ end }} {{ if .USCustomer }}(VAT zero rate){{ end }}VAT{{ if .ReverseVAT }} (reverse charge applies){{ end }} {{ if .USCustomer }}(VAT zero rate){{ end }} {{ .VATTotal }}
      Total{{ .Total }}RAZEM brutto{{ .Total }}
      diff --git a/proto/invoice/invoice.proto b/proto/invoice/invoice.proto index e56253d2..90fc8741 100644 --- a/proto/invoice/invoice.proto +++ b/proto/invoice/invoice.proto @@ -29,6 +29,7 @@ message Invoice { int64 days_due = 8; string iban = 9; string swift = 10; + string unit = 13; } message CreateInvoiceRequest {