mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 11:49:10 +00:00
fix(perpetual inventory): Get warehouse account map only if perpetual inventory enabled (#15743)
* fix(perpetual inventory): Get warehouse account map only if perpetual inventory enabled * fix(perpetual inventory): Get warehouse account map only if perpetual inventory enabled
This commit is contained in:
@@ -53,9 +53,9 @@ def get_warehouse_account(warehouse, warehouse_account=None):
|
||||
if not account and warehouse.company:
|
||||
account = get_company_default_inventory_account(warehouse.company)
|
||||
|
||||
if not account:
|
||||
if not account and warehouse.company:
|
||||
frappe.throw(_("Please set Account in Warehouse {0} or Default Inventory Account in Company {1}")
|
||||
.format(warehouse, warehouse.company))
|
||||
.format(warehouse.name, warehouse.company))
|
||||
return account
|
||||
|
||||
def get_company_default_inventory_account(company):
|
||||
|
||||
Reference in New Issue
Block a user