mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 03:09:09 +00:00
fix(stock): ignore fetching warehouse account for asset items
This commit is contained in:
@@ -264,14 +264,15 @@ class StockController(AccountsController):
|
|||||||
)
|
)
|
||||||
|
|
||||||
is_asset_pr = any(d.get("is_fixed_asset") for d in self.get("items"))
|
is_asset_pr = any(d.get("is_fixed_asset") for d in self.get("items"))
|
||||||
|
need_inventory_map = (self.get_stock_items() or self.get("packed_items")) and (
|
||||||
if (
|
|
||||||
cint(erpnext.is_perpetual_inventory_enabled(self.company))
|
cint(erpnext.is_perpetual_inventory_enabled(self.company))
|
||||||
or provisional_accounting_for_non_stock_items
|
)
|
||||||
or is_asset_pr
|
|
||||||
):
|
inventory_account_map = frappe._dict()
|
||||||
|
if need_inventory_map:
|
||||||
inventory_account_map = self.get_inventory_account_map()
|
inventory_account_map = self.get_inventory_account_map()
|
||||||
|
|
||||||
|
if need_inventory_map or provisional_accounting_for_non_stock_items or is_asset_pr:
|
||||||
if self.docstatus == 1:
|
if self.docstatus == 1:
|
||||||
if not gl_entries:
|
if not gl_entries:
|
||||||
gl_entries = (
|
gl_entries = (
|
||||||
|
|||||||
Reference in New Issue
Block a user