0% found this document useful (0 votes)
12 views28 pages

Food Management

The Food and Services Management System is a Python application integrated with MySQL, aimed at enhancing the efficiency of ordering, billing, and payment processes in the hospitality industry. It features a user-friendly interface for customers to place orders and make secure payments, while allowing administrators to manage prices and monitor orders. The system is designed to improve operational efficiency and customer satisfaction, providing a comprehensive solution for food and service management.

Uploaded by

Kavitha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views28 pages

Food Management

The Food and Services Management System is a Python application integrated with MySQL, aimed at enhancing the efficiency of ordering, billing, and payment processes in the hospitality industry. It features a user-friendly interface for customers to place orders and make secure payments, while allowing administrators to manage prices and monitor orders. The system is designed to improve operational efficiency and customer satisfaction, providing a comprehensive solution for food and service management.

Uploaded by

Kavitha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

INDEX

S.no Content Page

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

The Food and Services Management System is a sophisticated Python application


integrated with MySQL, designed to streamline various processes in the hospitality and
service industries. The system enhances the efficiency of ordering, billing, and payment
processes for food, beverages, and services such as door delivery and party arrangements.
Through an intuitive user interface, customers can easily place orders, view menus, and
make secure payments, thereby improving the overall customer experience. Authorized
administrators have the exclusive ability to modify prices for items and services, allowing
for real-time adjustments based on market conditions or specific business needs. This
feature is crucial for maintaining competitive pricing and adapting quickly to market
changes, ensuring that the business remains agile and responsive.

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 is an interpreted, high-level, general-purpose programming language.


Created by Guido van Rossum and first released in 1991, Python's design philosophy
emphasizes code readability with its notable use of significant whitespace. Its language
constructs and object-oriented approach aim to help programmers write clear, logical code
for small and large-scale projects.

Python is dynamically typed and garbage-collected. It supports multiple


programming paradigms, including procedural, object-oriented, and functional
programming. Python is often described as a "batteries included" language due to its
comprehensive standard library.

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.

In addition to built-in functions, a large number of pre-defined functions are also


available as a part of libraries bundled with Python distributions. These functions are
defined in modules. A module is a file containing definitions of functions, classes,
variables, constants or any other Python objects. Contents of this file can be made available
to any other program.

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.

 Overview of MySQL Concept:

MySQL is a Relational Database Management System (RDBMS) whereas the


Structured Query Language (SQL) is the language used for handling the RDBMS using
commands, i.e. Creating, Inserting, Updating and Deleting the data from the databases.
SQL commands are case insensitive, i.e. CREATE and create signify the same command.
1.2.3.1 Some Functions of MySQL:

 mysql.connector.connect():This method sets up a connection, establishing a


session with the MySQL server.

 mysqlconnection.cursor():This method returns a MySQLCursor() object,or a


subclass of it depending on the passed arguments. The returned object is a
cursor.CursorBase instance.

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:

 Order Management: Customers can browse through a catalog of food items,


beverages, and services, select items for their order, and specify delivery details if
applicable.

 Billing and Payment: Seamless integration with payment gateways allows


customers to pay securely through credit/debit cards, digital wallets, or other
preferred methods.

 Menu and Price Management: Authorized personnel, typically administrators,


can manage and update the menu items and prices dynamically through the MySQL
database. This ensures that changes in pricing or availability are reflected instantly
across the platform.

 Administration Dashboard: An intuitive dashboard for administrators allows


them to monitor orders in real-time, analyze sales trends, and generate reports for
business insights and decision-making.

 Scalability and Flexibility: Built on a scalable architecture, the system


accommodates future expansion and additional features such as customer loyalty
programs or promotional discounts.

8
Software & Hardware Requirement

 Operating System: Windows 7, 8 and 10.


 Processor: Dual Core 1.4GHz Processor
 RAM: Minimum 1 GB
 Hard Disk Space: Minimum 750MB space required.
 Software: Python 3.7.0, MySQL 5.5

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()

print(" 1.UPI \n 2.Credit Card \n 3.Debit Card \n 4.Cancel Order \n ")


ch=int(input("Enter your choice"))
if ch==1:
from PIL import Image
img=Image.open(r'qrcode.png')
img.show()
pay=input("Enter PAY to check out:")
if pay.lower()=='pay':
print("Order Placed Succesfully!!!")
print("Estimated time",random.randint(10,20),'minutes')
elif ch==2:
while True:
print()
cno=input("Enter the card number:")
cname=input("Enter the name on card:")
cdate=input("Enter the card's expiry date (YY-MM):")
ccvv=int(input("Enter 3-digit CVV number:"))
c=(cno,cname,cdate,ccvv)
con=my.connect(host='localhost',user='root',passwd='12345',database='project')
cur=con.cursor()
cur.execute("select * from payment")
fet=cur.fetchall()

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")

print("*"*24+"FLAVORZ FOOD ORDERING SYSTEM "+"*"*24+"\n")


def main():
while True:
print()
print("*"*35+ " MAIN MENU "+"*" *39+"\n")
print(" 1.Order \n 2.Bill \n 3.Payment \n 4.Add Item \n 5.Modify Item \n
6.Exit \n")

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.

 System is so much flexible so in nature it can increase easily and new


modules can be added easily.

 You can add new food items as well as update the price of items according to
its market price.

27
BIBLIOGRAPHY

 Computer Science with Python Class 12-Sumita Arora.


 www.wikipedia.com
 www.w3schools.com
 www.geeksforgeeks.org
 www.knowledgeboat.com

28

You might also like