{{define "invoice_card"}} {{$cardID := or .invoiceNumber .id}}

Invoice #{{.invoiceNumber}}

{{.status}}
{{with .customer}}

Customer: {{.name}}

{{end}} {{with .job}}

Job: {{.name}}

{{end}} {{/* Show location only in single invoice view */}} {{if not .MultipleInvoices}} {{with .location}}

Location: {{.name}}

{{end}} {{end}}

Total: ${{.totalPrice}}

{{/* Show items only in single invoice view */}} {{if not .MultipleInvoices}} {{if .items}}
Items
    {{range .items}}
  • {{.description}} - ${{.totalPrice}}
  • {{end}}
{{end}} {{end}}
{{range .buttons}} {{end}}
{{end}}