0% found this document useful (0 votes)
6 views

A Project Report cs

Uploaded by

jaikrit.sethi
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

A Project Report cs

Uploaded by

jaikrit.sethi
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 40

A Project Report

On
HARDWARE STORE
MANAGEMENT SYSTEM

For AISSCE 2024-25 Examination


As a part of the Computer Science Course (083)

Submitted by : Jaikrit Sethi


Class: XII- H
Roll Number: 12
CERTIFICATE

This is to certify that the Project entitled,


Hardware Store Management System is
a bonafide work done by Jaikrit Sethi of
class 12 H, Session 2024-25 in partial
fulfillment of CBSE’s AISSCE Examination
2023-24 and has been carried out under
my supervision and guidance.

…………………………… ……………………………
Signature of teacher guide Signature of teacher guide
Index

S.No CONTENTS PAGE NO.

1 Acknowledgement 4

2 Introduction 5-7

3 Setup Descriptions 8

4 Functions Used 9-14

5 Python Code

6 Output Screens

7 Bibliography
Acknowledgement

I would like to express my special thanks


of gratitude to my teacher Ms.
Deepshikha Sethi, who gave me this
golden opportunity to do this wonderful
project on the topic Hardware Store
Management System. This helped me in
doing a lot of research and I came to
know about so many new things. The
project would not have been completed
without her support and kind help.

Jaikrit Sethi
Introduction

Objectives of the Project

This software is designed for the particular


need of the store to carry out operations in a
smooth and effective manner.

Moreover, the software is supported to


eliminate and in some cases, reduce the
hardships faced by the existing system.

This project aims not just to streamline the


operations of hardware stores but to usher
them into a new era of digital competence and
customer satisfaction.
Advantages of the Project

1.Reduces the workload of the owner and the


salesman.
2.Makes it Easier for the customers to buy
products.
3.It is time efficient and customers do not have to
wait in line.
4.It also provides the bill hand to hand.
5.The owner can store the details of all the
products.

Limitations of the Project

1. This project lacks user login.


2. It does not store the previous
transactions of the customer.
System Requirements
 Hardware Specifications:
S.NO Name of Component Specifications
1. Processor Pentium IV+
2. Ram 128MB
3. Hard Disk 20GB
4. Monitor 15’’ Color monitor
5. Keyboard 122 Keys
6. Mouse Optical Mouse

 Software Specifications:
S.N Name of Component Specifications
O
1. Operation System Windows XP or
above Windows 8
2. IDE IDLE Python
3. Database MYSQL Server
4. Browser Chrome, Opera etc
5. Front End Python
6. Back End MYSQL
Setup Description

Main Menu

Owner Customer

ADD ITEM
SELECT ITEM
UPDATE ITEM
SELECT
QUANTITY
DELETE ITEM

TOTAL PRICE
CHECK SALES
WITH THE BILL
PRINTED
CHECK PROFIT
Modules Imported

1. Mysql Connector
A MySQL Connector is a software
component that enables interaction
between a MySQL database and python
allowing data exchange and manipulation.

2. Tkinter Import
Tkinter is python’s built in GUI (Graphical
User Interface) library. It is used import all
functions and built in modules in the
tkinter library.

3. Messagebox Module
This module is used to display message
boxes in the python application.
4. Partial function from the functools
modules
This module allows us to create new
functions by partially applying arguments
to an existing function.
FUNCTIONS USED IN CODE

Functions Name Function Use


ClearBotFrame() Clear widgets in
BotFrame.
ClearTopFrame() Clear widgets in
TopFrame.
ClearBill6Frame() Clear widgets ini
BillFrame.
ClearCurrItemInfo() Clear values in global
item state.
SetCurrItemInfo() To set values in global
item state
PrintCurrItemInfo() To print global item
state
GuiNewItemSave() To save new item in
database.
GuiItemUpdate() To update values of an
item in database
GuiItemDelete() To delete an item from
the database.
getItemDetail() To read item details
from database.
getItemSalesDetail() To get sales(total qty)
for an item.
getItemProfitDetail() To get total profit from
sales of an item.
addItem() To create UI form for
Add New Item.
updateItem() To create UI form for
Update Item.
deleteItem() To create UI form for
Delete Item.
checkInventory() To create UI Buttons to
let user Add/Update/
delete item.
checkFinanceSales() To create UI form to get
item no. for sales
details.
checkFinanceProfit() To create UI form to get
Item no. for profit
calculations.
checkFinance() To show UI Buttons to
let user check
Sales/Profit for items.
showAllItems() To show full inventory
in tabular form.
addItemToBill() To create UI to add a
given item into a Bill
table.
makeFinalPurchase() To make the final
purchase for items
added to bill.

