Browse Source

[FIX] make function call on the right model

pull/134/head
houssine 4 years ago
parent
commit
e6f9f9c9ec
  1. 2
      easy_my_coop_loan_account/models/interest_line.py

2
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)

Loading…
Cancel
Save