From 753a1b511d2696d241625f285a7db59e29092bd3 Mon Sep 17 00:00:00 2001 From: Anand Baburajan Date: Tue, 12 Dec 2023 20:53:44 +0530 Subject: [PATCH] fix: 1st row depr. sch. value of asset put to less than 180 days acc. to I.T. S. 32 (#38697) fix: 1st row value of asset put to less than 180 days acc. to IT S. 32 --- erpnext/assets/doctype/asset/asset.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/erpnext/assets/doctype/asset/asset.py b/erpnext/assets/doctype/asset/asset.py index e9c1e14b94cd..92a349abb3e2 100644 --- a/erpnext/assets/doctype/asset/asset.py +++ b/erpnext/assets/doctype/asset/asset.py @@ -427,6 +427,10 @@ def _make_depreciation_schedule( n == 0 and (has_pro_rata or has_wdv_or_dd_non_yearly_pro_rata) and not self.opening_accumulated_depreciation + and get_updated_rate_of_depreciation_for_wdv_and_dd( + self, value_after_depreciation, finance_book, False + ) + == finance_book.rate_of_depreciation ): from_date = add_days( self.available_for_use_date, -1 @@ -1387,7 +1391,9 @@ def get_depreciation_amount( @erpnext.allow_regional -def get_updated_rate_of_depreciation_for_wdv_and_dd(asset, depreciable_value, fb_row): +def get_updated_rate_of_depreciation_for_wdv_and_dd( + asset, depreciable_value, fb_row, show_msg=True +): return fb_row.rate_of_depreciation