Repayment updates
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
Reference in New Issue
Block a user