removed collected amount check

This commit is contained in:
Chinenye Nmoh
2025-11-03 14:06:32 +01:00
parent 0608faffa7
commit eae8e84fab
2 changed files with 2 additions and 4 deletions
+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"):
# raise ValueError("Repayment amount must be greater than zero.")
if balance <= Decimal("0.00"):
raise ValueError("There is no balance for this loan.")
if amount_collected > balance: