fix(e-invoicing): cannot cancel invoice if IRN cancelled on portal (#26638)
This commit is contained in:
parent
2ae2580706
commit
84c4161c00
@ -294,6 +294,7 @@ erpnext.patches.v13_0.update_level_in_bom #1234sswef
|
|||||||
erpnext.patches.v13_0.add_missing_fg_item_for_stock_entry
|
erpnext.patches.v13_0.add_missing_fg_item_for_stock_entry
|
||||||
erpnext.patches.v13_0.update_subscription_status_in_memberships
|
erpnext.patches.v13_0.update_subscription_status_in_memberships
|
||||||
erpnext.patches.v13_0.update_amt_in_work_order_required_items
|
erpnext.patches.v13_0.update_amt_in_work_order_required_items
|
||||||
|
erpnext.patches.v12_0.show_einvoice_irn_cancelled_field
|
||||||
erpnext.patches.v13_0.delete_orphaned_tables
|
erpnext.patches.v13_0.delete_orphaned_tables
|
||||||
erpnext.patches.v13_0.update_export_type_for_gst
|
erpnext.patches.v13_0.update_export_type_for_gst
|
||||||
erpnext.patches.v13_0.update_tds_check_field #3
|
erpnext.patches.v13_0.update_tds_check_field #3
|
||||||
|
12
erpnext/patches/v12_0/show_einvoice_irn_cancelled_field.py
Normal file
12
erpnext/patches/v12_0/show_einvoice_irn_cancelled_field.py
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
from __future__ import unicode_literals
|
||||||
|
import frappe
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
company = frappe.get_all('Company', filters = {'country': 'India'})
|
||||||
|
if not company:
|
||||||
|
return
|
||||||
|
|
||||||
|
irn_cancelled_field = frappe.db.exists('Custom Field', {'dt': 'Sales Invoice', 'fieldname': 'irn_cancelled'})
|
||||||
|
if irn_cancelled_field:
|
||||||
|
frappe.db.set_value('Custom Field', irn_cancelled_field, 'depends_on', 'eval: doc.irn')
|
||||||
|
frappe.db.set_value('Custom Field', irn_cancelled_field, 'read_only', 0)
|
@ -457,7 +457,7 @@ def make_custom_fields(update=True):
|
|||||||
depends_on='eval:in_list(["Registered Regular", "SEZ", "Overseas", "Deemed Export"], doc.gst_category) && doc.irn_cancelled === 0'),
|
depends_on='eval:in_list(["Registered Regular", "SEZ", "Overseas", "Deemed Export"], doc.gst_category) && doc.irn_cancelled === 0'),
|
||||||
|
|
||||||
dict(fieldname='irn_cancelled', label='IRN Cancelled', fieldtype='Check', no_copy=1, print_hide=1,
|
dict(fieldname='irn_cancelled', label='IRN Cancelled', fieldtype='Check', no_copy=1, print_hide=1,
|
||||||
depends_on='eval:(doc.irn_cancelled === 1)', read_only=1, allow_on_submit=1, insert_after='customer'),
|
depends_on='eval: doc.irn', allow_on_submit=1, insert_after='customer'),
|
||||||
|
|
||||||
dict(fieldname='eway_bill_validity', label='E-Way Bill Validity', fieldtype='Data', no_copy=1, print_hide=1,
|
dict(fieldname='eway_bill_validity', label='E-Way Bill Validity', fieldtype='Data', no_copy=1, print_hide=1,
|
||||||
depends_on='ewaybill', read_only=1, allow_on_submit=1, insert_after='ewaybill'),
|
depends_on='ewaybill', read_only=1, allow_on_submit=1, insert_after='ewaybill'),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user