chore: patch to correct asset values if je has workflow [v14] (#36915)

chore: patch to correct asset values if je has workflow
This commit is contained in:
Anand Baburajan
2023-09-02 18:32:16 +05:30
committed by GitHub
parent 345c6084e5
commit 0ff1546b9b
3 changed files with 120 additions and 3 deletions

View File

@@ -399,14 +399,11 @@ class AssetCapitalization(StockController):
def get_gl_entries_for_consumed_asset_items(
self, gl_entries, target_account, target_against, precision
):
self.are_all_asset_items_non_depreciable = True
# Consumed Assets
for item in self.asset_items:
asset = frappe.get_doc("Asset", item.asset)
if asset.calculate_depreciation:
self.are_all_asset_items_non_depreciable = False
depreciate_asset(asset, self.posting_date)
asset.reload()