diff --git a/ns_app/hooks.py b/ns_app/hooks.py index d713671..6435b51 100644 --- a/ns_app/hooks.py +++ b/ns_app/hooks.py @@ -5,7 +5,22 @@ app_description = "Custom ERPNext extensions" app_email = "dev@nsinnovations.net" app_license = "MIT" +# Load on every page app_include_js = [ "/assets/ns_app/js/custom.js" - "/assets/ns_app/js/sales_invoice.js" +] + +# Load on Sales Invoice form +doctype_js = { + "Sales Invoice": "public/js/sales_invoice.js" +} + +# Fixtures tracked in Git +fixtures = [ + { + "dt": "Print Format", + "filters": [ + ["name", "=", "Sales Invoice - NS"] + ] + } ] diff --git a/ns_app/print_formats/sales_invoice_ns/sales_invoice_ns.html b/ns_app/print_formats/sales_invoice_ns/sales_invoice_ns.html new file mode 100644 index 0000000..5f9c14c --- /dev/null +++ b/ns_app/print_formats/sales_invoice_ns/sales_invoice_ns.html @@ -0,0 +1,153 @@ + + +
+ {{ company_doc.company_name }}+
+ 1063 Chestnut Level Road, Quarryville PA 17566 |
+
+ Invoice + {{ doc.name }} + Date: {{ frappe.utils.formatdate(doc.posting_date, "MM-dd-yyyy") }} + |
+
| + + |
+ Due Date: {{ frappe.utils.formatdate(doc.due_date, "MM-dd-yyyy") }} + Terms: {{ doc.payment_terms_template or "Net 30" }} + |
+
|
+
+ {% if doc.custom_subscription_data %}
+
+ {{ doc.custom_subscription_data }}
+
+ {% endif %}
+
+ {% if doc.custom_invoice_notes %}
+
+ {{ doc.custom_invoice_notes }}
+
+ {% endif %}
+
+ |
+
| Item | +Description | +Qty | +Rate | +Amount | +
|---|---|---|---|---|
| {{ 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 }} +
++ Paid:{{ doc.total_advance }} +
++ Balance Due:{{ doc.outstanding_amount }} +
++ Prompt payment is always appreciated. We accept payments by check or over the phone using a debit or credit card. Automatic payment setup is also available upon request. + + Invoices over 30 days may be charged a late payment fee of 1.5% per month with a minimum fee of $5. + + Thanks for your business. +
+