{{.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"}} {{end}} {{if eq .IsDisplayQtyAndRateColumns "true"}} {{end}} {{if eq .IsDisplayQtyAndRateColumns "true"}} {{end}} {{range .Company_taxes_json}} {{if eq .LabelValue ""}} {{end}} {{end}} {{if eq .DiscountOption "discount_on_items"}} {{end}} {{$index:=1}} {{ range $index , $data := .Invoice_items }} {{if eq $data.ItemType "0"}}{{end}} {{if eq $data.ItemType "1"}}{{end}} {{if ne $data.TaxInfo ""}} {{end}} {{end}}
{{.Label_Code}}{{.Label_Description}} Item Type{{.Label_Quantity}}{{.Label_Rate}} {{.LabelKey}}{{.Label_Discount}}{{.Label_Amount}}
{{ $data.Code }}{{$data.ProductName}} {{ $data.ItemDescription }} PartsLabour{{ $data.Quantity }} {{ $data.Rate }}{{ $data.TaxInfo }}%{{$data.Discount}} {{if eq $data.DiscountType "0"}}%{{end}} {{ $data.ItemTotalAmount }} {{ $data.Non_taxable}}
{{.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 .Table_name "invoice"}} {{if eq .RemittanceEnable "true"}}
{{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}}
Card Type
{{range .RemittanceEnableCard}}
{{.}}
{{end}}
Cardholder's Name

Card Number
Cvv
Expiry Date
/
Signature
{{end}}
{{end}} {{end}} {{if ne .Att_length 0}}
{{$index:=0}} {{range $index ,$user :=.Invoice_attachments}} {{if gt $index 4}} {{$index:=0}}
{{end}}
{{.AttachmentName}}
{{.AttachmentDescription}}
{{end}}
{{end}}