repayment_data.LoanStatus
This commit is contained in:
@@ -51,8 +51,8 @@ class Repayment(db.Model):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def create_repayment(cls, repayment_data):
|
def create_repayment(cls, repayment_data):
|
||||||
|
|
||||||
if loan.status not in [LoanStatus.ACTIVE, LoanStatus.START_REPAY]:
|
if repayment_data.LoanStatus not in [LoanStatus.ACTIVE, LoanStatus.START_REPAY]:
|
||||||
raise ValueError(f"Repayment cannot be processed. Loan status: ({loan.status})")
|
raise ValueError(f"Repayment cannot be processed. Loan status: ({repayment_data.LoanStatus})")
|
||||||
|
|
||||||
repayment = cls(
|
repayment = cls(
|
||||||
customer_id=repayment_data.customerId,
|
customer_id=repayment_data.customerId,
|
||||||
|
|||||||
@@ -176,6 +176,7 @@ def salary_detect():
|
|||||||
"transactionId": loan.transaction_id,
|
"transactionId": loan.transaction_id,
|
||||||
"initiatedBy": "SALARY_DETECT",
|
"initiatedBy": "SALARY_DETECT",
|
||||||
"salaryAmount": pending_salary.amount,
|
"salaryAmount": pending_salary.amount,
|
||||||
|
"LoanStatus": loan.status,
|
||||||
}
|
}
|
||||||
|
|
||||||
# repayment_data = {
|
# repayment_data = {
|
||||||
|
|||||||
Reference in New Issue
Block a user