From 113aeda82f2bb3f70da1caf0a03d48ad65571acf Mon Sep 17 00:00:00 2001 From: Ty Reynolds Date: Tue, 20 Jan 2026 11:48:51 -0500 Subject: [PATCH] Add Quotation print format and updated the Invoice and Sales Order --- ns_app/hooks.py | 2 +- .../print_formats/quotataion_ns.html | 95 +++++++++++++++++++ .../print_formats/quotataion_ns.json | 12 +++ .../sales_invoice_ns.html | 2 +- .../sales_invoice_ns.json | 0 .../sales_order_ns.html | 0 .../sales_order_ns.json | 0 7 files changed, 109 insertions(+), 2 deletions(-) create mode 100644 ns_app/print_formats/print_formats/quotataion_ns.html create mode 100644 ns_app/print_formats/print_formats/quotataion_ns.json rename ns_app/print_formats/{sales_invoice_ns => print_formats}/sales_invoice_ns.html (98%) rename ns_app/print_formats/{sales_invoice_ns => print_formats}/sales_invoice_ns.json (100%) rename ns_app/print_formats/{sales_invoice_ns => print_formats}/sales_order_ns.html (100%) rename ns_app/print_formats/{sales_invoice_ns => print_formats}/sales_order_ns.json (100%) diff --git a/ns_app/hooks.py b/ns_app/hooks.py index 6435b51..671bac0 100644 --- a/ns_app/hooks.py +++ b/ns_app/hooks.py @@ -20,7 +20,7 @@ fixtures = [ { "dt": "Print Format", "filters": [ - ["name", "=", "Sales Invoice - NS"] + ["name", "=", "NS Invoice"] ] } ] diff --git a/ns_app/print_formats/print_formats/quotataion_ns.html b/ns_app/print_formats/print_formats/quotataion_ns.html new file mode 100644 index 0000000..7080a73 --- /dev/null +++ b/ns_app/print_formats/print_formats/quotataion_ns.html @@ -0,0 +1,95 @@ + + + + + Quotation + + + + + + + + + + +
+

{{ doc.company }}

+ {% if doc.company_address %} +

{{ doc.company_address }}

+ {% endif %} +
+

QUOTATION

+

Quote #: {{ doc.name }}

+

Date: {{ doc.transaction_date }}

+ {% if doc.valid_till %} +

Valid Till: {{ doc.valid_till }}

+ {% endif %} +
+ + + + + + +
+ Quote To:
+ {{ doc.customer_name }}
+ {% if doc.customer_address %} + {{ doc.customer_address }} + {% endif %} +
+ + + + + + + + + + + + + + {% for row in doc.items %} + + + + + + + + {% endfor %} + +
ItemDescriptionQtyRateAmount
{{ row.item_code }}{{ row.item_name }}{{ row.qty }}{{ row.rate }}{{ row.amount }}
+ + +
+

+ Subtotal: + {{ doc.total }} +

+ + {% for tax in doc.taxes %} +

+ {{ tax.account_head }} ({{ tax.rate }}%): + {{ tax.tax_amount }} +

+ {% endfor %} + +

+ Total: + {{ doc.grand_total }} +

+
+ + +{% if doc.terms %} +
+

Terms & Conditions

+

{{ doc.terms }}

+{% endif %} + + + diff --git a/ns_app/print_formats/print_formats/quotataion_ns.json b/ns_app/print_formats/print_formats/quotataion_ns.json new file mode 100644 index 0000000..1f351fa --- /dev/null +++ b/ns_app/print_formats/print_formats/quotataion_ns.json @@ -0,0 +1,12 @@ +[ + { + "doctype": "Print Format", + "name": "NS Quotation", + "doc_type": "Quotation", + "standard": "No", + "custom_format": 1, + "disabled": 0, + "print_format_type": "Jinja", + "html": "{% include \"ns_app/print_formats/quotation_ns.html\" %}" + } +] diff --git a/ns_app/print_formats/sales_invoice_ns/sales_invoice_ns.html b/ns_app/print_formats/print_formats/sales_invoice_ns.html similarity index 98% rename from ns_app/print_formats/sales_invoice_ns/sales_invoice_ns.html rename to ns_app/print_formats/print_formats/sales_invoice_ns.html index 9e4737a..754abed 100644 --- a/ns_app/print_formats/sales_invoice_ns/sales_invoice_ns.html +++ b/ns_app/print_formats/print_formats/sales_invoice_ns.html @@ -1,5 +1,5 @@