aloow partial to repay
This commit is contained in:
@@ -36,9 +36,8 @@ class Repayment(db.Model):
|
||||
def create_repayment(cls, customer_id, loan, transaction_id):
|
||||
|
||||
# Check that the loan is active
|
||||
if loan.status not in [LoanStatus.ACTIVE, LoanStatus.START_REPAY]:
|
||||
if loan.status not in [LoanStatus.ACTIVE, LoanStatus.START_REPAY, LoanStatus.ACTIVE_PARTIAL]:
|
||||
raise ValueError(f"Repayment cannot be processed. Loan status: ({loan.status})")
|
||||
|
||||
|
||||
repayment = cls(
|
||||
customer_id=customer_id,
|
||||
|
||||
Reference in New Issue
Block a user