{% 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", _("Purchase Invoice")) -%}{%- endif -%}
{{ add_header(0, 1, doc, letter_head, no_letterhead, print_settings) }}
Supplier Name: | {{ doc.supplier }} |
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) }} |
SL |
Item Code |
Item Name |
UOM |
Received Qty. |
Rejected Qty |
Qty |
Basic Rate |
Amount |
{% for item in doc.items %}
{{ loop.index }} |
{{ item.item_code }} |
{{ item.item_name }} |
{{ item.uom }} |
{{ item.received_qty }} |
{{ item.rejected_qty }} |
{{ item.qty}} |
{{ item.rate }} |
{{ item.amount }} |
{% endfor %}
Total Quantity: | {{ doc.total_qty }} |
Total: | {{doc.total}} |
Net Weight: | {{ doc.total_net_weight }} |
Tax and Charges: | {{doc.taxes_and_charges}} |
{% for tax in doc.taxes %}
{% if tax.tax_amount_after_discount_amount!= 0 %}
{{ tax.account_head }}: | {{ tax.tax_amount_after_discount_amount }} |
{% endif %}
{% endfor %}
{% if doc.taxes_and_charges_added!= 0 %}
Taxes and Charges Added: | {{ doc.taxes_and_charges_added }} |
{% endif %}
{% if doc.taxes_and_charges_deducted!= 0 %}
Taxes and Charges Deducted: | {{ doc.taxes_and_charges_deducted }} |
{% endif %}
Total Taxes and Charges: | {{ doc.total_taxes_and_charges }} |
Net Payable: | {{ doc.grand_total }} |
SL |
Account |
Party Type |
Party |
Debit Amount |
Credit Amount |
{% for entries in gl %}
{{ loop.index }} |
{{ entries.account }} |
{{ entries.party_type }} |
{{ entries.party }} |
{{ entries.debit }} |
{{ entries.credit }} |
{% endfor %}
Total |
{{ doc.grand_total|flt }} |
{{ doc.grand_total|flt }} |