Restaurant Billing System in Python
Restaurant Billing System in Python
def login():
if [Link]()=='' or [Link]()=='':
[Link]('Error','Username And Password Cannot Be Empty')
#*************** R E S T A R U N T B I L I N G S Y S T E M
*******************
import [Link]
def init_db():
conn = [Link](
host="[Link]", # NOT localhost
user="root",
password="NABAN2008@",
port=3306,
connection_timeout=5,
use_pure=True
)
cur = [Link]()
[Link]("CREATE DATABASE IF NOT EXISTS restaurant_db")
[Link]()
init_db()
table_name = f"bill_{bill_no}"
[Link]()
[Link]()
totprice=(aprice+bprice+cprice+dprice+eprice+fprice+gprice+hprice+iprice
+jprice+kprice+lprice+mprice+nprice+oprice+pprice
+qprice+rprice+sprice+tprice+uprice+vprice+wprice
+xprice+yprice+zprice+a1price+a2price+a3price+a4price)
[Link](state='normal')
[Link](0,END)##deleting preivious text wriiten in the entry
field
[Link](0,str(totprice)+' Rs')## inserting total price in
the entry field
[Link](state='disabled')
#*******************************************************************************
*************
def bill_():
billno=[Link](100,5000)
[Link](state='normal')
[Link](0,END)
[Link](0,billno)
[Link](state='disabled')
[Link](state='normal')
currentdate=[Link]().strftime('%d/%m/%y')
currenttime=[Link]().strftime('%I:%M:%S %p')
[Link](state='normal')
[Link](0,END)
[Link](state='normal')
[Link](0,END)
[Link](0,currentdate)
[Link](state='disabled')
[Link](0,currenttime)
[Link](state='disabled')
if [Link]()=='':
[Link]('Error','Select The Item')
elif [Link]()=='0 Rs':
[Link]('Error','Select The Item')
elif [Link]()=='':
[Link]('Error','Mode Of Payment -- Not Selected')
else:
[Link](1.0,END)
[Link](END,'\n\n\t MAVERICKS RESTAURANT (Pure
non-veg)\n')
[Link](END,'\n---------------------------------------------------------
')
[Link](END,f'\nBill Number:\t\t{[Link]()}')
[Link](END,'\n---------------------------------------------------------
')
if [Link]()!='':
[Link](END,f'\nDate:\t{[Link]()}')
if [Link]()!='':
[Link](END,f'\nTime:\t{[Link]()}')
[Link](END,'\n---------------------------------------------------------
')
[Link](END,'\nDish\t\t\tQuantity\t\t\tPrice')
[Link](END,'\n---------------------------------------------------------
')
if [Link]()!='0':
[Link](END,f'\nChicken
Rolls\t\t\t{[Link]()}\t\t\t{aprice} Rs ')
if [Link]()!='0':
[Link](END,f'\nChicken
Burger\t\t\t{[Link]()}\t\t\t{bprice} Rs ')
if [Link]()!='0':
[Link](END,f'\nChicken
Fries\t\t\t{[Link]()}\t\t\t{cprice} Rs ')
if [Link]()!='0':
[Link](END,f'\nBread
Omellette\t\t\t{[Link]()}\t\t\t{dprice} Rs ')
if [Link]()!='0':
[Link](END,f'\nMeat
Balls\t\t\t{[Link]()}\t\t\t{eprice} Rs ')
if [Link]()!='0':
[Link](END,f'\nChicken
Manchurian\t\t\t{[Link]()}\t\t\t{fprice} Rs ')
if [Link]()!='0':
[Link](END,f'\nChilli
Prawns\t\t\t{[Link]()}\t\t\t{gprice} Rs ')
if [Link]()!='0':
[Link](END,f'\nFish
Fries\t\t\t{[Link]()}\t\t\t{hprice} Rs ')
if [Link]()!='0':
[Link](END,f'\nSpecial
Shawarma\t\t\t{[Link]()}\t\t\t{iprice} Rs ')
if [Link]()!='0':
[Link](END,f'\nSoups\t\t\t{[Link]()}\t\t\t{jprice} Rs ')
if [Link]()!='0':
[Link](END,f'\nChicken
Biriyani\t\t\t{[Link]()}\t\t\t{kprice} Rs ')
if [Link]()!='0':
[Link](END,f'\nMutton
Biriyani\t\t\t{[Link]()}\t\t\t{lprice} Rs ')
if [Link]()!='0':
[Link](END,f'\nFish
Biriyani\t\t\t{[Link]()}\t\t\t{mprice} Rs ')
if [Link]()!='0':
[Link](END,f'\nPrawn
Biriyani\t\t\t{[Link]()}\t\t\t{nprice} Rs ')
if [Link]()!='0':
[Link](END,f'\nButter
Chicken\t\t\t{[Link]()}\t\t\t{oprice} Rs ')
if [Link]()!='0':
[Link](END,f'\nTandoori
Chicken\t\t\t{[Link]()}\t\t\t{pprice} Rs ')
if [Link]()!='0':
[Link](END,f'\nGrilled
Chicken\t\t\t{[Link]()}\t\t\t{qprice} Rs ')
if [Link]()!='0':
[Link](END,f'\nSchezwan
Chicken\t\t\t{[Link]()}\t\t\t{rprice} Rs ')
if [Link]()!='0':
[Link](END,f'\nEgg
Curry\t\t\t{[Link]()}\t\t\t{sprice} Rs ')
if [Link]()!='0':
[Link](END,f'\nFish
Curry\t\t\t{[Link]()}\t\t\t{tprice} Rs ')
if [Link]()!='0':
[Link](END,f'\nBread
Halwa\t\t\t{[Link]()}\t\t\t{uprice} Rs ')
if [Link]()!='0':
[Link](END,f'\nVanilla
Frosting\t\t\t{[Link]()}\t\t\t{vprice} Rs ')
if [Link]()!='0':
[Link](END,f'\nKulfi\t\t\t{[Link]()}\t\t\t{wprice} Rs ')
if [Link]()!='0':
[Link](END,f'\nApple
Pie\t\t\t{[Link]()}\t\t\t{xprice} Rs ')
if [Link]()!='0':
[Link](END,f'\nChocolate
Brownie\t\t\t{[Link]()}\t\t\t{yprice} Rs ')
if [Link]()!='0':
[Link](END,f'\nPumpkin
Cupcakes\t\t\t{[Link]()}\t\t\t{zprice} Rs ')
if [Link]()!='0':
[Link](END,f'\nChocolate
Cake\t\t\t{[Link]()}\t\t\t{a1price} Rs ')
if [Link]()!='0':
[Link](END,f'\nBanana
Bars\t\t\t{[Link]()}\t\t\t{a2price} Rs ')
if [Link]()!='0':
[Link](END,f'\nChoco
Truffle\t\t\t{[Link]()}\t\t\t{a3price} Rs ')
if [Link]()!='0':
[Link](END,f'\nRed
Velvet\t\t\t{[Link]()}\t\t\t{a4price} Rs ')
[Link](END,'\n---------------------------------------------------------
')
totalbill=[Link]()
[Link](END,f'\n\tTotalBill\t\t\t\t{totalbill}',)
[Link](END,'\n---------------------------------------------------------
')
corc=[Link]()
if [Link]()!='':
[Link](END,f'\nMode Of Payment: \t\t{corc}')
[Link](END,'\n---------------------------------------------------------
')
[Link](END,'\n\t\tThankyou For Dining With Us :)')
[Link](state='disabled')
#*******************************************************************************
********
#deleting all the values in he entryfields after clicking of clear
button
def clear_():##deffining the clear button as follows
[Link](0,END)
[Link](0,END)
[Link](0,END)
[Link](0,END)
[Link](0,END)
[Link](0,END)
[Link](0,END)
[Link](0,END)
[Link](0,END)
[Link](0,END)
[Link](0,END)
[Link](0,END)
[Link](0,END)
[Link](0,END)
[Link](0,END)
[Link](0,END)
[Link](0,END)
[Link](0,END)
[Link](0,END)
[Link](0,END)
[Link](0,END)
[Link](0,END)
[Link](0,END)
[Link](0,END)
[Link](0,END)
[Link](0,END)
[Link](0,END)
[Link](0,END)
[Link](0,END)
[Link](0,END)
[Link](state='normal')
[Link](0,END)
[Link](state='disabled')
##deleting the text written on the text area after clicking the
clear button
[Link](state='normal')
[Link](1.0,END)
[Link](state='disabled')
##deleting the text written on the entryfields of dt after clicking
the clear button
[Link](state='normal')
[Link](0,END)
[Link](state='disabled')
[Link](state='normal')
[Link](0,END)
[Link](state='disabled')
[Link](state='normal')
[Link](0,END)
[Link](state='disabled')
[Link](state='normal')
[Link](0,END)
[Link](state='disabled')
##again we are inserting the value 0
[Link](0,0)
[Link](0,0)
[Link](0,0)
[Link](0,0)
[Link](0,0)
[Link](0,0)
[Link](0,0)
[Link](0,0)
[Link](0,0)
[Link](0,0)
[Link](0,0)
[Link](0,0)
[Link](0,0)
[Link](0,0)
[Link](0,0)
[Link](0,0)
[Link](0,0)
[Link](0,0)
[Link](0,0)
[Link](0,0)
[Link](0,0)
[Link](0,0)
[Link](0,0)
[Link](0,0)
[Link](0,0)
[Link](0,0)
[Link](0,0)
[Link](0,0)
[Link](0,0)
[Link](0,0)
#*******************************************************************************
******
def close_():
[Link]()
def print_():
if [Link](1.0,END)=='\n':
[Link]('Error','Bill Is Empty')
else:
file=[Link]('.txt')
open(file,'w').write([Link](1.0,END))
[Link](file,'print')
# initialize database
init_db()
win=[Link]()
[Link]('Restaurant Billing System') ##giving title for the new
window
[Link](bg='#FAF3E0') ##bg colour for window
[Link]('1319x634') #giving geometry for the new window length x
bregth
[Link](0,0) ##dont want to maximize the window
#*******************************************************************************
********************
def aclick(event):
[Link]('Message','Chicken Rolls - 50.00 Rs')
def bclick(event):
[Link]('Message','Chicken Burger - 150.00 Rs')
def cclick(event):
[Link]('Message','Chicken Fries - 85.00 Rs')
def dclick(event):
[Link]('Message','Bread Omelette - 35.00')
def eclick(event):
[Link]('Message','Meat Balls - 160.00 Rs')
def fclick(event):
[Link]('Message','Chicken Manchurian - 190.00 Rs')
def gclick(event):
[Link]('Message','Chilli Prawns - 210.00 Rs')
def hclick(event):
[Link]('Message','Fish Fries - 150.00 Rs')
def iclick(event):
[Link]('Message','Special Shawarma - 90.00 Rs')
def jclick(event):
[Link]('Message','Soups - 60.00 Rs')
def kclick(event):
[Link]('Message','Chicken Biriyani - 200.00 Rs')
def lclick(event):
[Link]('Message','Mutton Biriyani - 350.00 Rs')
def mclick(event):
[Link]('Message','Fish Biriyani - 210.00 Rs')
def nclick(event):
[Link]('Message','Prawn Biriyani - 350.00 Rs')
def oclick(event):
[Link]('Message','Butter Chicken - 250.00 Rs')
def pclick(event):
[Link]('Message','Tandoori Chicken - 370.00 Rs')
def qclick(event):
[Link]('Message','Grilled Chicken - 400.00 Rs')
def rclick(event):
[Link]('Message',' Schezwan Chicken - 300.00 Rs')
def sclick(event):
[Link]('Message',' Egg Curry - 250.00 Rs')
def tclick(event):
[Link]('Message',' Fish Curry - 250.00 Rs')
def uclick(event):
[Link]('Message',' Bread Halwa - 100.00 Rs')
def vclick(event):
[Link]('Message','Vanilla Frosting - 250.00 Rs')
def wclick(event):
[Link]('Message',' Kulfi - 70.00 Rs')
def xclick(event):
[Link]('Message',' Apple Pie - 230.00 Rs')
def yclick(event):
[Link]('Message',' Chocolate Brownie - 130.00 Rs')
def zclick(event):
[Link]('Message',' Pumpkin Cupcakes - 70.00 Rs')
def a1click(event):
[Link]('Message',' Chocolate Cake - 350.00 Rs')
def a2click(event):
[Link]('Message',' Banana Bars - 80.00 Rs')
def a3click(event):
[Link]('Message',' Choco Truffle - 250.00 Rs')
def a4click(event):
[Link]('Message',' Red Velvet - 250.00 Rs')
##copied from chatGPT
#*******************************************************************************
********************************
##adding of chiken spring roll in starters frame
##a(chicken)
aLabel=Label(startersFrame, text="Chicken Rolls"
, font=("times new roman", 17, 'bold'))
[Link](fg='#FAF3E0') ##foreground colour
[Link](bg='dark blue') ##background colour
[Link](row=0,column=0) ##positioning
[Link]('<Button-1>',aclick)
aEntry=Entry(startersFrame, validate="key",
validatecommand=vcmd,width=5,bd='3') ##entry field
[Link](0,0) ##inserting '0' after clicking the button clear
[Link](row=0,column=1) ##positioning into the startersframe
##acheck=[Link](startersFrame)
##[Link](row=0,column=0)
##adding of burger in starters frame
##b(burger)
bLabel=Label(startersFrame, text="Chicken Burger"
, font=("times new roman", 17, 'bold',))
[Link](fg='#FAF3E0') ## foreground colour
[Link](bg='dark blue') ##background colour
[Link](row=1,column=0) #positioning
[Link]('<Button-1>',bclick)
bEntry=Entry(startersFrame, validate="key",
validatecommand=vcmd,width=5,bd='3') ##entry field
[Link](0,0) ##inserting '0' after clicking the button clear
[Link](row=1,column=1) ##positioning into the startersframe
##adding of Chicken Fries in starters frame
##c(Chicken Fries)
cLabel=Label(startersFrame, text="Chicken Fries"
, font=("times new roman", 17, 'bold',))
[Link](fg='#FAF3E0') ##foreground colour
[Link](bg='dark blue') ##background colour
[Link](row=2,column=0) #positioning
[Link]('<Button-1>',cclick)
cEntry=Entry(startersFrame, validate="key",
validatecommand=vcmd,width=5,bd='3') ##entry field
[Link](0,0) ##inserting '0' after clicking the button clear
[Link](row=2,column=1) ##positioning into the startersframe
##adding of bread omllette in starters frame
##d(bread omellete)
dLabel=[Link](startersFrame, text="Bread Omellette"
, font=("times new roman", 17, 'bold',))
[Link](fg='#FAF3E0') ##foreground colour colour
[Link](bg='dark blue') ##background colour
[Link](row=3,column=0) #positioning
[Link]('<Button-1>',dclick)
dEntry=Entry(startersFrame, validate="key",
validatecommand=vcmd,width=5,bd='3') ##entry field
[Link](0,0) ##inserting '0' after clicking the button clear
[Link](row=3,column=1) ##positioning into the startersframe
##adding of meat balls in starters frame
##e(meat balls)
eLabel=Label(startersFrame, text="Meat Balls "
, font=("times new roman", 17, 'bold',))
[Link](fg='#FAF3E0') ##foreground colour colour
[Link](bg='dark blue') ##background colour
[Link](row=4,column=0) #positioning
[Link]('<Button-1>',eclick)
eEntry=Entry(startersFrame, validate="key",
validatecommand=vcmd,width=5,bd='3') ##entry field
[Link](0,0) ##inserting '0' after clicking the button clear
[Link](row=4,column=1) ##positioning into the startersframe
##adding of chicken manchurian in starters frame
##f(chicken manchurian)
fLabel=Label(startersFrame, text="Chicken Manchurian "
, font=("times new roman", 17, 'bold',))
[Link](fg='#FAF3E0') ##foreground colour colour
[Link](bg='dark blue') ##background colour
[Link](row=5,column=0) #positioning
[Link]('<Button-1>',fclick)
fEntry=Entry(startersFrame, validate="key",
validatecommand=vcmd,width=5,bd='3') ##entry field
[Link](0,0) ##inserting '0' after clicking the button clear
[Link](row=5,column=1) ##positioning into the startersframe
#*********************** D E S E R T F R A M E
*********************#
##making a frame3 for dessert
dessertFrame=LabelFrame(dish1frame, text="Dessert"
, font=("segoe script", 21, 'bold',))
[Link](fg='yellow') ##foreground colour
[Link](bg='dark blue') ##background colour
[Link](row=0,column=2,padx=3) #positioning
##adding of bread halwa in main course frame
##u(breadhalwa)
uLabel=Label(dessertFrame, text="Bread Halwa "
, font=("times new roman", 17, 'bold',))
[Link](fg='#FAF3E0') ##foreground colour colour
[Link](bg='dark blue') ##background colour
[Link](row=0,column=0) #positioning
[Link]('<Button-1>',uclick)
uEntry=Entry(dessertFrame, validate="key",
validatecommand=vcmd,width=5,bd='3') ##entry field
[Link](0,0) ##inserting '0' after clicking the button clear
[Link](row=0,column=1) ##positioning into the dessertsframe
##adding of Vanilla Frosting in main course frame
##v(chocolate Cake With Vanilla Frosting
vLabel=Label(dessertFrame, text="Vanilla Frosting "
, font=("times new roman", 17, 'bold',))
[Link](fg='#FAF3E0') ##foreground colour colour
[Link](bg='dark blue') ##background colour
[Link](row=1,column=0) #positioning
[Link]('<Button-1>',vclick)
vEntry=Entry(dessertFrame, validate="key",
validatecommand=vcmd,width=5,bd='3') ##entry field
[Link](0,0) ##inserting '0' after clicking the button clear
[Link](row=1,column=1) ##positioning into the dessertframe)
##adding of kulfi in main course frame
##w(kulfi)
wLabel=Label(dessertFrame, text="Kulfi "
, font=("times new roman", 17, 'bold',))
[Link](fg='#FAF3E0') ##foreground colour colour
[Link](bg='dark blue') ##background colour
[Link](row=2,column=0) #positioning
[Link]('<Button-1>',wclick)
wEntry=Entry(dessertFrame, validate="key",
validatecommand=vcmd,width=5,bd='3') ##entry field
[Link](0,0) ##inserting '0' after clicking the button clear
[Link](row=2,column=1) ##positioning into the dessertframe
##adding of apple pie in main course frame
##x(apple pie)
xLabel=Label(dessertFrame, text="Apple Pie "
, font=("times new roman", 17, 'bold',))
[Link](fg='#FAF3E0') ##foreground colour colour
[Link](bg='dark blue') ##background colour
[Link](row=3,column=0) #positioning
[Link]('<Button-1>',xclick)
xEntry=Entry(dessertFrame, validate="key",
validatecommand=vcmd,width=5,bd='3') ##entry field
[Link](0,0) ##inserting '0' after clicking the button clear
[Link](row=3,column=1) ##positioning into the dessertframe
##adding of chocolate brownie in main course frame
##y(cbrownie)
yLabel=Label(dessertFrame, text="Chocolate brownie "
, font=("times new roman", 17, 'bold',))
[Link](fg='#FAF3E0') ##foreground colour colour
[Link](bg='dark blue') ##background colour
[Link](row=4,column=0) #positioning
[Link]('<Button-1>',yclick)
yEntry=Entry(dessertFrame, validate="key",
validatecommand=vcmd,width=5,bd='3') ##entry field\
[Link](0,0) ##inserting '0' after clicking the button clear
[Link](row=4,column=1) ##positioning into the dessertframe
##adding of Pumpkin cupcakes in main course frame
##z(Pumpkin cupcakes)
zLabel=Label(dessertFrame, text="Pumpkin Cupcakes "
, font=("times new roman", 17, 'bold',))
[Link](fg='#FAF3E0') ##foreground colour colour
[Link](bg='dark blue') ##background colour
[Link](row=5,column=0) #positioning
[Link]('<Button-1>',zclick)
zEntry=Entry(dessertFrame, validate="key",
validatecommand=vcmd,width=5,bd='3') ##entry field
[Link](0,0) ##inserting '0' after clicking the button clear
[Link](row=5,column=1) ##positioning into the dessertframe)
##adding of chocolate cake in main course frame
##a1(chocolate cake)
a1Label=Label(dessertFrame, text="Chocolate Cake "
, font=("times new roman", 17, 'bold',))
[Link](fg='#FAF3E0') ##foreground colour colour
[Link](bg='dark blue') ##background colour
[Link](row=6,column=0) #positioning
[Link]('<Button-1>',a1click)
a1Entry=Entry(dessertFrame, validate="key",
validatecommand=vcmd,width=5,bd='3') ##entry field
[Link](0,0) ##inserting '0' after clicking the button clear
[Link](row=6,column=1) ##positioning into the dessertframe)
##adding of Banana bars in main course frame
##a2(Banana bars)
a2Label=Label(dessertFrame, text="Banana Bars "
, font=("times new roman", 17, 'bold',))
[Link](fg='#FAF3E0') ##foreground colour colour
[Link](bg='dark blue') ##background colour
[Link](row=7,column=0) #positioning
[Link]('<Button-1>',a2click)
a2Entry=Entry(dessertFrame, validate="key",
validatecommand=vcmd,width=5,bd='3') ##entry field
[Link](0,0) ##inserting '0' after clicking the button clear
[Link](row=7,column=1) ##positioning into the dessertframe)
##adding of choco truffle in main course frame
##a3(choco truffle)
a3Label=Label(dessertFrame, text="Choco Truffle "
, font=("times new roman", 17, 'bold',))
[Link](fg='#FAF3E0') ##foreground colour colour
[Link](bg='dark blue') ##background colour
[Link](row=8,column=0) #positioning
[Link]('<Button-1>',a3click)
a3Entry=Entry(dessertFrame, validate="key",
validatecommand=vcmd,width=5,bd='3') ##entry field
[Link](0,0) ##inserting '0' after clicking the button clear
[Link](row=8,column=1) ##positioning into the dessertframe)
##adding of red velvet in main course frame
##a4(red velvet)
a4Label=Label(dessertFrame, text="Red Velvet "
, font=("times new roman", 17, 'bold',))
[Link](fg='#FAF3E0') ##foreground colour colour
[Link](bg='dark blue') ##background colour
[Link](row=9,column=0) #positioning
[Link]('<Button-1>',a4click)
a4Entry=Entry(dessertFrame, validate="key",
validatecommand=vcmd,width=5,bd='3') ##entry field
[Link](0,0) ##inserting '0' after clicking the button clear
[Link](row=9,column=1,padx=5) ##positioning into the
dessertframe)
#********************* B I L L I N G A R E A
**********************
##making billframe
billframe=Frame(dish1frame)
[Link](row=0,column=3,padx='5',sticky='s')
##making bilarealabel inside the billfframe
billarealabel=Label(billframe ,text="C u s t o m e r B i l l"
, font=("Courier New", 17, 'bold'),bg='dark
blue',fg='yellow')
[Link](bg='dark blue')
[Link](bd='8')
[Link](relief='groove')
[Link]()
##making sccroolbar in billframe
scrollbar=Scrollbar(billframe,orient='vertical')##placiing scroolbar in
vertical
[Link](side='right',fill='y')##positioning at right side to the
text area
##making textarea in billframe
textarea=Text(billframe,height=16,width=57,yscrollcommand=[Link],state='d
isabled')
[Link]()
##configuring scrollbar too view text
[Link](command=[Link])
billnoframe=LabelFrame(dish1frame,bd='8',bg='dark blue')
[Link](row=0,column=3,sticky='n')
billnolabel=Label(billnoframe,text=' Bill Number : '
,font=('segoe script',13,'bold'),fg='yellow',bg='dark
blue',bd='1')
[Link](row=0,column=0)
billnoEntry=Entry(billnoframe,width=5,font=('arial',12),bd='5')
[Link](state='disabled')
[Link](row=0,column=1,padx=20)
space=Label(billnoframe,text='
',bg='dark blue')
[Link](row=0,column=2)
##making a labelframe for bil menu
##bm(billmenu)
bmFrame=LabelFrame(win, text=""
, font=("times new roman", 21, 'bold',))
[Link](fg='yellow') ##foreground colour
[Link](bg='dark blue') ##background colour
[Link](bd='7') ## border size
[Link](fill='both',padx=7,pady=7) #positioning
##adding of total price in frame
##tot(total price)
totprice=Label(bmFrame, text="Total Price : "
, font=("segoe script", 25, 'bold',))
[Link](fg='yellow') ##foreground colour colour
[Link](bg='dark blue') ##background colour
[Link](row=0,column=0,padx=15) #positioning
totEntry=Entry(bmFrame,font=('arial',28),width=12,bd='5') ##entry
field
[Link](state='disabled')
[Link](row=0,column=1,padx=10,pady=5) ##positioning
##adding of total price in frame
##mod(mod of pyment)
modpay=Label(bmFrame, text="Mode Of Payment : "
, font=("segoe script", 18, 'bold',))
[Link](fg='yellow') ##foreground colour colour
[Link](bg='dark blue') ##background colour
[Link](row=0,column=2,padx=5) #positioning
def cash_():
[Link](state='normal')
[Link](0,END)
[Link](0,'CASH')
[Link](state='disabled')
##creating total button
cashbutton=Button(bmFrame, text="Cash"
, font=("times new roman", 17, 'bold',))
[Link](fg='#FAF3E0') ##foreground colour colour
[Link](bg='dark blue') ##background colour
[Link](bd='5')
[Link](width='5')
[Link](command=cash_)
[Link](row=0,column=3,pady=5,)
def card_():
[Link](state='normal')
[Link](0,END)
[Link](0,'CARD')
[Link](state='disabled')
##creating total button
cardbutton=Button(bmFrame, text="Card"
, font=("times new roman", 17, 'bold',))
[Link](fg='#FAF3E0') ##foreground colour colour
[Link](bg='dark blue') ##background colour
[Link](command=card_)
[Link](row=0,column=4,padx=35,pady=5)
def upi_():
[Link](state='normal')
[Link](0,END)
[Link](0,'UPI')
[Link](state='disabled')
##creating total button
upibutton=Button(bmFrame, text="UPI"
, font=("times new roman", 17, 'bold',))
[Link](bd='5')
[Link](width='5')
[Link](fg='#FAF3E0') ##foreground colour colour
[Link](bg='dark blue') ##background colour
[Link](bd='5')
[Link](width='5')
[Link](command=upi_)
[Link](row=0,column=5,pady=5,)
#*******************************************************************************
***********
[Link](state='disabled')
[Link](row=0,column=6,padx=37,pady=5) ##positioning
dateEntry=Entry(buttonframe,font=('arial',17),width=7,bd='5',state='disabled')
##entry field
[Link](row=1,column=6,pady=6) ##positioning
timeEntry=Entry(buttonframe,font=('arial',17),width=10,bd='5',state='disabled')
##entry field
[Link](row=2,column=6,pady=6,padx=10) ##positioning
#*******************************************************************************
******
##for looping
[Link]()
else:
[Link]('Error','Please Enter The Correct Credentials')
def close():
[Link]()
window=Tk()
[Link]('700x500+330+100')
[Link]('Login Page') ##giving title for the new window
[Link](bg='dark blue') ##bg colour for window
[Link](False,False)
loginlabel=Label(window,text='LOGIN',fg='yellow',bg='dark
blue',bd=7,relief="groove",font=("times new roman", 40, 'bold'))
[Link](fill='x')
loginframe=Frame(window,bg='dark blue',bd=7,relief="groove")
[Link](x=400,y=150)
[Link](fill='both')
usernamelabel=Label(loginframe,text='Username',fg='white',bg='dark
blue',font=("segoe script", 30, 'bold'))
[Link](row=0,column=0,ipadx=100,ipady=50,)
usernameentry=Entry(loginframe,width=15,font=('arial',17),bd=5)
[Link](row=0,column=1)
passwordlabel=Label(loginframe,text='Password',fg='white',bg='dark blue',
font=("segoe script", 30, 'bold'))
[Link](row=1,column=0,)
passwordentry=Entry(loginframe,width=15,font=('arial',17),bd=5)
[Link](row=1,column=1)
loginbutton=Button(loginframe,text='Login',fg='white',bg='dark blue',
font=("segoe script", 18, 'bold')
,bd=7,cursor='hand2',command=login)
[Link](row=2,column=0,ipadx=30,pady=45,columnspan=1)
closebutton=Button(loginframe,text='Close',fg='white',bg='dark blue',
font=("segoe script", 18, 'bold')
,bd=7,cursor='hand2',command=close)
[Link](row=2,column=1,ipadx=30,pady=45,columnspan=1)
[Link]()