added salary table

This commit is contained in:
Chinenye Nmoh
2025-06-19 21:30:21 +01:00
parent 3be765bf41
commit 7fbb659fc6
7 changed files with 164 additions and 41 deletions
+8
View File
@@ -70,3 +70,11 @@ class LoanService:
Get the latest loan without a disbursement date.
"""
return Loan.get_latest_loan_with_disburse_date()
@classmethod
def get_customer_loans(cls, customer_id):
"""
Get customer's active loans by customer_id.
"""
return Loan.get_customer_loans(customer_id=customer_id)
+7 -1
View File
@@ -55,4 +55,10 @@ class RepaymentService:
"""
Get the latest repayment with a repay date and no verification date.
"""
return Repayment.get_latest_loan_with_repay_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)
+7 -1
View File
@@ -15,4 +15,10 @@ class SalaryService:
"""
Get the pending salary for a given customer.
"""
return Salary.get_pending_salaries()
return Salary.get_pending_salaries()
@classmethod
def update_status(cls, salary_id, status):
"""
Update the status of the salary with the given salary_id.
"""
return Salary.update_status(salary_id, status)