fix: gl entry validation for miniscule loan penalty
(cherry picked from commit aef65e7417)
This commit is contained in:
@@ -279,9 +279,9 @@ class LoanRepayment(AccountsController):
|
||||
|
||||
if interest_paid > 0:
|
||||
if self.penalty_amount and interest_paid > self.penalty_amount:
|
||||
self.total_penalty_paid = self.penalty_amount
|
||||
self.total_penalty_paid = flt(self.penalty_amount, self.precision("debit"))
|
||||
elif self.penalty_amount:
|
||||
self.total_penalty_paid = interest_paid
|
||||
self.total_penalty_paid = flt(interest_paid, self.precision("debit"))
|
||||
|
||||
interest_paid -= self.total_penalty_paid
|
||||
|
||||
|
||||
Reference in New Issue
Block a user