added salary table
This commit was merged in pull request #25.
This commit is contained in:
@@ -161,6 +161,14 @@ class Repayment(db.Model):
|
||||
return cls.query.filter(
|
||||
cls.repay_date.is_(None)
|
||||
).order_by(cls.created_at.desc()).first()
|
||||
@classmethod
|
||||
def get_latest_repayment_with_loanId(cls, loan_id):
|
||||
"""
|
||||
Get the latest repayment with loan Id.
|
||||
"""
|
||||
return cls.query.filter(
|
||||
cls.loan_id == loan_id
|
||||
).order_by(cls.created_at.desc()).first()
|
||||
|
||||
@classmethod
|
||||
def get_latest_loan_with_repay_date(cls):
|
||||
|
||||
Reference in New Issue
Block a user