Satyam Modern Public School
Affiliated to CBSE, New Delhi, Code No: 530544
Session: 2022-2023
PROJECT REPORT
INVENTORY
MANAGEMENT SYSTEM
Submitted By- Submitted To-
Amanjeet Mrs. Seema sharma
Class- XII(A)
DECLARATION
I Amanjeet, a student of Class XII Satyam Modern Public School hereby declare
that I own the full responsibility for the information, results etc. provided in
this PROJECT titled “Inventory Management System”. It has been developed
successfully by using the Data Handling concepts like data management, data
visualization etc. provided in the programming language Python at Satyam
Modern Public School in complete fulfilment of project (curriculum of Central
Board of Secondary Education CBSE of Informatics Practices (065) conducted
by CBSE, New Delhi for the academic session 2022-23.
I also declare that this project work has neither been submitted to any other
board nor published at any time by me in the past.
Amanjeet
Class 12
Satyam Modern Public School
This is to certify that the Informatics Practices project on Inventory
Management System has been successfully completed by Amanjeet
of Class XII, Satyam Modern Public School for consideration in
partial fulfilment of curriculum of Central Board of Secondary
Education (CBSE) of Informatics Practices (065) for the award of
AISSCE Practical Examination 2022-23.
I certify that this project is up to my expectation and as per the
guidelines issued by the CBSE.
______________________
(External Examiner)
__________________________ _______________________
(Internal Examiner) (Principal)
ACKNOWLEDGEMENT
I take this opportunity to express my deep sense of gratitude to all
those who have been instrumental in preparation of this project.
I feel great pleasure to express my obligation to Mrs. Salini Choudhary,
Principal of Satyam Modern Public School.
I am also sincerely grateful to Mrs. Seema Sharma I.P. teacher of Satyam
Modern Public School for his encouragement and valuable guidance during
the entire period of work.
I would also thank all of my parents and friends for their whole hearted
support and encouragement without with this project would not have been
successful.
I could not forget Internet, Textbooks which provided me with sufficient
matter for reference.
TABLE OF CONTENT
Sr No Topic Page No
Introduction 6
Problem Statement 7
Objective 8
Project Scope 9
System Requirement and Specification 10
Overview of Python 11
Overview of SQL 12
Project Module 13
Data Flow Diagram 14
Database Design and Table Structure 15
SQL Code 16
Python Code 19
Outputs 32
Data Analysis (Best Selling Product) 39
Conclusion 41
Bibliography 42
Page 5
INTRODUCTION
Inventory refers to all the goods, items and materials purchased or
manufactured by business for sale to the customer to make profit.
Inventory management is all about tracking and controlling of business
inventory right from manufacturing, buying to storing and using. It controls the entire
flow of goods from purchasing to sale and ensures that you always have the right
quantities of the right item in the right location at the right time.
Inventory Management System is an application which refers to Inventory
Management developed for small business. It can be used by business to manage
Inventory using a computerized system where they can manage details of purchase,
sale, products and customers. They can also analyze data by visualization.
Page 6
PROBLEM STATEMENT
For any business Inventory is one of the most important department that must
be well managed in order to run daily business activity smoothly. But mostly business
are not able to manage inventory as they do not have good computerized system. As a
result they lacks in
Security of data, documents related to business transactions
Unable to keep single copy of data at single location which increases data
complexity
Managing data consistency
Accessing and referencing or search data quickly
Unable to analyze data as there is no mechanism to visualize data
Page 7
OBJECTIVE
The objective of project is to build an application program to:
Provide function to manage goods in the store more efficiently.
Provide searching facility based on various factors.
Reduce time and cost to control and manage inventory.
Reduce paperwork.
Increased accuracy and reliability.
Increased Data Consistency.
Increased Data security.
This application program can be used easily by non-programming personals.
Page 8
PROJECT SCOPE
Managing all products, sufficient stocks, sale and purchase records and analyzing sales
is a tedious job for any business. To do it more effectively and correctly a good
Inventory control is required. This is provided by our application which have following
scope:
ensures effective inventory control
manage daily sales records easily and precisely
can perform sales analysis of various products
user friendly interface
very easy to use
High level security of data.
Page 9
SYSTEM REQUIREMENT AND SPECIFICATIONS
Software Requirements:
Operating System Window-7 and later versions (32bit, 64 bit)
Language Python
Plateform Python IDLE 3.7 (min)
Database MySQL
Database driver MySQL Connector
Plotting Matplotlib
Hardware Requirements:
Processor Pentium Dual Core (min) 32bit or 64 bit
Hard-Disk 160GB (min)
RAM 1GB (min)
Input/output Requirements:
Input Mouse (any)
Input Keyboard (any)
Output Monitor (any)
Output Printer (any)
Page 10
OVERVIEW OF PYTHON
Python is a general purpose, dynamic, high-level, and interpreted programming
language. It supports Object Oriented programming approach to develop applications.
It is simple and easy to learn and provides lots of high-level data structures. Guido Van
Rossum is known as the founder of Python programming.
Features of Python:
Python is a high level language. It is a free and open source language.
It is an interpreted language, as Python programs are executed by an
interpreter.
Python programs are easy to understand as they have a clearly defined syntax
and relatively simple structure.
Python is case-sensitive. For TECHTIPNOW, NUMBER and number are not same
in Python.
Python is portable and platform independent, means it can run on various
operating systems and hardware platforms.
Python has a rich library of predefined functions.
Python is also helpful in web development. Many popular web services and
applications are built using Python.
Python uses indentation for blocks and nested blocks.
Page 11
OVERVIEW OF MYSQL
MySQL is a relational database management system (RDBMS). It is pronounced
as "My Sequel”. MySQL was originally founded and developed in Sweden by David
Axmark, Allan Larsson and Michael Widenius, who had worked together since the
1980s.
Characteristics of MySQL:
MySQL is released under an open-source license so it is customizable.
It requires no cost or payment for its usage.
MySQL has superior speed, is easy to use and is reliable.
MySQL uses a standard form of the well-known ANSI-SQL standards.
MySQL is a platform independent application which works on many operating
systems like
Windows, UNIX, LINUX etc. and have compatibility with many languages
including JAVA, C++, PHP, PERL, etc.
MySQL is an easy to install RDBMS and is capable of handling large data sets.
Since MySQL is released under an open-source license, it does not require any cost or
payment for its usage. Anyone can download and use this software from specific
location on Internet.
Page 12
PROJECT MODULES
Inventory Management System is divided into following modules:
Customer module: This module helps you to add, modify, and delete customer data.
Supplier module: This module helps you to add, modify, and delete supplier data.
Stock module: This module helps you to add, modify, and delete product data.
Sale module: This module is used to manage sell information.
Purchase module: This module is used to manage purchase records.
Login Module: This module is used to manage login details.
User module: This module is used to manage user credentials.
Report module: This module is used to generate sale bills, purchase bills and visualize
data by plotting charts.
Page 13
DATA FLOW DIAGRAM
PYTHON INTERFACE
ADMIN LOGIN
d fail
LOGIN CHECK
Success
MENU
SALE PURCHASE STOCK CUSTOMER SUPPLIER
ADD UDATE SEARCH DELETE
MySQL Data Store
Page 14
DATABASE DESIGN AND TABLE
STRUCTURES
Item
INO INT (PRIMARY KEY)
INAME VARCHAR SMASTER
PRATE FLOAT SALEID INT (PRIMARY KEY)
SRATE FLOAT SDATE DATE
QOH INT SID INT (FOREIGN KEY)
TOTAL FLOAT
CUSTOMER
CID INT (PRIMARY KEY)
CNAME VARCHAR
SDETAILS
CADD VARCHAR
SALEID INT (FOREIGN KEY)
MOBILE CHAR(10) INO INT(FOREIGN KEY)
QTY INT
SUPPLIER
RATE FLOAT
SID INT (PRIMARY KEY)
TOTAL FLOAT
SNAME VARCHAR
SADD VARCHAR
MOBILE CHAR(10) PDETAILS
PID INT (FOREIGN KEY)
PMASTER INO INT(FOREIGN KEY)
PID INT (PRIMARY KEY) QTY INT
PDATE DATE
RATE FLOAT
SID INT (FOREIGN KEY)
TOTAL FLOAT
TOTAL FLOAT
Page 15
SQL CODE
DATABASE DESIGN AND TABLE
STRUCTURES
Page 16
Page 17
Page 18
PYTHON
SOURCE CODE
MODULE DESIGNS
Page 19
MAIN MODULE
import item
import customer
import supplier
import transaction
import report
import os
while(True):
[Link]('cls')
print("="*80)
print("-"*80)
print("\n\t\t\tInventory Management System\n")
print("-"*80)
print("="*80)
print("\n\t\t\t\tEnter your choice\n\t\t\t\[Link]\n\t\t\t\
\[Link]\n\t\t\t\[Link]\
\n\t\t\t\[Link]\n\t\t\t\[Link]\n\t\t\t\[Link]")
ch=int(input())
if ch==1:
while(True):
print("---------------\nEnter your choice\n--------------\
\n\t\t\t\[Link] Item\n\t\t\t\[Link] Item\n\t\t\t\[Link] Rate\
\n\t\t\t\[Link] Item\n\t\t\t\[Link] Item\n\t\t\t\[Link]")
ch=int(input())
if ch==1:
item.add_item()
elif ch==2:
item.edit_item()
elif ch==3:
item.fix_rate()
elif ch==4:
item.search_item()
elif ch==5:
item.delete_item()
elif ch==6:
break
elif ch==2:
while(True):
print("\n---------------\nEnter your choice\n--------------\
\n\t\t\t\[Link] customers\n\t\t\t\[Link] Customers\
\n\t\t\t\[Link] Customers\n\t\t\t\[Link] Customers\n\t\t\t\[Link]")
ch=int(input())
if ch==1:
customer.add_customer()
Page 20
elif ch==2:
customer.edit_customer()
elif ch==3:
customer.search_customer()
elif ch==4:
customer.delete_customer()
elif ch==5:
break
elif ch==3:
while(True):
print("\n---------------\nEnter your choice\n--------------\
\n\t\t\t\[Link] Suppliers\n\t\t\t\[Link] Suppliers\
\n\t\t\t\[Link] Suppliers\n\t\t\t\[Link] Suppliers\n\t\t\t\[Link]")
ch=int(input())
if ch==1:
supplier.add_supplier()
elif ch==2:
supplier.edit_supplier()
elif ch==3:
supplier.search_supplier()
elif ch==4:
supplier.delete_supplier()
elif ch==5:
break
elif ch==4:
while(True):
print("\n---------------\nEnter your choice\n--------------\
\n\t\t\t\[Link]\n\t\t\t\[Link]\n\t\t\t\[Link]")
ch=int(input())
if ch==1:
[Link]()
elif ch==2:
[Link]()
elif ch==3:
break
elif ch==5:
while(True):
print("\n---------------\nEnter your choice\n--------------\
\n\t\t\t\[Link] Details\n\t\t\t\[Link] Details\
\n\t\t\t\[Link] Details\n\t\t\t\[Link] Details\n\
\t\t\[Link] Details\n\t\t\t\[Link] Selling Product(Plot)\
\n\t\t\t\[Link] Performance(Plot)\n\t\t\t\[Link]")
ch=int(input())
if ch==1:
Page 21
report.show_item()
elif ch==2:
report.show_customer()
elif ch==3:
report.show_supplier()
elif ch==4:
report.show_sale()
elif ch==5:
report.show_purchase()
elif ch==6:
report.best_product()
elif ch==7:
report.sale_performance()
elif ch==8:
break
elif ch==6:
break
Page 22
ITEM MODULE
import pandas as pd
from tabulate import tabulate
import [Link] as sqlt
import [Link] as plt
con=[Link](host = "localhost", user = "root", passwd="sanjay", database =
"inventory")
cursor=[Link]()
def add_item():
try:
ino = int(input("Enter Item No"))
iname = input("Enter Iname")
prate=float(input("Enter Purchase Rate"))
srate=float(input("enter Sale Rate"))
qoh=int(input("Enter Qty On Hand"))
q="insert into item values({},'{}',{},{},{});".format(ino,iname,prate,srate,qoh)
[Link](q)
[Link]()
print("Item Added")
except:
print("Wrong Entry..Please check")
def edit_item():
try:
ino=int(input("Enter Item No"))
q="select * from item where ino = {};".format(ino)
[Link](q)
if [Link]():
iname=input("Enter Item Name")
[Link]("update item set iname = '{}' where ino={};".format(iname,ino))
[Link]()
print("item Edited")
else:
print("Item Not Found")
except:
print("Wrong Entry")
def fix_rate():
ino=int(input("Enter Item No"))
q="select * from item where ino = {};".format(ino)
[Link](q)
if [Link]():
prate=int(input("enter new purchase rate"))
srate=int(input("Enter new Sale rate"))
[Link]("update item set prate={},srate={} where
ino={};".format(prate,srate,ino))
Page 23
[Link]()
print("New rate applied")
else:
print("Item Not Found")
def search_item():
ino=int(input("Enter Item No"))
q="select * from item where ino = {};".format(ino)
[Link](q)
if [Link]():
df=pd.read_sql(q,con)
print(tabulate(df,headers="keys", tablefmt = "psql", showindex = False))
else:
print("Item Not Found")
def delete_item():
ino=int(input("Enter Item No"))
q="select * from item where ino = {};".format(ino)
[Link](q)
if [Link]():
[Link]("delete from item where ino={};".format(ino))
[Link]()
print("item deleted")
else:
print("Item Not Found")
Page 24
CUSTOMER MODULE
import pandas as pd
from tabulate import tabulate
import [Link] as sqlt
import [Link] as plt
con=[Link](host = "localhost", user = "root", passwd="sanjay", database = "inventory")
cursor=[Link]()
def add_customer():
cid = int(input("Enter Customer ID"))
cname = input("Enter Customer Name")
cadd=input("Enter Address")
mobile=input("Enter Mobile")
q="insert into customer values({},'{}','{}','{}');".format(cid,cname,cadd,mobile)
[Link](q)
[Link]()
print("Customer Added")
def edit_customer():
cid=int(input("Enter Customer ID"))
q="select * from Customer where cid = {};".format(cid)
[Link](q)
if [Link]():
cadd=input("Enter Customer Address")
[Link]("update customer set cadd = '{}' where cid={};".format(cadd,cid))
[Link]()
print("Customer Edited")
else:
print("Customer Not Found")
def search_customer():
cname=input("Enter Customer Name")
q="select * from customer where cname like '%{}%';".format(cname)
[Link](q)
if [Link]():
df=pd.read_sql(q,con)
print(tabulate(df,headers='keys',tablefmt='psql',showindex=False))
else:
print("Customer Not found")
def delete_customer():
cid=int(input("Enter Customer ID"))
q="select * from customer where cid = {};".format(cid)
[Link](q)
if [Link]():
[Link]("delete from customer where cid={};".format(cid))
[Link]()
print("customer deleted")
else:
print("customer Not Found")
Page 25
SUPPLIER MODULE
import pandas as pd
from tabulate import tabulate
import [Link] as sqlt
import [Link] as plt
con=[Link](host = "localhost", user = "root", passwd="sanjay", database = "inventory")
cursor=[Link]()
def add_supplier():
sid = int(input("Enter Supplier ID"))
sname = input("Enter Supplier Name")
sadd=input("Enter Address")
mobile=input("Enter Mobile")
q="insert into supplier values({},'{}','{}','{}');".format(sid,sname,sadd,mobile)
[Link](q)
[Link]()
print("Supplier Added")
def edit_supplier():
sid=int(input("Enter Supplier ID"))
q="select * from Supplier where sid = {};".format(sid)
[Link](q)
if [Link]():
sadd=input("Enter Supplier Address")
[Link]("update Supplier set sadd = '{}' where sid={};".format(sadd,sid))
[Link]()
print("Supplier Edited")
else:
print("Supplier Not Found")
def search_supplier():
sid=int(input("Enter Supplier ID"))
q="select * from Supplier where sid = {};".format(sid)
[Link](q)
if [Link]():
df=pd.read_sql(q,con)
print(tabulate(df,headers="keys", tablefmt = "psql", showindex = False))
else:
print("Supplier Not Found")
def delete_supplier():
sid=int(input("Enter Supplier ID"))
q="select * from Supplier where sid = {};".format(sid)
[Link](q)
if [Link]():
[Link]("delete from Supplier where sid={};".format(sid))
[Link]()
print("Supplier deleted")
else:
print("Supplier Not Found")
Page 26
TRANSACTION MODULE
import pandas as pd
from tabulate import tabulate
import [Link] as sqlt
import [Link] as plt
con=[Link](host = "localhost", user = "root", passwd="sanjay", database =
"inventory")
cursor=[Link]()
def purchase():
pid=0
total=0
grand=0
l=[]
ch='y'
q="select max(pid) as largest from pmaster"
[Link](q)
r=[Link]()[0]
if r:
pid=r+1
else:
pid=1
pdate=input("Enter Purchase date")
sid = int(input("Enter Supplier ID"))
[Link]("select * from supplier where sid={};".format(sid))
if [Link]():
print("Item Details")
df=pd.read_sql("select * from item",con)
print(tabulate(df,headers='keys',tablefmt='psql',showindex=False))
while(ch=='y'):
ino=int(input("Enter Item No"))
[Link]("select * from item where ino ={};".format(ino))
r1=[Link]()
if r1:
qty = int(input("Enter qty"))
rate=r1[2]
total=qty*rate
grand=grand+total
t=(pid,ino,qty,rate,total)
[Link](t)
else:
print("Item Not Found")
ch=input("Do you wish to add more Items in bucket y/n")
q1="insert into pmaster values({},'{}',{},{});".format(pid,pdate,sid,grand)
[Link](q1)
Page 27
[Link]()
q2="insert into pdetail values(%s,%s,%s,%s,%s);"
[Link](q2,l)
[Link]()
[Link]("insert into ptemp values(%s,%s,%s,%s,%s);",l)
[Link]()
q3="update item join ptemp using(ino) set [Link] = [Link]+[Link]"
[Link](q3)
[Link]()
[Link]("delete from ptemp")
[Link]()
print("Item Purchased and Added")
else:
print("Supplier Not Found")
def sale():
saleid=0
total=0
grand=0
l=[]
ch='y'
q="select max(saleid) as largest from smaster"
[Link](q)
r=[Link]()[0]
if r:
saleid=r+1
else:
saleid=1
sdate=input("Enter Sale date")
sid = int(input("Enter Supplier ID"))
[Link]("select * from supplier where sid={};".format(sid))
if [Link]():
print("Item Details")
df=pd.read_sql("select * from item",con)
print(tabulate(df,headers='keys',tablefmt='psql',showindex=False))
while(ch=='y'):
ino=int(input("Enter Item No"))
[Link]("select * from item where ino ={};".format(ino))
r1=[Link]()
if r1:
qty = int(input("Enter qty"))
rate=r1[2]
total=qty*rate
grand=grand+total
Page 28
t=(saleid,ino,qty,rate,total)
[Link](t)
else:
print("Item Not Found")
ch=input("Do you wish to add more Items in bucket y/n")
q1="insert into smaster values({},'{}',{},{});".format(saleid,sdate,sid,grand)
[Link](q1)
[Link]()
q2="insert into sdetail values(%s,%s,%s,%s,%s);"
[Link](q2,l)
[Link]()
[Link]("insert into stemp values(%s,%s,%s,%s,%s);",l)
[Link]()
q3="update item join stemp using(ino) set [Link] = [Link]"
[Link](q3)
[Link]()
[Link]("delete from stemp")
[Link]()
print("Item Purchased and Added")
else:
print("Supplier Not Found")
Page 29
REPORT MODULE
import [Link] as sqlt
import pandas as pd
from tabulate import tabulate
con = [Link](host = "localhost", user = "root", passwd = "sanjay", database =
"library")
cursor = [Link]()
def show_item():
df=pd.read_sql("select * from item",con)
print(tabulate(df,headers= 'keys', tablefmt='psql',showindex = False))
def show_customer():
df=pd.read_sql("select * from customer",con)
print(tabulate(df,headers= 'keys', tablefmt='psql',showindex = False))
def show_supplier():
df=pd.read_sql("select * from supplier",con)
print(tabulate(df,headers= 'keys', tablefmt='psql',showindex = False))
def show_sale():
bdate=input("enter beginning date")
edate=input("enter end date")
df=pd.read_sql("select * from smaster where sdate between '{}' and
'{}';".format(bdate,edate),con)
print(tabulate(df,headers= 'keys', tablefmt='psql',showindex = False))
def show_purchase():
bdate=input("enter beginning date")
edate=input("enter end date")
df=pd.read_sql("select * from pmaster where pdate between '{}' and
'{}';".format(bdate,edate),con)
print(tabulate(df,headers= 'keys', tablefmt='psql',showindex = False))
def best_product():
s=input("Enter Start date")
e=input("Enter End Date")
q="select [Link],sum([Link]) as total from smaster s1,sdetail s2 \
where [Link] = [Link] and [Link] between '{}' and '{}'\
group by [Link];".format(s,e)
df=pd.read_sql(q,con)
print(tabulate(df, headers='keys', tablefmt = 'psql', showindex=False))
[Link]([Link],[Link])
[Link]("Item Code")
[Link]("Qty")
[Link]("Best Selling Product")
[Link]([Link])
[Link]()
def sale_performance():
Page 30
y=input("Enter Year")
q="select month(sdate) as month,sum(total)\
as total from smaster where year(sdate) = '{}'\
and group by month(sdate);".format(y)
df = pd.read_sql(q,con)
[Link]([Link],[Link])
[Link]("Month")
[Link]("Total Sale")
[Link]([Link])
[Link]()
Page 31
PROGRAM
OUTPUT
Page 32
MAIN MENU
Page 33
ITEM
ADD ITEM
EDIT ITEM
Page 34
UPDATE RATE OF ITEM
SEARCH ITEM
DELETE ITEM
Page 35
CUSTOMER MODULE
SUPPLIER MODULE
Page 36
TRANSACTION MODULE
REPORT MODULE
Page 37
SALE MODULE
Page 38
DATA
ANALYSIS
BEST SELLING PRODUCT
Page 39
BEST SELLING PRODUCT
Page 40
CONCLUSION
This Inventory Management System is a simple desktop based application basically
suitable for small organization. It has all basic elements which are used for managing
inventory of small organization. We are successful in making the application where we
can insert, delete, update, search and analyze records as per need. This application
also provides a report including chart of sales records to analyze the performance.
We strongly believes that he implementation of this system will surely benefit the
organization.
Page 41
BIBLIOGRAPHY
References and Bibliography:
Informatics Practices Class-XII NCERT Publication
Informatics Practices Class-XII by Sumita Arora
Think Python by Allen B Downey
Python for everybody by Charles Severance
Learning MYSQL by Seyed M. M. Tahaghoghi
MySQL in a nutshell by Russell J. T. Dyer
[Link]
[Link]
Page 42