loan id
This commit is contained in:
+16
-6
@@ -166,16 +166,26 @@ def salary_detect():
|
||||
# Step 3.3: Create repayments
|
||||
for loan in loans:
|
||||
try:
|
||||
loan_dict = loan.to_dict()
|
||||
logger.info(f"loan_dict ==== Repayment Data:{loan_dict}")
|
||||
#loan_dict = loan.to_dict()
|
||||
logger.info(f"loan_dict ==== Repayment Data:{loan}")
|
||||
repayment_data = {
|
||||
"customerId": loan_dict["customerId"],
|
||||
"loanId": loan_dict["debtId"],
|
||||
"productId": loan_dict["productId"],
|
||||
"transactionId": loan_dict["transactionId"],
|
||||
"customerId": loan.customer_id,
|
||||
"loanId": loan.id ,
|
||||
"productId": loan.product_id ,
|
||||
"transactionId": lloan.transaction_id,
|
||||
"initiatedBy": "SALARY_DETECT",
|
||||
"salaryAmount": pending_salary.amount,
|
||||
}
|
||||
|
||||
# repayment_data = {
|
||||
# "customerId": loan.customer_id,
|
||||
# "loanId": loan_dict["debtId"],
|
||||
# "productId": loan_dict["productId"],
|
||||
# "transactionId": loan_dict["transactionId"],
|
||||
# "initiatedBy": "SALARY_DETECT",
|
||||
# "salaryAmount": pending_salary.amount,
|
||||
# }
|
||||
#
|
||||
logger.info(f"Saving/Creating Repayment Data:{repayment_data}")
|
||||
#logger.info(f"Creating repayment for loan ID {loan_dict['debtId']}")
|
||||
# repayment = RepaymentService.add_repayment(repayment_data)
|
||||
|
||||
Reference in New Issue
Block a user