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

chore: patch to correct asset values if je has workflow
This commit is contained in:
Anand Baburajan
2023-09-02 18:31:32 +05:30
committed by GitHub
parent 2e7548462d
commit 4f0bb45a8b
4 changed files with 121 additions and 4 deletions

View File

@@ -840,7 +840,7 @@ def make_journal_entry(asset_name):
je.voucher_type = "Depreciation Entry"
je.naming_series = depreciation_series
je.company = asset.company
je.remark = _("Depreciation Entry against asset {0}").format(asset_name)
je.remark = ("Depreciation Entry against asset {0}").format(asset_name)
je.append(
"accounts",

View File

@@ -404,14 +404,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
notes = _(
"This schedule was created when Asset {0} was consumed through Asset Capitalization {1}."
).format(