{{ index .translations.invoice_from .ctx.lang }}

{{ tpl (file.Read "templates/company.gohtml") (dict "ctx" .ctx "data" .data "translations" .translations) }}
{{ if (eq .data.type "invoice") }} {{ else }} {{ end }} {{ if (eq .data.type "invoice") }} {{ else }} {{ end }} {{ if (eq .data.type "invoice") }} {{ end }}

{{ index .translations.invoice .ctx.lang }}

{{ index .translations.quote .ctx.lang }}

#{{ .data.number }}

{{ index .translations.invoice_issued_at .ctx.lang }}{{ index .translations.quote_issued_at .ctx.lang }}{{ .data.date.Format "2006-01-02" }}
{{ index .translations.invoice_due_at .ctx.lang }} {{ .data.due_date.Format "2006-01-02" }}

{{ index .translations.invoice_to .ctx.lang }}

{{ $ctx := .ctx }} {{ range .data.items }} {{ end }}
{{ index .translations.item .ctx.lang }} {{ index .translations.rate .ctx.lang }} {{ index .translations.quantity .ctx.lang }} {{ index .translations.amount .ctx.lang }}
{{ index .name $ctx.lang }} {{ if (has .comment $ctx.lang) }}

{{ index .comment $ctx.lang }}

{{ end }}
{{ .rate }} {{ .qty }} {{ .sum }}
{{ index .translations.total_in .ctx.lang }} {{ .data.currency }} {{ .data.total }}
{{ if .data.notes }}

{{ index .data.notes .ctx.lang }}

{{ end }}