-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainfile.py
2049 lines (1673 loc) · 79.4 KB
/
mainfile.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
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#Import required module
from tkinter import *
import tkinter as tk
from PIL import Image,ImageTk
import random
import time
a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
#creating Indian Food Page
def Indian_Food():
root=Toplevel()
root.geometry("1600x1300+0+0")
def undiyupuri():
global a
a=a+1
def uttapam():
global b
b=b+1
def idli():
global c
c+=1
def vej():
global d
d+=1
def rice():
global e
e+=1
def gulab():
global f
f+=1
def kaju():
global g
g+=1
def jalebi():
global h
h+=1
def rasgulla():
global i
i+=1
def ladoo():
global j
j+=1
def chai():
global k
k+=1
def kesar():
global l
l+=1
def lassi():
global m
m+=1
def chass():
global n
n+=1
def toddy():
global o
o+=1
def coca():
global p
p+=1
def pepsi():
global q
q+=1
def thumbs():
global r
r+=1
def sprite():
global s
s+=1
def maza():
global t
t+=1
def receipt():
global TotalBill
textreceipt.delete(1.0,END)
x=random.randint(100,10000)
billnumber='BILL'+str(x)
date=time.strftime('%d/%m/%Y')
textreceipt.insert(END,'Receipt Ref:\t\t'+billnumber+'\t\t\t'+date+'\n')
txtName=text.get()
textreceipt.insert(END,f'Customer Name:\t{txtName}\n')
textreceipt.insert(END,'==================================================\n')
textreceipt.insert(END,f'Items\t\t\tQnt.\t\t\tPrice\n')
if a>0:
textreceipt.insert(END,f'Undiyu Puri\t\t\t{a}\t\t\t{a*100}\n')
if b>0:
textreceipt.insert(END,f'Uttapam\t\t\t{b}\t\t\t{b*70}\n')
if c>0:
textreceipt.insert(END,f'Idli Samber\t\t\t{c}\t\t\t{c*50}\n')
if d>0:
textreceipt.insert(END,f'Vej Biryani\t\t\t{d}\t\t\t{d*110}\n')
if e>0:
textreceipt.insert(END,f'Dal And Rice\t\t\t{e}\t\t\t{e*110}\n')
if f>0:
textreceipt.insert(END,f'Gulab Jamun\t\t\t{f}\t\t\t{f*30}\n')
if g>0:
textreceipt.insert(END,f'Kaju Katari\t\t\t{g}\t\t\t{g*50}\n')
if h>0:
textreceipt.insert(END,f'Jalebi\t\t\t{h}\t\t\t{h*50}\n')
if i>0:
textreceipt.insert(END,f'Rasgulla\t\t\t{i}\t\t\t{i*50}\n')
if j>0:
textreceipt.insert(END,f'Ladoo\t\t\t{j}\t\t\t{j*40}\n')
if k>0:
textreceipt.insert(END,f'Chai\t\t\t{k}\t\t\t{k*30}\n')
if l>0:
textreceipt.insert(END,f'Kesar Dudh\t\t\t{l}\t\t\t{l*60}\n')
if m>0:
textreceipt.insert(END,f'Lassi\t\t\t{m}\t\t\t{m*40}\n')
if n>0:
textreceipt.insert(END,f'Masala Chass\t\t\t{n}\t\t\t{n*30}\n')
if o>0:
textreceipt.insert(END,f'Toddy\t\t\t{o}\t\t\t{o*50}\n')
if p>0:
textreceipt.insert(END,f'Coca-Cola\t\t\t{p}\t\t\t{p*20}\n')
if q>0:
textreceipt.insert(END,f'Pepsi\t\t\t{q}\t\t\t{q*20}\n')
if r>0:
textreceipt.insert(END,f'Thumbs Up\t\t\t{r}\t\t\t{r*20}\n')
if s>0:
textreceipt.insert(END,f'Sprite\t\t\t{s}\t\t\t{s*20}\n')
if t>0:
textreceipt.insert(END,f'Maza\t\t\t{t}\t\t\t{t*20}\n')
def total():
receipt()
TotalBill=(a*100)+(b*70)+(c*50)+(d*110)+(e*50)+(f*30)+(g*50)+(h*50)+(i*50)+(j*40)+(k*30)+(l*60)+(m*40)+(n*30)+(o*50)+(p*20)+(q*20)+(r*20)+(s*20)+(t*20)
if TotalBill>0:
textreceipt.insert(END,'==================================================\n')
textreceipt.insert(END,f'TotalBill:\t\t\t\t\t\t{TotalBill}')
def reset():
global a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t
a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
textreceipt.delete(1.0,END)
def send():
top=Toplevel()
top.geometry("250x200+600+300")
top.title("Send Receipt")
label=Label(top,text="Your Bill Sent Successful",compound='center',bg="#15133C",fg="#00FFAB")
label.pack(pady=50)
textreceipt.delete(1.0,END)
global a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t
a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
top.mainloop()
def back():
root.destroy()
global a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t
a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
#Background image and head
filename=Image.open("D:\\Project\\photos\\Indian food\\background.jpg")
filename=ImageTk.PhotoImage(filename.resize((1700,800)))
l1=Label(root,image=filename)
l1.place(x=0,y=0)
root.title("Bill Machine")
#frame head 1
f1=Frame(root,bd=5,relief=GROOVE)
f1.pack(side=TOP)
#Frame head 2
f2=Frame(root,bd=5,relief=GROOVE)
f2.pack()
#First head
bill=Label(f1,text="Billing Machine",fg="#FF7F3F",bg="#FDD998",width=1300,font=("Times new roman",27,"bold"),compound='center')
bill.pack()
#Second Head
indian_food=Label(f2,text="Indian Food",fg="#FF7F3F",bg="#FDD998",width=1300,font=("Times new roman",27,"bold"),compound='center')
indian_food.pack()
#text in frame 3 and create
f3=LabelFrame(root,text="Food",font=("Times new roman",25,"bold"),bg="#FDD998",fg="#FF7F3F")
f3.pack(side=LEFT,padx=5)
#first image
image1=Image.open("D:\\Project\\photos\\Indian food\\undhiyu.jfif")
resize_image1=ImageTk.PhotoImage(image1.resize((115,65)))
label_image1=Label(f3,image=resize_image1)
label_image1.pack(ipady=5)
#First image text 1
label_text1=Label(f3,text="Undhiyu Puri",width=35,compound='left',fg="#EC5858",bg="#FDD998")
label_text1.pack()
#Creating Button 1
button1=Button(f3,text="Add",compound='center',width=7,bg="#FFF8CD",fg="#61B15A",command=undiyupuri)
button1.pack(pady=2)
#second image
image2=Image.open("D:\\Project\\photos\\Indian food\\uttapam.jfif")
resize_image2=ImageTk.PhotoImage(image2.resize((115,65)))
label_image2=Label(f3,image=resize_image2)
label_image2.pack(ipady=5)
#Second image text 2
label_text2=Label(f3,text="Uttapam",width=35,compound='left',fg="#EC5858",bg="#FDD998")
label_text2.pack()
#Creating Button 2
button2=Button(f3,text="Add",compound='center',width=7,bg="#FFF8CD",fg="#61B15A",command=uttapam)
button2.pack(pady=2)
#third image
image3=Image.open("D:\\Project\\photos\\Indian food\\idli-sambar.jpg")
resize_image3=ImageTk.PhotoImage(image3.resize((115,65)))
label_image3=Label(f3,image=resize_image3)
label_image3.pack(ipady=5)
#Third image text 3
label_text3=Label(f3,text="Idli Samber",width=35,compound='left',fg="#EC5858",bg="#FDD998")
label_text3.pack()
#Creating Button 3
button3=Button(f3,text="Add",compound='center',width=7,bg="#FFF8CD",fg="#61B15A",command=idli)
button3.pack(pady=2)
#four image
image4=Image.open("D:\\Project\\photos\\Indian food\\vej biryani.jpg")
resize_image4=ImageTk.PhotoImage(image4.resize((115,65)))
label_image4=Label(f3,image=resize_image4)
label_image4.pack(ipady=5)
#Third image text 4
label_text4=Label(f3,text="Vej Biryani",width=35,compound='left',fg="#EC5858",bg="#FDD998")
label_text4.pack()
#Creating Button 4
button4=Button(f3,text="Add",compound='center',width=7,bg="#FFF8CD",fg="#61B15A",command=vej)
button4.pack(pady=2)
#five image
image5=Image.open("D:\\Project\\photos\\Indian food\\rice and dal.jfif")
resize_image5=ImageTk.PhotoImage(image5.resize((115,65)))
label_image5=Label(f3,image=resize_image5)
label_image5.pack(ipady=5)
#Third image text 5
label_text5=Label(f3,text="Rice and Dal",width=35,compound='left',fg="#EC5858",bg="#FDD998")
label_text5.pack()
#Creating Button 5
button5=Button(f3,text="Add",compound='center',width=7,bg="#FFF8CD",fg="#61B15A",command=rice)
button5.pack(pady=2)
#text and Frame creating 4
sweet=LabelFrame(root,text="Sweet",font=("Times new roman",25,"bold"),bg="#FDD998",fg="#FF7F3F")
sweet.pack(side=LEFT,padx=5)
#first image in sweet
sweet_image1=Image.open("D:\\Project\\photos\\Indian food\\gulabjamun.jfif")
sweet_resize_image1=ImageTk.PhotoImage(sweet_image1.resize((115,65)))
sweet_label_image1=Label(sweet,image=sweet_resize_image1)
sweet_label_image1.pack(ipady=5)
#First image text 1 of sweet
label_text6=Label(sweet,text="Gulab Jamun",width=35,compound='left',fg="#EC5858",bg="#FDD998")
label_text6.pack()
#Creating Button 1 of sweet
button6=Button(sweet,text="Add",compound='center',width=7,bg="#FFF8CD",fg="#61B15A",command=gulab)
button6.pack(pady=2)
#second image in sweet
sweet_image2=Image.open("D:\\Project\\photos\\Indian food\\kajukatari.jfif")
sweet_resize_image2=ImageTk.PhotoImage(sweet_image2.resize((115,65)))
sweet_label_image2=Label(sweet,image=sweet_resize_image2)
sweet_label_image2.pack(ipady=5)
#second image text of sweet
label_text7=Label(sweet,text="Kaju Katari",width=35,compound='left',fg="#EC5858",bg="#FDD998")
label_text7.pack()
#Creating Button 2 of sweet
button7=Button(sweet,text="Add",compound='center',width=7,bg="#FFF8CD",fg="#61B15A",command=kaju)
button7.pack(pady=2)
#third image in sweet
sweet_image3=Image.open("D:\\Project\\photos\\Indian food\\jalebi.jfif")
sweet_resize_image3=ImageTk.PhotoImage(sweet_image3.resize((115,65)))
sweet_label_image3=Label(sweet,image=sweet_resize_image3)
sweet_label_image3.pack(ipady=5)
#third image text 1 of sweet
label_text8=Label(sweet,text="Jalebi",width=35,compound='left',fg="#EC5858",bg="#FDD998")
label_text8.pack()
#Creating Button 3 of sweet
button8=Button(sweet,text="Add",compound='center',width=7,bg="#FFF8CD",fg="#61B15A",command=jalebi)
button8.pack(pady=2)
#fourth image in sweet
sweet_image4=Image.open("D:\\Project\\photos\\Indian food\\rasgulla.jfif")
sweet_resize_image4=ImageTk.PhotoImage(sweet_image4.resize((115,65)))
sweet_label_image4=Label(sweet,image=sweet_resize_image4)
sweet_label_image4.pack(ipady=5)
#Fourth image text 1 of sweet
label_text9=Label(sweet,text="Rasgulla",width=35,compound='left',fg="#EC5858",bg="#FDD998")
label_text9.pack()
#Creating Button 4 of sweet
button9=Button(sweet,text="Add",compound='center',width=7,bg="#FFF8CD",fg="#61B15A",command=rasgulla)
button9.pack(pady=2)
#fifth image in sweet
sweet_image5=Image.open("D:\\Project\\photos\\Indian food\\ladoo.jfif")
sweet_resize_image5=ImageTk.PhotoImage(sweet_image5.resize((115,65)))
sweet_label_image5=Label(sweet,image=sweet_resize_image5 )
sweet_label_image5.pack(ipady=5)
#Fifth image text 1 of sweet
label_text10=Label(sweet,text="Ladoo",width=35,compound='left',fg="#EC5858",bg="#FDD998")
label_text10.pack()
#Creating Button 5 of sweet
button10=Button(sweet,text="Add",compound='center',width=7,bg="#FFF8CD",fg="#61B15A",command=ladoo)
button10.pack(pady=2)
#text and Frame creating 4
drink=LabelFrame(root,text="Drink",font=("Times new roman",25,"bold"),bg="#FDD998",fg="#FF7F3F")
drink.pack(side=LEFT,padx=5)
#first image in drink
drink_image1=Image.open("D:\\Project\\photos\\Indian food\\Chai.jfif")
drink_resize_image1=ImageTk.PhotoImage(drink_image1.resize((115,65)))
drink_label_image1=Label(drink,image=drink_resize_image1)
drink_label_image1.pack(ipady=5)
#First image text 1 of drink
label_text11=Label(drink,text="Chai",width=35,compound='left',fg="#EC5858",bg="#FDD998")
label_text11.pack()
#Creating Button 1 of drink
button11=Button(drink,text="Add",compound='center',width=7,bg="#FFF8CD",fg="#61B15A",command=chai)
button11.pack(pady=2)
#second image in drink
drink_image2=Image.open("D:\\Project\\photos\\Indian food\\kesar dudh.jfif")
drink_resize_image2=ImageTk.PhotoImage(drink_image2.resize((115,65)))
drink_label_image2=Label(drink,image=drink_resize_image2)
drink_label_image2.pack(ipady=5)
#second image text of drink
label_text12=Label(drink,text="Kesar Dudh",width=35,compound='left',fg="#EC5858",bg="#FDD998")
label_text12.pack()
#Creating Button 2 of drink
button12=Button(drink,text="Add",compound='center',width=7,bg="#FFF8CD",fg="#61B15A",command=kesar)
button12.pack(pady=2)
#third image in drink
drink_image3=Image.open("D:\\Project\\photos\\Indian food\\lassi.jfif")
drink_resize_image3=ImageTk.PhotoImage(drink_image3.resize((115,65)))
drink_label_image3=Label(drink,image=drink_resize_image3)
drink_label_image3.pack(ipady=5)
#third image text 1 of drink
label_text13=Label(drink,text="Lassi",width=35,compound='left',fg="#EC5858",bg="#FDD998")
label_text13.pack()
#Creating Button 3 of drink
button13=Button(drink,text="Add",compound='center',width=7,bg="#FFF8CD",fg="#61B15A",command=lassi)
button13.pack(pady=2)
#fourth image in drink
drink_image4=Image.open("D:\\Project\\photos\\Indian food\\Chhash.jfif")
drink_resize_image4=ImageTk.PhotoImage(drink_image4.resize((115,65)))
drink_label_image4=Label(drink,image=drink_resize_image4)
drink_label_image4.pack(ipady=5)
#Fourth image text 1 of drink
label_text14=Label(drink,text="Masala Chaas",width=35,compound='left',fg="#EC5858",bg="#FDD998")
label_text14.pack()
#Creating Button 4 of drink
button14=Button(drink,text="Add",compound='center',width=7,bg="#FFF8CD",fg="#61B15A",command=chass)
button14.pack(pady=2)
#fifth image in drink
drink_image5=Image.open("D:\\Project\\photos\\Indian food\\toddy.jfif")
drink_resize_image5=ImageTk.PhotoImage(drink_image5.resize((115,65)))
drink_label_image5=Label(drink,image=drink_resize_image5 )
drink_label_image5.pack(ipady=5)
#Fifth image text 1 of drink
label_text15=Label(drink,text="Toddy",width=35,compound='left',fg="#EC5858",bg="#FDD998")
label_text15.pack()
#Creating Button 5 of drink
button15=Button(drink,text="Add",compound='center',width=7,bg="#FFF8CD",fg="#61B15A",command=toddy)
button15.pack(pady=2)
#text and Frame creating 5
soft_drink=LabelFrame(root,text="Soft Drink",font=("Times new roman",25,"bold"),bg="#FDD998",fg="#FF7F3F")
soft_drink.pack(side=LEFT,padx=5)
#first image in soft drink
soft_drink_image1=Image.open("D:\\Project\\photos\\Indian food\\cocacola.jfif")
soft_drink_resize_image1=ImageTk.PhotoImage(soft_drink_image1.resize((115,65)))
soft_drink_label_image1=Label(soft_drink,image=soft_drink_resize_image1)
soft_drink_label_image1.pack(ipady=5)
#First image text 1 of soft drink
label_text16=Label(soft_drink,text="Coca-Cola",width=35,compound='left',fg="#EC5858",bg="#FDD998")
label_text16.pack()
#Creating Button 1 of soft drink
button16=Button(soft_drink,text="Add",compound='center',width=7,bg="#FFF8CD",fg="#61B15A",command=coca)
button16.pack(pady=2)
#second image in soft drink
soft_drink_image2=Image.open("D:\\Project\\photos\\Indian food\\pepsi.jfif")
soft_drink_resize_image2=ImageTk.PhotoImage(soft_drink_image2.resize((115,65)))
soft_drink_label_image2=Label(soft_drink,image=soft_drink_resize_image2)
soft_drink_label_image2.pack(ipady=5)
#second image text of soft drink
label_text17=Label(soft_drink,text="Pepsi",width=35,compound='left',fg="#EC5858",bg="#FDD998")
label_text17.pack()
#Creating Button 2 of soft drink
button17=Button(soft_drink,text="Add",compound='center',width=7,bg="#FFF8CD",fg="#61B15A",command=pepsi)
button17.pack(pady=2)
#third image in soft drink
soft_drink_image3=Image.open("D:\\Project\\photos\\Indian food\\thumbsup.jfif")
soft_drink_resize_image3=ImageTk.PhotoImage(soft_drink_image3.resize((115,65)))
soft_drink_label_image3=Label(soft_drink,image=soft_drink_resize_image3)
soft_drink_label_image3.pack(ipady=5)
#third image text 1 of soft drink
label_text18=Label(soft_drink,text="Thumbs Up",width=35,compound='left',fg="#EC5858",bg="#FDD998")
label_text18.pack()
#Creating Button 3 of soft drink
button18=Button(soft_drink,text="Add",compound='center',width=7,bg="#FFF8CD",fg="#61B15A",command=thumbs)
button18.pack(pady=2)
#fourth image in soft drink
soft_drink_image4=Image.open("D:\\Project\\photos\\Indian food\\sprite.jfif")
soft_drink_resize_image4=ImageTk.PhotoImage(soft_drink_image4.resize((115,65)))
soft_drink_label_image4=Label(soft_drink,image=soft_drink_resize_image4)
soft_drink_label_image4.pack(ipady=5)
#Fourth image text 1 of soft drink
label_text19=Label(soft_drink,text="Sprite",width=35,compound='left',fg="#EC5858",bg="#FDD998")
label_text19.pack()
#Creating Button 4 of soft drink
button19=Button(soft_drink,text="Add",compound='center',width=7,bg="#FFF8CD",fg="#61B15A",command=sprite)
button19.pack(pady=2)
#fifth image in soft drink
soft_drink_image5=Image.open("D:\\Project\\photos\\Indian food\\maza.jfif")
soft_drink_resize_image5=ImageTk.PhotoImage(soft_drink_image5.resize((115,65)))
soft_drink_label_image5=Label(soft_drink,image=soft_drink_resize_image5 )
soft_drink_label_image5.pack(ipady=5)
#Fifth image text 1 of soft drink
label_text20=Label(soft_drink,text="Maza",width=35,compound='left',fg="#EC5858",bg="#FDD998")
label_text20.pack()
#Creating Button 5 of soft drink
button20=Button(soft_drink,text="Add",compound='center',width=7,bg="#FFF8CD",fg="#61B15A",command=maza)
button20.pack(pady=2)
#creating frame 5
billframe=LabelFrame(root,text="Receipt",font=("Times new roman",25,"bold"),bg="#FDD998",fg="#FF7F3F")
billframe.pack(side=LEFT,padx=7)
#adding text area
textreceipt=Text(billframe,font=("Times new roman",12,"bold"),bg="white",height=30)
textreceipt.pack()
#creating button
button21=Button(billframe,text="Total",bg="#FDD998",fg="#FF7F3F",font=("Times new roman",15,"bold"),compound='center',command=total)
button21.pack(side=LEFT,padx=13,pady=5)
button22=Button(billframe,text="Receipt",bg="#FDD998",fg="#FF7F3F",font=("Times new roman",15,"bold"),compound='center',command=receipt)
button22.pack(side=LEFT,padx=13)
button23=Button(billframe,text="Reset",bg="#FDD998",fg="#FF7F3F",font=("Times new roman",15,"bold"),compound='center',command=reset)
button23.pack(side=LEFT,padx=13)
button24=Button(billframe,text="Send",bg="#FDD998",fg="#FF7F3F",font=("Times new roman",15,"bold"),compound='center',command=send)
button24.pack(side=LEFT,padx=13)
button25=Button(billframe,text="Back",bg="#FDD998",fg="#FF7F3F",font=("Times new roman",15,"bold"),compound='center',command=back)
button25.pack(side=LEFT,padx=13)
#Indian Food Page Mainloop
root.mainloop()
def Chinese_Food():
root=Toplevel()
root.geometry("1600x1300+0+0")
def dim():
global a
a=a+1
def quick():
global b
b=b+1
def szechwan():
global c
c+=1
def springroll():
global d
d+=1
def rice():
global e
e+=1
def red():
global f
f+=1
def egg():
global g
g+=1
def tanghulu():
global h
h+=1
def pancake():
global i
i+=1
def fried():
global j
j+=1
def Tieguanyin():
global k
k+=1
def Jiuniang():
global l
l+=1
def pearl():
global m
m+=1
def greentea():
global n
n+=1
def soybean():
global o
o+=1
def coca():
global p
p+=1
def pepsi():
global q
q+=1
def thumbs():
global r
r+=1
def sprite():
global s
s+=1
def maza():
global t
t+=1
def receipt():
global TotalBill
textreceipt.delete(1.0,END)
x=random.randint(100,10000)
billnumber='BILL'+str(x)
date=time.strftime('%d/%m/%Y')
textreceipt.insert(END,'Receipt Ref:\t\t'+billnumber+'\t\t\t'+date+'\n')
txtName=text.get()
textreceipt.insert(END,f'Customer Name:\t{txtName}\n')
textreceipt.insert(END,'==================================================\n')
textreceipt.insert(END,f'Items\t\t\tQnt.\t\t\tPrice\n')
if a>0:
textreceipt.insert(END,f'Dim Sums\t\t\t{a}\t\t\t{a*450}\n')
if b>0:
textreceipt.insert(END,f'Quick Noodles\t\t\t{b}\t\t\t{b*50}\n')
if c>0:
textreceipt.insert(END,f'Szechwan Chilli Chicken\t\t\t{c}\t\t\t{c*160}\n')
if d>0:
textreceipt.insert(END,f'Spring Rolls\t\t\t{d}\t\t\t{d*40}\n')
if e>0:
textreceipt.insert(END,f'Stir Fried Tofu with Rice\t\t\t{e}\t\t\t{e*120}\n')
if f>0:
textreceipt.insert(END,f'Red Been Bun\t\t\t{f}\t\t\t{f*250}\n')
if g>0:
textreceipt.insert(END,f'Egg Tarts\t\t\t{g}\t\t\t{g*200}\n')
if h>0:
textreceipt.insert(END,f'Tanghulu\t\t\t{h}\t\t\t{h*100}\n')
if i>0:
textreceipt.insert(END,f'Pumpkin pancakes\t\t\t{i}\t\t\t{i*180}\n')
if j>0:
textreceipt.insert(END,f'Fried Durian\t\t\t{j}\t\t\t{j*180}\n')
if k>0:
textreceipt.insert(END,f'Tieguanyin\t\t\t{k}\t\t\t{k*70}\n')
if l>0:
textreceipt.insert(END,f'Jiuniang\t\t\t{l}\t\t\t{l*120}\n')
if m>0:
textreceipt.insert(END,f'Pearl milk tea\t\t\t{m}\t\t\t{m*80}\n')
if n>0:
textreceipt.insert(END,f'Chivas mixed with green tea\t\t\t{n}\t\t\t{n*60}\n')
if o>0:
textreceipt.insert(END,f'Soybean milk\t\t\t{o}\t\t\t{o*50}\n')
if p>0:
textreceipt.insert(END,f'Coca-Cola\t\t\t{p}\t\t\t{p*20}\n')
if q>0:
textreceipt.insert(END,f'Pepsi\t\t\t{q}\t\t\t{q*20}\n')
if r>0:
textreceipt.insert(END,f'Thumbs Up\t\t\t{r}\t\t\t{r*20}\n')
if s>0:
textreceipt.insert(END,f'Sprite\t\t\t{s}\t\t\t{s*20}\n')
if t>0:
textreceipt.insert(END,f'Maza\t\t\t{t}\t\t\t{t*20}\n')
def total():
receipt()
TotalBill=(a*450)+(b*50)+(c*160)+(d*40)+(e*120)+(f*250)+(g*200)+(h*100)+(i*180)+(j*180)+(k*70)+(l*120)+(m*80)+(n*60)+(o*50)+(p*20)+(q*20)+(r*20)+(s*20)+(t*20)
if TotalBill>0:
textreceipt.insert(END,'==================================================\n')
textreceipt.insert(END,f'TotalBill:\t\t\t\t\t\t{TotalBill}')
def reset():
global a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t
a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
textreceipt.delete(1.0,END)
def send():
top=Toplevel()
top.geometry("250x200+600+300")
top.title("Send Receipt")
label=Label(top,text="Your Bill Sent Successful",compound='center',bg="#15133C",fg="#00FFAB")
label.pack(pady=50)
textreceipt.delete(1.0,END)
global a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t
a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
top.mainloop()
def back():
root.destroy()
global a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t
a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
#Background image and head
filename=Image.open("D:\\Project\\photos\\Indian food\\background.jpg")
filename=ImageTk.PhotoImage(filename.resize((1700,800)))
l1=Label(root,image=filename)
l1.place(x=0,y=0)
root.title("Bill Machine")
#frame head 1
f1=Frame(root,bd=5,relief=GROOVE)
f1.pack(side=TOP)
#Frame head 2
f2=Frame(root,bd=5,relief=GROOVE)
f2.pack()
#First head
bill=Label(f1,text="Billing Machine",fg="#FF7F3F",bg="#FDD998",width=1300,font=("Times new roman",27,"bold"),compound='center')
bill.pack()
#Second Head
indian_food=Label(f2,text="Chinese Food",fg="#FF7F3F",bg="#FDD998",width=1300,font=("Times new roman",27,"bold"),compound='center')
indian_food.pack()
#text in frame 3 and create
f3=LabelFrame(root,text="Food",font=("Times new roman",25,"bold"),bg="#FDD998",fg="#FF7F3F")
f3.pack(side=LEFT,padx=5)
#first image
image1=Image.open("D:\\Project\\photos\\chinese food\\Dim Sums.jfif")
resize_image1=ImageTk.PhotoImage(image1.resize((115,65)))
label_image1=Label(f3,image=resize_image1)
label_image1.pack(ipady=5)
#First image text 1
label_text1=Label(f3,text="Dim Sums",width=35,compound='left',fg="#EC5858",bg="#FDD998")
label_text1.pack()
#Creating Button 1
button1=Button(f3,text="Add",compound='center',width=7,bg="#FFF8CD",fg="#61B15A",command=dim)
button1.pack(pady=2)
#second image
image2=Image.open("D:\\Project\\photos\\chinese food\\Quick Noodles.jfif")
resize_image2=ImageTk.PhotoImage(image2.resize((115,65)))
label_image2=Label(f3,image=resize_image2)
label_image2.pack(ipady=5)
#Second image text 2
label_text2=Label(f3,text="Quick Noodles",width=35,compound='left',fg="#EC5858",bg="#FDD998")
label_text2.pack()
#Creating Button 2
button2=Button(f3,text="Add",compound='center',width=7,bg="#FFF8CD",fg="#61B15A",command=quick)
button2.pack(pady=2)
#third image
image3=Image.open("D:\\Project\\photos\\chinese food\\Szechwan Chilli Chicken.jfif")
resize_image3=ImageTk.PhotoImage(image3.resize((115,65)))
label_image3=Label(f3,image=resize_image3)
label_image3.pack(ipady=5)
#Third image text 3
label_text3=Label(f3,text="Szechwan Chilli Chicken",width=35,compound='left',fg="#EC5858",bg="#FDD998")
label_text3.pack()
#Creating Button 3
button3=Button(f3,text="Add",compound='center',width=7,bg="#FFF8CD",fg="#61B15A",command=szechwan)
button3.pack(pady=2)
#four image
image4=Image.open("D:\\Project\\photos\\chinese food\\Spring Rolls.jfif")
resize_image4=ImageTk.PhotoImage(image4.resize((115,65)))
label_image4=Label(f3,image=resize_image4)
label_image4.pack(ipady=5)
#Third image text 4
label_text4=Label(f3,text="Spring Rolls",width=35,compound='left',fg="#EC5858",bg="#FDD998")
label_text4.pack()
#Creating Button 4
button4=Button(f3,text="Add",compound='center',width=7,bg="#FFF8CD",fg="#61B15A",command=springroll)
button4.pack(pady=2)
#five image
image5=Image.open("D:\\Project\\photos\\chinese food\\Stir Fried Tofu with Rice.jfif")
resize_image5=ImageTk.PhotoImage(image5.resize((115,65)))
label_image5=Label(f3,image=resize_image5)
label_image5.pack(ipady=5)
#Third image text 5
label_text5=Label(f3,text="Stir Fried Tofu with Rice",width=35,compound='left',fg="#EC5858",bg="#FDD998")
label_text5.pack()
#Creating Button 5
button5=Button(f3,text="Add",compound='center',width=7,bg="#FFF8CD",fg="#61B15A",command=rice)
button5.pack(pady=2)
#text and Frame creating 4
sweet=LabelFrame(root,text="Sweet",font=("Times new roman",25,"bold"),bg="#FDD998",fg="#FF7F3F")
sweet.pack(side=LEFT,padx=5)
#first image in sweet
sweet_image1=Image.open("D:\\Project\\photos\\chinese food\\Red Been Bun.jfif")
sweet_resize_image1=ImageTk.PhotoImage(sweet_image1.resize((115,65)))
sweet_label_image1=Label(sweet,image=sweet_resize_image1)
sweet_label_image1.pack(ipady=5)
#First image text 1 of sweet
label_text6=Label(sweet,text="Red Been Bun",width=35,compound='left',fg="#EC5858",bg="#FDD998")
label_text6.pack()
#Creating Button 1 of sweet
button6=Button(sweet,text="Add",compound='center',width=7,bg="#FFF8CD",fg="#61B15A",command=red)
button6.pack(pady=2)
#second image in sweet
sweet_image2=Image.open("D:\\Project\\photos\\chinese food\\Egg Tarts.jfif")
sweet_resize_image2=ImageTk.PhotoImage(sweet_image2.resize((115,65)))
sweet_label_image2=Label(sweet,image=sweet_resize_image2)
sweet_label_image2.pack(ipady=5)
#second image text of sweet
label_text7=Label(sweet,text="Egg Tarts",width=35,compound='left',fg="#EC5858",bg="#FDD998")
label_text7.pack()
#Creating Button 2 of sweet
button7=Button(sweet,text="Add",compound='center',width=7,bg="#FFF8CD",fg="#61B15A",command=egg)
button7.pack(pady=2)
#third image in sweet
sweet_image3=Image.open("D:\\Project\\photos\\chinese food\\Tanghulu..jfif")
sweet_resize_image3=ImageTk.PhotoImage(sweet_image3.resize((115,65)))
sweet_label_image3=Label(sweet,image=sweet_resize_image3)
sweet_label_image3.pack(ipady=5)
#third image text 1 of sweet
label_text8=Label(sweet,text="Tanghulu",width=35,compound='left',fg="#EC5858",bg="#FDD998")
label_text8.pack()
#Creating Button 3 of sweet
button8=Button(sweet,text="Add",compound='center',width=7,bg="#FFF8CD",fg="#61B15A",command=tanghulu)
button8.pack(pady=2)
#fourth image in sweet
sweet_image4=Image.open("D:\\Project\\photos\\chinese food\\Pumpkin pancakes.jfif")
sweet_resize_image4=ImageTk.PhotoImage(sweet_image4.resize((115,65)))
sweet_label_image4=Label(sweet,image=sweet_resize_image4)
sweet_label_image4.pack(ipady=5)
#Fourth image text 1 of sweet
label_text9=Label(sweet,text="Pumpkin pancakes",width=35,compound='left',fg="#EC5858",bg="#FDD998")
label_text9.pack()
#Creating Button 4 of sweet
button9=Button(sweet,text="Add",compound='center',width=7,bg="#FFF8CD",fg="#61B15A",command=pancake)
button9.pack(pady=2)
#fifth image in sweet
sweet_image5=Image.open("D:\\Project\\photos\\chinese food\\fried durian.jfif")
sweet_resize_image5=ImageTk.PhotoImage(sweet_image5.resize((115,65)))
sweet_label_image5=Label(sweet,image=sweet_resize_image5 )
sweet_label_image5.pack(ipady=5)
#Fifth image text 1 of sweet
label_text10=Label(sweet,text="Fried Durian",width=35,compound='left',fg="#EC5858",bg="#FDD998")
label_text10.pack()
#Creating Button 5 of sweet
button10=Button(sweet,text="Add",compound='center',width=7,bg="#FFF8CD",fg="#61B15A",command=fried)
button10.pack(pady=2)
#text and Frame creating 4
drink=LabelFrame(root,text="Drink",font=("Times new roman",25,"bold"),bg="#FDD998",fg="#FF7F3F")
drink.pack(side=LEFT,padx=5)
#first image in drink
drink_image1=Image.open("D:\\Project\\photos\\chinese food\\Tieguanyin.jfif")
drink_resize_image1=ImageTk.PhotoImage(drink_image1.resize((115,65)))
drink_label_image1=Label(drink,image=drink_resize_image1)
drink_label_image1.pack(ipady=5)
#First image text 1 of drink
label_text11=Label(drink,text="Tieguanyin",width=35,compound='left',fg="#EC5858",bg="#FDD998")
label_text11.pack()
#Creating Button 1 of drink
button11=Button(drink,text="Add",compound='center',width=7,bg="#FFF8CD",fg="#61B15A",command=Tieguanyin)
button11.pack(pady=2)
#second image in drink
drink_image2=Image.open("D:\\Project\\photos\\chinese food\\Jiuniang.jfif")
drink_resize_image2=ImageTk.PhotoImage(drink_image2.resize((115,65)))
drink_label_image2=Label(drink,image=drink_resize_image2)
drink_label_image2.pack(ipady=5)
#second image text of drink
label_text12=Label(drink,text="Jiuniang",width=35,compound='left',fg="#EC5858",bg="#FDD998")
label_text12.pack()
#Creating Button 2 of drink
button12=Button(drink,text="Add",compound='center',width=7,bg="#FFF8CD",fg="#61B15A",command=Jiuniang)
button12.pack(pady=2)
#third image in drink
drink_image3=Image.open("D:\\Project\\photos\\chinese food\\Pearl milk tea..jfif")
drink_resize_image3=ImageTk.PhotoImage(drink_image3.resize((115,65)))
drink_label_image3=Label(drink,image=drink_resize_image3)
drink_label_image3.pack(ipady=5)
#third image text 1 of drink
label_text13=Label(drink,text="Pearl milk tea",width=35,compound='left',fg="#EC5858",bg="#FDD998")
label_text13.pack()
#Creating Button 3 of drink
button13=Button(drink,text="Add",compound='center',width=7,bg="#FFF8CD",fg="#61B15A",command=pearl)
button13.pack(pady=2)
#fourth image in drink
drink_image4=Image.open("D:\\Project\\photos\\chinese food\\Chivas mixed with green tea.jfif")
drink_resize_image4=ImageTk.PhotoImage(drink_image4.resize((115,65)))
drink_label_image4=Label(drink,image=drink_resize_image4)
drink_label_image4.pack(ipady=5)
#Fourth image text 1 of drink
label_text14=Label(drink,text="Chivas mixed with green tea",width=35,compound='left',fg="#EC5858",bg="#FDD998")
label_text14.pack()
#Creating Button 4 of drink
button14=Button(drink,text="Add",compound='center',width=7,bg="#FFF8CD",fg="#61B15A",command=greentea)
button14.pack(pady=2)
#fifth image in drink
drink_image5=Image.open("D:\\Project\\photos\\chinese food\\Soybean milk.jfif")
drink_resize_image5=ImageTk.PhotoImage(drink_image5.resize((115,65)))
drink_label_image5=Label(drink,image=drink_resize_image5 )
drink_label_image5.pack(ipady=5)
#Fifth image text 1 of drink
label_text15=Label(drink,text="Soybean milk",width=35,compound='left',fg="#EC5858",bg="#FDD998")
label_text15.pack()
#Creating Button 5 of drink
button15=Button(drink,text="Add",compound='center',width=7,bg="#FFF8CD",fg="#61B15A",command=soybean)
button15.pack(pady=2)
#text and Frame creating 5
soft_drink=LabelFrame(root,text="Soft Drink",font=("Times new roman",25,"bold"),bg="#FDD998",fg="#FF7F3F")
soft_drink.pack(side=LEFT,padx=5)
#first image in soft drink
soft_drink_image1=Image.open("D:\\Project\\photos\\Indian food\\cocacola.jfif")
soft_drink_resize_image1=ImageTk.PhotoImage(soft_drink_image1.resize((115,65)))
soft_drink_label_image1=Label(soft_drink,image=soft_drink_resize_image1)
soft_drink_label_image1.pack(ipady=5)
#First image text 1 of soft drink
label_text16=Label(soft_drink,text="Coca-Cola",width=35,compound='left',fg="#EC5858",bg="#FDD998")
label_text16.pack()
#Creating Button 1 of soft drink
button16=Button(soft_drink,text="Add",compound='center',width=7,bg="#FFF8CD",fg="#61B15A",command=coca)
button16.pack(pady=2)
#second image in soft drink
soft_drink_image2=Image.open("D:\\Project\\photos\\Indian food\\pepsi.jfif")
soft_drink_resize_image2=ImageTk.PhotoImage(soft_drink_image2.resize((115,65)))
soft_drink_label_image2=Label(soft_drink,image=soft_drink_resize_image2)
soft_drink_label_image2.pack(ipady=5)
#second image text of soft drink
label_text17=Label(soft_drink,text="Pepsi",width=35,compound='left',fg="#EC5858",bg="#FDD998")
label_text17.pack()
#Creating Button 2 of soft drink
button17=Button(soft_drink,text="Add",compound='center',width=7,bg="#FFF8CD",fg="#61B15A",command=pepsi)
button17.pack(pady=2)
#third image in soft drink
soft_drink_image3=Image.open("D:\\Project\\photos\\Indian food\\thumbsup.jfif")
soft_drink_resize_image3=ImageTk.PhotoImage(soft_drink_image3.resize((115,65)))
soft_drink_label_image3=Label(soft_drink,image=soft_drink_resize_image3)
soft_drink_label_image3.pack(ipady=5)
#third image text 1 of soft drink
label_text18=Label(soft_drink,text="Thumbs Up",width=35,compound='left',fg="#EC5858",bg="#FDD998")
label_text18.pack()
#Creating Button 3 of soft drink
button18=Button(soft_drink,text="Add",compound='center',width=7,bg="#FFF8CD",fg="#61B15A",command=thumbs)
button18.pack(pady=2)
#fourth image in soft drink
soft_drink_image4=Image.open("D:\\Project\\photos\\Indian food\\sprite.jfif")
soft_drink_resize_image4=ImageTk.PhotoImage(soft_drink_image4.resize((115,65)))
soft_drink_label_image4=Label(soft_drink,image=soft_drink_resize_image4)
soft_drink_label_image4.pack(ipady=5)
#Fourth image text 1 of soft drink
label_text19=Label(soft_drink,text="Sprite",width=35,compound='left',fg="#EC5858",bg="#FDD998")
label_text19.pack()
#Creating Button 4 of soft drink
button19=Button(soft_drink,text="Add",compound='center',width=7,bg="#FFF8CD",fg="#61B15A",command=sprite)
button19.pack(pady=2)
#fifth image in soft drink
soft_drink_image5=Image.open("D:\\Project\\photos\\Indian food\\maza.jfif")
soft_drink_resize_image5=ImageTk.PhotoImage(soft_drink_image5.resize((115,65)))
soft_drink_label_image5=Label(soft_drink,image=soft_drink_resize_image5 )
soft_drink_label_image5.pack(ipady=5)
#Fifth image text 1 of soft drink
label_text20=Label(soft_drink,text="Maza",width=35,compound='left',fg="#EC5858",bg="#FDD998")
label_text20.pack()
#Creating Button 5 of soft drink
button20=Button(soft_drink,text="Add",compound='center',width=7,bg="#FFF8CD",fg="#61B15A",command=maza)
button20.pack(pady=2)
#creating frame 5
billframe=LabelFrame(root,text="Receipt",font=("Times new roman",25,"bold"),bg="#FDD998",fg="#FF7F3F")
billframe.pack(side=LEFT,padx=7)
#adding text area
textreceipt=Text(billframe,font=("Times new roman",12,"bold"),bg="white",height=30)
textreceipt.pack()
#creating button
button21=Button(billframe,text="Total",bg="#FDD998",fg="#FF7F3F",font=("Times new roman",15,"bold"),compound='center',command=total)
button21.pack(side=LEFT,padx=13,pady=5)
button22=Button(billframe,text="Receipt",bg="#FDD998",fg="#FF7F3F",font=("Times new roman",15,"bold"),compound='center',command=receipt)
button22.pack(side=LEFT,padx=13)
button23=Button(billframe,text="Reset",bg="#FDD998",fg="#FF7F3F",font=("Times new roman",15,"bold"),compound='center',command=reset)
button23.pack(side=LEFT,padx=13)
button24=Button(billframe,text="Send",bg="#FDD998",fg="#FF7F3F",font=("Times new roman",15,"bold"),compound='center',command=send)
button24.pack(side=LEFT,padx=13)
button25=Button(billframe,text="Back",bg="#FDD998",fg="#FF7F3F",font=("Times new roman",15,"bold"),compound='center',command=back)
button25.pack(side=LEFT,padx=13)