Compare commits

...

1 Commits

Author SHA1 Message Date
VivianDee e5b2d6e7b6 Update provide_loan.py 2025-11-11 07:15:21 +01:00
+6 -2
View File
@@ -18,6 +18,7 @@ from app.api.integrations import EventServiceIntegration
from app.models import LoanRepaymentSchedule
from app.api.services.offer_analysis import OfferAnalysis
from app.api.helpers.response_helper import ResponseHelper
from datetime import datetime
class ProvideLoanService(BaseService):
TRANSACTION_TYPE = TransactionType.PROVIDE_LOAN
@@ -113,9 +114,12 @@ class ProvideLoanService(BaseService):
management = charges["management"]
insurance = charges["insurance"]
vat = charges["vat"]
# Generate Loan Reference
loan_ref = f"SIM{datetime.now().strftime('%Y%m%d%H%M%S%f')}"
padded_id = str(transaction_id).zfill(12)
loan_ref = f"{padded_id}{channel}{offer.product_id}"
# padded_id = str(transaction_id).zfill(12)
# loan_ref = f"{padded_id}{channel}{offer.product_id}"
# Save the loan details