{{define "content"}}

Order #{{.Order.ID}}

{{.Order.CustomerName}} · {{formatDate .Order.OrderDate}}

← All Orders {{if eq .Order.Status "draft"}} Edit {{end}} {{if eq .Order.Status "confirmed"}} {{end}}
Customer
{{.Order.CustomerName}}
Date
{{formatDate .Order.OrderDate}}
Status
{{statusBadge .Order.Status}}
Total
{{formatMoney .Order.TotalAmount}}
{{if .Order.Notes}}
Notes
{{.Order.Notes}}
{{end}}
{{template "order-lines" .Order}}
{{end}} {{define "order-lines"}}

Line Items

{{if eq .Status "draft"}} {{end}} {{range .Lines}} {{if eq $.Status "draft"}} {{end}} {{else}} {{end}} {{if eq .Status "draft"}}{{end}}
Description Qty Unit Price Total
{{.Description}} {{printf "%.0f" .Quantity}} {{formatMoney .UnitPrice}} {{formatMoney .LineTotal}}
No line items yet.
Total {{formatMoney .TotalAmount}}
{{if eq .Status "draft"}}

Add Line Item

{{end}}
{{end}}