This commit is contained in:
CHIEFSOFT\ameye
2025-06-20 20:52:08 -04:00
parent 4e23ea4e91
commit ee077fb380
+16 -6
View File
@@ -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)