diff --git a/erpnext/patches/v12_0/create_itc_reversal_custom_fields.py b/erpnext/patches/v12_0/create_itc_reversal_custom_fields.py index d157aad8f2..d4fbded5a3 100644 --- a/erpnext/patches/v12_0/create_itc_reversal_custom_fields.py +++ b/erpnext/patches/v12_0/create_itc_reversal_custom_fields.py @@ -97,6 +97,8 @@ def execute(): 'itc_central_tax': 0, 'itc_cess_amount': 0 }) + if not gst_accounts: + continue if d.account_head in gst_accounts.get('igst_account'): amount_map[d.parent]['itc_integrated_tax'] += d.amount