aloow partial to repay

This commit is contained in:
CHIEFSOFT\ameye
2025-11-03 10:04:15 -05:00
parent c4b2df714c
commit 5b1d867d49
+1 -2
View File
@@ -36,10 +36,9 @@ class Repayment(db.Model):
def create_repayment(cls, customer_id, loan, transaction_id): def create_repayment(cls, customer_id, loan, transaction_id):
# Check that the loan is active # 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})") raise ValueError(f"Repayment cannot be processed. Loan status: ({loan.status})")
repayment = cls( repayment = cls(
customer_id=customer_id, customer_id=customer_id,
loan_id=loan.id, loan_id=loan.id,