diff --git a/erpnext/accounts/doctype/sales_invoice/regional/india.js b/erpnext/accounts/doctype/sales_invoice/regional/india.js index f54bce8aac7..1ed4b92e7a4 100644 --- a/erpnext/accounts/doctype/sales_invoice/regional/india.js +++ b/erpnext/accounts/doctype/sales_invoice/regional/india.js @@ -1,8 +1,6 @@ {% include "erpnext/regional/india/taxes.js" %} -{% include "erpnext/regional/india/e_invoice/einvoice.js" %} erpnext.setup_auto_gst_taxation('Sales Invoice'); -erpnext.setup_einvoice_actions('Sales Invoice') frappe.ui.form.on("Sales Invoice", { setup: function(frm) { @@ -48,6 +46,8 @@ frappe.ui.form.on("Sales Invoice", { }, __("Create")); } - } + }, }); + + diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 9cf3e62c695..2f8b782356d 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -225,9 +225,9 @@ class SalesInvoice(SellingController): frappe.throw(_("At least one mode of payment is required for POS invoice.")) def before_cancel(self): - super(SalesInvoice, self).before_cancel() self.update_time_sheet(None) + def on_cancel(self): super(SalesInvoice, self).on_cancel() diff --git a/erpnext/accounts/print_format/gst_e_invoice/__init__.py b/erpnext/accounts/print_format/gst_e_invoice/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/erpnext/accounts/print_format/gst_e_invoice/gst_e_invoice.html b/erpnext/accounts/print_format/gst_e_invoice/gst_e_invoice.html deleted file mode 100644 index b4255038d39..00000000000 --- a/erpnext/accounts/print_format/gst_e_invoice/gst_e_invoice.html +++ /dev/null @@ -1,147 +0,0 @@ -{%- from "templates/print_formats/standard_macros.html" import add_header, render_field, print_value -%} -{%- set einvoice = json.loads(doc.signed_einvoice) -%} - -
{{ seller.Gstin }}
-{{ seller.LglNm }}
-{{ seller.Addr1 }}
- {%- if seller.Addr2 -%}{{ seller.Addr2 }}
{% endif %} -{{ seller.Loc }}
-{{ frappe.db.get_value("Address", doc.company_address, "gst_state") }} - {{ seller.Pin }}
- - {%- if einvoice.ShipDtls -%} - {%- set shipping = einvoice.ShipDtls -%} -{{ shipping.Gstin }}
-{{ shipping.LglNm }}
-{{ shipping.Addr1 }}
- {%- if shipping.Addr2 -%}{{ shipping.Addr2 }}
{% endif %} -{{ shipping.Loc }}
-{{ frappe.db.get_value("Address", doc.shipping_address_name, "gst_state") }} - {{ shipping.Pin }}
- {% endif %} -{{ buyer.Gstin }}
-{{ buyer.LglNm }}
-{{ buyer.Addr1 }}
- {%- if buyer.Addr2 -%}{{ buyer.Addr2 }}
{% endif %} -{{ buyer.Loc }}
-{{ frappe.db.get_value("Address", doc.customer_address, "gst_state") }} - {{ buyer.Pin }}
-| Sr. No. | -Item | -HSN Code | -Qty | -UOM | -Rate | -Discount | -Taxable Amount | -Tax Rate | -Other Charges | -Total | -
|---|---|---|---|---|---|---|---|---|---|---|
| {{ item.SlNo }} | -{{ item.PrdDesc }} | -{{ item.HsnCd }} | -{{ item.Qty }} | -{{ item.Unit }} | -{{ frappe.utils.fmt_money(item.UnitPrice, None, "INR") }} | -{{ frappe.utils.fmt_money(item.Discount, None, "INR") }} | -{{ frappe.utils.fmt_money(item.AssAmt, None, "INR") }} | -{{ item.GstRt + item.CesRt }} % | -{{ frappe.utils.fmt_money(0, None, "INR") }} | -{{ frappe.utils.fmt_money(item.TotItemVal, None, "INR") }} | -
| Taxable Amount | -CGST | -SGST | -IGST | -CESS | -State CESS | -Discount | -Other Charges | -Round Off | -Total Value | -
|---|---|---|---|---|---|---|---|---|---|
| {{ frappe.utils.fmt_money(value_details.AssVal, None, "INR") }} | -{{ frappe.utils.fmt_money(value_details.CgstVal, None, "INR") }} | -{{ frappe.utils.fmt_money(value_details.SgstVal, None, "INR") }} | -{{ frappe.utils.fmt_money(value_details.IgstVal, None, "INR") }} | -{{ frappe.utils.fmt_money(value_details.CesVal, None, "INR") }} | -{{ frappe.utils.fmt_money(0, None, "INR") }} | -{{ frappe.utils.fmt_money(value_details.Discount, None, "INR") }} | -{{ frappe.utils.fmt_money(0, None, "INR") }} | -{{ frappe.utils.fmt_money(value_details.RndOffAmt, None, "INR") }} | -{{ frappe.utils.fmt_money(value_details.TotInvVal, None, "INR") }} | -