Repayment updates

This commit is contained in:
CHIEFSOFT\ameye
2025-06-20 15:18:04 -04:00
parent 190cd6611a
commit 7b21140b39
5 changed files with 64 additions and 3 deletions
+5 -1
View File
@@ -175,7 +175,11 @@ def salary_detect():
"salaryAmount": pending_salary.amount,
}
logger.info(f"Creating repayment for loan ID {loan_dict['debtId']}")
repayment = RepaymentService.add_repayment(repayment_data)
# repayment = RepaymentService.add_repayment(repayment_data)
repayment = RepaymentService.create_repayment(repayment_data)
Loan.update_status(loan_id=repayment_data.loanId,
status=LoanStatus.START_REPAY) # repay started
logger.info(f"Created repayment ID: {repayment.id}")
except Exception as e:
logger.error(f"Error creating repayment for loan ID {loan.id}: {e}")