PurchaseItems() Show Inventory and


create buill for final
purchase.
remove() To exit the app.

5.
Python Source Code

###########################################################################
# Imports for the app
###########################################################################
import mysql.connector as pm
from tkinter import *
import tkinter as TK
from tkinter import messagebox
from functools import partial

###########################################################################
# Initializing TKINTER for UI
###########################################################################
root=Tk()
root.title("Main Menu")
root.geometry("600x300")
topFrame = Frame(root)
topFrame.grid(row=0, column=0)
botFrame = Frame(root)
botFrame.grid(row=0, column=1)
billFrame = Frame(root)
billFrame.grid(row=1, column=0)

prodLabel = Label(root,
text=" Welcome to Hardware Store ",
bg="lightblue",
font=("Arial", 16, "bold"),
fg="maroon",
padx=15,
pady=15,
relief=TK.RAISED
)
prodLabel.place(x=100,y=100)

###########################################################################
# Initializing database connection
###########################################################################
mydb = pm.connect(host="localhost", user="root", password="firstdb")
cur = mydb.cursor()
cur.execute("use project")

###########################################################################
# Global variables
###########################################################################
currItemSNo = StringVar()
currItemName = StringVar()
currItemQty = StringVar()
currItemPrice = StringVar()
currItemReadState = False
currItemReport = StringVar()
buyTr = 0
buyitemno = StringVar()
buyitemqty = StringVar()
buyitemtotalprice = StringVar()
makepurchaseprice = 0
validItemNo = [0,1]

###########################################################################
# Function to clear the widgets in BotFrame
###########################################################################
def ClearBotFrame():
global botFrame
for widget in botFrame.winfo_children():
widget.destroy()
botFrame.destroy()
botFrame = Frame(root)
botFrame.grid(row=0, column=1)

###########################################################################
# Function to clear the widgets in TopFrame
###########################################################################
def ClearTopFrame():
global topFrame
prodLabel.destroy()
for widget in topFrame.winfo_children():
widget.destroy()
topFrame.destroy()
topFrame = Frame(root)
topFrame.grid(row=0, column=0)

###########################################################################
# Function to clear the widgets in BillFrame
###########################################################################
def ClearBillFrame():
global billFrame
for widget in billFrame.winfo_children():
widget.destroy()
billFrame.destroy();
billFrame = Frame(root)
billFrame.grid(row=1, column=0)

###########################################################################
# Function to clear the values in global item state
###########################################################################
def ClearCurrItemInfo():
currItemSNo = ""
currItemName = ""
currItemQty = ""
currItemPrice = ""
currItemReadState = False

###########################################################################
# Function to set the values in global item state
###########################################################################
def SetCurrItemInfo(si1, si2, si3, si4):
currItemSNo.set(si1)
currItemName.set(si2)
currItemQty.set(si3)
currItemPrice.set(si4)
currItemReadState = True
PrintCurrItemInfo("SetCurrItemInfo")

###########################################################################
# Function to print the global item state - for debugging
###########################################################################
def PrintCurrItemInfo(sm):
msg = "From {0} - CurrItemInfo values('{1}','{2}',{3},{4})".format(sm, currItemSNo.get(),
currItemName.get(), currItemQty.get(), currItemPrice.get())
messagebox.showinfo("CurrItemInfo", msg)

###########################################################################
# Function to save a new item in database
###########################################################################
def GuiNewItemSave():
#PrintCurrItemInfo("NEW ITEM SAVE")
sno = currItemSNo.get()
if(sno.isdigit() != True):
messagebox.showerror("Get Item Detail Error", "Item No should be a numeric value")
return

query = "insert into inventory values('{0}','{1}',{2},{3})".format(currItemSNo.get(),


currItemName.get(), currItemQty.get(), currItemPrice.get())

try:
cur.execute(query)
mydb.commit()
except (pm.Error, pm.Warning) as e:
messagebox.showerror("New Item Save Error", e)
return

###########################################################################
# Function to update the values of an item in database for given item no
###########################################################################
def GuiItemUpdate():
sno = currItemSNo.get()

if(sno.isdigit() != True):
messagebox.showerror("Update Item Error", "Item No should be a numeric value")
return

query = "update inventory set item_name='{1}', item_price={2}, item_number={3} where


