Food Management
Food Management
1 Synopsis 2
2 Abstract 3
3 Introduction 4
4 Objectives 7
5 Functions 8
6 Software & Hardware Requirement 9
7 Source code 10
8 Output 20
9 MySQL tables 25
10 Future scope 27
11 Bibliography 28
1
SYNOPSIS
Moreover, the system provides customers with estimated delivery times, enhancing their
experience by setting clear expectations for service. While it does not include order
tracking, this feature helps manage customer expectations and improves communication.
The automation of customer interactions significantly reduces the manual workload for
staff and minimizes the potential for errors. Robust security measures are integrated into
the system to protect sensitive customer data and financial transactions, ensuring that all
interactions are conducted in a secure environment. By providing a comprehensive solution
that optimizes operations and enhances customer satisfaction, the Food and Services
Management System offers a seamless and secure experience for both customers and
internal staff in the hospitality and service sectors.
2
ABSTRACT
The Food and Services Management System is a comprehensive, Python-based application
integrated with MySQL, designed to streamline the processes of ordering, billing, and
payment for food, beverages, and various services such as door delivery and party
arrangements. This system offers a user-friendly interface that allows customers to browse
menus, place orders, and complete transactions securely online. It incorporates robust
security measures to protect sensitive customer data and financial transactions. The
primary goal of the Food and Services Management System is to enhance operational
efficiency, improve customer satisfaction, and support business growth within the
hospitality and service sectors. By leveraging the capabilities of Python programming and
MySQL database management, the system provides a reliable and efficient solution for
managing food and service orders seamlessly.
3
INTRODUCTION
About python:
Python was conceived in the late 1980s as a successor to the ABC language. Python
2.0, released in 2000, introduced features like list comprehensions and a garbage collection
system capable of collecting reference cycles. Python 3.0, released in 2008, was a major
revision of the language that is not completely backward-compatible, and much Python 2
code does not run unmodified on Python 3.
The Python 2 language, i.e. Python 2.7.x, is "sunsetting" on January 1, 2020 (after
extension; first planned for 2015), and the Python team of volunteers will not fix security
issues, or improve it in other ways after that date. With the end-of-life, only Python 3.5.x
and later will be supported.
Python interpreters are available for many operating systems. A global community
of programmers develops and maintains CPython, an open source reference
implementation. A non-profit organization, the Python Software Foundation, manages and
directs resources for Python and CPython development.
4
Overview of Python modules:
The Python interpreter has a number of built-in functions. They are loaded
automatically as the interpreter starts and are always available. For example, print() and
input() for I/O, number conversion functions int(),float(),complex(), data type conversions
list(),tuple(), set(), etc.
Built-in modules are written in C and integrated with the Python interpreter. Each
built-in module contains resources for certain system-specific functionalities such as OS
management, disk IO, etc. The standard library also contains many Python scripts (with
the .py extension) containing useful utilities.
5
mysqlcursor.execution():This method executes the given database operation
(query or command). The parameters found in the tuple or dictionary params are bound
to the variables in the operation.
6
OBJECTIVES
The primary objective of this project is to streamline the process of ordering, billing, and
paying for food items and beverages, providing a seamless and efficient customer
experience. Additionally, the system offers comprehensive services for party
arrangements, catering to various event needs. Although it does not include order tracking
or inventory management, it enhances customer satisfaction by providing accurate
estimated times of arrival for orders. By integrating Python with MySQL, the project
ensures robust data management and a user-friendly interface, aiming to improve
operational efficiency and customer service in the food and beverage industry.
7
FUNCTIONS
Key features:
8
Software & Hardware Requirement
9
SOURCE CODE
import mysql.connector as my
from datetime import datetime
import random
bi=[]
def otherser():
con=my.connect(host='localhost',user='root',passwd='12345',database='project')
cur=con.cursor()
while True:
print()
cur.execute("select * from services")
fet=cur.fetchall()
for i in fet:
for j in i:
print(j,end='\t')
print()
print()
print()
a=int(input("Enter the SNo of item to order:"))
if a>0 and a<6:
print(fet[a-1][1],fet[a-1][2])
c=int(fet[a-1][2][3:])
e=[fet[a-1][1],fet[a-1][2],1,c]
bi.append(e)
print("Successfully Ordered!")
print(" 1.Next order \n 2.Main Menu \n ")
d=int(input("Enter your choice:"))
if d==1:
pass
elif d==2:
break
else:
print()
10
print("Invalid SNo of item")
def food():
con=my.connect(host='localhost',user='root',passwd='12345',database='project')
cur=con.cursor()
while True:
print()
cur.execute("select * from foodname")
fet=cur.fetchall()
for i in fet:
for j in i:
print(j,end='\t')
print()
print()
print()
a=int(input("Enter the SNo of item to order:"))
if a>0 and a<26:
print(fet[a-1][1],fet[a-1][2])
b=int(input("How much do you want to order?"))
c=int(fet[a-1][2][3:])
e=[fet[a-1][1],fet[a-1][2],b,c*b]
bi.append(e)
print("Successfully Ordered!")
print(" 1.Next order \n 2.Main Menu \n ")
d=int(input("Enter your choice:"))
if d==1:
pass
elif d==2:
break
else:
print()
print("Invalid SNo of item")
def beverages():
con=my.connect(host='localhost',user='root',passwd='12345',database='project')
cur=con.cursor()
while True:
11
print()
cur.execute("select * from beverages")
fet=cur.fetchall()
for i in fet:
for j in i:
print(j,end='\t')
print()
print()
print()
a=int(input("Enter the SNo of item to order:"))
if a>0 and a<11:
print(fet[a-1][1],fet[a-1][2])
b=int(input("How much do you want to order?"))
c=int(fet[a-1][2][3:])
e=[fet[a-1][1],fet[a-1][2],b,c*b]
bi.append(e)
print("Successfully Ordered!")
print(" 1.Next order \n 2.Main Menu \n ")
d=int(input("Enter your choice:"))
if d==1:
pass
elif d==2:
break
else:
print()
print("Invalid SNo of item")
def desserts():
con=my.connect(host='localhost',user='root',passwd='12345',database='project')
cur=con.cursor()
while True:
print()
cur.execute("select * from desserts")
fet=cur.fetchall()
for i in fet:
for j in i:
print(j,end='\t')
12
print()
print()
print()
a=int(input("Enter the SNo of item to order:"))
if a>0 and a<11:
print(fet[a-1][1],fet[a-1][2])
b=int(input("How much do you want to order?"))
c=int(fet[a-1][2][3:])
e=[fet[a-1][1],fet[a-1][2],b,c*b]
bi.append(e)
print("Successfully Ordered!")
print(" 1.Next order \n 2.Main Menu \n ")
d=int(input("Enter your choice:"))
if d==1:
pass
elif d==2:
break
else:
print()
print("Invalid SNo of item")
def bill(bi):
print("*"*24+"FLAVORZ"+"*"*24+'\n')
c=datetime.now()
ct=c.strftime('%H:%M:%S')
print("Order date and time",c,'\n')
top=['Item Name','Rate','Qty','Amt']
for i in top:
print(i,end='\t'+'|')
print()
print('-'*70)
t=0
for i in bi:
t+=i[-1]
for j in i:
print(j,end='\t'+'|')
print()
13
print("*"*61)
print(" GRAND TOTAL:",t)
print("*"*61+'\n')
def payment():
print("*"*27+" PAYMENT PORTAL "+"*"*27+"\n")
print()
print("*"*23+" DETAILS"+"*"*23+"\n")
name=input("Enter your name:")
adr=input("Enter delivery address:")
mob=int(input("Enter mobile number:"))
print()
print("*"*16+" MODE OF PAYMENT"+"*"*16+"\n")
print()
14
if c in fet:
print()
pay=input("Enter PAY to check out:")
if pay.lower()=='pay':
print("Order Placed Succesfully!!!")
print("Estimated time",random.randint(10,20),'minutes')
break
else:
print("Invalid credentials")
elif ch==3:
while True:
print()
dno=input("Enter the card number:")
dname=input("Enter the name on card:")
ddate=input("Enter the card's expiry date (YY-MM):")
dcvv=input("Enter 3-digit CVV number:")
d=(dno,dname,ddate,dcvv)
con=my.connect(host='localhost',user='root',passwd='12345',database='project')
cur=con.cursor()
cur.execute("select * from payment")
fet=list(cur.fetchall())
if d in fet:
print()
pay=input("Enter PAY to check out:")
if pay.lower()=='pay':
print("Order Placed Succesfully!!!")
print("Estimated time",random.randint(10,20),'minutes')
break
else:
print("Invalid credentials")
elif ch==4:
pass
def additem():
con=my.connect(host='localhost',user='root',passwd='12345',database='project')
cur=con.cursor()
print()
15
us=['Nadin','Aadil','Akchith']
nam=input("Enter username:")
pas=input("Enter login password:")
if pas=='FLAVORZ10' and nam in us:
print()
print(" 1.Other Services \n 2.Food \n 3.Beverages \n 4.Desserts \n")
ro=int(input("Enter your choice"))
if ro==1:
sno=int(input("Enter S.No of the product:"))
name=input("Enter product name:")
pri=input("Enter price:")
pric='Rs.'+pri
cur.execute("insert into services values({},'{}','{}')".format(sno,name,pric))
con.commit()
print()
print("ITEM ADDED SUCCESSFULLY !!!")
elif ro==2:
sno=int(input("Enter S.No of the product:"))
name=input("Enter product name:")
pri=input("Enter price:")
pric='Rs.'+pri
cur.execute("insert into foodname values({},'{}','{}')".format(sno,name,pric))
con.commit()
print()
print("ITEM ADDED SUCCESSFULLY !!!")
elif ro==3:
sno=int(input("Enter S.No of the product:"))
name=input("Enter product name:")
pri=input("Enter price:")
pric='Rs.'+pri
cur.execute("insert into beverages values({},'{}','{}')".format(sno,name,pric))
con.commit()
print()
print("ITEM ADDED SUCCESSFULLY !!!")
elif ro==4:
sno=int(input("Enter S.No of the product:"))
name=input("Enter product name:")
16
pri=input("Enter price:")
pric='Rs.'+pri
cur.execute("insert into desserts values({},'{}','{}')".format(sno,name,pric))
con.commit()
print()
print("ITEM ADDED SUCCESSFULLY !!!")
else:
print()
print("INVALID INPUT")
else:
print()
print("INVALID CREDENTIALS")
def modifyitem():
con=my.connect(host='localhost',user='root',passwd='12345',database='project')
cur=con.cursor()
print()
us=['Nadin','Aadil','Akchith']
nam=input("Enter username:")
pas=input("Enter login password:")
if pas=='FLAVORZ10' and nam in us:
print()
print(" 1.Other Services \n 2.Food \n 3.Beverages \n 4.Desserts \n")
ro=int(input("Enter your choice"))
if ro==1:
name=input("Enter product name:")
pri=input("Enter updated price:")
pric='Rs.'+pri
cur.execute("update services set Price='{}' where
NameOfService='{}'".format(pric,name))
con.commit()
print()
print("ITEM UPDATED SUCCESSFULLY !!!")
elif ro==2:
name=input("Enter product name:")
pri=input("Enter updated price:")
pric='Rs.'+pri
17
cur.execute("update foodname set Price='{}' where
ItemName='{}'".format(pric,name))
con.commit()
print()
print("ITEM UPDATED SUCCESSFULLY !!!")
elif ro==3:
name=input("Enter product name:")
pri=input("Enter updated price:")
pric='Rs.'+pri
cur.execute("update beverages set Price='{}' where
ItemName='{}'".format(pric,name))
con.commit()
print()
print("ITEM UPDATED SUCCESSFULLY !!!")
elif ro==4:
name=input("Enter product name:")
pri=input("Enter updated price:")
pric='Rs.'+pri
cur.execute("update desserts set Price='{}' where
ItemName='{}'".format(pric,name))
con.commit()
print()
print("ITEM UPDATED SUCCESSFULLY !!!")
else:
print()
print("INVALID INPUT")
else:
print()
print("INVALID CREDENTIALS")
18
i1=int(input("Enter your choice"))
if i1==1:
print('\n',"*"*30+ " ORDER MENU "+"*" *30+"\n")
print(" 1.Other Services \n 2.Food \n 3.Beverages \n 4.Desserts \n")
i2=int(input("Enter your choice"))
if i2==1:
otherser()
elif i2==2:
food()
elif i2==3:
beverages()
elif i2==4:
desserts()
elif i1==2:
bill(bi)
elif i1==3:
payment()
elif i1==4:
additem()
elif i1==5:
modifyitem()
elif i1==6:
print()
print("THANK YOU , VISIT AGAIN !!!")
break
else:
print()
print("INVALID INPUT")
main()
19
Output
20
21
22
23
24
MYSQL TABLES
25
26
FUTURE SCOPE
In future our system can include accounting system, good backup and restore
facility.
You can add new food items as well as update the price of items according to
its market price.
27
BIBLIOGRAPHY
28