From 9cf790db9d81e809e34fd2c6ec8c3f63b29e3de2 Mon Sep 17 00:00:00 2001 From: Ganga Manoj Date: Wed, 13 Apr 2022 14:15:10 +0530 Subject: [PATCH] fix: Depreciation Amount calculation for first row when Monthly Depreciation is allowed (#30692) --- erpnext/assets/doctype/asset/asset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/assets/doctype/asset/asset.py b/erpnext/assets/doctype/asset/asset.py index a2ad2cf5bb2..21d90b5e48a 100644 --- a/erpnext/assets/doctype/asset/asset.py +++ b/erpnext/assets/doctype/asset/asset.py @@ -364,7 +364,7 @@ class Asset(AccountsController): if has_pro_rata and n == 0: # For first entry of monthly depr if r == 0: - days_until_first_depr = date_diff(monthly_schedule_date, self.available_for_use_date) + days_until_first_depr = date_diff(monthly_schedule_date, self.available_for_use_date) + 1 per_day_amt = depreciation_amount / days depreciation_amount_for_current_month = per_day_amt * days_until_first_depr depreciation_amount -= depreciation_amount_for_current_month