sno={0}".format(currItemSNo.get(), currItemName.get(), currItemPrice.get(), currItemQty.get())

try:
cur.execute(query)
mydb.commit()
except (pm.Error, pm.Warning) as e:
messagebox.showerror("Update Item Error", e)
return

###########################################################################
# Function to delete an item from database for given item no
###########################################################################
def GuiItemDelete():
sno = currItemSNo.get()

if(sno.isdigit() != True):
messagebox.showerror("Delete Item Error", "Item No should be a numeric value")
return
update_query1="delete from inventory where sno=%s"
input_query1=[currItemSNo.get()]

try:
cur.execute(update_query1,input_query1)
mydb.commit()
except (pm.Error, pm.Warning) as e:
messagebox.showerror("Delete Item Error", e)
return

###########################################################################
# Function to read the item details from database for given item no
###########################################################################
def getItemDetail():

sno = currItemSNo.get()

if(sno.isdigit() != True):
messagebox.showerror("Get Item Detail Error", "Item No should be a numeric value")
return

update_query1="select * from inventory where sno=%s"


input_query1=[currItemSNo.get()]

try:
cur.execute(update_query1,input_query1)
except (pm.Error, pm.Warning) as e:
messagebox.showerror("Get Item Detail Error", e)
return

try:
result = cur.fetchone()
currItemSNo.set(result[0])
currItemName.set(result[1])
currItemQty.set(result[2])
currItemPrice.set(result[3])
except TypeError as e:
messagebox.showerror("Fetch Item Detail Error", e)
return

###########################################################################
# Function to get sales (total quantity) for a given item no
###########################################################################
def getItemSalesDetail():

currItemReport.set("")
cir = " "
sno = currItemSNo.get()

if(sno.isdigit() != True):
messagebox.showerror("Get Item Detail Error", "Item No should be a numeric value")
return
s=0
p=0

query = "select * from billhistory where sno={0}".format(sno)

try:
cur.execute(query)
except (pm.Error, pm.Warning) as e:
messagebox.showerror("Get Item Sales Error", e)
return

try:
result = cur.fetchall()
for rec in result:
s = s + rec[1]
except TypeError as e:
messagebox.showerror("Fetch Item Detail Error", e)
return

cir += "Total Qty Sold is {0}".format(s)

currItemReport.set(cir)

###########################################################################
# Function to get total profit from the sale of a given item no
###########################################################################
def getItemProfitDetail():

currItemReport.set("")
cir = " "
sno = currItemSNo.get()

if(sno.isdigit() != True):
messagebox.showerror("Get Item Detail Error", "Item No should be a numeric value")
return
s=0
p=0

query = "select * from billhistory where sno={0}".format(sno)

try:
cur.execute(query)
except (pm.Error, pm.Warning) as e:
messagebox.showerror("Get Item Sales Error", e)
return

try:
result = cur.fetchall()
for rec in result:
s = s + rec[1]
except TypeError as e:
messagebox.showerror("Fetch Item Detail Error", e)
return

query = "select * from inventory where sno={0}".format(currItemSNo.get())

try:
cur.execute(query)
except (pm.Error, pm.Warning) as e:
messagebox.showerror("Get Item Sales Error", e)
return

try:
result = cur.fetchone()
p = result[3]
except TypeError as e:
messagebox.showerror("Fetch Item Detail Error", e)
return

profit = p*s
cir += "Profit is Rs. {0}".format(profit)
currItemReport.set(cir)

###########################################################################
# Function to create the UI Form for Add New Item
###########################################################################
def addItem():
ClearBotFrame()
botFrame.grid()

label1 = Label(
botFrame,
text="Item No:").grid(column=0,row=0)
label2 = Label(
botFrame,
text="Item Name:").grid(column=0,row=1)
label3 = Label(
botFrame,
text="Item Price:").grid(column=0,row=2)
label4 = Label(
botFrame,
text="Item Qty:").grid(column=0,row=3)

entry1 = Entry(botFrame, textvariable=currItemSNo).grid(column=1,row=0)


entry2 = Entry(botFrame, textvariable=currItemName).grid(column=1,row=1)
entry3 = Entry(botFrame, textvariable=currItemPrice).grid(column=1,row=2)
entry4 = Entry(botFrame, textvariable=currItemQty).grid(column=1,row=3)

buttonx = Button(
botFrame,
text="Save",
command=GuiNewItemSave
).grid(column=0,row=4)

###########################################################################
# Function to create the UI Form for Update Item
###########################################################################
def updateItem():

