From e7e8a751cf5ab6a6952f926178e18ca3b29a1e03 Mon Sep 17 00:00:00 2001 From: Chinenye Nmoh Date: Mon, 3 Nov 2025 15:26:33 +0100 Subject: [PATCH] logged collected amount --- app/models/loan.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/loan.py b/app/models/loan.py index 6de6ffe..125757b 100644 --- a/app/models/loan.py +++ b/app/models/loan.py @@ -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: -- 2.34.1