diff --git a/easy_my_coop_loan_account/models/interest_line.py b/easy_my_coop_loan_account/models/interest_line.py index 413ad2a..2b2227e 100644 --- a/easy_my_coop_loan_account/models/interest_line.py +++ b/easy_my_coop_loan_account/models/interest_line.py @@ -100,7 +100,7 @@ class LoanInterestLine(models.Model): # compute the prorata interest for the fiscal year prorata_date = line.due_date - relativedelta(years=-1) diff_days = (prorata_date - date).days - days = line.loan_issue_id.get_number_of_days(date.year) + days = line.issue_line.get_number_of_days(date.year) previous_interest = line.accrued_interest - line.interest prorata_interest = line.interest * (diff_days / days)