Skip to content

Commit

Permalink
TFRS - Credit transfer incorrectly categorized in TFRS #2916 (#2917)
Browse files Browse the repository at this point in the history
* TFRS - Credit transfer incorrectly categorized in TFRS #2916

* .

---------

Co-authored-by: prv-proton <[email protected]>
  • Loading branch information
prv-proton and prv-proton authored Nov 12, 2024
1 parent c06c470 commit fc44c81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/api/services/CreditTradeService.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ def calculate_transfer_category(agreement_date, proposal_date, category_d_select
delta = relativedelta(proposal_date, agreement_date)
difference_in_months = delta.years * 12 + delta.months

if difference_in_months <= 6:
if (difference_in_months == 6 and delta.days == 0) or difference_in_months < 6:
return CreditTradeCategory.objects.get(category="A")
elif 6 < difference_in_months <= 12:
elif (difference_in_months == 12 and delta.days == 0) or (6 <= difference_in_months < 12):
return CreditTradeCategory.objects.get(category="B")
else:
return CreditTradeCategory.objects.get(category="C")
Expand Down

0 comments on commit fc44c81

Please sign in to comment.