ClearCurrItemInfo()
ClearBotFrame()
botFrame.grid()

label1 = Label(
botFrame,
text="Item No:").grid(column=0,row=0)
entry1 = Entry(botFrame, textvariable=currItemSNo).grid(column=1,row=0)

buttonx = Button(
botFrame,
text="Get",
command=getItemDetail
).grid(column=2,row=0)

label2 = Label(
botFrame,
text="Item Name:").grid(column=0,row=1)
label3 = Label(
botFrame,
text="Item Price:").grid(column=0,row=2)
label4 = Label(
botFrame,
text="Item Qty:").grid(column=0,row=3)

entry2 = Entry(botFrame, textvariable=currItemName).grid(column=1,row=1)


entry3 = Entry(botFrame, textvariable=currItemPrice).grid(column=1,row=2)
entry4 = Entry(botFrame, textvariable=currItemQty).grid(column=1,row=3)

buttony = Button(
botFrame,
text="Update",
command=GuiItemUpdate
).grid(column=0,row=4)

###########################################################################
# Function to create the UI for Delete Item
###########################################################################
def deleteItem():

ClearCurrItemInfo()
ClearBotFrame()
botFrame.grid()

label1 = Label(
botFrame,
text="Item No:").grid(column=0,row=0)
entry1 = Entry(botFrame, textvariable=currItemSNo).grid(column=1,row=0)

buttonx = Button(
botFrame,
text="Get",
command=getItemDetail
).grid(column=2,row=0)

label2 = Label(
botFrame,
text="Item Name:").grid(column=0,row=1)
label3 = Label(
botFrame,
text="Item Price:").grid(column=0,row=2)
label4 = Label(
botFrame,
text="Item Qty:").grid(column=0,row=3)

entry2 = Entry(botFrame, textvariable=currItemName).grid(column=1,row=1)


entry3 = Entry(botFrame, textvariable=currItemPrice).grid(column=1,row=2)
entry4 = Entry(botFrame, textvariable=currItemQty).grid(column=1,row=3)

buttony = Button(
botFrame,
text="Delete",
command=GuiItemDelete
).grid(column=0,row=4)

###########################################################################
# Function to create the UI Buttons to let user Add/Update/Delete items
###########################################################################
def checkInventory():

ClearTopFrame()
ClearBotFrame()
ClearBillFrame()

cur.execute("create table if not exists inventory(sno varchar(5) primary key, item_name


varchar(20), item_number int(11) , item_price int(11))")

button1=Button(topFrame,text="Add Item", command=addItem)


button2=Button(topFrame,text="Update Item", command=updateItem)
button3=Button(topFrame,text="Delete Item", command=deleteItem)
button1.pack(padx=5, pady=5)
button2.pack(padx=5, pady=5)
button3.pack(padx=5, pady=5)

###########################################################################
# Function to create UI form to get Item no. for sales details
###########################################################################
def checkFinanceSales():
ClearCurrItemInfo()
ClearBotFrame()
botFrame.grid()
label1 = Label(
botFrame,
text="Item No:").grid(column=0,row=0)
entry1 = Entry(botFrame, textvariable=currItemSNo).grid(column=1,row=0)

buttonx = Button(
botFrame,
text="Show Sales",
command=getItemSalesDetail
).grid(column=2,row=0)
entry2 = Entry(botFrame, textvariable=currItemReport,
state='readonly').grid(column=1,row=1)

###########################################################################
# Function to create UI form to get Item no. for profit calculations
###########################################################################
def checkFinanceProfit():
ClearCurrItemInfo()
ClearBotFrame()
botFrame.grid()
label1 = Label(
botFrame,
text="Item No:").grid(column=0,row=0)
entry1 = Entry(botFrame, textvariable=currItemSNo).grid(column=1,row=0)

buttonx = Button(
botFrame,
text="Show Profit",
command=getItemProfitDetail
).grid(column=2,row=0)
entry2 = Entry(botFrame, textvariable=currItemReport,
state='readonly').grid(column=1,row=1)

###########################################################################
# Function to show UI Buttons to let user check Sales/Profit for items
###########################################################################
def checkFinance():

ClearTopFrame()
ClearBotFrame()
ClearBillFrame()

cur.execute("create table if not exists inventory(sno varchar(5) primary key, item_name


varchar(20), item_number int(11) , item_price int(11))")

button1=Button(topFrame,text="Check Sales", command=checkFinanceSales)


