Skip to content

Commit

Permalink
fix: gl entry validation for miniscule loan penalty
Browse files Browse the repository at this point in the history
(cherry picked from commit aef65e7)
  • Loading branch information
abhinavxd authored and mergify[bot] committed May 15, 2022
1 parent c7f4a15 commit e958ef2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,9 @@ def allocate_amounts(self, repayment_details):

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

Expand Down

0 comments on commit e958ef2

Please sign in to comment.