made loan data dynamic and populated result fields

This commit was merged in pull request #19.
This commit is contained in:
Chinenye Nmoh
2025-06-04 18:55:53 +01:00
parent 5bbcaefe7f
commit 680ec9e9e0
4 changed files with 88 additions and 42 deletions
+14
View File
@@ -30,3 +30,17 @@ class LoanService:
Update the disbursement status of the loan with the given loan_id.
"""
return Loan.set_disbursement_date(loan_id, customer_id)
@classmethod
def set_disbursement_result(cls, loan_id, result, description):
"""
Update the disbursement result of the loan with the given loan_id.
"""
return Loan.set_disbursement_result(loan_id, result, description)
@classmethod
def get_latest_loan_without_disburse_date(cls):
"""
Get the latest loan without a disbursement date.
"""
return Loan.get_latest_loan_without_disburse_date()