fix(Asset): Fix value_after_depreciation calculation

This commit is contained in:
GangaManoj 2021-06-23 22:19:05 +05:30
parent 80399802c6
commit 2f5f9d8566

View File

@ -182,10 +182,10 @@ class Asset(AccountsController):
# value_after_depreciation - current Asset value # value_after_depreciation - current Asset value
if d.value_after_depreciation: if d.value_after_depreciation:
value_after_depreciation = (flt(d.value_after_depreciation) - value_after_depreciation = (flt(d.value_after_depreciation) -
flt(self.opening_accumulated_depreciation)) - flt(d.expected_value_after_useful_life) flt(self.opening_accumulated_depreciation))
else: else:
value_after_depreciation = (flt(self.gross_purchase_amount) - value_after_depreciation = (flt(self.gross_purchase_amount) -
flt(self.opening_accumulated_depreciation)) - flt(d.expected_value_after_useful_life) flt(self.opening_accumulated_depreciation))
d.value_after_depreciation = value_after_depreciation d.value_after_depreciation = value_after_depreciation