From b69d311268e07da2cd398f3b03a568e5e71b1032 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 20 Mar 2017 16:30:34 +0530 Subject: [PATCH] [fix] precision issue during making of depreciation schedule --- erpnext/accounts/doctype/asset/asset.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/asset/asset.py b/erpnext/accounts/doctype/asset/asset.py index 9caac071f9..88a52e7d01 100644 --- a/erpnext/accounts/doctype/asset/asset.py +++ b/erpnext/accounts/doctype/asset/asset.py @@ -112,8 +112,8 @@ class Asset(Document): def set_accumulated_depreciation(self): accumulated_depreciation = flt(self.opening_accumulated_depreciation) for d in self.get("schedules"): - accumulated_depreciation += flt(d.depreciation_amount) - d.accumulated_depreciation_amount = accumulated_depreciation + accumulated_depreciation += flt(d.depreciation_amount, d.precision("depreciation_amount")) + d.accumulated_depreciation_amount = flt(accumulated_depreciation, d.precision("accumulated_depreciation_amount")) def get_depreciation_amount(self, depreciable_value): if self.depreciation_method in ("Straight Line", "Manual"):