removed collected amount check #54
+2
-2
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user