Item
Item
import pandas as pd
from datetime import date
item_file=r"E:\\XII-BRN-1\Newfolder\item_file.csv"
Customer_file=r"E:\\XII-BRN-1\Newfolder\customer_file.csv"
issueitems_file=r"E:\\XII-BRN-1\New folder\issueitems_file.csv"
print("WELCOME TO RESTAURANT MANAGEMENT SYSTEM")
#fuction to add new item
def additem():
item_id=int(input("Enter item id:"))
item_name=input("Enter item name:")
item_category=input("Enter item type:")
item_cost=float(input("Enter item cost:"))
pdf=pd.read_csv(item_file)
print(pdf)
n=pdf["item_id"].count()
pdf.loc[n]=[item_id,item_name,item_category,item_cost]
pdf.to_csv(item_file, index=False)
print("item added successfully")
print(pdf)
def showitems():
pdf = pd.read_csv(item_file)
print(pdf)
while True:
print("\nOptions:")
print("1. Add item:")
print("2. Search item:")
print("3. Delete item:")
print("4. Show item:")
print("5. Add New customer:")
print("6. Search customer:")
print("7. Delete customer:")
print("8. Show customer:")
print("9. Issue item:")
print("0. Exit")
ch = int(input("enter your choice : "))
if ch == 1:
additem()
elif ch == 2:
searchitem()
elif ch == 3:
deleteitem()
elif ch == 4:
showitems()
elif ch == 5:
addcustomer()
elif ch == 6:
searchcustomer()
elif ch == 7:
deletecustomer()
elif ch == 8:
showcustomer()
elif ch == 9:
issueitems()
elif ch == 0:
print("Thank you for using the digital store.Goodbye! ")
break
else:
print("Invalid choice. Please select a valid option.")
continue
MAIN MENU
WELCOME TO RESTAURANT MANAGEMENT SYSTEM
Options:
1. Add item:
2. Search item:
3. Delete item:
4. Show item:
5. Add New customer:
6. Search customer:
7. Delete customer:
8. Show customer:
9. Issue item:
0. Exit
ADD ITEM
enter your choice : 1
Enter item id:4
Enter item name:Pizza
Enter item type:Main Course
Enter item cost:110
Item added successfully
item_id item_name item_category item_cost
0 1 Garlic Bread Appetizer 80
1 2 Chocolate Brownie Dessert 90
2 3 Mango Smoothie Beverage 70
3 4 Pizza Main Course 110.0
CSV FILE-
SEARCH ITEM
enter your choice : 2
Enter an item id:2
item details are:
item_id item_name item_category item_cost
1 2 Chocolate Brownie Dessert 90.0
DELETE ITEM
enter your choice : 3
Enter a item id: 3
Item Deleted Successfully
item_id item_name item_category item_cost
0 1 Garlic Bread Appetizer 80.0
1 2 Chocolate Brownie Dessert 90.0
3 4 Pizza Main Course 110.0
SHOW ITEMS
enter your choice : 4
item_id item_name item_category item_cost
0 1 Garlic Bread Appetizer 80.0
1 2 Chocolate Brownie Dessert 90.0
2 4 Pizza Main Course 110.0
ADD CUSTOMERS
enter your choice : 5
Enter a customer id: c03
Enter customer name: Natasha
Enter phone number: 8050480504
enter number of items issued: 13
New customer added successfully
customer_id cname phoneno numberofitemsissued
0 c01 abhi 9765478965 7
1 c02 anish 7856543990 6
2 c03 Natasha 8050480504 13
SEARCH CUSTOMER
DELETE CUSTOMER
ISSUE ITEMS
enter your choice : 9
Enter item name: Pizza
Enter customer name: anish
Enter number of product issued: 4
item issued successfully
item_name cname dateofissue numberofitemsissued
0 Garlic Bread Natasha 2024-12-24 13
1 Pizza anish 2024-12-24 4
INVALID CHOICE