-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparentcat.py
More file actions
127 lines (111 loc) · 6.87 KB
/
Copy pathparentcat.py
File metadata and controls
127 lines (111 loc) · 6.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
#please given filename as parentcat so that you don't face any error
import random
def feepayment(D):
print("\n\n\t\t\tFEE PAYMENT")
print("\t\t\t===========")
UID2=int(input("\n\nEnter Student Unique ID:")) #INPUT STUDENT INFO
dob=input("Enter Date of birth(dd/mm/yyyy):")
pay=input("\n\n\t\t Make payment(y/n):")
print("\n\n\n")
if UID2 in D and dob==D[UID2]["DOB"]:
print("Unique Identification Number:",UID2) #DISPLAY INPUTTED STUDENT INFO
print("Student name:",D[UID2]["Student Name"])
print("Date of Birth:",D[UID2]["DOB"])
print("Class:",D[UID2]["Class"])
print("Stream:",D[UID2]["Stream"])
print("Gender:",D[UID2]["Gender"])
print("SGSC Status:",D[UID2]["SGSC"])
mob=int(input("\nEnter your mobile number:"))
PAY=input("\n\n\t\t\tMake payment(y/n):")
print("\n\n\n\n")
if PAY=="y":
def receipt(amt,AF,RF,TF,CF,VV): #ASKING BANK DETAILS
card=input("Enter your mode of Payment(DebitCard[DC]/CreditCard[CC]:")
cardnum=input("Enter Card Number:")
exp=input("Enter Expiration Date(mm/yyyy):")
cvv=input("CVV/CVC:")
cardnam=input("Enter Card Holder Name:")
print("\n\n\t\t\tMERCHANT DETAILS")
print("\t\t\t================\n")
print("\n\t\tMerchant:KVS")
print("\t\tAmount:",amt,"Rs")
print("\t\tCard Number:XXXX XXXX XXXX ",cardnum[12::])
otp=int(random.random()*(10**4))
print("\n\n\t\tThe OTP:",otp," is sent to Phone No.",mob) #OTP SENT TO GIVEN PHONE NO.
OTP=int(input("\n\nEnter OTP sent to your number:"))
if OTP==otp:
payy=input("\n\n\t\tPay the fees amount of "+str(amt)+"Rs?(y/n):") #CONFIRMING PAYMENT
print("\n\n\n")
if payy=="y":
TO=AF+RF+TF+CF+VV
print("\n\n\nUnique Identification Number:",UID2) #GENERATING FEE RECEIPT
print("Student name:",D[UID2]["Student Name"])
print("Date of Birth:",D[UID2]["DOB"])
print("Class:",D[UID2]["Class"])
print("\n\n\t\t\tPayment Succesful\n\n\n")
print("________________")
print("| RECIEPT ")
print("| ")
print("|Unique Identification Number:",UID2," ")
print("|Student name:",D[UID2]["Student Name"]," ")
print("|Date of Birth:",D[UID2]["DOB"]," ")
print("|Class:",D[UID2]["Class"]," ")
print("|Stream:",D[UID2]["Stream"]," ")
print("|Father's name:",D[UID2]["Father's name"]," ")
print("|Mother's name:",D[UID2]["Mother's name"]," ")
print("|SGSC Status:",D[UID2]["SGSC"]," ")
print("|Gender:",D[UID2]["Gender"]," ")
print("|_______________")
print("|FEE PARTICULAR | AMOUNT ")
print("|---------------------------------------------")
print("|Admission Fees | ",AF," ")
print("|Registration Fees | ",RF," ")
print("|Tution fee | ",TF," ")
print("|Late fee(Tution) | 0 ")
print("|Vidyalaya Vikas Nidhi(VVN)| ",VV," ")
print("|Late Fee(VVN) | 0 ")
print("|Computer Education Fee | ",CF," ")
print("|Project Fee | 0 ")
print("|Others(VVN) | 0 ")
print("|Others(SF) | 0 ")
print("|=============================================")
print("|Total | ",TO," .00 ")
print("|_______________")
D[UID2]["Fee Status"]="Paid"
else:
print("\n\n\t\t\tTHANK YOU") #IF DENY PAYMENT
else: #IF ENTERED WRONG OTP
print("\n\n")
print("\t\t\tYou have entered the wrong OTP")
print("\n")
OTP=int(input("\n\nEnter OTP sent to your number:"))
#GENERATING FEES ACCORDING TO EACH STUDENT
if D[UID2]["Class"]==1:
receipt(1925,100,25,0,300,1500)
if D[UID2]["Class"] in [2,3,4,5,6,7,8] and D[UID2]["SGSC"]=="False":
receipt(1800,0,0,0,300,1500)
if D[UID2]["Class"] in [2,3,4,5] and D[UID2]["SGSC"]=="True":
receipt(1800,0,0,0,300,1500)
if D[UID2]["Class"] in [6,7,8,9,10,11,12] and D[UID2]["SGSC"]=="True":
receipt(0,0,0,0,0,0)
if (D[UID2]["Class"]==9 or D[UID2]["Class"]==10) and D[UID2]["SGSC"]=="False":
if D[UID2]["Gender"]=="M":
receipt(2400,0,0,600,300,1500)
if D[UID2]["Gender"]=="F":
receipt(1800,0,0,0,300,1500)
if (D[UID2]["Class"]==11 or D[UID2]["Class"]==12) and D[UID2]["SGSC"]=="False":
if D[UID2]["Gender"]=="M":
if D[UID2]["Stream"]=="CS":
receipt(3150,0,0,1200,450,1500)
if D[UID2]["Stream"]=="BIO":
receipt(3000,0,0,1200,300,1500)
if D[UID2]["Gender"]=="F":
if D[UID2]["Stream"]=="CS":
receipt(1950,0,0,0,450,1500)
if D[UID2]["Stream"]=="BIO":
receipt(1800,0,0,0,300,1500)
else:
print("\n\n\n\t\t\tTHANK YOU") #IF DENIED PAYMENT
else:
print("\n\n\t\t\tYou have entered INVALID information")
print("\t\t\t\tTry again")