loan select

This commit is contained in:
CHIEFSOFT\ameye
2025-02-17 11:52:51 -05:00
parent ede4fe6276
commit 45bdb2ee3d
2 changed files with 15 additions and 1 deletions
+13
View File
@@ -65,6 +65,19 @@ INSERT INTO loan_offers (
CREATE TABLE loan_select (
id SERIAL,
uid uuid DEFAULT uuid_generate_v4(),
loan VARCHAR(25) NOT NULL,
bvn VARCHAR(12) NOT NULL,
added timestamp without time zone DEFAULT now()
);
ALTER TABLE ONLY loan_select
ADD CONSTRAINT loan_select_id_key UNIQUE (id);
{"cid": "425611f2-c692-4404-b93d-76ca7a5ce00", "description": "100,000 Naira for 30 Days" , "active" : 1 },
{"cid": "425611f2-c692-4404-b93d-76ca7a5ce01", "description": "300,000 Naira for 60 Days" , "active" : 1 },
{"cid": "425611f2-c692-4404-b93d-76ca7a5ce02", "description": "900,000 Naira for 90 Days" , "active" : 1 },
+2 -1
View File
@@ -242,8 +242,9 @@ def salary_loanselect():
# validate input
loan = data["loan"]
bvn = data["bvn"]
if username == 'loan' and password == 'loan' :
if loan != '' and bvn != '' :
loan = load_offer(loan,bvn)
INSERT_LOAN ="INSERT INTO loan_select (loan, bvn) VALUES(%s, %s)"
return {
"message": "REQUEST_PIN",
"loan": loan,