mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-30 18:34:48 +00:00
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:
@@ -269,6 +269,9 @@ class JournalEntry(AccountsController):
|
|||||||
frappe.throw(_("Journal Entry type should be set as Depreciation Entry for asset depreciation"))
|
frappe.throw(_("Journal Entry type should be set as Depreciation Entry for asset depreciation"))
|
||||||
|
|
||||||
def validate_stock_accounts(self):
|
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)
|
stock_accounts = get_stock_accounts(self.company, accounts=self.accounts)
|
||||||
for account in stock_accounts:
|
for account in stock_accounts:
|
||||||
account_bal, stock_bal, warehouse_list = get_stock_and_account_balance(
|
account_bal, stock_bal, warehouse_list = get_stock_and_account_balance(
|
||||||
|
|||||||
Reference in New Issue
Block a user