bank minimum amount
This commit is contained in:
@@ -178,7 +178,11 @@ class OfferAnalysis:
|
|||||||
logger.info(f"sum_active_loans === > {sum_active_loans}")
|
logger.info(f"sum_active_loans === > {sum_active_loans}")
|
||||||
real_eligible_amount = original_loan.eligible_amount - sum_active_loans
|
real_eligible_amount = original_loan.eligible_amount - sum_active_loans
|
||||||
|
|
||||||
if real_eligible_amount < original_transaction_offer.min_amount:
|
# if real_eligible_amount < original_transaction_offer.min_amount:
|
||||||
|
# logger.error(f"Max eligible amount ({real_eligible_amount}) is less than the minimum offer amount ({original_transaction_offer.min_amount}).")
|
||||||
|
# raise ValueError("You are not eligible for a loan at this time.")
|
||||||
|
|
||||||
|
if real_eligible_amount < 100:
|
||||||
logger.error(f"Max eligible amount ({real_eligible_amount}) is less than the minimum offer amount ({original_transaction_offer.min_amount}).")
|
logger.error(f"Max eligible amount ({real_eligible_amount}) is less than the minimum offer amount ({original_transaction_offer.min_amount}).")
|
||||||
raise ValueError("You are not eligible for a loan at this time.")
|
raise ValueError("You are not eligible for a loan at this time.")
|
||||||
|
|
||||||
@@ -219,11 +223,14 @@ class OfferAnalysis:
|
|||||||
approved_amount = new_eligible_amount
|
approved_amount = new_eligible_amount
|
||||||
approved_amount = round(approved_amount, 2)
|
approved_amount = round(approved_amount, 2)
|
||||||
|
|
||||||
if approved_amount < offer.min_amount:
|
# if approved_amount < offer.min_amount:
|
||||||
|
# logger.error(f"Max eligible amount ({approved_amount}) is less than the minimum offer amount ({offer.min_amount}).")
|
||||||
|
# raise ValueError("You are not eligible for a loan at this time.")
|
||||||
|
|
||||||
|
if approved_amount < 100:
|
||||||
logger.error(f"Max eligible amount ({approved_amount}) is less than the minimum offer amount ({offer.min_amount}).")
|
logger.error(f"Max eligible amount ({approved_amount}) is less than the minimum offer amount ({offer.min_amount}).")
|
||||||
raise ValueError("You are not eligible for a loan at this time.")
|
raise ValueError("You are not eligible for a loan at this time.")
|
||||||
|
|
||||||
|
|
||||||
transaction_offer = TransactionOffer.create_transaction_offer(
|
transaction_offer = TransactionOffer.create_transaction_offer(
|
||||||
customer_id=customer_id,
|
customer_id=customer_id,
|
||||||
transaction_id=transaction_id,
|
transaction_id=transaction_id,
|
||||||
|
|||||||
Reference in New Issue
Block a user