mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-23 06:59:20 +00:00
fix: cannot cancel irn without submitting sales invoice
This commit is contained in:
@@ -19,7 +19,7 @@ erpnext.setup_einvoice_actions = (doctype) => {
|
|||||||
frm.set_df_property('ewaybill', 'read_only', 1);
|
frm.set_df_property('ewaybill', 'read_only', 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (docstatus == 0 && !irn && !__unsaved) {
|
if (!irn && !__unsaved) {
|
||||||
const action = () => {
|
const action = () => {
|
||||||
frappe.call({
|
frappe.call({
|
||||||
method: 'erpnext.regional.india.e_invoice.utils.get_einvoice',
|
method: 'erpnext.regional.india.e_invoice.utils.get_einvoice',
|
||||||
@@ -35,7 +35,7 @@ erpnext.setup_einvoice_actions = (doctype) => {
|
|||||||
add_custom_button(__("Generate IRN"), action);
|
add_custom_button(__("Generate IRN"), action);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (docstatus == 1 && irn && !irn_cancelled && !ewaybill) {
|
if (irn && !irn_cancelled && !ewaybill) {
|
||||||
const fields = [
|
const fields = [
|
||||||
{
|
{
|
||||||
"label": "Reason",
|
"label": "Reason",
|
||||||
@@ -108,7 +108,7 @@ erpnext.setup_einvoice_actions = (doctype) => {
|
|||||||
add_custom_button(__("Generate E-Way Bill"), action);
|
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 = [
|
const fields = [
|
||||||
{
|
{
|
||||||
"label": "Reason",
|
"label": "Reason",
|
||||||
|
|||||||
Reference in New Issue
Block a user