{%- from "templates/print_formats/standard_macros.html" import add_header -%}
{% set gl = frappe.get_list(doctype="GL Entry", fields=["account", "party_type", "party", "debit", "credit", "remarks"], filters={"voucher_type": doc.doctype, "voucher_no": doc.name}) %} {%- if not doc.get("print_heading") and not doc.get("select_print_heading") and doc.set("select_print_heading", _("Sales Invoice")) -%}{%- endif -%} {{ add_header(0, 1, doc, letter_head, no_letterhead, print_settings) }}
Customer Name: {{ doc.customer }}
Due Date: {{ frappe.utils.format_date(doc.due_date) }}
Address: {{doc.address_display}}
Contact: {{doc.contact_display}}
Mobile no: {{doc.contact_mobile}}
Voucher No: {{ doc.name }}
Date: {{ frappe.utils.format_date(doc.creation) }}
{% for item in doc.items %} {% endfor %}
SL Item Code Item Name UOM Quantity Basic Rate Amount
{{ loop.index }} {{ item.item_code }} {{ item.item_name }} {{ item.uom }} {{ item.qty}} {{ item.rate }} {{ item.amount }}
Total Quantity: {{ doc.total_qty }}
Total: {{doc.total}}
Net Weight: {{ doc.total_net_weight }}
{% for tax in doc.taxes %} {% if tax.tax_amount_after_discount_amount!= 0 %} {% endif %} {% endfor %}
Tax and Charges: {{doc.taxes_and_charges}}
{{ tax.account_head }}: {{ tax.tax_amount_after_discount_amount }}
Total Taxes and Charges: {{ doc.total_taxes_and_charges }}
Net Payable: {{ doc.grand_total }}
{% for entries in gl %} {% endfor %}
SL Account Party Type Party Debit Amount Credit Amount
{{ loop.index }} {{ entries.account }} {{ entries.party_type }} {{ entries.party }} {{ entries.debit }} {{ entries.credit }}
Total {{ doc.grand_total|flt }} {{ doc.grand_total|flt }}