From 976fb14614ed2fbce010dfb84f1861572bcf0c7a Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Sat, 10 May 2025 07:53:35 -0400 Subject: [PATCH] This ensures the progragation of original transaction id --- app/api/services/provide_loan.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/api/services/provide_loan.py b/app/api/services/provide_loan.py index 88db200..6e39cfb 100644 --- a/app/api/services/provide_loan.py +++ b/app/api/services/provide_loan.py @@ -107,7 +107,6 @@ class ProvideLoanService(BaseService): vat = charges["vat"] - # Save the loan details loan = Loan.create_loan( customer_id = customer_id, @@ -116,7 +115,7 @@ class ProvideLoanService(BaseService): product_id = offer.product_id, collection_type = collection_type, transaction_id = validated_data.get('transactionId'), - original_transaction = validated_data.get('transactionId'), + original_transaction = transaction_offer.original_transaction, initial_loan_amount = validated_data.get('requestedAmount'), upfront_fee = upfront_fee, repayment_amount = repayment_amount, @@ -124,7 +123,6 @@ class ProvideLoanService(BaseService): eligible_amount=eligible_amount, status = LoanStatus.ACTIVE, tenor = offer.tenor, - ) if not loan: