chore: asset scrap and restore fixes [v14] (#35851)

chore: better err msg on cancelling JE for asset scrap and allow restoring non-depr assets
This commit is contained in:
Anand Baburajan
2023-06-22 22:22:18 +05:30
committed by GitHub
parent fb823b53d1
commit 69780da099
2 changed files with 14 additions and 4 deletions

View File

@@ -343,6 +343,9 @@ def modify_depreciation_schedule_for_asset_repairs(asset):
def reverse_depreciation_entry_made_after_disposal(asset, date):
if not asset.calculate_depreciation:
return
row = -1
finance_book = asset.get("schedules")[0].get("finance_book")
for schedule in asset.get("schedules"):