Skip to content

Commit

Permalink
fix: use get_last_day to get the correct date (backport #42564) (#42598)
Browse files Browse the repository at this point in the history
fix: use get_last_day to get the correct date (#42564)

(cherry picked from commit 5d58eb6)

Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com>
  • Loading branch information
mergify[bot] and khushi8112 committed Aug 2, 2024
1 parent 9616c59 commit 2de86eb
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -729,10 +729,15 @@ def get_daily_depr_amount(asset, row, schedule_idx, amount):
)
),
add_days(
add_months(
row.depreciation_start_date,
(row.frequency_of_depreciation * (asset.opening_number_of_booked_depreciations + 1))
* -1,
get_last_day(
add_months(
row.depreciation_start_date,
(
row.frequency_of_depreciation
* (asset.opening_number_of_booked_depreciations + 1)
)
* -1,
),
),
1,
),
Expand Down

0 comments on commit 2de86eb

Please sign in to comment.