logged collected amount

This commit was merged in pull request #54.
This commit is contained in:
Chinenye Nmoh
2025-11-03 15:26:33 +01:00
parent eae8e84fab
commit e7e8a751cf
+2 -2
View File
@@ -341,8 +341,8 @@ class Loan(db.Model):
balance = Decimal(str(loan.balance or 0)).quantize(Decimal("0.01"), rounding=ROUND_HALF_UP)
# Ensure valid repayment amount
# if amount_collected <= Decimal("0.00"):
# raise ValueError("Repayment amount must be greater than zero.")
if amount_collected <= Decimal("0.00"):
logger.info(f"Repayment amount is less than or equal to 0: {amount_collected}. Must be greater than 0.00")
if balance <= Decimal("0.00"):
raise ValueError("There is no balance for this loan.")
if amount_collected > balance: