Merge pull request #53554 from saeedkola/fix/validate-stock-accounts-perpetual-v15-hotfix

fix: skip validate_stock_accounts in Journal Entry when perpetual inventory is disabled
This commit is contained in:
rohitwaghchaure
2026-03-17 18:30:34 +05:30
committed by GitHub

View File

@@ -269,6 +269,9 @@ class JournalEntry(AccountsController):
frappe.throw(_("Journal Entry type should be set as Depreciation Entry for asset depreciation"))
def validate_stock_accounts(self):
if not erpnext.is_perpetual_inventory_enabled(self.company):
return
stock_accounts = get_stock_accounts(self.company, accounts=self.accounts)
for account in stock_accounts:
account_bal, stock_bal, warehouse_list = get_stock_and_account_balance(