{{.Company_name}}
{{if eq .Table_name "invoice"}}
{{.Invoice}} {{end}}
{{if eq .Table_name "estimation"}}
{{.Label_estimate}} {{end}}
{{if eq .Table_name "purchase_order"}}
{{.Label_purchase_order}} {{end}}
{{if eq .Table_name "credit_memo"}}
{{.Label_credit_memo}} {{end}}
{{if eq .Table_name "invoice"}}{{.Label_Invoice_no}} {{end}}
{{if eq .Table_name "estimation"}} {{.Label_Estimate_no}} {{end}}
{{if eq .Table_name "purchase_order"}}{{.Label_Po_no}} {{end}}
{{if eq .Table_name "credit_memo"}} {{.Label_Credit_memo_no}} {{end}}
{{.Label_date}}
{{if ne .Terms "0 days"}}{{.Label_Terms}}
{{.Label_due_date}} {{end}}
{{.Label_BillTo}}
{{.Invoice_no}}
{{.InvoiceDatetime}}
{{if ne .Terms "0 days"}}{{.Terms}}
{{.DueDate}}{{end}}
{{.ClientName}}
{{.ClientAddressLine1}}
{{.ClientAddressLine2}}
{{.ClientAddressLine3}}
{{.Address1}}
{{.Address2}}
{{.Address3}}
{{.Phone}}
{{.Fax}}
{{.CellMobile}}
{{.Email}}
{{.WebsiteAddress}}
{{if ne .TinValue ""}}
{{.TinLabel}}
{{.TinValue}}
{{end}}
{{if eq .Table_name "invoice"}}
{{if eq .IsDisplayShippingFields "true"}}
{{.Label_Ship_to}}
{{.ClientShippingAddressLine1}}
{{.ClientShippingAddressLine2}}
{{.ClientShippingAddressLine3}}
{{if ne .ShippingDate ""}}{{.Label_Ship_date}} {{end}}
{{if ne .TrackingNumber ""}}{{.Label_Tracking_no}} {{end}}
{{if ne .ShipVia ""}}{{.Label_Ship_via}} {{end}}
{{if ne .Fob ""}}{{.Label_Fob}} {{end}}
{{if ne .ShippingDate ""}}{{.ShippingDate}} {{end}}
{{if ne .TrackingNumber ""}} {{.TrackingNumber}} {{end}}
{{if ne .ShipVia ""}} {{.ShipVia}} {{end}}
{{if ne .Fob ""}} {{.Fob}} {{end}}
{{end}}
{{if eq .IsDisplayShippingFields "false"}}
{{end}}
{{end}}
{{if eq .Table_name "estimation"}}
{{if eq .IsDisplayShippingFields "true"}}
{{.Label_Ship_to}}
{{.ClientShippingAddressLine1}}
{{.ClientShippingAddressLine2}}
{{.ClientShippingAddressLine3}}
{{if ne .ShippingDate ""}}{{.Label_Ship_date}} {{end}}
{{if ne .TrackingNumber ""}}{{.Label_Tracking_no}} {{end}}
{{if ne .ShipVia ""}}{{.Label_Ship_via}} {{end}}
{{if ne .Fob ""}}{{.Label_Fob}} {{end}}
{{if ne .ShippingDate ""}}{{.ShippingDate}} {{end}}
{{if ne .TrackingNumber ""}} {{.TrackingNumber}} {{end}}
{{if ne .ShipVia ""}} {{.ShipVia}} {{end}}
{{if ne .Fob ""}} {{.Fob}} {{end}}
{{end}}
{{if eq .IsDisplayShippingFields "false"}}
{{end}}
{{end}}
{{$index:=0}}
{{range $index ,$user :=.Invoice_items}}
{{if eq $index 0}}
{{end}}
{{end}}
{{if eq .IsDisplayProductCode "true"}}
{{.Label_Code}}
{{end}}
{{.Label_Description}}
Item Type
{{if eq .IsDisplayQtyAndRateColumns "true"}}
{{.Label_Quantity}}
{{end}}
{{if eq .IsDisplayQtyAndRateColumns "true"}}
{{.Label_Rate}}
{{end}}
{{range .Company_taxes_json}}
{{if eq .LabelValue ""}}
{{.LabelKey}}
{{end}}
{{end}}
{{if eq .DiscountOption "discount_on_items"}}
{{.Label_Discount}}
{{end}}
{{.Label_Amount}}
{{$index:=1}}
{{ range $index , $data := .Invoice_items }}
{{ $data.Code }}{{$data.ProductName}}
{{ $data.ItemDescription }}
{{if eq $data.ItemType "0"}}Parts {{end}}
{{if eq $data.ItemType "1"}}Labour {{end}}
{{ $data.Quantity }}
{{ $data.Rate }}
{{if ne $data.TaxInfo ""}}
{{ $data.TaxInfo }}% {{end}}
{{$data.Discount}} {{if eq $data.DiscountType "0"}}%{{end}}
{{ $data.ItemTotalAmount }} {{ $data.Non_taxable}}
{{end}}
{{.InvoiceComment}}
{{.Label_Subtotal}}
{{.SubtotalAmount}}
{{if eq .Table_name "estimation"}}
{{if eq .DiscountOption "discount_on_subtotal"}}
{{.Label_Discount}}
{{.Discount}}
{{end}}
{{end}}
{{if eq .Table_name "invoice"}}
{{if eq .DiscountOption "discount_on_subtotal"}}
{{.Label_Discount}}
{{.Discount}}
{{end}}
{{end}}
{{range .Company_taxes_json}}
{{.Inclusive}} {{.LabelKey}}{{if ne .LabelValue ""}} ({{.LabelValue}}%){{end}}
{{.TaxAmount}}
{{end}}
{{if eq .Table_name "estimation"}}
{{if eq .IsDisplayShippingFields "true"}}
{{.Label_Shipping}}
{{.ShippingAmount}}
{{end}}
{{end}}
{{if eq .Table_name "invoice"}}
{{if eq .IsDisplayShippingFields "true"}}
{{.Label_Shipping}}
{{.ShippingAmount}}
{{end}}
{{.Label_Total}}
{{.TotalAmount}}
{{if eq .WithholdingEnable "true"}}
{{.WithholdingAbbreviation}} ({{.WithholdingRate}}%)
{{.WithholdingAmount}}
{{end}}
{{.Label_Paid}}
{{.PaidAmount}} {{.MultiPaidAmount}}
{{end}}
{{if eq .Table_name "invoice"}}
{{.Label_Balance_due}}
{{.BalanceDueAmount}} {{.MultiBalanceDueAmount}}
{{end}}
{{if ne .Table_name "invoice"}}
{{.Label_Total}}
{{.TotalAmount}}
{{end}}
{{if eq .RemittanceEnable "true"}}
{{.Label_Send_with_remittance_to}}
{{.Label_Ramittance_advice_for_invoice}}
{{.Label_Balance_due}}
{{.BalanceDueAmount}} {{.MultiBalanceDueAmount}}
{{.Label_Amount_paid}}
{{.Label_Received_from}} {{.ClientName}}
{{end}}
{{$index:=0}}
{{range $index ,$user :=.Invoice_attachments}}
{{if gt $index 4}}
{{$index:=0}}