mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-15 11:09:17 +00:00
fix: Prevent clearing of Depreciation Schedule on adding more than one Finance Book
This commit is contained in:
@@ -185,11 +185,11 @@ class Asset(AccountsController):
|
|||||||
if not self.available_for_use_date:
|
if not self.available_for_use_date:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
start = self.clear_depreciation_schedule()
|
||||||
|
|
||||||
for d in self.get('finance_books'):
|
for d in self.get('finance_books'):
|
||||||
self.validate_asset_finance_books(d)
|
self.validate_asset_finance_books(d)
|
||||||
|
|
||||||
start = self.clear_depreciation_schedule()
|
|
||||||
|
|
||||||
# value_after_depreciation - current Asset value
|
# value_after_depreciation - current Asset value
|
||||||
if self.docstatus == 1 and d.value_after_depreciation:
|
if self.docstatus == 1 and d.value_after_depreciation:
|
||||||
value_after_depreciation = (flt(d.value_after_depreciation) -
|
value_after_depreciation = (flt(d.value_after_depreciation) -
|
||||||
|
|||||||
Reference in New Issue
Block a user