{%- macro add_header(page_num, max_pages, doc, letter_head, no_letterhead, footer, print_settings=None, print_heading_template=None) -%} {% if letter_head and not no_letterhead %}
| {{ _("Customer Name") }}: {{doc.customer_name }} | {{ _("Payment Due Date") }}: {{ frappe.utils.format_date(doc.due_date) }} |
| {{ _("Invoice Number") }}: {{ doc.name }} | {{ _("Invoice Date") }}: {{ frappe.utils.format_date(doc.posting_date) }} |
| {{ _("Bill From") }}: {{ address }} |
{{ _("Bill To") }}: {{ company_address_display }} |
| {{ _("No") }} | {{ _("Item") }} | {{ _("Quantity") }} | {{ _("Rate") }} | {{ _("Amount") }} |
| {{ loop.index }} | {{ item.item_name }} | {{ item.get_formatted("qty", 0) }} {{ item.uom }} | {{ item.get_formatted("net_rate", doc) }} | {{ item.get_formatted("net_amount", doc) }} |
{{ _("Total in words") }}
| {{ _("Sub Total:") }} | {{ doc.get_formatted("total", doc) }} |
| {{ _("Discount") }} ({{ doc.additional_discount_percentage }}%): | {{ doc.get_formatted("discount_amount", doc) }} |
| {{ _("Tax") }} ({{ tax_rate }}%): | {{ doc.get_formatted("total_taxes_and_charges", doc) }} |
| {{ _("Grand Total:") }} | {{ doc.get_formatted("grand_total", doc) }} |