Merge pull request #17962 from rohitwaghchaure/not_able_to_save_asset_for_manual_method_develop
fix: not able to save asset if depreciation method is manual
This commit is contained in:
commit
ada1e4f0c4
@ -291,8 +291,11 @@ class Asset(AccountsController):
|
||||
|
||||
def validate_expected_value_after_useful_life(self):
|
||||
for row in self.get('finance_books'):
|
||||
accumulated_depreciation_after_full_schedule = max([d.accumulated_depreciation_amount
|
||||
for d in self.get("schedules") if cint(d.finance_book_id) == row.idx])
|
||||
accumulated_depreciation_after_full_schedule = [d.accumulated_depreciation_amount
|
||||
for d in self.get("schedules") if cint(d.finance_book_id) == row.idx]
|
||||
|
||||
if accumulated_depreciation_after_full_schedule:
|
||||
accumulated_depreciation_after_full_schedule = max(accumulated_depreciation_after_full_schedule)
|
||||
|
||||
asset_value_after_full_schedule = flt(flt(self.gross_purchase_amount) -
|
||||
flt(accumulated_depreciation_after_full_schedule),
|
||||
|
Loading…
x
Reference in New Issue
Block a user