This commit is contained in:
CHIEFSOFT\ameye
2025-06-05 07:13:35 -04:00
parent 67363ff6e5
commit 50769f7faf
5 changed files with 137 additions and 65 deletions
+9
View File
@@ -144,6 +144,15 @@ class Loan(db.Model):
@classmethod
def get_latest_loan_without_disburse_date(cls):
"""
Get the latest loan without a disbursement date.
"""
return cls.query.filter(
cls.disburse_date.is_(None)
).order_by(cls.created_at.desc()).first()
@classmethod
def get_latest_loan_with_disburse_date(cls):
"""
Get the latest loan without a disbursement date.
"""