Skip to content

Commit

Permalink
fix: loan interest accrual date (#35695)
Browse files Browse the repository at this point in the history
fix: loan interest accrual date

---------

Co-authored-by: Abhinav Raut <abhinav.raut@zerodha.com>
Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
(cherry picked from commit 2a24423)
  • Loading branch information
abhinavxd authored and mergify[bot] committed Jun 18, 2023
1 parent 0a8b714 commit 314f0e1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,8 @@ def get_last_accrual_date(loan, posting_date):
# interest for last interest accrual date is already booked, so add 1 day
last_disbursement_date = get_last_disbursement_date(loan, posting_date)

if last_disbursement_date and getdate(last_disbursement_date) > getdate(
last_interest_accrual_date
if last_disbursement_date and getdate(last_disbursement_date) > add_days(
getdate(last_interest_accrual_date), 1
):
last_interest_accrual_date = last_disbursement_date

Expand Down

0 comments on commit 314f0e1

Please sign in to comment.