Merge pull request #46006 from frappe/mergify/bp/version-15-hotfix/pr-45895

fix: do not reschedule depreciation for fully depreciated asset on scrap (backport #45895)
This commit is contained in:
Khushi Rawat
2025-02-19 14:24:55 +05:30
committed by GitHub

View File

@@ -444,7 +444,7 @@ def scrap_asset(asset_name):
notes = _("This schedule was created when Asset {0} was scrapped.").format( notes = _("This schedule was created when Asset {0} was scrapped.").format(
get_link_to_form(asset.doctype, asset.name) get_link_to_form(asset.doctype, asset.name)
) )
if asset.status != "Fully Depreciated":
depreciate_asset(asset, date, notes) depreciate_asset(asset, date, notes)
asset.reload() asset.reload()