forked from Kalyan4636/PYTHON-EERING
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TAXI BOOKING SYSTEM.py
593 lines (464 loc) · 27.5 KB
/
TAXI BOOKING SYSTEM.py
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
from tkinter import *
from tkinter import ttk
import random
import time
import datetime
from tkinter import messagebox as ms
import sqlite3
Item4 = 0
# make database and users (if not exists already) table at programme start up
with sqlite3.connect('Users.db') as db:
c = db.cursor()
c.execute('CREATE TABLE IF NOT EXISTS user (username TEXT NOT NULL ,password TEXT NOT NULL)')
db.commit()
db.close()
#main Class
class user:
def __init__(self,master):
# Window
self.master = master
# Some Usefull variables
self.username = StringVar()
self.password = StringVar()
self.n_username = StringVar()
self.n_password = StringVar()
#Create Widgets
self.widgets()
#Login Function
def login(self):
#Establish Connection
with sqlite3.connect('Users.db') as db:
c = db.cursor()
#Find user If there is any take proper action
find_user = ('SELECT * FROM user WHERE username = ? and password = ?')
c.execute(find_user,[(self.username.get()),(self.password.get())])
result = c.fetchall()
if result:
self.logf.pack_forget()
self.head['text'] = "Welcome, " + self.username.get()
self.head.configure(fg="green")
self.head.pack(fill=X)
application = travel(root)
else:
ms.showerror('Oops!','Username Not Found.')
def new_user(self):
#Establish Connection
with sqlite3.connect('Users.db') as db:
c = db.cursor()
#Find Existing username if any take proper action
find_user = ('SELECT * FROM user WHERE username = ?')
c.execute(find_user,[(self.username.get())])
if c.fetchall():
ms.showerror('Error!','Username Already Taken!')
else:
ms.showinfo('Success!','Account Created!')
self.log()
#Create New Account
insert = 'INSERT INTO user(username,password) VALUES(?,?)'
c.execute(insert,[(self.n_username.get()),(self.n_password.get())])
db.commit()
#Frame Packing Methords
def log(self):
self.username.set('')
self.password.set('')
self.crf.pack_forget()
self.head['text'] = 'LOGIN'
self.logf.pack()
def cr(self):
self.n_username.set('')
self.n_password.set('')
self.logf.pack_forget()
self.head['text'] = 'Create Account'
self.crf.pack()
#Draw Widgets
def widgets(self):
self.head = Label(self.master,text = 'LOGIN',font = ('',35),pady = 10)
self.head.pack()
self.logf = Frame(self.master,padx =10,pady = 10)
Label(self.logf,text = 'Username: ',font = ('',20),pady=5,padx=5).grid(sticky = W)
Entry(self.logf,textvariable = self.username,bd = 5,font = ('',15)).grid(row=0,column=1)
Label(self.logf,text = 'Password: ',font = ('',20),pady=5,padx=5).grid(sticky = W)
Entry(self.logf,textvariable = self.password,bd = 5,font = ('',15),show = '*').grid(row=1,column=1)
Button(self.logf,text = ' Login ',bd = 3 ,font = ('',15),padx=5,pady=5,command=self.login).grid()
Button(self.logf,text = ' Create Account ',bd = 3 ,font = ('',15),padx=5,pady=5,command=self.cr).grid(row=2,column=1)
self.logf.pack()
self.crf = Frame(self.master,padx =10,pady = 10)
Label(self.crf,text = 'Username: ',font = ('',20),pady=5,padx=5).grid(sticky = W)
Entry(self.crf,textvariable = self.n_username,bd = 5,font = ('',15)).grid(row=0,column=1)
Label(self.crf,text = 'Password: ',font = ('',20),pady=5,padx=5).grid(sticky = W)
Entry(self.crf,textvariable = self.n_password,bd = 5,font = ('',15),show = '*').grid(row=1,column=1)
Button(self.crf,text = 'Create Account',bd = 3 ,font = ('',15),padx=5,pady=5,command=self.new_user).grid()
Button(self.crf,text = 'Go to Login',bd = 3 ,font = ('',15),padx=5,pady=5,command=self.log).grid(row=2,column=1)
class travel:
def __init__(self,root):
self.root = root
self.root.title("Taxi Booking System In LPU")
self.root.geometry(geometry)
self.root.configure(background='black')
DateofOrder=StringVar()
DateofOrder.set(time.strftime(" %d / %m / %Y "))
Receipt_Ref=StringVar()
PaidTax=StringVar()
SubTotal=StringVar()
TotalCost=StringVar()
var1=IntVar()
var2=IntVar()
var3=IntVar()
var4=IntVar()
journeyType=IntVar()
carType=IntVar()
varl1=StringVar()
varl2=StringVar()
varl3=StringVar()
reset_counter=0
Firstname=StringVar()
Surname=StringVar()
Address=StringVar()
Postcode=StringVar()
Mobile=StringVar()
Telephone=StringVar()
Email=StringVar()
TaxiTax=StringVar()
Km=StringVar()
Travel_Ins=StringVar()
Luggage=StringVar()
Receipt=StringVar()
Standard=StringVar()
PrimeSedan=StringVar()
PremiumSedan=StringVar()
TaxiTax.set("0")
Km.set("0")
Travel_Ins.set("0")
Luggage.set("0")
Standard.set("0")
PrimeSedan.set("0")
PremiumSedan.set("0")
#==========================================Define Functiom==================================================
def iExit():
iExit= ms.askyesno("Prompt!","Do you want to exit?")
if iExit > 0:
root.destroy()
return
def Reset():
TaxiTax.set("0")
Km.set("0")
Travel_Ins.set("0")
Luggage.set("0")
Standard.set("0")
PrimeSedan.set("0")
PremiumSedan.set("0")
Firstname.set("")
Surname.set("")
Address.set("")
Postcode.set("")
Mobile.set("")
Telephone.set("")
Email.set("")
PaidTax.set("")
SubTotal.set("")
TotalCost.set("")
self.txtReceipt1.delete("1.0",END)
self.txtReceipt2.delete("1.0",END)
var1.set(0)
var2.set(0)
var3.set(0)
var4.set(0)
journeyType.set(0)
carType.set(0)
varl1.set("0")
varl2.set("0")
varl3.set("0")
self.cboPickup.current(0)
self.cboDrop.current(0)
self.cboPooling.current(0)
self.txtTaxiTax.configure(state=DISABLED)
self.txtKm.configure(state=DISABLED)
self.txtTravel_Ins.configure(state=DISABLED)
self.txtLuggage.configure(state=DISABLED)
self.txtStandard.configure(state=DISABLED)
self.txtPrimeSedan.configure(state=DISABLED)
self.txtPremiumSedan.configure(state=DISABLED)
self.reset_counter=1
def Receiptt():
if reset_counter is 0 and Firstname.get()!="" and Surname.get()!="" and Address.get()!="" and Postcode.get()!="" and Mobile.get()!="" and Telephone.get()!="" and Email.get()!="":
self.txtReceipt1.delete("1.0",END)
self.txtReceipt2.delete("1.0",END)
x=random.randint(10853,500831)
randomRef = str(x)
Receipt_Ref.set(randomRef)
self.txtReceipt1.insert(END,"Receipt Ref:\n")
self.txtReceipt2.insert(END, Receipt_Ref.get() + "\n")
self.txtReceipt1.insert(END,'Date:\n')
self.txtReceipt2.insert(END, DateofOrder.get() + "\n")
self.txtReceipt1.insert(END,'Taxi No:\n')
self.txtReceipt2.insert(END, 'TR ' + Receipt_Ref.get() + " BW\n")
self.txtReceipt1.insert(END,'Firstname:\n')
self.txtReceipt2.insert(END, Firstname.get() + "\n")
self.txtReceipt1.insert(END,'Surname:\n')
self.txtReceipt2.insert(END, Surname.get() + "\n")
self.txtReceipt1.insert(END,'Address:\n')
self.txtReceipt2.insert(END, Address.get() + "\n")
self.txtReceipt1.insert(END,'Postal Code:\n')
self.txtReceipt2.insert(END, Postcode.get() + "\n")
self.txtReceipt1.insert(END,'Telephone:\n')
self.txtReceipt2.insert(END, Telephone.get() + "\n")
self.txtReceipt1.insert(END,'Mobile:\n')
self.txtReceipt2.insert(END, Mobile.get() + "\n")
self.txtReceipt1.insert(END,'Email:\n')
self.txtReceipt2.insert(END, Email.get() + "\n")
self.txtReceipt1.insert(END,'From:\n')
self.txtReceipt2.insert(END, varl1.get() + "\n")
self.txtReceipt1.insert(END,'To:\n')
self.txtReceipt2.insert(END, varl2.get() + "\n")
self.txtReceipt1.insert(END,'Pooling:\n')
self.txtReceipt2.insert(END, varl3.get() + "\n")
self.txtReceipt1.insert(END,'Standard:\n')
self.txtReceipt2.insert(END, Standard.get() + "\n")
self.txtReceipt1.insert(END,'Prime Sedan:\n')
self.txtReceipt2.insert(END, PrimeSedan.get() + "\n")
self.txtReceipt1.insert(END,'Premium Sedan:\n')
self.txtReceipt2.insert(END, PremiumSedan.get() + "\n")
self.txtReceipt1.insert(END,'Paid:\n')
self.txtReceipt2.insert(END, PaidTax.get() + "\n")
self.txtReceipt1.insert(END,'SubTotal:\n')
self.txtReceipt2.insert(END, str(SubTotal.get()) + "\n")
self.txtReceipt1.insert(END,'Total Cost:\n')
self.txtReceipt2.insert(END, str(TotalCost.get()))
else:
self.txtReceipt1.delete("1.0",END)
self.txtReceipt2.delete("1.0",END)
self.txtReceipt1.insert(END,"\nNo Input")
def Taxi_Tax():
global Item1
if var1.get() == 1:
self.txtTaxiTax.configure(state = NORMAL)
Item1=float(50)
TaxiTax.set("Rs " + str(Item1))
elif var1.get() == 0:
self.txtTaxiTax.configure(state=DISABLED)
TaxiTax.set("0")
Item1=0
def Kilo():
if var2.get() == 0:
self.txtKm.configure(state=DISABLED)
Km.set("0")
elif var2.get() == 1 and varl1.get() != "" and varl2.get() != "":
self.txtKm.configure(state=NORMAL)
if varl1.get() == "CampusCafe":
switch ={"BoysHostel": 10,"GirlsHostel": 8,"AdmissionBlock":6,"CampusCafe": 0}
Km.set(switch[varl2.get()])
elif varl1.get() == "BoysHostel":
switch ={"BoysHostel": 0,"GirlsHostel": 2,"AdmissionBlock":5,"CampusCafe": 10}
Km.set(switch[varl2.get()])
elif varl1.get() == "GirlsHostel":
switch ={"BoysHostel": 2,"GirlsHostel": 0,"AdmissionBlock":3,"CampusCafe": 8}
Km.set(switch[varl2.get()])
elif varl1.get() == "AdmissionBlock":
switch ={"BoysHostel": 5,"GirlsHostel": 3,"AdmissionBlock":0,"CampusCafe": 6}
Km.set(switch[varl2.get()])
def Travelling():
global Item3
if var3.get() == 1:
self.txtTravel_Ins.configure(state = NORMAL)
Item3=float(10)
Travel_Ins.set("Rs " + str(Item3))
elif var3.get() == 0:
self.txtTravel_Ins.configure(state = DISABLED)
Travel_Ins.set("0")
Item3=0
def Lug():
global Item4
if (var4.get()==1):
self.txtLuggage.configure(state = NORMAL)
Item4=float(30)
Luggage.set("Rs "+ str(Item4))
elif var4.get()== 0:
self.txtLuggage.configure(state = DISABLED)
Luggage.set("0")
Item4=0
def selectCar():
global Item5
if carType.get() == 1:
self.txtPrimeSedan.configure(state = DISABLED)
PrimeSedan.set("0")
self.txtPremiumSedan.configure(state = DISABLED)
PremiumSedan.set("0")
self.txtStandard.configure(state = NORMAL)
Item5 = float(8)
Standard.set("Rs "+ str(Item5))
elif carType.get() == 2:
self.txtStandard.configure(state =DISABLED)
Standard.set("0")
self.txtPremiumSedan.configure(state = DISABLED)
PremiumSedan.set("0")
self.txtPrimeSedan.configure(state = NORMAL)
Item5 = float(10)
PrimeSedan.set("Rs "+ str(Item5))
else:
self.txtStandard.configure(state =DISABLED)
Standard.set("0")
self.txtPrimeSedan.configure(state = DISABLED)
PrimeSedan.set("0")
self.txtPremiumSedan.configure(state = NORMAL)
Item5 = float(15)
PremiumSedan.set("Rs "+ str(Item5))
def Total_Paid():
if ((var1.get() == 1 and var2.get() == 1 and var3.get() == 1 or var4.get() == 1) and carType.get() != 0 and journeyType.get() != 0 and (varl1.get() != "" and varl2.get() !="")):
if journeyType.get()==1:
Item2=Km.get()
Cost_of_fare = (Item1+(float(Item2)*Item5)+Item3+Item4)
Tax = "Rs " + str('%.2f'%((Cost_of_fare) *0.09))
ST = "Rs " + str('%.2f'%((Cost_of_fare)))
TT = "Rs " + str('%.2f'%(Cost_of_fare+((Cost_of_fare)*0.9)))
elif journeyType.get()==2:
Item2=Km.get()
Cost_of_fare = (Item1+(float(Item2)*Item5)*1.5+Item3+Item4)
Tax = "Rs " + str('%.2f'%((Cost_of_fare) *0.09))
ST = "Rs " + str('%.2f'%((Cost_of_fare)))
TT = "Rs " + str('%.2f'%(Cost_of_fare+((Cost_of_fare)*0.9)))
else:
Item2=Km.get()
Cost_of_fare = (Item1+(float(Item2)*Item5)*2+Item3+Item4)
Tax = "Rs " + str('%.2f'%((Cost_of_fare) *0.09))
ST = "Rs " + str('%.2f'%((Cost_of_fare)))
TT = "Rs " + str('%.2f'%(Cost_of_fare+((Cost_of_fare)*0.9)))
PaidTax.set(Tax)
SubTotal.set(ST)
TotalCost.set(TT)
else:
w = ms.showwarning("Error !","Invalid Input\nPlease try again !!!")
#================================================mainframe========================================================================
MainFrame=Frame(self.root)
MainFrame.pack(fill=BOTH,expand=True)
Tops = Frame(MainFrame, bd=20, width=1350,relief=RIDGE)
Tops.pack(side=TOP,fill=BOTH,expand=True)
self.lblTitle=Label(Tops,font=('arial',70,'bold'),text=" Taxi Booking System in LPU ")
self.lblTitle.grid()
#================================================customerframedetail=============================================================
CustomerDetailsFrame=LabelFrame(MainFrame, width=1350,height=500,bd=20, pady=5, relief=RIDGE)
CustomerDetailsFrame.pack(side=BOTTOM,fill=BOTH,expand=True)
FrameDetails=Frame(CustomerDetailsFrame, width=880,height=400,bd=10, relief=RIDGE)
FrameDetails.pack(side=LEFT,fill=BOTH,expand=True)
CustomerName=LabelFrame(FrameDetails, width=150,height=250,bd=10, font=('arial',12,'bold'),text="Customer Name", relief=RIDGE)
CustomerName.grid(row=0,column=0)
TravelFrame = LabelFrame(FrameDetails,bd=10, width=300,height=250, font=('arial',12,'bold'),text="Booking Detail", relief=RIDGE)
TravelFrame.grid(row=0,column=1)
Book_Frame=LabelFrame(FrameDetails,width=300,height=150,relief=FLAT)
Book_Frame.grid(row=1,column=0)
CostFrame = LabelFrame(FrameDetails,width=150,height=150,bd=5,relief=FLAT)
CostFrame.grid(row=1,column=1)
#===============================================recipt======================================================================
Receipt_BottonFrame=LabelFrame(CustomerDetailsFrame,bd=10, width=450,height=400, relief=RIDGE)
Receipt_BottonFrame.pack(side=RIGHT,fill=BOTH,expand=True)
ReceiptFrame=LabelFrame(Receipt_BottonFrame, width=350,height=300, font=('arial',12,'bold'),text="Receipt", relief=RIDGE)
ReceiptFrame.grid(row=0,column=0)
ButtonFrame=LabelFrame(Receipt_BottonFrame, width=350,height=100, relief=RIDGE)
ButtonFrame.grid(row=1,column=0)
#=========================================================CustomerName====================================================
self.lblFirstname=Label(CustomerName,font=('arial',14,'bold'),text="Firstname",bd=7)
self.lblFirstname.grid(row=0,column=0,sticky=W)
self.txtFirstname=Entry(CustomerName,font=('arial',14,'bold'),textvariable=Firstname,bd=7,insertwidth=2,justify=RIGHT)
self.txtFirstname.grid(row=0,column=1)
self.lblSurname=Label(CustomerName,font=('arial',14,'bold'),text="Surname",bd=7)
self.lblSurname.grid(row=1,column=0,sticky=W)
self.txtSurname=Entry(CustomerName,font=('arial',14,'bold'),textvariable=Surname,bd=7,insertwidth=2,justify=RIGHT)
self.txtSurname.grid(row=1,column=1,sticky=W)
self.lblAddress=Label(CustomerName,font=('arial',14,'bold'),text="Address",bd=7)
self.lblAddress.grid(row=2,column=0,sticky=W)
self.txtAddress=Entry(CustomerName,font=('arial',14,'bold'),textvariable=Address,bd=7,insertwidth=2,justify=RIGHT)
self.txtAddress.grid(row=2,column=1)
self.lblPostcode=Label(CustomerName,font=('arial',14,'bold'),text="Postcode",bd=7)
self.lblPostcode.grid(row=3,column=0,sticky=W)
self.txtPostcode=Entry(CustomerName,font=('arial',14,'bold'),textvariable=Postcode,bd=7,insertwidth=2,justify=RIGHT)
self.txtPostcode.grid(row=3,column=1)
self.lblTelephone=Label(CustomerName,font=('arial',14,'bold'),text="Telephone",bd=7)
self.lblTelephone.grid(row=4,column=0,sticky=W)
self.txtTelephone=Entry(CustomerName,font=('arial',14,'bold'),textvariable=Telephone,bd=7,insertwidth=2,justify=RIGHT)
self.txtTelephone.grid(row=4,column=1)
self.lblMobile=Label(CustomerName,font=('arial',14,'bold'),text="Mobile",bd=7)
self.lblMobile.grid(row=5,column=0,sticky=W)
self.txtMobile=Entry(CustomerName,font=('arial',14,'bold'),textvariable=Mobile,bd=7,insertwidth=2,justify=RIGHT)
self.txtMobile.grid(row=5,column=1)
self.lblEmail=Label(CustomerName,font=('arial',14,'bold'),text="Email",bd=7)
self.lblEmail.grid(row=6,column=0,sticky=W)
self.txtEmail=Entry(CustomerName,font=('arial',14,'bold'),textvariable=Email,bd=7,insertwidth=2,justify=RIGHT)
self.txtEmail.grid(row=6,column=1)
#===============================================Taxi Information==============================================================
self.lblPickup=Label(TravelFrame,font=('arial',14,'bold'),text="Pickup",bd=7)
self.lblPickup.grid(row=0,column=0,sticky=W)
self.cboPickup =ttk.Combobox(TravelFrame, textvariable = varl1 , state='readonly', font=('arial',20,'bold'), width=14)
self.cboPickup['value']=('','CampusCafe','AdmissionBlock','GirlsHostel','BoysHostel')
self.cboPickup.current(0)
self.cboPickup.grid(row=0,column=1)
self.lblDrop=Label(TravelFrame,font=('arial',14,'bold'),text="Drop",bd=7)
self.lblDrop.grid(row=1,column=0,sticky=W)
self.cboDrop =ttk.Combobox(TravelFrame, textvariable = varl2 , state='readonly', font=('arial',20,'bold'), width=14)
self.cboDrop['value']=('','BoysHostel','GirlsHostel','CampusCafe','AdmissionBlock')
self.cboDrop.current(0)
self.cboDrop.grid(row=1,column=1)
self.lblPooling=Label(TravelFrame,font=('arial',14,'bold'),text="Pooling",bd=7)
self.lblPooling.grid(row=2,column=0,sticky=W)
self.cboPooling =ttk.Combobox(TravelFrame, textvariable = varl3 , state='readonly', font=('arial',20,'bold'), width=14)
self.cboPooling['value']=('','1','2','3','4')
self.cboPooling.current(1)
self.cboPooling.grid(row=2,column=1)
#===============================================Taxi Information==============================================================
self.chkTaxiTax=Checkbutton(TravelFrame,text="Taxi Tax(Base Charge) *",variable = var1, onvalue=1, offvalue=0,font=('arial',16,'bold'),command=Taxi_Tax).grid(row=3, column=0, sticky=W)
self.txtTaxiTax=Label(TravelFrame,font=('arial',14,'bold'),textvariable=TaxiTax,bd=6,width=18,bg="white",state= DISABLED,justify=RIGHT,relief=SUNKEN)
self.txtTaxiTax.grid(row=3,column=1)
self.chkKm=Checkbutton(TravelFrame,text="Distance(KMs) *",variable = var2, onvalue=1, offvalue=0,font=('arial',16,'bold'),command=Kilo).grid(row=4, column=0, sticky=W)
self.txtKm=Label(TravelFrame,font=('arial',14,'bold'),textvariable=Km,bd=6,width=18,bg="white",state= DISABLED,justify=RIGHT,relief=SUNKEN,highlightthickness=0)
self.txtKm.grid(row=4,column=1)
self.chkTravel_Ins=Checkbutton(TravelFrame,text="Travelling Insurance *",variable = var3, onvalue=1, offvalue=0,font=('arial',16,'bold'),command=Travelling).grid(row=5, column=0, sticky=W)
self.txtTravel_Ins=Label(TravelFrame,font=('arial',14,'bold'),textvariable=Travel_Ins,bd=6,width=18,bg="white",state= DISABLED,justify=RIGHT,relief=SUNKEN)
self.txtTravel_Ins.grid(row=5,column=1)
self.chkLuggage=Checkbutton(TravelFrame,text="Extra Luggage",variable = var4, onvalue=1, offvalue=0,font=('arial',16,'bold'),command=Lug).grid(row=6, column=0, sticky=W)
self.txtLuggage=Label(TravelFrame,font=('arial',14,'bold'),textvariable=Luggage,bd=6,width=18,bg="white",state= DISABLED,justify=RIGHT,relief=SUNKEN)
self.txtLuggage.grid(row=6,column=1)
#=================================payment information ===========================================================================
self.lblPaidTax=Label(CostFrame,font=('arial',14,'bold'),text="Paid Tax\t\t",bd=7)
self.lblPaidTax.grid(row=0,column=2,sticky=W)
self.txtPaidTax = Label(CostFrame,font=('arial',14,'bold'),textvariable=PaidTax,bd=7, width=26, justify=RIGHT,bg="white",relief=SUNKEN)
self.txtPaidTax.grid(row=0,column=3)
self.lblSubTotal=Label(CostFrame,font=('arial',14,'bold'),text="Sub Total",bd=7)
self.lblSubTotal.grid(row=1,column=2,sticky=W)
self.txtSubTotal = Label(CostFrame,font=('arial',14,'bold'),textvariable=SubTotal,bd=7, width=26, justify=RIGHT,bg="white",relief=SUNKEN)
self.txtSubTotal.grid(row=1,column=3)
self.lblTotalCost=Label(CostFrame,font=('arial',14,'bold'),text="Total Cost",bd=7)
self.lblTotalCost.grid(row=2,column=2,sticky=W)
self.txtTotalCost = Label(CostFrame,font=('arial',14,'bold'),textvariable=TotalCost,bd=7, width=26, justify=RIGHT,bg="white",relief=SUNKEN)
self.txtTotalCost.grid(row=2,column=3)
#==========================================================taxiselect=======================================================================
self.chkStandard=Radiobutton(Book_Frame,text="Standard",value=1,variable = carType,font=('arial',14,'bold'),command=selectCar).grid(row=0, column=0, sticky=W)
self.txtStandard = Label(Book_Frame,font=('arial',14,'bold'),width =7,textvariable=Standard,bd=5, state= DISABLED, justify=RIGHT,bg="white",relief=SUNKEN)
self.txtStandard.grid(row=0,column=1)
self.chkPrimeSedand=Radiobutton(Book_Frame,text="PrimeSedan",value=2,variable = carType,font=('arial',14,'bold'),command=selectCar).grid(row=1, column=0, sticky=W)
self.txtPrimeSedan= Label(Book_Frame,font=('arial',14,'bold'),width =7,textvariable=PrimeSedan,bd=5, state= DISABLED, justify=RIGHT,bg="white",relief=SUNKEN)
self.txtPrimeSedan.grid(row=1,column=1)
self.chkPremiumSedan = Radiobutton(Book_Frame,text="PremiumSedan",value=3,variable = carType,font=('arial',14,'bold'),command=selectCar).grid(row=2, column=0)
self.txtPremiumSedan = Label(Book_Frame,font=('arial',14,'bold'),width =7,textvariable=PremiumSedan,bd=5, state= DISABLED, justify=RIGHT,bg="white",relief=SUNKEN)
self.txtPremiumSedan.grid(row=2,column=1)
self.chkSingle =Radiobutton(Book_Frame,text="Single",value=1,variable = journeyType,font=('arial',14,'bold')).grid(row=0, column=2, sticky=W)
self.chkReturn =Radiobutton(Book_Frame,text="Return",value=2,variable = journeyType,font=('arial',14,'bold')).grid(row=1, column=2, sticky=W)
self.chkSpecialsNeeds =Radiobutton(Book_Frame,text="SpecialNeeds",value=3,variable = journeyType,font=('arial',14,'bold')).grid(row=2, column=2, sticky=W)
#=======================================Recipt====================================================================================
self.txtReceipt1 = Text(ReceiptFrame,width = 22, height = 21,font=('arial',10,'bold'),borderwidth=0)
self.txtReceipt1.grid(row=0,column=0,columnspan=2)
self.txtReceipt2 = Text(ReceiptFrame,width = 22, height = 21,font=('arial',10,'bold'),borderwidth=0)
self.txtReceipt2.grid(row=0,column=2,columnspan=2)
#======================================Button========================================================================================
self.btnTotal = Button(ButtonFrame,padx=18,bd=7,font=('arial',11,'bold'),width = 2,text='Total',command=Total_Paid).grid(row=0,column=0)
self.btnReceipt = Button(ButtonFrame,padx=18,bd=7,font=('arial',11,'bold'),width = 2,text='Receipt',command=Receiptt).grid(row=0,column=1)
self.btnReset = Button(ButtonFrame,padx=18,bd=7,font=('arial',11,'bold'),width = 2,text='Reset',command=Reset).grid(row=0,column=2)
self.btnExit = Button(ButtonFrame,padx=18,bd=7,font=('arial',11,'bold'),width = 2,text='Exit', command=iExit).grid(row=0,column=3)
#====================================================================================================================================
if __name__=='__main__':
root = Tk()
#=========================================== Getting Screen Width ==================================================================
w = root.winfo_screenwidth()
h = root.winfo_screenheight()
geometry="%dx%d+%d+%d"%(w,h,0,0)
root.geometry("500x300+320+200")
root.title('Login Form')
application = user(root)
root.mainloop()