button2=Button(topFrame,text="Check Profit", command=checkFinanceProfit)
button1.pack(padx=5, pady=5)
button2.pack(padx=5, pady=5)

###########################################################################
# Function to show the full inventory in tabular form
###########################################################################
def showAllItems():
global buyTr
global buyitemtotalprice
global makepurchaseprice

query = "select * from inventory"

buyTr = 0
buyitemno.set("")
buyitemqty.set("")
validItemNo.clear()
buyitemtotalprice.set("0")
makepurchaseprice = 0

label1 = Label(
topFrame,
width=70,
text="All Items",
bg='lightblue').grid(column=0,row=buyTr, columnspan=4)

buyTr+=1

try:
cur.execute(query)
except (pm.Error, pm.Warning) as e:
messagebox.showerror("Get Item Sales Error", e)
return

try:
cur.execute("drop table bill")
except (pm.Error, pm.Warning) as e:
pass

try:
result = cur.fetchall()
total_rows = len(result)
total_cols = len(result[0])
e1 = Entry(topFrame, width=20, fg='blue')
e1.grid(row=buyTr, column=0)
e1.insert(END, "S.No.")
e1.config(state='readonly')
e2 = Entry(topFrame, width=20, fg='blue')
e2.grid(row=buyTr, column=1)
e2.insert(END, "Name")
e2.config(state='readonly')
e3 = Entry(topFrame, width=20, fg='blue')
e3.grid(row=buyTr, column=2)
e3.insert(END, "Qty")
e3.config(state='readonly')
e4 = Entry(topFrame, width=20, fg='blue')
e4.grid(row=buyTr, column=3)
e4.insert(END, "Price")
e4.config(state='readonly')

for i in range(total_rows):
buyTr += 1
for j in range(total_cols):
e = Entry(topFrame, width=20)
e.grid(row=buyTr, column=j)
e.insert(END, str(result[i][j]))
e.config(state='readonly')
validItemNo.append(str(result[i][0]))

except TypeError as e:
messagebox.showerror("Fetch Item Detail Error", e)
return

try:
cur.execute("create table if not exists bill(sno varchar(5), number int(11))")
cur.execute("create table if not exists billhistory(sno varchar(5), number int(11))")
except (pm.Error, pm.Warning) as e:
messagebox.showerror("Get Item Sales Error", e)
return
buyTr += 1
l1 = Label(
topFrame,
text="Items No:").grid(column=0,row=buyTr)
ebuyno = Entry(topFrame, width = 20, textvariable=buyitemno)
ebuyno.grid(column=1, row=buyTr)
buyTr += 1
l2 = Label(
topFrame,
text="Qty").grid(column=0,row=buyTr)
ebuyqty = Entry(topFrame, width = 20, textvariable=buyitemqty)
ebuyqty.grid(column=1, row=buyTr)

buyTr+=1
bb = Button(topFrame, text="Add To Bill", command=addItemToBill,
activebackground='lightblue').grid(column=1, row=buyTr)

buyTr = 0

l4 = Label(
billFrame,
fg='blue',
text="Total Price (Rs.):").grid(column=0,row=buyTr)
ebuytotalprice = Entry(billFrame, width = 20,
fg='blue', textvariable=buyitemtotalprice)
ebuytotalprice.grid(column=1, row=buyTr)
ebuytotalprice.config(state='readonly')
bf = Button(billFrame,
text="Make Purchase",
command=makeFinalPurchase,
activebackground='lightblue').grid(column=2, row=buyTr)
buyTr += 1
l3 = Label(
billFrame,
width=52, bg='lightblue',
text="Your Bill").grid(column=0, row=buyTr, columnspan=3)

buyTr+=1
e5 = Entry(billFrame, width=20, fg='blue')
e5.grid(row=buyTr, column=0)
e5.insert(END, "S.No.")
e5.config(state='readonly')
e6 = Entry(billFrame, width=20, fg='blue')
e6.grid(row=buyTr, column=1)
e6.insert(END, "Qty")
e6.config(state='readonly')

e7 = Entry(billFrame, width=20, fg='blue')


e7.grid(row=buyTr, column=2)
e7.insert(END, "Price")
e7.config(state='readonly')

###########################################################################
# Function to create UI to add a given item into a Bill table
###########################################################################
def addItemToBill():
global buyTr
global makepurchaseprice
global buyitemtotalprice

sno = buyitemno.get()
nbr = buyitemqty.get()

if(sno.isdigit() != True or nbr.isdigit() != True):


