Skip to content

Commit

Permalink
fix: Prevent clearing of Depreciation Schedule on adding more than on…
Browse files Browse the repository at this point in the history
…e Finance Book
  • Loading branch information
GangaManoj committed Nov 18, 2021
1 parent f8e371a commit a4043c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions erpnext/assets/doctype/asset/asset.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,11 @@ def make_depreciation_schedule(self, date_of_sale):
if not self.available_for_use_date:
return

start = self.clear_depreciation_schedule()

for d in self.get('finance_books'):
self.validate_asset_finance_books(d)

start = self.clear_depreciation_schedule()

# value_after_depreciation - current Asset value
if self.docstatus == 1 and d.value_after_depreciation:
value_after_depreciation = (flt(d.value_after_depreciation) -
Expand Down

0 comments on commit a4043c0

Please sign in to comment.