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:
-2
View File
@@ -16,7 +16,6 @@ def get_headers():
"password": "G7$k9@pL2!qR"
}
logger.info(f"Calling Bank Call-Auth Endpoint: {url}")
logger.info(f"Calling Bank Call-Auth Endpoint with data: {data}")
headers = {"Content-Type": "application/json"}
@@ -25,7 +24,6 @@ def get_headers():
response.raise_for_status() # Raises HTTPError for 4xx/5xx
result = response.json()
logger.info(f"Bank Call Auth Response: {result}")
# Check if access_token is present
if 'access_token' not in result: