Merge branch 'master' into develop
This commit is contained in:
commit
3b27382013
@ -4,7 +4,7 @@ import inspect
|
|||||||
import frappe
|
import frappe
|
||||||
from erpnext.hooks import regional_overrides
|
from erpnext.hooks import regional_overrides
|
||||||
|
|
||||||
__version__ = '8.6.3'
|
__version__ = '8.6.4'
|
||||||
|
|
||||||
def get_default_company(user=None):
|
def get_default_company(user=None):
|
||||||
'''Get default company for user'''
|
'''Get default company for user'''
|
||||||
|
@ -147,8 +147,9 @@ class Asset(Document):
|
|||||||
accumulated_depreciation_after_full_schedule = \
|
accumulated_depreciation_after_full_schedule = \
|
||||||
max([d.accumulated_depreciation_amount for d in self.get("schedules")])
|
max([d.accumulated_depreciation_amount for d in self.get("schedules")])
|
||||||
|
|
||||||
asset_value_after_full_schedule = (flt(self.gross_purchase_amount) -
|
asset_value_after_full_schedule = flt(flt(self.gross_purchase_amount) -
|
||||||
flt(accumulated_depreciation_after_full_schedule))
|
flt(accumulated_depreciation_after_full_schedule),
|
||||||
|
self.precision('expected_value_after_useful_life'))
|
||||||
|
|
||||||
if self.expected_value_after_useful_life < asset_value_after_full_schedule:
|
if self.expected_value_after_useful_life < asset_value_after_full_schedule:
|
||||||
frappe.throw(_("Expected value after useful life must be greater than or equal to {0}")
|
frappe.throw(_("Expected value after useful life must be greater than or equal to {0}")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user