fix: Initialize interest_paid as zero

This commit is contained in:
Deepesh Garg 2020-04-30 22:22:44 +05:30
parent 4226191ec7
commit 61363d2ced

View File

@ -106,6 +106,7 @@ class LoanRepayment(AccountsController):
def allocate_amounts(self, paid_entries):
self.set('repayment_details', [])
self.principal_amount_paid = 0
interest_paid = 0
if self.amount_paid - self.penalty_amount > 0 and paid_entries:
interest_paid = self.amount_paid - self.penalty_amount