Merge pull request #34778 from AnandBaburajan/asset_value_adjust_get_depr_amt
fix: improper usage of get_depreciation_amount in asset_value_adjustment
This commit is contained in:
commit
29e025c012
@ -14,6 +14,7 @@ from erpnext.assets.doctype.asset.asset import get_asset_value_after_depreciatio
|
||||
from erpnext.assets.doctype.asset.depreciation import get_depreciation_accounts
|
||||
from erpnext.assets.doctype.asset_depreciation_schedule.asset_depreciation_schedule import (
|
||||
get_asset_depr_schedule_doc,
|
||||
get_depreciation_amount,
|
||||
)
|
||||
|
||||
|
||||
@ -162,7 +163,7 @@ class AssetValueAdjustment(Document):
|
||||
depreciation_amount = days * rate_per_day
|
||||
from_date = data.schedule_date
|
||||
else:
|
||||
depreciation_amount = asset.get_depreciation_amount(value_after_depreciation, d)
|
||||
depreciation_amount = get_depreciation_amount(asset, value_after_depreciation, d)
|
||||
|
||||
if depreciation_amount:
|
||||
value_after_depreciation -= flt(depreciation_amount)
|
||||
|
Loading…
Reference in New Issue
Block a user