fix: use get_last_day to get the correct date (backport #42564) (#42602)

fix: use get_last_day to get the correct date (#42564)

(cherry picked from commit 5d58eb67a6)

Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com>
This commit is contained in:
mergify[bot]
2024-08-03 09:27:16 +05:30
committed by GitHub
parent 703b9accb8
commit 02a31caa05

View File

@@ -729,10 +729,15 @@ def get_daily_depr_amount(asset, row, schedule_idx, amount):
) )
), ),
add_days( add_days(
add_months( get_last_day(
row.depreciation_start_date, add_months(
(row.frequency_of_depreciation * (asset.opening_number_of_booked_depreciations + 1)) row.depreciation_start_date,
* -1, (
row.frequency_of_depreciation
* (asset.opening_number_of_booked_depreciations + 1)
)
* -1,
),
), ),
1, 1,
), ),