From 81cbd0dc50a211e6c013bb33549c4e80280cc917 Mon Sep 17 00:00:00 2001 From: Saqib Ansari Date: Wed, 23 Dec 2020 15:21:50 +0530 Subject: [PATCH] fix: cannot cancel irn without submitting sales invoice --- erpnext/regional/india/e_invoice/einvoice.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/regional/india/e_invoice/einvoice.js b/erpnext/regional/india/e_invoice/einvoice.js index 916d436e3f9..d794cd48184 100644 --- a/erpnext/regional/india/e_invoice/einvoice.js +++ b/erpnext/regional/india/e_invoice/einvoice.js @@ -19,7 +19,7 @@ erpnext.setup_einvoice_actions = (doctype) => { frm.set_df_property('ewaybill', 'read_only', 1); } - if (docstatus == 0 && !irn && !__unsaved) { + if (!irn && !__unsaved) { const action = () => { frappe.call({ method: 'erpnext.regional.india.e_invoice.utils.get_einvoice', @@ -35,7 +35,7 @@ erpnext.setup_einvoice_actions = (doctype) => { add_custom_button(__("Generate IRN"), action); } - if (docstatus == 1 && irn && !irn_cancelled && !ewaybill) { + if (irn && !irn_cancelled && !ewaybill) { const fields = [ { "label": "Reason", @@ -108,7 +108,7 @@ erpnext.setup_einvoice_actions = (doctype) => { add_custom_button(__("Generate E-Way Bill"), action); } - if (docstatus == 1 && irn && ewaybill && !irn_cancelled && !eway_bill_cancelled) { + if (irn && ewaybill && !irn_cancelled && !eway_bill_cancelled) { const fields = [ { "label": "Reason",