From be0cb5289f920f6d5a7c26df08090fec3e21f249 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 4 Apr 2024 18:28:29 +0530 Subject: [PATCH] fix:linter issue --- .../asset_depreciation_schedule.py | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/erpnext/assets/doctype/asset_depreciation_schedule/asset_depreciation_schedule.py b/erpnext/assets/doctype/asset_depreciation_schedule/asset_depreciation_schedule.py index 7b55735c8b7..9fd15c1501b 100644 --- a/erpnext/assets/doctype/asset_depreciation_schedule/asset_depreciation_schedule.py +++ b/erpnext/assets/doctype/asset_depreciation_schedule/asset_depreciation_schedule.py @@ -689,18 +689,24 @@ def get_straight_line_or_manual_depr_amount( - flt(row.expected_value_after_useful_life) ) - total_days = date_diff( - get_last_day( - add_months( - row.depreciation_start_date, - flt(row.total_number_of_depreciations - asset.number_of_depreciations_booked - 1) - * row.frequency_of_depreciation, - ) - ), - add_days( - get_last_day(add_months(row.depreciation_start_date, -1 * row.frequency_of_depreciation)), 1 - ), - ) + 1 + total_days = ( + date_diff( + get_last_day( + add_months( + row.depreciation_start_date, + flt(row.total_number_of_depreciations - asset.number_of_depreciations_booked - 1) + * row.frequency_of_depreciation, + ) + ), + add_days( + get_last_day( + add_months(row.depreciation_start_date, -1 * row.frequency_of_depreciation) + ), + 1, + ), + ) + + 1 + ) daily_depr_amount = amount / total_days