removed collected amount check #54

Merged
ameye merged 1 commits from test into master 2025-11-03 14:34:34 +00:00
+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: