{{.Company_name}}

{{.Invoice_no}}

{{.TotalAmount}}
{{if ne .MultiTotalAmount ""}}{{.MultiTotalAmount}}{{end}}

{{.InvoiceDatetime}}

{{.Company_name}}

{{if ne .Logo ""}} {{end}}
{{if eq .Table_name "invoice"}}

{{.Invoice}}

{{end}}

{{.InvoiceHeader}}


{{if eq .InvoiceType "1"}}{{.Invoice}}{{end}} {{if eq .InvoiceType "2"}}{{.Label_estimate}}{{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}}
{{if ne .ClientAddressLine1 ""}}{{.ClientAddressLine1}}
{{end}} {{if ne .ClientAddressLine2 ""}}{{.ClientAddressLine2}}
{{end}} {{if ne .ClientBillingState ""}}{{.ClientBillingState}}
{{end}} {{if ne .ClientAddressLine3 ""}}{{.ClientAddressLine3}}
{{end}} {{if ne .ClientBillingCountry ""}}{{.ClientBillingCountry}}{{end}}{{if ne .TaxNumber ""}} TaxNumber: {{.TaxNumber}}{{end}}
{{if ne .Address1 ""}}{{.Address1}}
{{end}} {{if ne .Address2 ""}}{{.Address2}}
{{end}} {{if ne .CompanyState ""}}{{.CompanyState}}
{{end}} {{if ne .Address3 ""}}{{.Address3}}
{{end}} {{if ne .Phone ""}}{{.Phone}}
{{end}} {{if ne .Fax ""}}{{.Fax}}
{{end}} {{if ne .CellMobile ""}}{{.CellMobile}}
{{end}} {{if ne .Email ""}}{{.Email}}
{{end}} {{if ne .WebsiteAddress ""}}{{.WebsiteAddress}}
{{end}} {{if ne .CompanyCountry ""}}{{.CompanyCountry}}
{{end}}
{{if ne .TinValue ""}} {{.TinLabel}} {{.TinValue}} {{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}}
{{.Label_Subtotal}}
{{.SubtotalAmount}}

{{.MultiSubtotalAmount}}

{{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}}

{{.MultiTaxAmount}}

{{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}}

{{.MultiTotalAmount}}

{{if eq .WithholdingEnable "true"}}
{{.WithholdingAbbreviation}} ({{.WithholdingRate}} %)
{{.WithholdingAmount}}
{{end}}
{{.Label_Paid}}
{{.PaidAmount}}

{{.MultiPaidAmount}}

{{end}}
{{if eq .Table_name "invoice"}}
{{.Label_Balance_due}}
{{.BalanceDueAmount}}
{{if ne .MultiBalanceDueAmount ""}}
 
 
{{.MultiBalanceDueAmount}}
{{end}} {{end}} {{if ne .Table_name "invoice"}}
{{.Label_Total}}
{{.TotalAmount}}
{{.MultiTotalAmount}}
{{end}}
{{if ne .InvoiceComment ""}}
Notes:

{{.InvoiceComment}}

{{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}}