{{define "content"}}

Document #{{.Document.ID}}

{{if eq .Document.Type "quote"}}Quote {{else if eq .Document.Type "invoice"}}Invoice {{else if eq .Document.Type "purchaseOrder"}}Purchase Order {{else if eq .Document.Type "orderAck"}}Order Acknowledgement {{else if eq .Document.Type "packingList"}}Packing List {{else}}{{.Document.Type}}{{end}}

{{if .Document.PdfFilename}} View PDF {{end}}

Document Information

ID {{.Document.ID}}
Type {{.Document.Type}}
Created {{.Document.Created.Format "2 January 2006 at 15:04"}}
Created By {{if and .Document.UserFirstName.Valid .Document.UserLastName.Valid}} {{.Document.UserFirstName.String}} {{.Document.UserLastName.String}} {{else if .Document.UserUsername.Valid}} {{.Document.UserUsername.String}} {{else}} Unknown User {{end}}
Page Count {{.Document.DocPageCount}}
{{if .Document.PdfFilename}}

PDF Information

{{if and .Document.PdfCreatorFirstName.Valid .Document.PdfCreatorLastName.Valid}} {{end}}
Filename {{.Document.PdfFilename}}
PDF Created {{.Document.PdfCreatedAt.Format "2 January 2006 at 15:04"}}
PDF Created By {{.Document.PdfCreatorFirstName.String}} {{.Document.PdfCreatorLastName.String}}
{{end}} {{/* TODO: Add customer and enquiry information when queries are available */}} {{if false}}

Related Information

{{if .Document.CustomerName}} {{end}} {{if .Document.EnquiryTitle.Valid}} {{end}}
Customer {{.Document.CustomerName}}
Enquiry {{.Document.EnquiryTitle.String}}
CMC Reference {{.Document.CmcReference}}
Revision {{.Document.Revision}}
{{end}}
{{end}}