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
+8
View File
@@ -78,3 +78,11 @@ class LoanService:
"""
return Loan.get_customer_loans(customer_id=customer_id)
@classmethod
def update_status(cls, loan_id, status):
"""
Update the status of the loan with the given loan_id.
"""
# Retrieve loan
return Loan.update_status(loan_id, status)
+9 -1
View File
@@ -62,9 +62,17 @@ class RepaymentService:
Get the latest repayment with a repay date and no verification date.
"""
return Repayment.get_latest_loan_with_repay_date()
@classmethod
def add_repayment(cls, data):
"""
Add a new repayment entry.
"""
return Repayment.add_repayment(data)
return Repayment.add_repayment(data)
@classmethod
def create_repayment(cls, repayment_data):
"""
Add a new repayment entry.
"""
return Repayment.create_repayment(customer_id, repayment_data)