Skip to content

Commit

Permalink
Merge branch 'hotfix'
Browse files Browse the repository at this point in the history
  • Loading branch information
mbauskar committed Jul 28, 2017
2 parents 734e635 + 2b420f7 commit 9d5b1b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion erpnext/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import frappe
from erpnext.hooks import regional_overrides

__version__ = '8.6.3'
__version__ = '8.6.4'

def get_default_company(user=None):
'''Get default company for user'''
Expand Down
5 changes: 3 additions & 2 deletions erpnext/accounts/doctype/asset/asset.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,9 @@ def validate_expected_value_after_useful_life(self):
accumulated_depreciation_after_full_schedule = \
max([d.accumulated_depreciation_amount for d in self.get("schedules")])

asset_value_after_full_schedule = (flt(self.gross_purchase_amount) -
flt(accumulated_depreciation_after_full_schedule))
asset_value_after_full_schedule = flt(flt(self.gross_purchase_amount) -
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:
frappe.throw(_("Expected value after useful life must be greater than or equal to {0}")
Expand Down

0 comments on commit 9d5b1b0

Please sign in to comment.