[add]: Loan details and repayment fix

This commit is contained in:
VivianDee
2025-04-10 12:20:57 +01:00
parent edd19b9a39
commit 1b973322c9
6 changed files with 80 additions and 33 deletions
+3 -3
View File
@@ -20,11 +20,11 @@ class Customer(db.Model):
)
@classmethod
def is_eligible(cls, customer_id):
def is_valid_customer(cls, customer_id):
customer = cls.query.filter_by(id=customer_id).first()
if not customer:
return False, "Customer not found"
return True, "Customer is eligible"
return False
return True
@classmethod
def create_customer(cls, id, msisdn, country_code, account_id, account_type='savings'):