From 725a4fcf2d01d76eb5c249587e458749ffd04eee Mon Sep 17 00:00:00 2001 From: khushi8112 Date: Sun, 30 Nov 2025 17:00:55 +0530 Subject: [PATCH] feat: standard print format for POS Invoice --- .../letterhead/company_letterhead.html | 198 +++++++++--------- .../letterhead/company_letterhead_grey.html | 56 ++--- .../pos_invoice_standard/__init__.py | 0 .../pos_invoice_standard.json | 33 +++ .../purchase_order_standard.json | 6 +- .../delivery_note_standard.json | 6 +- 6 files changed, 167 insertions(+), 132 deletions(-) create mode 100644 erpnext/accounts/print_format/pos_invoice_standard/__init__.py create mode 100644 erpnext/accounts/print_format/pos_invoice_standard/pos_invoice_standard.json diff --git a/erpnext/accounts/letterhead/company_letterhead.html b/erpnext/accounts/letterhead/company_letterhead.html index f4b8db863f6..7cdf58cb6e0 100644 --- a/erpnext/accounts/letterhead/company_letterhead.html +++ b/erpnext/accounts/letterhead/company_letterhead.html @@ -1,108 +1,108 @@ - - - + + + - - {{ company_address.get("address_line1") or "" }}
- {% if company_address.get("address_line2") %}{{ company_address.get("address_line2") }}
{% endif %} - {{ company_address.get("city") or "" }}, {{ company_address.get("state") or "" }} {{ company_address.get("pincode") or "" }}, {{ company_address.get("country") or "" }}
- {% endif %} - + - - +
+ {{ doc.doctype }} + {{ doc.name }} +
+ {% if website %} +
+ {{ _("Website:") }} + {{ website }} +
+ {% endif %} {% if email %} +
+ {{ _("Email:") }} + {{ email }} +
+ {% endif %} {% if phone_no %} +
+ {{ _("Contact:") }} + {{ phone_no }} +
+ {% endif %} + + +
-
- {% set company_logo = frappe.db.get_value("Company", doc.company, "company_logo") %} - {% if company_logo %} - Company Logo - {% endif %} -
-
+
+ {% set company_logo = frappe.db.get_value("Company", doc.company, "company_logo") %} {% if + company_logo %} + Company Logo + {% endif %} +
+
-
- {{ doc.company }} -
- {% if doc.company_address %} - {% set company_address = frappe.db.get_value("Address", doc.company_address, ["address_line1", "address_line2", "city", "state", "pincode", "country"], as_dict=True) %} +
+
{{ doc.company }}
+ {% if doc.company_address %} {% set company_address = frappe.db.get_value("Address", + doc.company_address, ["address_line1", "address_line2", "city", "state", "pincode", + "country"], as_dict=True) %} {% elif doc.billing_address %} {% set company_address = + frappe.db.get_value("Address", doc.billing_address, ["address_line1", "address_line2", "city", + "state", "pincode", "country"], as_dict=True) %} {% endif %} {% if company_address %} {{ + company_address.address_line1 or "" }}
+ {% if company_address.address_line2 %} {{ company_address.address_line2 }}
+ {% endif %} {{ company_address.city or "" }}, {{ company_address.state or "" }} {{ + company_address.pincode or "" }}, {{ company_address.country or ""}}
+ {% endif %} +
+ {% set website = frappe.db.get_value("Company", doc.company, "website") %} {% set email = + frappe.db.get_value("Company", doc.company, "email") %} {% set phone_no = + frappe.db.get_value("Company", doc.company, "phone_no") %} - - {% set company_details = frappe.db.get_value("Company", doc.company, ["website", "email", "phone_no"], as_dict=True) %} - -
- {{ _("Invoice:") }} - {{ doc.name }} -
- {% if company_details.website %} -
- {{ _("Website:") }} - {{ company_details.website }} -
- {% endif %} - {% if company_details.email %} -
- {{ _("Email:") }} - {{ company_details.email }} -
- {% endif %} - {% if company_details.phone_no %} -
- {{ _("Contact:") }} - {{ company_details.phone_no }} -
- {% endif %} -
diff --git a/erpnext/accounts/letterhead/company_letterhead_grey.html b/erpnext/accounts/letterhead/company_letterhead_grey.html index 3736c19084f..a46d33ebd95 100644 --- a/erpnext/accounts/letterhead/company_letterhead_grey.html +++ b/erpnext/accounts/letterhead/company_letterhead_grey.html @@ -1,7 +1,7 @@ \n\t
\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n \n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t
\n\t\t\t\t\t{{ _(\"Customer Name\") }}: {{doc.customer_name }}\n\t\t\t\t\n\t\t\t\t\t{{ _(\"Payment Due Date\") }}: {{\n\t\t\t\t\tfrappe.utils.format_date(doc.due_date) }}\n\t\t\t\t
{{ _(\"Invoice Number\") }}: {{ doc.name }}\n\t\t\t\t\t{{ _(\"Invoice Date\") }}: {{\n\t\t\t\t\tfrappe.utils.format_date(doc.posting_date) }}\n\t\t\t\t
{{ _(\"Bill From\") }}:
\n\t\t\t\t\t{% if doc.company_address %}\n {% set company_address = frappe.db.get_value(\"Address\", doc.company_address, [\"address_line1\", \"address_line2\", \"city\", \"state\", \"pincode\", \"country\"], as_dict=True) %}\n {{ doc.company }}
\n {{ company_address.get(\"address_line1\") or \"\" }}
\n {% if company_address.get(\"address_line2\") %}{{ company_address.get(\"address_line2\") }}
{% endif %}\n {{ company_address.get(\"city\") or \"\" }}, {{ company_address.get(\"state\") or \"\" }} {{ company_address.get(\"pincode\") or \"\" }}, {{ company_address.get(\"country\") or \"\" }}
\n {% endif %}\n\t\t\t\t
{{ _(\"Bill To\") }}:
\n\t\t\t\t {% if doc.customer_address %}\n\t\t\t\t\t\t{% set customer_address = frappe.db.get_value(\"Address\", doc.customer_address, [\"address_line1\", \"address_line2\", \"city\", \"state\", \"pincode\", \"country\"], as_dict=True) %}\n {{ doc.customer_name }}
\n\t\t\t\t\t\t{{ customer_address.address_line1 or \"\" }}
\n\t\t\t\t\t\t{% if customer_address.address_line2 %}{{ customer_address.address_line2 }}
{% endif %}\n\t\t\t\t\t\t{{ customer_address.city or \"\" }} {{ customer_address.state or \"\" }} {{ customer_address.pincode or \"\" }} {{ customer_address.country or \"\" }}
\n\t\t\t\t\t{% endif %}\n\t\t\t\t
\n\n\t\t\n\t\t{% set item_naming_by = frappe.db.get_single_value(\"Stock Settings\", \"item_naming_by\") %}\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{% if item_naming_by != \"Item Code\" %}\n\t\t\t\t\t\t\n\t\t\t\t\t{% endif %}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t{% for item in doc.items %}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{% if item_naming_by != \"Item Code\" %}\n\t\t\t\t\t\t\n\t\t\t\t\t{% endif %}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{% endfor %}\n\t\t\t\n\t\t
{{ _(\"No\") }}{{ _(\"Item\") }}{{ _(\"Item Code\") }}{{ _(\"Quantity\") }}{{ _(\"Rate\") }}{{ _(\"Amount\") }}
{{ loop.index }}{{ item.item_name }}{{ item.item_code }}{{ item.get_formatted(\"qty\", 0) }} {{ item.uom }}{{ item.get_formatted(\"net_rate\", doc) }}\n\t\t\t\t\t\t{{ item.get_formatted(\"net_amount\", doc) }}\n\t\t\t\t\t
\n\n\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t
\n\t\t\t\t

{{ _(\"Total in words\") }}

\n\t\t\t\t
{{ doc.in_words }}
\n\t\t\t
\n\t\t\t\t \n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{%- if doc.apply_discount_on == \"Net Total\" -%}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t{%- endif -%}\n\t\t\t\t\t{%- for tax in doc.taxes -%}\n\t\t\t\t\t\t{%- if (tax.tax_amount or print_settings.print_taxes_with_zero_amount) and (not tax.included_in_print_rate or doc.flags.show_inclusive_tax_in_print) -%}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{%- endif -%}\n\t\t\t\t\t{%- endfor -%}\n\t\t\t\t\t{%- if doc.apply_discount_on == \"Grand Total\" -%}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t{%- endif -%}\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
{{ _(\"Sub Total:\") }}
{{ doc.get_formatted(\"total\", doc) }}
\n\t\t\t\t\t\t\t\t
{{ _(\"Discount\") }} ({{ doc.additional_discount_percentage }}%):\n\t\t\t\t\t\t\t
{{ doc.get_formatted(\"discount_amount\", doc) }}
{{ tax.get_formatted(\"description\") }} ({{ tax.get_formatted(\"rate\") }}%):
{{ tax.get_formatted(\"tax_amount\") }}
\n\t\t\t\t\t\t\t\t
{{ _(\"Discount\") }} ({{ doc.additional_discount_percentage }}%):\n\t\t\t\t\t\t\t
{{ doc.get_formatted(\"discount_amount\", doc) }}
{{ _(\"Grand Total:\") }}{{ doc.get_formatted(\"grand_total\", doc) }}
\n\t\t\t
\n\n\t\t\n\t\t
\n\t\t\t{% if doc.terms %}\n\t\t\t
\n\t\t\t\t
{{ _(\"Terms and Conditions\") }}
\n\t\t\t\t{{ doc.terms}}\n\t\t\t
\n\t\t\t{% endif %}\n\t
\n
\n{% endfor %}\n", + "idx": 0, + "line_breaks": 0, + "margin_bottom": 15.0, + "margin_left": 15.0, + "margin_right": 15.0, + "margin_top": 15.0, + "modified": "2025-11-30 16:58:32.571054", + "modified_by": "Administrator", + "module": "Accounts", + "name": "POS Invoice Standard", + "owner": "Administrator", + "page_number": "Hide", + "pdf_generator": "wkhtmltopdf", + "print_format_builder": 0, + "print_format_builder_beta": 0, + "print_format_for": "DocType", + "print_format_type": "Jinja", + "raw_printing": 0, + "show_section_headings": 0, + "standard": "Yes" +} diff --git a/erpnext/buying/print_format/purchase_order_standard/purchase_order_standard.json b/erpnext/buying/print_format/purchase_order_standard/purchase_order_standard.json index 695c600409c..c5ee7381d5f 100644 --- a/erpnext/buying/print_format/purchase_order_standard/purchase_order_standard.json +++ b/erpnext/buying/print_format/purchase_order_standard/purchase_order_standard.json @@ -1,7 +1,7 @@ { "absolute_value": 0, "align_labels_right": 0, - "creation": "2025-11-29 00:57:28.988603", + "creation": "2025-11-30 16:55:52.799647", "custom_format": 1, "default_print_language": "en", "disabled": 0, @@ -9,14 +9,14 @@ "docstatus": 0, "doctype": "Print Format", "font_size": 14, - "html": "{%- macro add_header(page_num, max_pages, doc, letter_head, no_letterhead, footer, print_settings=None, print_heading_template=None) -%}\n\t{% if letter_head and not no_letterhead %}\n\t\t
{{ letter_head }}
\n\t{% endif %}\n\t{% if print_heading_template %}\n\t\t{{ frappe.render_template(print_heading_template, {\"doc\":doc}) }}\n\t{% endif %}\n{%- endmacro -%}\n\n{% for page in layout %}\n
\n\t
\n\t\t{{ add_header(loop.index, layout|len, doc, letter_head, no_letterhead, footer, print_settings) }}\n\t
\n\t{%- if doc.meta.is_submittable and doc.docstatus==2-%}\n\t\t
\n\t\t\t

{{ _(\"CANCELLED\") }}

\n\t\t
\n\t{%- endif -%}\n\t{%- if doc.meta.is_submittable and doc.docstatus==0 and (print_settings==None or print_settings.add_draft_heading) -%}\n\t\t
\n\t\t\t

{{ _(\"DRAFT\") }}

\n\t\t
\n\t{%- endif -%}\n\n\t\n\t
\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t
\n\t\t\t\t\t{{ _(\"Customer Name\") }}: {{doc.customer_name }}\n\t\t\t\t\n\t\t\t\t\t{{ _(\"Payment Due Date\") }}: {{\n\t\t\t\t\tfrappe.utils.format_date(doc.due_date) }}\n\t\t\t\t
{{ _(\"Invoice Number\") }}: {{ doc.name }}\n\t\t\t\t\t{{ _(\"Invoice Date\") }}: {{\n\t\t\t\t\tfrappe.utils.format_date(doc.posting_date) }}\n\t\t\t\t
{{ _(\"Bill From\") }}:
\n\t\t\t\t\t{% if doc.company_address %}\n {% set company_address = frappe.db.get_value(\"Address\", doc.company_address, [\"address_line1\", \"address_line2\", \"city\", \"state\", \"pincode\", \"country\"], as_dict=True) %}\n {{ doc.company }}
\n {{ company_address.get(\"address_line1\") or \"\" }}
\n {% if company_address.get(\"address_line2\") %}{{ company_address.get(\"address_line2\") }}
{% endif %}\n {{ company_address.get(\"city\") or \"\" }}, {{ company_address.get(\"state\") or \"\" }} {{ company_address.get(\"pincode\") or \"\" }}, {{ company_address.get(\"country\") or \"\" }}
\n {% endif %}\n\t\t\t\t
{{ _(\"Bill To\") }}:
\n\t\t\t\t {% if doc.customer_address %}\n\t\t\t\t\t\t{% set customer_address = frappe.db.get_value(\"Address\", doc.customer_address, [\"address_line1\", \"address_line2\", \"city\", \"state\", \"pincode\", \"country\"], as_dict=True) %}\n {{ doc.customer_name }}
\n\t\t\t\t\t\t{{ customer_address.address_line1 or \"\" }}
\n\t\t\t\t\t\t{% if customer_address.address_line2 %}{{ customer_address.address_line2 }}
{% endif %}\n\t\t\t\t\t\t{{ customer_address.city or \"\" }} {{ customer_address.state or \"\" }} {{ customer_address.pincode or \"\" }} {{ customer_address.country or \"\" }}
\n\t\t\t\t\t{% endif %}\n\t\t\t\t
\n\n\t\t\n\t\t{% set item_naming_by = frappe.db.get_single_value(\"Stock Settings\", \"item_naming_by\") %}\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{% if item_naming_by != \"Item Code\" %}\n\t\t\t\t\t\t\n\t\t\t\t\t{% endif %}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t{% for item in doc.items %}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{% if item_naming_by != \"Item Code\" %}\n\t\t\t\t\t\t\n\t\t\t\t\t{% endif %}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{% endfor %}\n\t\t\t\n\t\t
{{ _(\"No\") }}{{ _(\"Item\") }}{{ _(\"Item Code\") }}{{ _(\"Quantity\") }}{{ _(\"Rate\") }}{{ _(\"Amount\") }}
{{ loop.index }}{{ item.item_name }}{{ item.item_code }}{{ item.get_formatted(\"qty\", 0) }} {{ item.uom }}{{ item.get_formatted(\"net_rate\", doc) }}\n\t\t\t\t\t\t{{ item.get_formatted(\"net_amount\", doc) }}\n\t\t\t\t\t
\n\n\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t
\n\t\t\t\t

{{ _(\"Total in words\") }}

\n\t\t\t\t
{{ doc.in_words }}
\n\t\t\t
\n\t\t\t\t \n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{%- if doc.apply_discount_on == \"Net Total\" -%}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t{%- endif -%}\n\t\t\t\t\t{%- for tax in doc.taxes -%}\n\t\t\t\t\t\t{%- if (tax.tax_amount or print_settings.print_taxes_with_zero_amount) and (not tax.included_in_print_rate or doc.flags.show_inclusive_tax_in_print) -%}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{%- endif -%}\n\t\t\t\t\t{%- endfor -%}\n\t\t\t\t\t{%- if doc.apply_discount_on == \"Grand Total\" -%}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t{%- endif -%}\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
{{ _(\"Sub Total:\") }}
{{ doc.get_formatted(\"total\", doc) }}
\n\t\t\t\t\t\t\t\t
{{ _(\"Discount\") }} ({{ doc.additional_discount_percentage }}%):\n\t\t\t\t\t\t\t
{{ doc.get_formatted(\"discount_amount\", doc) }}
{{ tax.get_formatted(\"description\") }} ({{ tax.get_formatted(\"rate\") }}%):
{{ tax.get_formatted(\"tax_amount\") }}
\n\t\t\t\t\t\t\t\t
{{ _(\"Discount\") }} ({{ doc.additional_discount_percentage }}%):\n\t\t\t\t\t\t\t
{{ doc.get_formatted(\"discount_amount\", doc) }}
{{ _(\"Grand Total:\") }}{{ doc.get_formatted(\"grand_total\", doc) }}
\n\t\t\t
\n\n\t\t\n\t\t
\n\t\t\t{% if doc.terms %}\n\t\t\t
\n\t\t\t\t
{{ _(\"Terms and Conditions\") }}
\n\t\t\t\t{{ doc.terms}}\n\t\t\t
\n\t\t\t{% endif %}\n\t
\n
\n{% endfor %}\n", + "html": "{%- macro add_header(page_num, max_pages, doc, letter_head, no_letterhead, footer, print_settings=None, print_heading_template=None) -%}\n\t{% if letter_head and not no_letterhead %}\n\t\t
{{ letter_head }}
\n\t{% endif %}\n\t{% if print_heading_template %}\n\t\t{{ frappe.render_template(print_heading_template, {\"doc\":doc}) }}\n\t{% endif %}\n{%- endmacro -%}\n\n{% for page in layout %}\n
\n\t
\n\t\t{{ add_header(loop.index, layout|len, doc, letter_head, no_letterhead, footer, print_settings) }}\n\t
\n\t{%- if doc.meta.is_submittable and doc.docstatus==2-%}\n\t\t
\n\t\t\t

{{ _(\"CANCELLED\") }}

\n\t\t
\n\t{%- endif -%}\n\t{%- if doc.meta.is_submittable and doc.docstatus==0 and (print_settings==None or print_settings.add_draft_heading) -%}\n\t\t
\n\t\t\t

{{ _(\"DRAFT\") }}

\n\t\t
\n\t{%- endif -%}\n\n\t\n\t
\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t
\n\t\t\t\t\t{{ _(\"Supplier Name\") }}: {{doc.supplier_name }}\n\t\t\t\t\n\t\t\t\t\t{{ _(\"Required By\") }}: {{\n\t\t\t\t\tfrappe.utils.format_date(doc.schedule_date) }}\n\t\t\t\t
{{ _(\"Order Number\") }}: {{ doc.name }}\n\t\t\t\t\t{{ _(\"Order Date\") }}: {{\n\t\t\t\t\tfrappe.utils.format_date(doc.transaction_date) }}\n\t\t\t\t
{{ _(\"Supplier Address\") }}:
\n\t\t\t\t\t{% if doc.supplier_address %}\n\t\t\t\t\t\t{% set supplier_address = frappe.db.get_value(\"Address\", doc.supplier_address, [\"address_line1\", \"address_line2\", \"city\", \"state\", \"pincode\", \"country\"], as_dict=True) %}\n {{ doc.supplier_name }}
\n\t\t\t\t\t\t{{ supplier_address.address_line1 or \"\" }}
\n\t\t\t\t\t\t{% if supplier_address.address_line2 %}{{ supplier_address.address_line2 }}
{% endif %}\n\t\t\t\t\t\t{{ supplier_address.city or \"\" }} {{ supplier_address.state or \"\" }} {{ supplier_address.pincode or \"\" }} {{ supplier_address.country or \"\" }}
\n\t\t\t\t\t{% endif %}\n\t\t\t\t
{{ _(\"Company Address\") }}:
\n {% if doc.billing_address %}\n {% set billing_address = frappe.db.get_value(\"Address\", doc.billing_address, [\"address_line1\", \"address_line2\", \"city\", \"state\", \"pincode\", \"country\"], as_dict=True) %}\n {{ doc.company }}
\n {{ billing_address.get(\"address_line1\") or \"\" }}
\n {% if billing_address.get(\"address_line2\") %}{{ billing_address.get(\"address_line2\") }}
{% endif %}\n {{ billing_address.get(\"city\") or \"\" }}, {{ billing_address.get(\"state\") or \"\" }} {{ billing_address.get(\"pincode\") or \"\" }}, {{ billing_address.get(\"country\") or \"\" }}
\n {% endif %}\n\t\t\t\t
\n\n\t\t\n\t\t{% set item_naming_by = frappe.db.get_single_value(\"Stock Settings\", \"item_naming_by\") %}\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{% if item_naming_by != \"Item Code\" %}\n\t\t\t\t\t\t\n\t\t\t\t\t{% endif %}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t{% for item in doc.items %}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{% if item_naming_by != \"Item Code\" %}\n\t\t\t\t\t\t\n\t\t\t\t\t{% endif %}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{% endfor %}\n\t\t\t\n\t\t
{{ _(\"No\") }}{{ _(\"Item\") }}{{ _(\"Item Code\") }}{{ _(\"Quantity\") }}{{ _(\"Rate\") }}{{ _(\"Amount\") }}
{{ loop.index }}{{ item.item_name }}{{ item.item_code }}{{ item.get_formatted(\"qty\", 0) }} {{ item.uom }}{{ item.get_formatted(\"net_rate\", doc) }}\n\t\t\t\t\t\t{{ item.get_formatted(\"net_amount\", doc) }}\n\t\t\t\t\t
\n\n\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t
\n\t\t\t\t

{{ _(\"Total in words\") }}

\n\t\t\t\t
{{ doc.in_words }}
\n\t\t\t
\n\t\t\t\t \n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{%- if doc.apply_discount_on == \"Net Total\" -%}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t{%- endif -%}\n\t\t\t\t\t{%- for tax in doc.taxes -%}\n\t\t\t\t\t\t{%- if (tax.tax_amount or print_settings.print_taxes_with_zero_amount) and (not tax.included_in_print_rate or doc.flags.show_inclusive_tax_in_print) -%}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{%- endif -%}\n\t\t\t\t\t{%- endfor -%}\n\t\t\t\t\t{%- if doc.apply_discount_on == \"Grand Total\" -%}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t{%- endif -%}\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
{{ _(\"Sub Total:\") }}
{{ doc.get_formatted(\"total\", doc) }}
\n\t\t\t\t\t\t\t\t
{{ _(\"Discount\") }} ({{ doc.additional_discount_percentage }}%):\n\t\t\t\t\t\t\t
{{ doc.get_formatted(\"discount_amount\", doc) }}
{{ tax.get_formatted(\"description\") }} ({{ tax.get_formatted(\"rate\") }}%):
{{ tax.get_formatted(\"tax_amount\") }}
\n\t\t\t\t\t\t\t\t
{{ _(\"Discount\") }} ({{ doc.additional_discount_percentage }}%):\n\t\t\t\t\t\t\t
{{ doc.get_formatted(\"discount_amount\", doc) }}
{{ _(\"Grand Total:\") }}{{ doc.get_formatted(\"grand_total\", doc) }}
\n\t\t\t
\n\n\t\t\n\t\t
\n\t\t\t{% if doc.terms %}\n\t\t\t
\n\t\t\t\t
{{ _(\"Terms and Conditions\") }}
\n\t\t\t\t{{ doc.terms}}\n\t\t\t
\n\t\t\t{% endif %}\n\t
\n
\n{% endfor %}\n", "idx": 0, "line_breaks": 0, "margin_bottom": 15.0, "margin_left": 15.0, "margin_right": 15.0, "margin_top": 15.0, - "modified": "2025-11-29 00:57:32.409130", + "modified": "2025-11-30 16:55:52.799647", "modified_by": "Administrator", "module": "Buying", "name": "Purchase Order Standard", diff --git a/erpnext/stock/print_format/delivery_note_standard/delivery_note_standard.json b/erpnext/stock/print_format/delivery_note_standard/delivery_note_standard.json index 656a715e855..691c0403f72 100644 --- a/erpnext/stock/print_format/delivery_note_standard/delivery_note_standard.json +++ b/erpnext/stock/print_format/delivery_note_standard/delivery_note_standard.json @@ -1,7 +1,7 @@ { "absolute_value": 0, "align_labels_right": 0, - "creation": "2025-11-29 01:01:37.362065", + "creation": "2025-11-30 16:53:24.456411", "custom_format": 1, "default_print_language": "en", "disabled": 0, @@ -9,14 +9,14 @@ "docstatus": 0, "doctype": "Print Format", "font_size": 14, - "html": "{%- macro add_header(page_num, max_pages, doc, letter_head, no_letterhead, footer, print_settings=None, print_heading_template=None) -%}\n\t{% if letter_head and not no_letterhead %}\n\t\t
{{ letter_head }}
\n\t{% endif %}\n\t{% if print_heading_template %}\n\t\t{{ frappe.render_template(print_heading_template, {\"doc\":doc}) }}\n\t{% endif %}\n{%- endmacro -%}\n\n{% for page in layout %}\n
\n\t
\n\t\t{{ add_header(loop.index, layout|len, doc, letter_head, no_letterhead, footer, print_settings) }}\n\t
\n\t{%- if doc.meta.is_submittable and doc.docstatus==2-%}\n\t\t
\n\t\t\t

{{ _(\"CANCELLED\") }}

\n\t\t
\n\t{%- endif -%}\n\t{%- if doc.meta.is_submittable and doc.docstatus==0 and (print_settings==None or print_settings.add_draft_heading) -%}\n\t\t
\n\t\t\t

{{ _(\"DRAFT\") }}

\n\t\t
\n\t{%- endif -%}\n\n\t\n\t
\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t
\n\t\t\t\t\t{{ _(\"Customer Name\") }}: {{doc.customer_name }}\n\t\t\t\t\n\t\t\t\t\t{{ _(\"Payment Due Date\") }}: {{\n\t\t\t\t\tfrappe.utils.format_date(doc.due_date) }}\n\t\t\t\t
{{ _(\"Invoice Number\") }}: {{ doc.name }}\n\t\t\t\t\t{{ _(\"Invoice Date\") }}: {{\n\t\t\t\t\tfrappe.utils.format_date(doc.posting_date) }}\n\t\t\t\t
{{ _(\"Bill From\") }}:
\n\t\t\t\t\t{% if doc.company_address %}\n {% set company_address = frappe.db.get_value(\"Address\", doc.company_address, [\"address_line1\", \"address_line2\", \"city\", \"state\", \"pincode\", \"country\"], as_dict=True) %}\n {{ doc.company }}
\n {{ company_address.get(\"address_line1\") or \"\" }}
\n {% if company_address.get(\"address_line2\") %}{{ company_address.get(\"address_line2\") }}
{% endif %}\n {{ company_address.get(\"city\") or \"\" }}, {{ company_address.get(\"state\") or \"\" }} {{ company_address.get(\"pincode\") or \"\" }}, {{ company_address.get(\"country\") or \"\" }}
\n {% endif %}\n\t\t\t\t
{{ _(\"Bill To\") }}:
\n\t\t\t\t {% if doc.customer_address %}\n\t\t\t\t\t\t{% set customer_address = frappe.db.get_value(\"Address\", doc.customer_address, [\"address_line1\", \"address_line2\", \"city\", \"state\", \"pincode\", \"country\"], as_dict=True) %}\n {{ doc.customer_name }}
\n\t\t\t\t\t\t{{ customer_address.address_line1 or \"\" }}
\n\t\t\t\t\t\t{% if customer_address.address_line2 %}{{ customer_address.address_line2 }}
{% endif %}\n\t\t\t\t\t\t{{ customer_address.city or \"\" }} {{ customer_address.state or \"\" }} {{ customer_address.pincode or \"\" }} {{ customer_address.country or \"\" }}
\n\t\t\t\t\t{% endif %}\n\t\t\t\t
\n\n\t\t\n\t\t{% set item_naming_by = frappe.db.get_single_value(\"Stock Settings\", \"item_naming_by\") %}\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{% if item_naming_by != \"Item Code\" %}\n\t\t\t\t\t\t\n\t\t\t\t\t{% endif %}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t{% for item in doc.items %}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{% if item_naming_by != \"Item Code\" %}\n\t\t\t\t\t\t\n\t\t\t\t\t{% endif %}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{% endfor %}\n\t\t\t\n\t\t
{{ _(\"No\") }}{{ _(\"Item\") }}{{ _(\"Item Code\") }}{{ _(\"Quantity\") }}{{ _(\"Rate\") }}{{ _(\"Amount\") }}
{{ loop.index }}{{ item.item_name }}{{ item.item_code }}{{ item.get_formatted(\"qty\", 0) }} {{ item.uom }}{{ item.get_formatted(\"net_rate\", doc) }}\n\t\t\t\t\t\t{{ item.get_formatted(\"net_amount\", doc) }}\n\t\t\t\t\t
\n\n\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t
\n\t\t\t\t

{{ _(\"Total in words\") }}

\n\t\t\t\t
{{ doc.in_words }}
\n\t\t\t
\n\t\t\t\t \n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{%- if doc.apply_discount_on == \"Net Total\" -%}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t{%- endif -%}\n\t\t\t\t\t{%- for tax in doc.taxes -%}\n\t\t\t\t\t\t{%- if (tax.tax_amount or print_settings.print_taxes_with_zero_amount) and (not tax.included_in_print_rate or doc.flags.show_inclusive_tax_in_print) -%}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{%- endif -%}\n\t\t\t\t\t{%- endfor -%}\n\t\t\t\t\t{%- if doc.apply_discount_on == \"Grand Total\" -%}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t{%- endif -%}\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
{{ _(\"Sub Total:\") }}
{{ doc.get_formatted(\"total\", doc) }}
\n\t\t\t\t\t\t\t\t
{{ _(\"Discount\") }} ({{ doc.additional_discount_percentage }}%):\n\t\t\t\t\t\t\t
{{ doc.get_formatted(\"discount_amount\", doc) }}
{{ tax.get_formatted(\"description\") }} ({{ tax.get_formatted(\"rate\") }}%):
{{ tax.get_formatted(\"tax_amount\") }}
\n\t\t\t\t\t\t\t\t
{{ _(\"Discount\") }} ({{ doc.additional_discount_percentage }}%):\n\t\t\t\t\t\t\t
{{ doc.get_formatted(\"discount_amount\", doc) }}
{{ _(\"Grand Total:\") }}{{ doc.get_formatted(\"grand_total\", doc) }}
\n\t\t\t
\n\n\t\t\n\t\t
\n\t\t\t{% if doc.terms %}\n\t\t\t
\n\t\t\t\t
{{ _(\"Terms and Conditions\") }}
\n\t\t\t\t{{ doc.terms}}\n\t\t\t
\n\t\t\t{% endif %}\n\t
\n
\n{% endfor %}\n", + "html": "{%- macro add_header(page_num, max_pages, doc, letter_head, no_letterhead, footer, print_settings=None, print_heading_template=None) -%}\n\t{% if letter_head and not no_letterhead %}\n\t\t
{{ letter_head }}
\n\t{% endif %}\n\t{% if print_heading_template %}\n\t\t{{ frappe.render_template(print_heading_template, {\"doc\":doc}) }}\n\t{% endif %}\n{%- endmacro -%}\n\n{% for page in layout %}\n
\n\t
\n\t\t{{ add_header(loop.index, layout|len, doc, letter_head, no_letterhead, footer, print_settings) }}\n\t
\n\t{%- if doc.meta.is_submittable and doc.docstatus==2-%}\n\t\t
\n\t\t\t

{{ _(\"CANCELLED\") }}

\n\t\t
\n\t{%- endif -%}\n\t{%- if doc.meta.is_submittable and doc.docstatus==0 and (print_settings==None or print_settings.add_draft_heading) -%}\n\t\t
\n\t\t\t

{{ _(\"DRAFT\") }}

\n\t\t
\n\t{%- endif -%}\n\n\t\n\t
\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t
\n\t\t\t\t\t{{ _(\"Customer Name\") }}: {{doc.customer_name }}\n\t\t\t\t\n\t\t\t\t\t{{ _(\"Status\") }}: {{ doc.status }}\n\t\t\t\t
{{ _(\"Delivery Note\") }}: {{ doc.name }}\n\t\t\t\t\t{{ _(\"Date\") }}: {{\n\t\t\t\t\tfrappe.utils.format_date(doc.posting_date) }}\n\t\t\t\t
{{ _(\"Company Address\") }}:
\n\t\t\t\t\t{% if doc.company_address %}\n {% set company_address = frappe.db.get_value(\"Address\", doc.company_address, [\"address_line1\", \"address_line2\", \"city\", \"state\", \"pincode\", \"country\"], as_dict=True) %}\n {{ doc.company }}
\n {{ company_address.get(\"address_line1\") or \"\" }}
\n {% if company_address.get(\"address_line2\") %}{{ company_address.get(\"address_line2\") }}
{% endif %}\n {{ company_address.get(\"city\") or \"\" }}, {{ company_address.get(\"state\") or \"\" }} {{ company_address.get(\"pincode\") or \"\" }}, {{ company_address.get(\"country\") or \"\" }}
\n {% endif %}\n\t\t\t\t
{{ _(\"Customer Address\") }}:
\n\t\t\t\t {% if doc.customer_address %}\n\t\t\t\t\t\t{% set customer_address = frappe.db.get_value(\"Address\", doc.customer_address, [\"address_line1\", \"address_line2\", \"city\", \"state\", \"pincode\", \"country\"], as_dict=True) %}\n {{ doc.customer_name }}
\n\t\t\t\t\t\t{{ customer_address.address_line1 or \"\" }}
\n\t\t\t\t\t\t{% if customer_address.address_line2 %}{{ customer_address.address_line2 }}
{% endif %}\n\t\t\t\t\t\t{{ customer_address.city or \"\" }} {{ customer_address.state or \"\" }} {{ customer_address.pincode or \"\" }} {{ customer_address.country or \"\" }}
\n\t\t\t\t\t{% endif %}\n\t\t\t\t
\n\n\t\t\n\t\t{% set item_naming_by = frappe.db.get_single_value(\"Stock Settings\", \"item_naming_by\") %}\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{% if item_naming_by != \"Item Code\" %}\n\t\t\t\t\t\t\n\t\t\t\t\t{% endif %}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t{% for item in doc.items %}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{% if item_naming_by != \"Item Code\" %}\n\t\t\t\t\t\t\n\t\t\t\t\t{% endif %}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{% endfor %}\n\t\t\t\n\t\t
{{ _(\"No\") }}{{ _(\"Item\") }}{{ _(\"Item Code\") }}{{ _(\"Quantity\") }}{{ _(\"Rate\") }}{{ _(\"Amount\") }}
{{ loop.index }}{{ item.item_name }}{{ item.item_code }}{{ item.get_formatted(\"qty\", 0) }} {{ item.uom }}{{ item.get_formatted(\"net_rate\", doc) }}\n\t\t\t\t\t\t{{ item.get_formatted(\"net_amount\", doc) }}\n\t\t\t\t\t
\n\n\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t
\n\t\t\t\t

{{ _(\"Total in words\") }}

\n\t\t\t\t
{{ doc.in_words }}
\n\t\t\t
\n\t\t\t\t \n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{%- if doc.apply_discount_on == \"Net Total\" -%}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t{%- endif -%}\n\t\t\t\t\t{%- for tax in doc.taxes -%}\n\t\t\t\t\t\t{%- if (tax.tax_amount or print_settings.print_taxes_with_zero_amount) and (not tax.included_in_print_rate or doc.flags.show_inclusive_tax_in_print) -%}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{%- endif -%}\n\t\t\t\t\t{%- endfor -%}\n\t\t\t\t\t{%- if doc.apply_discount_on == \"Grand Total\" -%}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t{%- endif -%}\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
{{ _(\"Sub Total:\") }}
{{ doc.get_formatted(\"total\", doc) }}
\n\t\t\t\t\t\t\t\t
{{ _(\"Discount\") }} ({{ doc.additional_discount_percentage }}%):\n\t\t\t\t\t\t\t
{{ doc.get_formatted(\"discount_amount\", doc) }}
{{ tax.get_formatted(\"description\") }} ({{ tax.get_formatted(\"rate\") }}%):
{{ tax.get_formatted(\"tax_amount\") }}
\n\t\t\t\t\t\t\t\t
{{ _(\"Discount\") }} ({{ doc.additional_discount_percentage }}%):\n\t\t\t\t\t\t\t
{{ doc.get_formatted(\"discount_amount\", doc) }}
{{ _(\"Grand Total:\") }}{{ doc.get_formatted(\"grand_total\", doc) }}
\n\t\t\t
\n\n\t\t\n\t\t
\n\t\t\t{% if doc.terms %}\n\t\t\t
\n\t\t\t\t
{{ _(\"Terms and Conditions\") }}
\n\t\t\t\t{{ doc.terms}}\n\t\t\t
\n\t\t\t{% endif %}\n\t
\n
\n{% endfor %}\n", "idx": 0, "line_breaks": 0, "margin_bottom": 15.0, "margin_left": 15.0, "margin_right": 15.0, "margin_top": 15.0, - "modified": "2025-11-29 01:02:00.693127", + "modified": "2025-11-30 16:53:24.456411", "modified_by": "Administrator", "module": "Stock", "name": "Delivery Note Standard",