├── .idea
├── .gitignore
├── misc.xml
├── inspectionProfiles
│ └── profiles_settings.xml
├── modules.xml
└── Resturant Management.iml
├── Exitbottom.py
├── calculatordisplay.py
├── pricefooddrink.py
├── reset.py
├── Receiptfunctions.py
├── billingsystem.py
├── fooddrink.py
└── main.py
/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Exitbottom.py:
--------------------------------------------------------------------------------
1 | # Function Declaration
2 |
3 | def iExit():
4 | iExit=tkinter.messagebox.askyesno("Exit Restaurant System", "Confirm if you want to exit")
5 | if iExit > 0:
6 | root.destroy()
7 | return
--------------------------------------------------------------------------------
/.idea/inspectionProfiles/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/Resturant Management.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/calculatordisplay.py:
--------------------------------------------------------------------------------
1 | def btnClick(numbers):
2 | global operator
3 | operator = operator + str(numbers)
4 | text_Input.set(operator)
5 |
6 | def btnClear():
7 | global operator
8 | operator = ""
9 | text_Input.set("")
10 |
11 | def btnEquals():
12 | global operator
13 | sumup = str(eval(operator))
14 | text_Input.set(sumup)
15 | operator = ""
16 |
17 | txtDisplay = Entry(Calculator_Function, width=45, bg='white', bd=4, font=('arial',12,'bold'), justify=RIGHT, textvariable=text_Input)
18 | txtDisplay.grid(row=0,column=0,columnspan=4,pady=1)
19 | txtDisplay.insert(0,"0")
--------------------------------------------------------------------------------
/pricefooddrink.py:
--------------------------------------------------------------------------------
1 | def TotalofUnit():
2 |
3 | Unit1 = float(cocktail.get())
4 | Unit2 = float(iced_tea.get())
5 | Unit3 = float(hot_chocolate.get())
6 | Unit4 = float(orange_juice.get())
7 | Unit5 = float(milkshake.get())
8 | Unit6 = float(mountain_dew.get())
9 | Unit7 = float(sting.get())
10 | Unit8 = float(cobra.get())
11 |
12 | Unit9 = float(fried_chicken.get())
13 | Unit10 = float(kare_kare.get())
14 | Unit11 = float(crispy_pata.get())
15 | Unit12 = float(sinigang_baboy.get())
16 | Unit13 = float(sinigang_hipon.get())
17 | Unit14 = float(bicol_express.get())
18 | Unit15 = float(asparagus_tofu.get())
19 | Unit16 = float(chicken_sisig.get())
20 |
21 | Prices_Drinks = (Unit1 * 50) + (Unit2 * 45) + (Unit3 * 60) + (Unit4 * 35) + (Unit5 * 70) + (Unit6 * 40) + (Unit7 * 55) + (Unit8 * 75)
22 |
23 | Prices_Food = (Unit9 * 490) + (Unit10 * 450) + (Unit11 * 350) + (Unit12 * 400) + (Unit13 * 500) + (Unit14 * 250) + (Unit15 * 650) + (Unit16 * 370)
24 |
25 |
26 |
27 | DrinksPrices = "P" + str('%.2f' % Prices_Drinks)
28 | FoodsPrices = "P" + str('%.2f' % Prices_Food)
29 | Total_of_Food.set(FoodsPrices)
30 | Total_of_Drinks.set(DrinksPrices)
31 | SC = "P" + str('%.2f' % 1.59)
32 | ServiceCharge.set(SC)
33 |
34 | Sub_Total_of_Unit = "P" + str('%.2f'%(Prices_Drinks + Prices_Food + 1.59))
35 | SubTotal.set(Sub_Total_of_Unit)
36 |
37 | Tax = "P" + str('%.2f'%((Prices_Drinks + Prices_Food + 1.59) * 0.15))
38 | PaidTax.set(Tax)
39 |
40 | TT = ((Prices_Drinks + Prices_Food + 1.59) * 0.15)
41 | TC = "P" + str('%.2f'%(Prices_Drinks + Prices_Food + 1.59 + TT))
42 | TotalCost.set(TC)
--------------------------------------------------------------------------------
/reset.py:
--------------------------------------------------------------------------------
1 | def Reset():
PaidTax.set("")
SubTotal.set("")
TotalCost.set("")
Total_of_Food.set("")
Total_of_Drinks.set("")
ServiceCharge.set("")
textReceipt.delete("1.0", END)
cocktail.set("0")
iced_tea.set("0")
hot_chocolate.set("0")
orange_juice.set("0")
milkshake.set("0")
mountain_dew.set("0")
sting.set("0")
cobra.set("0")
fried_chicken.set("0")
kare_kare.set("0")
crispy_pata.set("0")
sinigang_baboy.set("0")
sinigang_hipon.set("0")
bicol_express.set("0")
asparagus_tofu.set("0")
chicken_sisig.set("0")
variable1.set(0)
variable2.set(0)
variable3.set(0)
variable4.set(0)
variable5.set(0)
variable6.set(0)
variable7.set(0)
variable8 .set(0)
variable9 .set(0)
variable10 .set(0)
variable11 .set(0)
variable12 .set(0)
variable13 .set(0)
variable14 .set(0)
variable15 .set(0)
variable16 .set(0)
textCocktail.configure(state=DISABLED)
textIcedTea.configure(state=DISABLED)
textHotChocolate.configure(state=DISABLED)
textOrangeJuice.configure(state=DISABLED)
textMilkShake.configure(state=DISABLED)
textMountainDew.configure(state=DISABLED)
textSting.configure(state=DISABLED)
textCobra.configure(state=DISABLED)
textFriedChicken.configure(state=DISABLED)
textKareKAre.configure(state=DISABLED)
textCrispyPata.configure(state=DISABLED)
textSinigangBaboy.configure(state=DISABLED)
textSinigangHipon.configure(state=DISABLED)
textBicolExpress.configure(state=DISABLED)
textAsparagusTofu.configure(state=DISABLED)
textChickenSisig.configure(state=DISABLED)
--------------------------------------------------------------------------------
/Receiptfunctions.py:
--------------------------------------------------------------------------------
1 | def Receipt():
2 | textReceipt.delete("1.0", END)
3 | x = random.randint(10908, 500876)
4 | randomRef = str(x)
5 | Receipt_Ref.set("Bill" + randomRef)
6 |
7 |
8 | textReceipt.insert(END, 'Receipt Ref:\t\t\t'+Receipt_Ref.get() + '\t' + Date_of_Order.get() + '\n')
9 | textReceipt.insert(END, 'Unit\t\t\t\t'+"Total of Unit \n")
10 | textReceipt.insert(END, 'Cocktail:\t\t\t\t\t' + cocktail.get() + '\n')
11 | textReceipt.insert(END, 'Iced Tea:\t\t\t\t\t' + iced_tea.get()+'\n')
12 | textReceipt.insert(END, 'Hot Chocolate:\t\t\t\t\t' + hot_chocolate.get()+'\n')
13 | textReceipt.insert(END, 'Orange Juice:\t\t\t\t\t' + orange_juice.get()+'\n')
14 | textReceipt.insert(END, 'Milk Shake:\t\t\t\t\t' + milkshake.get()+'\n')
15 | textReceipt.insert(END, 'Mountain Dew:\t\t\t\t\t' + mountain_dew.get()+'\n')
16 | textReceipt.insert(END, 'Sting:\t\t\t\t\t' + sting.get()+'\n')
17 | textReceipt.insert(END, 'Cobra:\t\t\t\t\t' + cobra.get()+'\n')
18 | textReceipt.insert(END, 'Fried Chicken:\t\t\t\t\t' + fried_chicken.get()+'\n')
19 | textReceipt.insert(END, 'Kare Kare:\t\t\t\t\t' + kare_kare.get()+'\n')
20 | textReceipt.insert(END, 'Crispy Pata:\t\t\t\t\t' + crispy_pata.get()+'\n')
21 | textReceipt.insert(END, 'Sinigang baboy:\t\t\t\t\t' + sinigang_baboy.get()+'\n')
22 | textReceipt.insert(END, 'Sinigang Hipon:\t\t\t\t\t' + sinigang_hipon.get()+'\n')
23 | textReceipt.insert(END, 'Bicol Express:\t\t\t\t\t' + bicol_express.get()+'\n')
24 | textReceipt.insert(END, 'Asparagus Tofu:\t\t\t\t\t' + asparagus_tofu.get()+'\n')
25 | textReceipt.insert(END, 'Chicken Sisig:\t\t\t\t\t' + chicken_sisig.get()+'\n')
26 | textReceipt.insert(END, 'Total of Drinks:\t\t\t\t' + Total_of_Drinks.get()+'\nTax Paid:\t\t\t\t'+PaidTax.get()+"\n")
27 | textReceipt.insert(END, 'Total of Foods:\t\t\t\t' + Total_of_Food.get()+'\nSubTotal:\t\t\t\t'+str(SubTotal.get())+"\n")
28 | textReceipt.insert(END, 'Service Charge:\t\t\t\t' + ServiceCharge.get()+'\nTotal Cost:\t\t\t\t'+str(TotalCost.get())+"\n")
--------------------------------------------------------------------------------
/billingsystem.py:
--------------------------------------------------------------------------------
1 | from tkinter import *
2 | import time
3 | import random
4 | import tkinter.messagebox
5 |
6 | root =Tk()
7 | root.geometry("1400x750+0+0")
8 | root.title(" BisKIRAN Restaurant KTM ")
9 | root.configure(background='Black')
10 |
11 | Tops = Frame(root, bg='dark Red', bd=25, pady=20, relief=GROOVE)
12 | Tops.pack(side=TOP)
13 |
14 | lblTitle = Label(Tops, font=('arial', 30, 'bold'), text='BisKIRAN Restaurant KTM ', bd=15, bg='sky blue',
15 | fg='dark blue', justify=CENTER)
16 | lblTitle.grid(row=0)
17 |
18 |
19 |
20 | ReceiptCal_Function = Frame(root, bg='dark blue', bd=10, relief=GROOVE)
21 | ReceiptCal_Function.pack(side=LEFT)
22 |
23 | Buttons_Function = Frame(ReceiptCal_Function, bg='dark Red', bd=3, relief=GROOVE)
24 | Buttons_Function.pack(side=TOP)
25 |
26 | Calculator_Function = Frame(ReceiptCal_Function, bg='dark blue', bd=6, relief=GROOVE)
27 | Calculator_Function.pack(side=BOTTOM)
28 |
29 | Receipt_Function = Frame(ReceiptCal_Function, bg='dark blue', bd=4, relief=GROOVE)
30 | Receipt_Function.pack(side=BOTTOM)
31 |
32 | MenuFrame = Frame(root, bg='dark blue', bd=32, relief=GROOVE)
33 | MenuFrame.pack(side=RIGHT)
34 | Total_Function = Frame(MenuFrame, bg='sky blue', bd=4)
35 | Total_Function.pack(side=BOTTOM)
36 | Drinks_Function = Frame(MenuFrame,bg='sky blue',bd=4)
37 | Drinks_Function.pack(side=TOP)
38 |
39 |
40 | Drinks_Function = Frame(MenuFrame, bg='sky blue', bd=4, relief=GROOVE)
41 | Drinks_Function.pack(side=LEFT)
42 | Food_Function = Frame(MenuFrame, bg='sky blue', bd=4, relief=GROOVE)
43 | Food_Function.pack(side=RIGHT)
44 | # variables
45 |
46 | variable1 = IntVar()
47 | variable2 = IntVar()
48 | variable3 = IntVar()
49 | variable4 = IntVar()
50 | variable5 = IntVar()
51 | variable6 = IntVar()
52 | variable7 = IntVar()
53 | variable8 = IntVar()
54 | variable9 = IntVar()
55 | variable10 = IntVar()
56 | variable11 = IntVar()
57 | variable12 = IntVar()
58 | variable13 = IntVar()
59 | variable14 = IntVar()
60 | variable15 = IntVar()
61 | variable16 = IntVar()
62 |
63 | Date_of_Order = StringVar()
64 | Receipt_Ref = StringVar()
65 | PaidTax = StringVar()
66 | SubTotal = StringVar()
67 | TotalCost = StringVar()
68 | Total_of_Food = StringVar()
69 | Total_of_Drinks = StringVar()
70 | ServiceCharge = StringVar()
71 |
72 | text_Input = StringVar()
73 | operator = ""
74 |
75 | cocktail = StringVar()
76 | iced_tea = StringVar()
77 | hot_chocolate = StringVar()
78 | orange_juice = StringVar()
79 | milkshake = StringVar()
80 | mountain_dew = StringVar()
81 | sting = StringVar()
82 | cobra = StringVar()
83 |
84 | fried_chicken = StringVar()
85 | kare_kare = StringVar()
86 | crispy_pata = StringVar()
87 | sinigang_baboy = StringVar()
88 | sinigang_hipon = StringVar()
89 | bicol_express = StringVar()
90 | asparagus_tofu = StringVar()
91 | chicken_sisig = StringVar()
92 |
93 | cocktail.set("0")
94 | iced_tea.set("0")
95 | hot_chocolate.set("0")
96 | orange_juice.set("0")
97 | milkshake.set("0")
98 | mountain_dew.set("0")
99 | sting.set("0")
100 | cobra.set("0")
101 |
102 | fried_chicken.set("0")
103 | kare_kare.set("0")
104 | crispy_pata.set("0")
105 | sinigang_baboy.set("0")
106 | sinigang_hipon.set("0")
107 | bicol_express.set("0")
108 | asparagus_tofu.set("0")
109 | chicken_sisig.set("0")
--------------------------------------------------------------------------------
/fooddrink.py:
--------------------------------------------------------------------------------
1 | def drinksCocktail():
2 | if variable1.get() == 1:
3 | textCocktail.configure(state=NORMAL)
4 | textCocktail.focus()
5 | textCocktail.delete('0', END)
6 | cocktail.set("")
7 | elif variable1.get() == 0:
8 | textCocktail.configure(state=DISABLED)
9 | cocktail.set("0")
10 |
11 | def drinksIceTea():
12 | if variable2.get() == 1:
13 | textIcedTea.configure(state=NORMAL)
14 | textIcedTea.focus()
15 | textIcedTea.delete('0', END)
16 | iced_tea.set("")
17 | elif variable2.get() == 0:
18 | textIcedTea.configure(state=DISABLED)
19 | iced_tea.set("0")
20 |
21 | def drinksHotChocolate():
22 | if variable3.get() == 1:
23 | textHotChocolate.configure(state=NORMAL)
24 | textHotChocolate.delete('0', END)
25 | textHotChocolate.focus()
26 | elif variable3.get() == 0:
27 | textHotChocolate.configure(state=DISABLED)
28 | hot_chocolate.set("0")
29 |
30 | def drinksOrangeJuice():
31 | if variable4.get() == 1:
32 | textOrangeJuice.configure(state=NORMAL)
33 | textOrangeJuice.delete('0', END)
34 | textOrangeJuice.focus()
35 | elif variable4.get() == 0:
36 | textOrangeJuice.configure(state=DISABLED)
37 | orange_juice.set("0")
38 |
39 | def drinksMilkShake():
40 | if variable5.get() == 1:
41 | textMilkShake.configure(state=NORMAL)
42 | textMilkShake.delete('0', END)
43 | textMilkShake.focus()
44 | elif variable5.get() == 0:
45 | textMilkShake.configure(state=DISABLED)
46 | milkshake.set("0")
47 |
48 | def drinksMountainDew():
49 | if variable6.get() == 1:
50 | textMountainDew.configure(state=NORMAL)
51 | textMountainDew.delete('0', END)
52 | textMountainDew.focus()
53 | elif variable6.get() == 0:
54 | textMountainDew.configure(state=DISABLED)
55 | mountain_dew.set("0")
56 |
57 | def drinksSting():
58 | if variable7.get() == 1:
59 | textSting.configure(state=NORMAL)
60 | textSting.delete('0', END)
61 | textSting.focus()
62 | elif variable7.get() == 0:
63 | textSting.configure(state=DISABLED)
64 | sting.set("0")
65 |
66 | def drinksCobra():
67 | if variable8.get() == 1:
68 | textCobra.configure(state=NORMAL)
69 | textCobra.delete('0', END)
70 | textCobra.focus()
71 | elif variable8.get() == 0:
72 | textCobra.configure(state=DISABLED)
73 | cobra.set("0")
74 |
75 | def foodsFriedChicken():
76 | if variable9.get() == 1:
77 | textFriedChicken.configure(state=NORMAL)
78 | textFriedChicken.delete('0', END)
79 | textFriedChicken.focus()
80 | elif variable9.get() == 0:
81 | textFriedChicken.configure(state=DISABLED)
82 | fried_chicken.set("0")
83 |
84 | def foodsKareKare():
85 | if variable10.get() == 1:
86 | textKareKAre.configure(state=NORMAL)
87 | textKareKAre.delete('0', END)
88 | textKareKAre.focus()
89 | elif variable10.get() == 0:
90 | textKareKAre.configure(state=DISABLED)
91 | kare_kare.set("0")
92 |
93 | def foodsCrispyPata():
94 | if variable11.get() == 1:
95 | textCrispyPata.configure(state=NORMAL)
96 | textCrispyPata.delete('0', END)
97 | textCrispyPata.focus()
98 | elif variable11.get() == 0:
99 | textCrispyPata.configure(state=DISABLED)
100 | crispy_pata.set("0")
101 |
102 | def foodsSinigangBaboy():
103 | if variable12.get() == 1:
104 | textSinigangBaboy.configure(state=NORMAL)
105 | textSinigangBaboy.delete('0', END)
106 | textSinigangBaboy.focus()
107 | elif variable12.get() == 0:
108 | textSinigangBaboy.configure(state=DISABLED)
109 | sinigang_baboy.set("0")
110 |
111 | def foodsSinigangHipon():
112 | if variable13 .get() == 1:
113 | textSinigangHipon.configure(state=NORMAL)
114 | textSinigangHipon.delete('0',END)
115 | textSinigangHipon.focus()
116 | elif(variable13.get() == 0):
117 | textSinigangHipon.configure(state=DISABLED)
118 | sinigang_hipon.set("0")
119 |
120 | def foodsBicolExpress():
121 | if variable14 .get() == 1:
122 | textBicolExpress.configure(state=NORMAL)
123 | textBicolExpress.delete('0', END)
124 | textBicolExpress.focus()
125 | elif variable14.get() == 0:
126 | textBicolExpress.configure(state=DISABLED)
127 | bicol_express.set("0")
128 |
129 | def foodsAsparagusTofu():
130 | if variable15.get() == 1:
131 | textAsparagusTofu.configure(state=NORMAL)
132 | textAsparagusTofu.delete('0', END)
133 | textAsparagusTofu.focus()
134 | elif variable15.get() == 0:
135 | textAsparagusTofu.configure(state=DISABLED)
136 | asparagus_tofu.set("0")
137 |
138 | def foodsChickenSisig():
139 | if variable16 .get() == 1:
140 | textChickenSisig.configure(state=NORMAL)
141 | textChickenSisig.delete('0',END)
142 | textChickenSisig.focus()
143 | elif(variable16.get() == 0):
144 | textChickenSisig.configure(state=DISABLED)
145 | chicken_sisig.set("0")
--------------------------------------------------------------------------------
/main.py:
--------------------------------------------------------------------------------
1 | from tkinter import *
2 | import time
3 | import random
4 | import tkinter.messagebox
5 |
6 | root =Tk()
7 | root.geometry("1400x750+0+0")
8 | root.title(" BisKIRAN Restaurant KTM ")
9 | root.configure(background='Black')
10 |
11 | Tops = Frame(root, bg='dark Red', bd=25, pady=20, relief=GROOVE)
12 | Tops.pack(side=TOP)
13 |
14 | lblTitle = Label(Tops, font=('arial', 30, 'bold'), text='BisKIRAN Restaurant KTM ', bd=15, bg='sky blue',
15 | fg='dark blue', justify=CENTER)
16 | lblTitle.grid(row=0)
17 |
18 |
19 |
20 | ReceiptCal_Function = Frame(root, bg='dark blue', bd=10, relief=GROOVE)
21 | ReceiptCal_Function.pack(side=LEFT)
22 |
23 | Buttons_Function = Frame(ReceiptCal_Function, bg='dark Red', bd=3, relief=GROOVE)
24 | Buttons_Function.pack(side=TOP)
25 |
26 | Calculator_Function = Frame(ReceiptCal_Function, bg='dark blue', bd=6, relief=GROOVE)
27 | Calculator_Function.pack(side=BOTTOM)
28 |
29 | Receipt_Function = Frame(ReceiptCal_Function, bg='dark blue', bd=4, relief=GROOVE)
30 | Receipt_Function.pack(side=BOTTOM)
31 |
32 | MenuFrame = Frame(root, bg='dark blue', bd=32, relief=GROOVE)
33 | MenuFrame.pack(side=RIGHT)
34 | Total_Function = Frame(MenuFrame, bg='sky blue', bd=4)
35 | Total_Function.pack(side=BOTTOM)
36 | Drinks_Function = Frame(MenuFrame,bg='sky blue',bd=4)
37 | Drinks_Function.pack(side=TOP)
38 |
39 |
40 | Drinks_Function = Frame(MenuFrame, bg='sky blue', bd=4, relief=GROOVE)
41 | Drinks_Function.pack(side=LEFT)
42 | Food_Function = Frame(MenuFrame, bg='sky blue', bd=4, relief=GROOVE)
43 | Food_Function.pack(side=RIGHT)
44 | # variables
45 |
46 | variable1 = IntVar()
47 | variable2 = IntVar()
48 | variable3 = IntVar()
49 | variable4 = IntVar()
50 | variable5 = IntVar()
51 | variable6 = IntVar()
52 | variable7 = IntVar()
53 | variable8 = IntVar()
54 | variable9 = IntVar()
55 | variable10 = IntVar()
56 | variable11 = IntVar()
57 | variable12 = IntVar()
58 | variable13 = IntVar()
59 | variable14 = IntVar()
60 | variable15 = IntVar()
61 | variable16 = IntVar()
62 |
63 | Date_of_Order = StringVar()
64 | Receipt_Ref = StringVar()
65 | PaidTax = StringVar()
66 | SubTotal = StringVar()
67 | TotalCost = StringVar()
68 | Total_of_Food = StringVar()
69 | Total_of_Drinks = StringVar()
70 | ServiceCharge = StringVar()
71 |
72 | text_Input = StringVar()
73 | operator = ""
74 |
75 | cocktail = StringVar()
76 | iced_tea = StringVar()
77 | hot_chocolate = StringVar()
78 | orange_juice = StringVar()
79 | milkshake = StringVar()
80 | mountain_dew = StringVar()
81 | sting = StringVar()
82 | cobra = StringVar()
83 |
84 | fried_chicken = StringVar()
85 | kare_kare = StringVar()
86 | crispy_pata = StringVar()
87 | sinigang_baboy = StringVar()
88 | sinigang_hipon = StringVar()
89 | bicol_express = StringVar()
90 | asparagus_tofu = StringVar()
91 | chicken_sisig = StringVar()
92 |
93 | cocktail.set("0")
94 | iced_tea.set("0")
95 | hot_chocolate.set("0")
96 | orange_juice.set("0")
97 | milkshake.set("0")
98 | mountain_dew.set("0")
99 | sting.set("0")
100 | cobra.set("0")
101 |
102 | fried_chicken.set("0")
103 | kare_kare.set("0")
104 | crispy_pata.set("0")
105 | sinigang_baboy.set("0")
106 | sinigang_hipon.set("0")
107 | bicol_express.set("0")
108 | asparagus_tofu.set("0")
109 | chicken_sisig.set("0")
110 |
111 | Date_of_Order.set(time.strftime("%y/%m/%d"))
112 |
113 | # Function Declaration
114 |
115 | def iExit():
116 | iExit=tkinter.messagebox.askyesno("Exit Restaurant System", "Confirm if you want to exit")
117 | if iExit > 0:
118 | root.destroy()
119 | return
120 |
121 | def Reset():
122 |
123 | PaidTax.set("")
124 | SubTotal.set("")
125 | TotalCost.set("")
126 | Total_of_Food.set("")
127 | Total_of_Drinks.set("")
128 | ServiceCharge.set("")
129 | textReceipt.delete("1.0", END)
130 |
131 |
132 | cocktail.set("0")
133 | iced_tea.set("0")
134 | hot_chocolate.set("0")
135 | orange_juice.set("0")
136 | milkshake.set("0")
137 | mountain_dew.set("0")
138 | sting.set("0")
139 | cobra.set("0")
140 |
141 | fried_chicken.set("0")
142 | kare_kare.set("0")
143 | crispy_pata.set("0")
144 | sinigang_baboy.set("0")
145 | sinigang_hipon.set("0")
146 | bicol_express.set("0")
147 | asparagus_tofu.set("0")
148 | chicken_sisig.set("0")
149 |
150 | variable1.set(0)
151 | variable2.set(0)
152 | variable3.set(0)
153 | variable4.set(0)
154 | variable5.set(0)
155 | variable6.set(0)
156 | variable7.set(0)
157 | variable8 .set(0)
158 | variable9 .set(0)
159 | variable10 .set(0)
160 | variable11 .set(0)
161 | variable12 .set(0)
162 | variable13 .set(0)
163 | variable14 .set(0)
164 | variable15 .set(0)
165 | variable16 .set(0)
166 |
167 |
168 | textCocktail.configure(state=DISABLED)
169 | textIcedTea.configure(state=DISABLED)
170 | textHotChocolate.configure(state=DISABLED)
171 | textOrangeJuice.configure(state=DISABLED)
172 | textMilkShake.configure(state=DISABLED)
173 | textMountainDew.configure(state=DISABLED)
174 | textSting.configure(state=DISABLED)
175 | textCobra.configure(state=DISABLED)
176 | textFriedChicken.configure(state=DISABLED)
177 | textKareKAre.configure(state=DISABLED)
178 | textCrispyPata.configure(state=DISABLED)
179 | textSinigangBaboy.configure(state=DISABLED)
180 | textSinigangHipon.configure(state=DISABLED)
181 | textBicolExpress.configure(state=DISABLED)
182 | textAsparagusTofu.configure(state=DISABLED)
183 | textChickenSisig.configure(state=DISABLED)
184 |
185 | def TotalofUnit():
186 | Unit1 = float(cocktail.get())
187 | Unit2 = float(iced_tea.get())
188 | Unit3 = float(hot_chocolate.get())
189 | Unit4 = float(orange_juice.get())
190 | Unit5 = float(milkshake.get())
191 | Unit6 = float(mountain_dew.get())
192 | Unit7 = float(sting.get())
193 | Unit8 = float(cobra.get())
194 |
195 | Unit9 = float(fried_chicken.get())
196 | Unit10 = float(kare_kare.get())
197 | Unit11 = float(crispy_pata.get())
198 | Unit12 = float(sinigang_baboy.get())
199 | Unit13 = float(sinigang_hipon.get())
200 | Unit14 = float(bicol_express.get())
201 | Unit15 = float(asparagus_tofu.get())
202 | Unit16 = float(chicken_sisig.get())
203 |
204 | Prices_Drinks = (Unit1 * 50) + (Unit2 * 45) + (Unit3 * 60) + (Unit4 * 35) + (Unit5 * 70) + (Unit6 * 40) + (Unit7 * 55) + (Unit8 * 75)
205 |
206 | Prices_Food = (Unit9 * 490) + (Unit10 * 450) + (Unit11 * 350) + (Unit12 * 400) + (Unit13 * 500) + (Unit14 * 250) + (Unit15 * 650) + (Unit16 * 370)
207 |
208 |
209 |
210 | DrinksPrices = "P" + str('%.2f' % Prices_Drinks)
211 | FoodsPrices = "P" + str('%.2f' % Prices_Food)
212 | Total_of_Food.set(FoodsPrices)
213 | Total_of_Drinks.set(DrinksPrices)
214 | SC = "P" + str('%.2f' % 1.59)
215 | ServiceCharge.set(SC)
216 |
217 | Sub_Total_of_Unit = "P" + str('%.2f'%(Prices_Drinks + Prices_Food + 1.59))
218 | SubTotal.set(Sub_Total_of_Unit)
219 |
220 | Tax = "P" + str('%.2f'%((Prices_Drinks + Prices_Food + 1.59) * 0.15))
221 | PaidTax.set(Tax)
222 |
223 | TT = ((Prices_Drinks + Prices_Food + 1.59) * 0.15)
224 | TC = "P" + str('%.2f'%(Prices_Drinks + Prices_Food + 1.59 + TT))
225 | TotalCost.set(TC)
226 |
227 |
228 | def drinksCocktail():
229 | if variable1.get() == 1:
230 | textCocktail.configure(state=NORMAL)
231 | textCocktail.focus()
232 | textCocktail.delete('0', END)
233 | cocktail.set("")
234 | elif variable1.get() == 0:
235 | textCocktail.configure(state=DISABLED)
236 | cocktail.set("0")
237 |
238 | def drinksIceTea():
239 | if variable2.get() == 1:
240 | textIcedTea.configure(state=NORMAL)
241 | textIcedTea.focus()
242 | textIcedTea.delete('0', END)
243 | iced_tea.set("")
244 | elif variable2.get() == 0:
245 | textIcedTea.configure(state=DISABLED)
246 | iced_tea.set("0")
247 |
248 | def drinksHotChocolate():
249 | if variable3.get() == 1:
250 | textHotChocolate.configure(state=NORMAL)
251 | textHotChocolate.delete('0', END)
252 | textHotChocolate.focus()
253 | elif variable3.get() == 0:
254 | textHotChocolate.configure(state=DISABLED)
255 | hot_chocolate.set("0")
256 |
257 | def drinksOrangeJuice():
258 | if variable4.get() == 1:
259 | textOrangeJuice.configure(state=NORMAL)
260 | textOrangeJuice.delete('0', END)
261 | textOrangeJuice.focus()
262 | elif variable4.get() == 0:
263 | textOrangeJuice.configure(state=DISABLED)
264 | orange_juice.set("0")
265 |
266 | def drinksMilkShake():
267 | if variable5.get() == 1:
268 | textMilkShake.configure(state=NORMAL)
269 | textMilkShake.delete('0', END)
270 | textMilkShake.focus()
271 | elif variable5.get() == 0:
272 | textMilkShake.configure(state=DISABLED)
273 | milkshake.set("0")
274 |
275 | def drinksMountainDew():
276 | if variable6.get() == 1:
277 | textMountainDew.configure(state=NORMAL)
278 | textMountainDew.delete('0', END)
279 | textMountainDew.focus()
280 | elif variable6.get() == 0:
281 | textMountainDew.configure(state=DISABLED)
282 | mountain_dew.set("0")
283 |
284 | def drinksSting():
285 | if variable7.get() == 1:
286 | textSting.configure(state=NORMAL)
287 | textSting.delete('0', END)
288 | textSting.focus()
289 | elif variable7.get() == 0:
290 | textSting.configure(state=DISABLED)
291 | sting.set("0")
292 |
293 | def drinksCobra():
294 | if variable8.get() == 1:
295 | textCobra.configure(state=NORMAL)
296 | textCobra.delete('0', END)
297 | textCobra.focus()
298 | elif variable8.get() == 0:
299 | textCobra.configure(state=DISABLED)
300 | cobra.set("0")
301 |
302 | def foodsFriedChicken():
303 | if variable9.get() == 1:
304 | textFriedChicken.configure(state=NORMAL)
305 | textFriedChicken.delete('0', END)
306 | textFriedChicken.focus()
307 | elif variable9.get() == 0:
308 | textFriedChicken.configure(state=DISABLED)
309 | fried_chicken.set("0")
310 |
311 | def foodsKareKare():
312 | if variable10.get() == 1:
313 | textKareKAre.configure(state=NORMAL)
314 | textKareKAre.delete('0', END)
315 | textKareKAre.focus()
316 | elif variable10.get() == 0:
317 | textKareKAre.configure(state=DISABLED)
318 | kare_kare.set("0")
319 |
320 | def foodsCrispyPata():
321 | if variable11.get() == 1:
322 | textCrispyPata.configure(state=NORMAL)
323 | textCrispyPata.delete('0', END)
324 | textCrispyPata.focus()
325 | elif variable11.get() == 0:
326 | textCrispyPata.configure(state=DISABLED)
327 | crispy_pata.set("0")
328 |
329 | def foodsSinigangBaboy():
330 | if variable12.get() == 1:
331 | textSinigangBaboy.configure(state=NORMAL)
332 | textSinigangBaboy.delete('0', END)
333 | textSinigangBaboy.focus()
334 | elif variable12.get() == 0:
335 | textSinigangBaboy.configure(state=DISABLED)
336 | sinigang_baboy.set("0")
337 |
338 | def foodsSinigangHipon():
339 | if variable13 .get() == 1:
340 | textSinigangHipon.configure(state=NORMAL)
341 | textSinigangHipon.delete('0',END)
342 | textSinigangHipon.focus()
343 | elif(variable13.get() == 0):
344 | textSinigangHipon.configure(state=DISABLED)
345 | sinigang_hipon.set("0")
346 |
347 | def foodsBicolExpress():
348 | if variable14 .get() == 1:
349 | textBicolExpress.configure(state=NORMAL)
350 | textBicolExpress.delete('0', END)
351 | textBicolExpress.focus()
352 | elif variable14.get() == 0:
353 | textBicolExpress.configure(state=DISABLED)
354 | bicol_express.set("0")
355 |
356 | def foodsAsparagusTofu():
357 | if variable15.get() == 1:
358 | textAsparagusTofu.configure(state=NORMAL)
359 | textAsparagusTofu.delete('0', END)
360 | textAsparagusTofu.focus()
361 | elif variable15.get() == 0:
362 | textAsparagusTofu.configure(state=DISABLED)
363 | asparagus_tofu.set("0")
364 |
365 | def foodsChickenSisig():
366 | if variable16 .get() == 1:
367 | textChickenSisig.configure(state=NORMAL)
368 | textChickenSisig.delete('0',END)
369 | textChickenSisig.focus()
370 | elif(variable16.get() == 0):
371 | textChickenSisig.configure(state=DISABLED)
372 | chicken_sisig.set("0")
373 |
374 | def Receipt():
375 | textReceipt.delete("1.0", END)
376 | x = random.randint(10908, 500876)
377 | randomRef = str(x)
378 | Receipt_Ref.set("Bill" + randomRef)
379 |
380 |
381 | textReceipt.insert(END, 'Receipt Ref:\t\t\t'+Receipt_Ref.get() + '\t' + Date_of_Order.get() + '\n')
382 | textReceipt.insert(END, 'Unit\t\t\t\t'+"Total of Unit \n")
383 | textReceipt.insert(END, 'Cocktail:\t\t\t\t\t' + cocktail.get() + '\n')
384 | textReceipt.insert(END, 'Iced Tea:\t\t\t\t\t' + iced_tea.get()+'\n')
385 | textReceipt.insert(END, 'Hot Chocolate:\t\t\t\t\t' + hot_chocolate.get()+'\n')
386 | textReceipt.insert(END, 'Orange Juice:\t\t\t\t\t' + orange_juice.get()+'\n')
387 | textReceipt.insert(END, 'Milk Shake:\t\t\t\t\t' + milkshake.get()+'\n')
388 | textReceipt.insert(END, 'Mountain Dew:\t\t\t\t\t' + mountain_dew.get()+'\n')
389 | textReceipt.insert(END, 'Sting:\t\t\t\t\t' + sting.get()+'\n')
390 | textReceipt.insert(END, 'Cobra:\t\t\t\t\t' + cobra.get()+'\n')
391 | textReceipt.insert(END, 'Fried Chicken:\t\t\t\t\t' + fried_chicken.get()+'\n')
392 | textReceipt.insert(END, 'Kare Kare:\t\t\t\t\t' + kare_kare.get()+'\n')
393 | textReceipt.insert(END, 'Crispy Pata:\t\t\t\t\t' + crispy_pata.get()+'\n')
394 | textReceipt.insert(END, 'Sinigang baboy:\t\t\t\t\t' + sinigang_baboy.get()+'\n')
395 | textReceipt.insert(END, 'Sinigang Hipon:\t\t\t\t\t' + sinigang_hipon.get()+'\n')
396 | textReceipt.insert(END, 'Bicol Express:\t\t\t\t\t' + bicol_express.get()+'\n')
397 | textReceipt.insert(END, 'Asparagus Tofu:\t\t\t\t\t' + asparagus_tofu.get()+'\n')
398 | textReceipt.insert(END, 'Chicken Sisig:\t\t\t\t\t' + chicken_sisig.get()+'\n')
399 | textReceipt.insert(END, 'Total of Drinks:\t\t\t\t' + Total_of_Drinks.get()+'\nTax Paid:\t\t\t\t'+PaidTax.get()+"\n")
400 | textReceipt.insert(END, 'Total of Foods:\t\t\t\t' + Total_of_Food.get()+'\nSubTotal:\t\t\t\t'+str(SubTotal.get())+"\n")
401 | textReceipt.insert(END, 'Service Charge:\t\t\t\t' + ServiceCharge.get()+'\nTotal Cost:\t\t\t\t'+str(TotalCost.get())+"\n")
402 |
403 |
404 | # Drinks
405 | Cocktail = Checkbutton(Drinks_Function, text='Cocktail', variable=variable1, onvalue=1, offvalue=0, font=('arial', 16, 'bold'),
406 | bg='sky blue', command=drinksCocktail).grid(row=0, sticky=W)
407 | IcedTea = Checkbutton(Drinks_Function, text='Iced Tea', variable=variable2, onvalue=1, offvalue=0, font=('arial', 16, 'bold'),
408 | bg='sky blue', command=drinksIceTea).grid(row=1, sticky=W)
409 | HotChocolate = Checkbutton(Drinks_Function, text='Hot Chocolate', variable=variable3, onvalue=1, offvalue=0, font=('arial', 16, 'bold'),
410 | bg='sky blue', command=drinksHotChocolate).grid(row=2, sticky=W)
411 | OrangeJuice = Checkbutton(Drinks_Function, text='Orange Juice', variable=variable4, onvalue=1, offvalue=0, font=('arial', 16, 'bold'),
412 | bg='sky blue', command=drinksOrangeJuice).grid(row=3, sticky=W)
413 | MilkShake = Checkbutton(Drinks_Function, text='Milk Shake', variable=variable5, onvalue=1, offvalue=0, font=('arial', 16, 'bold'),
414 | bg='sky blue', command=drinksMilkShake).grid(row=4, sticky=W)
415 | MountainDew = Checkbutton(Drinks_Function, text='Mountain Dew', variable=variable6, onvalue=1, offvalue=0, font=('arial', 16, 'bold'),
416 | bg='sky blue', command=drinksMountainDew).grid(row=5, sticky=W)
417 | Sting = Checkbutton(Drinks_Function, text='Sting', variable=variable7, onvalue=1, offvalue=0, font=('arial', 16, 'bold'),
418 | bg='sky blue', command=drinksSting).grid(row=6, sticky=W)
419 | Cobra = Checkbutton(Drinks_Function, text='Cobra', variable=variable8, onvalue=1, offvalue=0, font=('arial', 16, 'bold'),
420 | bg='sky blue', command=drinksCobra).grid(row=7, sticky=W)
421 | # Drink Entry
422 |
423 | textCocktail = Entry(Drinks_Function, font=('arial', 16, 'bold'), bd=8, width=6, justify=LEFT, state=DISABLED, textvariable=cocktail)
424 | textCocktail.grid(row=0,column=1)
425 |
426 | textIcedTea = Entry(Drinks_Function,font=('arial',16,'bold'),bd=8,width=6,justify=LEFT,state=DISABLED,textvariable=iced_tea)
427 | textIcedTea.grid(row=1,column=1)
428 |
429 | textHotChocolate = Entry(Drinks_Function,font=('arial',16,'bold'),bd=8,width=6,justify=LEFT,state=DISABLED,textvariable=hot_chocolate)
430 | textHotChocolate.grid(row=2,column=1)
431 |
432 | textOrangeJuice= Entry(Drinks_Function,font=('arial',16,'bold'),bd=8,width=6,justify=LEFT,state=DISABLED,textvariable=orange_juice)
433 | textOrangeJuice.grid(row=3,column=1)
434 |
435 | textMilkShake = Entry(Drinks_Function,font=('arial',16,'bold'),bd=8,width=6,justify=LEFT,state=DISABLED,textvariable=milkshake)
436 | textMilkShake.grid(row=4,column=1)
437 |
438 | textMountainDew = Entry(Drinks_Function,font=('arial',16,'bold'),bd=8,width=6,justify=LEFT,state=DISABLED, textvariable=mountain_dew)
439 | textMountainDew.grid(row=5,column=1)
440 |
441 | textSting = Entry(Drinks_Function,font=('arial',16,'bold'),bd=8,width=6,justify=LEFT,state=DISABLED
442 | ,textvariable=sting)
443 | textSting.grid(row=6,column=1)
444 |
445 | textCobra = Entry(Drinks_Function,font=('arial',16,'bold'),bd=8,width=6,justify=LEFT,state=DISABLED
446 | ,textvariable=cobra)
447 | textCobra.grid(row=7,column=1)
448 | # Foods
449 |
450 | FriedChicken = Checkbutton(Food_Function,text="Fried Chicken\t\t\t ",variable=variable9,onvalue = 1, offvalue=0,
451 | font=('arial',16,'bold'),bg='sky blue',command=foodsFriedChicken).grid(row=0,sticky=W)
452 | KareKare = Checkbutton(Food_Function,text="Kare kare",variable=variable10,onvalue = 1, offvalue=0,
453 | font=('arial',16,'bold'),bg='sky blue',command=foodsKareKare).grid(row=1,sticky=W)
454 | CrispyPata = Checkbutton(Food_Function,text="Crispy Pata ",variable=variable11,onvalue = 1, offvalue=0,
455 | font=('arial',16,'bold'),bg='sky blue',command=foodsCrispyPata).grid(row=2,sticky=W)
456 | SinigangBaboy = Checkbutton(Food_Function,text="Sinigang Baboy ",variable=variable12,onvalue = 1, offvalue=0,
457 | font=('arial',16,'bold'),bg='sky blue',command=foodsSinigangBaboy).grid(row=3,sticky=W)
458 | SinigangHipon = Checkbutton(Food_Function,text="Sinigang Hipon ",variable=variable13,onvalue = 1, offvalue=0,
459 | font=('arial',16,'bold'),bg='sky blue',command=foodsSinigangHipon).grid(row=4,sticky=W)
460 | BicolExpress = Checkbutton(Food_Function,text="Bicol Express ",variable=variable14,onvalue = 1, offvalue=0,
461 | font=('arial',16,'bold'),bg='sky blue',command=foodsBicolExpress).grid(row=5,sticky=W)
462 | AsparagusTofu = Checkbutton(Food_Function,text="Asparagus Tofu ",variable=variable15,onvalue = 1, offvalue=0,
463 | font=('arial',16,'bold'),bg='sky blue',command=foodsAsparagusTofu).grid(row=6,sticky=W)
464 | ChickenSisig = Checkbutton(Food_Function,text="Chicken Sisig ",variable=variable16,onvalue = 1, offvalue=0,
465 | font=('arial',16,'bold'),bg='sky blue',command=foodsChickenSisig).grid(row=7,sticky=W)
466 |
467 | textFriedChicken=Entry(Food_Function,font=('arial',16,'bold'),bd=8,width=6,justify=LEFT,state=DISABLED,textvariable=fried_chicken)
468 | textFriedChicken.grid(row=0,column=1)
469 |
470 | textKareKAre=Entry(Food_Function,font=('arial',16,'bold'),bd=8,width=6,justify=LEFT,state=DISABLED,textvariable=kare_kare)
471 | textKareKAre.grid(row=1,column=1)
472 |
473 | textCrispyPata=Entry(Food_Function,font=('arial',16,'bold'),bd=8,width=6,justify=LEFT,state=DISABLED, textvariable=crispy_pata)
474 | textCrispyPata.grid(row=2,column=1)
475 |
476 | textSinigangBaboy=Entry(Food_Function,font=('arial',16,'bold'),bd=8,width=6,justify=LEFT,state=DISABLED,textvariable=sinigang_baboy)
477 | textSinigangBaboy.grid(row=3,column=1)
478 |
479 | textSinigangHipon=Entry(Food_Function,font=('arial',16,'bold'),bd=8,width=6,justify=LEFT,state=DISABLED,textvariable=sinigang_hipon)
480 | textSinigangHipon.grid(row=4,column=1)
481 |
482 | textBicolExpress=Entry(Food_Function,font=('arial',16,'bold'),bd=8,width=6,justify=LEFT,state=DISABLED,textvariable=bicol_express)
483 | textBicolExpress.grid(row=5,column=1)
484 |
485 | textAsparagusTofu=Entry(Food_Function,font=('arial',16,'bold'),bd=8,width=6,justify=LEFT,state=DISABLED,textvariable=asparagus_tofu)
486 | textAsparagusTofu.grid(row=6,column=1)
487 |
488 | textChickenSisig=Entry(Food_Function,font=('arial',16,'bold'),bd=8,width=6,justify=LEFT,state=DISABLED,textvariable=chicken_sisig)
489 | textChickenSisig.grid(row=7,column=1)
490 |
491 | # ToTal Cost
492 | lblTotalofDrinks=Label(Total_Function,font=('arial',14,'bold'),text='Total of Drinks\t',bg='sky blue',fg='black',justify=CENTER)
493 | lblTotalofDrinks.grid(row=0,column=0,sticky=W)
494 | textTotalofDrinks=Entry(Total_Function,bg='white',bd=7,font=('arial',14,'bold'),insertwidth=2,justify=RIGHT,textvariable=Total_of_Drinks)
495 | textTotalofDrinks.grid(row=0,column=1)
496 |
497 | lblTotalofFood=Label(Total_Function,font=('arial',14,'bold'),text='Total of Foods ',bg='sky blue',fg='black',justify=CENTER)
498 | lblTotalofFood.grid(row=1,column=0,sticky=W)
499 | textTotalofFood=Entry(Total_Function,bg='white',bd=7,font=('arial',14,'bold'),insertwidth=2,justify=RIGHT,textvariable=Total_of_Food)
500 | textTotalofFood.grid(row=1,column=1)
501 |
502 | lblServiceCharge=Label(Total_Function,font=('arial',14,'bold'),text='Service Charge',bg='sky blue',fg='black',justify=CENTER)
503 | lblServiceCharge.grid(row=2,column=0,sticky=W)
504 | txtServiceCharge=Entry(Total_Function,bg='white',bd=7,font=('arial',14,'bold'),insertwidth=2,justify=RIGHT,textvariable=ServiceCharge)
505 | txtServiceCharge.grid(row=2,column=1)
506 | # Payment information
507 |
508 | lblPaidTax=Label(Total_Function,font=('arial',14,'bold'),text='\tPaid Tax',bg='sky blue',bd=7,fg='black',justify=CENTER)
509 | lblPaidTax.grid(row=0,column=2,sticky=W)
510 | textPaidTax=Entry(Total_Function,bg='white',bd=7,font=('arial',14,'bold'),insertwidth=2,justify=RIGHT,textvariable=PaidTax)
511 | textPaidTax.grid(row=0,column=3)
512 |
513 | lblSubTotal=Label(Total_Function,font=('arial',14,'bold'),text='\tSub Total',bg='sky blue',bd=7,fg='black',justify=CENTER)
514 | lblSubTotal.grid(row=1,column=2,sticky=W)
515 | textSubTotal=Entry(Total_Function,bg='white',bd=7,font=('arial',14,'bold'), insertwidth=2,justify=RIGHT,textvariable=SubTotal)
516 | textSubTotal.grid(row=1,column=3)
517 |
518 | lblTotalCost=Label(Total_Function,font=('arial',14,'bold'),text='\tTotal',bg='sky blue',bd=7,fg='black',justify=CENTER)
519 | lblTotalCost.grid(row=2,column=2,sticky=W)
520 | textTotalCost=Entry(Total_Function,bg='white',bd=7,font=('arial',14,'bold'),insertwidth=2,justify=RIGHT,textvariable=TotalCost)
521 | textTotalCost.grid(row=2,column=3)
522 |
523 | # RECEIPT
524 | textReceipt=Text(Receipt_Function,width=46,height=12,bg='white',bd=4,font=('arial',12,'bold'))
525 | textReceipt.grid(row=0,column=0)
526 |
527 |
528 | # BUTTONS
529 | buttonTotal=Button(Buttons_Function,padx=16,pady=1,bd=7,fg='gold',font=('arial',12,'bold'),width=4,text='Total',bg='black',command=TotalofUnit).grid(row=0,column=0)
530 | buttonReceipt=Button(Buttons_Function,padx=16,pady=1,bd=7,fg='gold',font=('arial',12,'bold'),width=4,text='Receipt',bg='black',command=Receipt).grid(row=0,column=1)
531 | buttonReset=Button(Buttons_Function,padx=16,pady=1,bd=7,fg='gold',font=('arial',12,'bold'),width=4,text='Reset',bg='black',command=Reset).grid(row=0,column=2)
532 | buttonExit=Button(Buttons_Function,padx=16,pady=1,bd=7,fg='gold',font=('arial',12,'bold'),width=4,text='Exit',bg='black',command=iExit).grid(row=0,column=3)
533 |
534 |
535 | # Calculator Display
536 |
537 |
538 |
539 |
540 | def btnClick(numbers):
541 | global operator
542 | operator = operator + str(numbers)
543 | text_Input.set(operator)
544 |
545 | def btnClear():
546 | global operator
547 | operator = ""
548 | text_Input.set("")
549 |
550 | def btnEquals():
551 | global operator
552 | sumup = str(eval(operator))
553 | text_Input.set(sumup)
554 | operator = ""
555 |
556 |
557 |
558 |
559 | # Calculator
560 | txtDisplay = Entry(Calculator_Function, width=45, bg='white', bd=4, font=('arial',12,'bold'), justify=RIGHT, textvariable=text_Input)
561 | txtDisplay.grid(row=0,column=0,columnspan=4,pady=1)
562 | txtDisplay.insert(0,"0")
563 |
564 | # CALCULATOR BUTTONS
565 | button7=Button(Calculator_Function, padx=16, pady=1, bd=7, fg='gold', font=('arial', 12, 'bold'), width=4, text='7',bg='black',command=lambda:btnClick(7)).grid(row=2,column=0)
566 | button8=Button(Calculator_Function,padx=16,pady=1,bd=7,fg='gold',font=('arial',12,'bold'),width=4,text='8',bg='black',command=lambda:btnClick(8)).grid(row=2,column=1)
567 | button9=Button(Calculator_Function,padx=16,pady=1,bd=7,fg='gold',font=('arial',12,'bold'),width=4,text='9',bg='black',command=lambda:btnClick(9)).grid(row=2,column=2)
568 | buttonAdd=Button(Calculator_Function,padx=16,pady=1,bd=7,fg='gold',font=('arial',12,'bold'),width=4,text='+',bg='black',command=lambda:btnClick('+')).grid(row=2,column=3)
569 |
570 | button4=Button(Calculator_Function,padx=16,pady=1,bd=7,fg='gold',font=('arial',12,'bold'),width=4,text='4',bg='black',command=lambda:btnClick(4)).grid(row=3,column=0)
571 | button5=Button(Calculator_Function,padx=16,pady=1,bd=7,fg='gold',font=('arial',12,'bold'),width=4,text='5',bg='black',command=lambda:btnClick(5)).grid(row=3,column=1)
572 | button6=Button(Calculator_Function,padx=16,pady=1,bd=7,fg='gold',font=('arial',12,'bold'),width=4,text='6',bg='black',command=lambda:btnClick(6)).grid(row=3,column=2)
573 | buttonSub=Button(Calculator_Function,padx=16,pady=1,bd=7,fg='gold',font=('arial',12,'bold'),width=4,text='-',bg='black',command=lambda:btnClick('-')).grid(row=3,column=3)
574 |
575 | button1=Button(Calculator_Function,padx=16,pady=1,bd=7,fg='gold',font=('arial',12,'bold'),width=4,text='1',bg='black',command=lambda:btnClick(1)).grid(row=4,column=0)
576 | button2=Button(Calculator_Function,padx=16,pady=1,bd=7,fg='gold',font=('arial',12,'bold'),width=4,text='2',bg='black',command=lambda:btnClick(2)).grid(row=4,column=1)
577 | button3=Button(Calculator_Function,padx=16,pady=1,bd=7,fg='gold',font=('arial',12,'bold'),width=4,text='3',bg='black',command=lambda:btnClick(3)).grid(row=4,column=2)
578 | buttonMulti=Button(Calculator_Function,padx=16,pady=1,bd=7,fg='gold',font=('arial',12,'bold'),width=4,text='*',bg='black',command=lambda:btnClick('*')).grid(row=4,column=3)
579 |
580 | button0=Button(Calculator_Function,padx=16,pady=1,bd=7,fg='gold',font=('arial',12,'bold'),width=4,text='0',bg='black',command=lambda:btnClick(0)).grid(row=5,column=0)
581 | buttonClear=Button(Calculator_Function,padx=16,pady=1,bd=7,fg='gold',font=('arial',12,'bold'),width=4,text='C',bg='black',command=btnClear).grid(row=5,column=1)
582 | buttonEqual=Button(Calculator_Function,padx=16,pady=1,bd=7,fg='gold',font=('arial',12,'bold'),width=4,text='=',bg='black',command=btnEquals).grid(row=5,column=2)
583 | buttonDiv=Button(Calculator_Function,padx=16,pady=1,bd=7,fg='gold',font=('arial',12,'bold'),width=4,text='/',bg='black',command=lambda:btnClick('/')).grid(row=5,column=3)
584 |
585 | root.mainloop()
586 |
587 |
--------------------------------------------------------------------------------