fix: Initialize interest_paid as zero
This commit is contained in:
parent
4226191ec7
commit
61363d2ced
@ -106,6 +106,7 @@ class LoanRepayment(AccountsController):
|
|||||||
def allocate_amounts(self, paid_entries):
|
def allocate_amounts(self, paid_entries):
|
||||||
self.set('repayment_details', [])
|
self.set('repayment_details', [])
|
||||||
self.principal_amount_paid = 0
|
self.principal_amount_paid = 0
|
||||||
|
interest_paid = 0
|
||||||
|
|
||||||
if self.amount_paid - self.penalty_amount > 0 and paid_entries:
|
if self.amount_paid - self.penalty_amount > 0 and paid_entries:
|
||||||
interest_paid = self.amount_paid - self.penalty_amount
|
interest_paid = self.amount_paid - self.penalty_amount
|
||||||
|
Loading…
Reference in New Issue
Block a user