messagebox.showerror("Add To Bill Error", "Item No & Item Qty should be a numeric
value")
return

if(validItemNo.count(str(sno)) < 1):


messagebox.showerror("Add To Bill Error", "Item No does not exist in All Items")
return

try:
query3 = "select * from inventory where sno={0}".format(sno)
cur.execute(query3)
rec = cur.fetchone()
recsno = rec[0]
recname = rec[1]
recqty = rec[2]
recprice = rec[3]
except (pm.Error, pm.Warning) as e:
messagebox.showerror("Get Item Sales Error", e)
return

try:
query1 = "insert into bill values('{0}',{1})".format(sno,nbr)
query2= "insert into billhistory values('{0}',{1})".format(sno,nbr)
cur.execute(query1)
cur.execute(query2)
mydb.commit()
except (pm.Error, pm.Warning) as e:
messagebox.showerror("Get Item Sales Error", e)
return

pp = int(recprice) * int(nbr)
makepurchaseprice += pp
buyitemtotalprice.set(str(makepurchaseprice))

buyTr+=1
e7 = Entry(billFrame, width=20)
e7.grid(row=buyTr, column=0)
e7.insert(END, sno)
e7.config(state='readonly')
e8 = Entry(billFrame, width=20)
e8.grid(row=buyTr, column=1)
e8.insert(END, nbr)
e8.config(state='readonly')
e9 = Entry(billFrame, width=20)
e9.grid(row=buyTr, column=2)
e9.insert(END, pp)
e9.config(state='readonly')
buyitemno.set("")
buyitemqty.set("")

###########################################################################
# Function to make the final purchase for items added to the Bill
###########################################################################
def makeFinalPurchase():
try:
cur.execute("create table if not exists invoice(sno varchar(5), name varchar(20), number
int(11), price int(11), cost int(11))")
cur.execute("select * from bill")
record1 = cur.fetchall()

cur.execute("select * from inventory")


record2 = cur.fetchall()

for i in record1 :
a = i[0]
b = i[1]
for j in record2 :
a1 = j[0]
a2 = j[1]
a3 = j[2]
a4 = j[3]
a5 = b * a4
if a == a1 :
query = "insert into invoice values('{0}','{1}',{2},{3},{4})".format(a1,a2,b,a4,a5)
cur.execute(query)
mydb.commit()

cur.execute("drop table bill")

except (pm.Error, pm.Warning) as e:


messagebox.showerror("Get Item Sales Error", e)
return
messagebox.showinfo("Purchase", "Succesful purchase of all items added in the Bill")
ClearTopFrame()
ClearBotFrame()
ClearBillFrame()

###########################################################################
# Function as entry show inventory and create buill for final purchase
###########################################################################
def purchaseItems():
ClearTopFrame()
ClearBotFrame()
ClearBillFrame()
topFrame.grid(row=0,column=0, sticky="ew", padx="5", pady="5")
billFrame.grid(row=1,column=0, sticky="ew", padx="5", pady="5")
showAllItems()

###########################################################################
# Function to exit the App
###########################################################################
def remove():
frm = Frame(root)
frm.grid()

###########################################################################
# Main app continues
# Add meu options to the window
###########################################################################
menubar=Menu(root)
editmenu1=Menu(root)
editmenu2=Menu(root)
filemenu= Menu(menubar,tearoff=0)
editmenu1= Menu(menubar,tearoff=0)
editmenu2= Menu(menubar,tearoff=0)

filemenu.add_separator()
filemenu.add_command(label="Exit",command=root.destroy)
menubar.add_cascade(label="File",menu=filemenu)

editmenu1.add_separator()
editmenu1.add_command(label="Inventory", command=checkInventory)
editmenu1.add_command(label="Finance", command=checkFinance)
menubar.add_cascade(label="Owner", menu=editmenu1)

editmenu2.add_separator()
editmenu2.add_command(label="Purchase", command=purchaseItems)
menubar.add_cascade(label="Customer",menu=editmenu2)

###########################################################################
# Run app message loop
###########################################################################
root.config(menu=menubar)
root.mainloop()
Output Screens

 Opening Screen
Accessing Drop down menu under
Owner tab
 Add items to inventory
 Update items in inventory

 Delete items from inventory


 Check total quantity sold of an item
Check total profit received from an item

Purchasing items as a customer


Final Purchase of all items by the
customer:
Bibliography

 Computer Science with Python by


Sumita Arora

 Computer Science NCERT Class XII

 Wikipedia

You might also like