Suraj
Suraj
NIKETAN
UPPARWAHI
1|Page
Mr. Ravi Kumar Sharma SURAJ KUMAR YADAV
Index
1. Acknowledgement……………………
………………………….3 Pg
2. Certificate………………………………
……………………………4 Pg
3. Background and scope of the
project…………………5 Pg
4. Hardware and software
requirement…………………6 Pg
a. Frontend – Python
b. Backend – MYSQL
5. Module
Design…………………………………………
…………….7 Pg
6. Table
Design…………………………………………
……………… 12 Pg
2|Page
7. Source
Code……………………………………………
……………13 Pg
8. Output……………………………………
…………………………… 23 Pg
9. Testing
Technologies………………………………
……………30 Pg
10.References………………………………
………………………… 31 Pg
Acknowledgement
I would like to convey my sincere thanks to
Mr. Ravi Kumar Sharma, my Computer
Science teacher for his valuable suggestions
and guidance through the course of this
project. He has been a source of inspiration
for me during the completion of this project.
He helped understand and remember the
3|Page
important details of the practical that I would
have otherwise lost. The credit of my
project’s success surely goes to him.
Student’s Signature
Date:
School: Ambuja Vidya Niketan
Subject Teacher: Mr. Ravi Kumar Sharma
Certificate
4|Page
supervision. He has taken proper care and
shown utmost sincerity while making it. I
certify that practical is up to my expectation
and as per guidelines issued by CBSE.
External Examiner
Internal Examiner
(Signature)
(Signature)
School Stamp
5|Page
USES
▪ Similar types of software is used in various small shops like grocery
shops. clothing shops, etc.
▪ The billing interface helps the person at the billing section select
products fast.
▪ Get transactions and purchase print out instantly. Give the print of
the bill to your customer too.
ADVANTAGES
▪ Billing and stocks checking software gets integrated with your
inventory.
Hardware
Requirement
6|Page
➢ Operating System: Windows 10/11, Linux
based, Mac OS
➢ Processor: Dual Core (Recommended)
➢ RAM: Minimum 4GB ram
➢ Disk Space: Up to 2 GB ➢ Monitor, Keyboard,
Mouse, etc.
Software
Requirement
➢ Python: [for
Frontend] Features:
1. Easy MYSQL connectivity.
2. Dynamic Typing Support.
3. Free and open source.
7|Page
Module Design
1) Admin:
After you choose this option, an "ADMIN
window" will Appear.
8|Page
If you choose the second option, you will be
asked to enter the date of expiry, after entering
the date you will be able to go through the
details of products on the basis of their
respective dates.
9|Page
If you select this option you will have to enter
product Name, its new price, its new quantity.
After entering this information the stock table
will be updated and the updated record will be
printed
1.2)CHECK BILLS:
After choosing this option, you will get an
interface containing options to check the Bills
table.
10 | P a g e
able to go through the transaction details of the
respective customer
11 | P a g e
1.3)BACK:
2) USER:
After you choose the option, a "USER
WINDOW" will appear
12
Once it is entered completely, click "0" to
proceed to the next window to enter further
required information of the consumer to make
the bill.
|Page
13 | P a g e
After entering all this required
information, the bill will be generated and
will be printed on the screen. Moreover,
this data will automatically be inserted in
the table "BILLS" in our database
"STOREM".
2.3) BACK:
Table Design
Table Products:-
Table Bills:-
14 | P a g e
Source Code
import
mysql.connector
from tabulate
import tabulate
from datetime
import date
con=mysql.connector.connect(host="localhost",user=
"root",passwd="gt650",dat abase ="store")
def dispfullstock():
cur=con.cursor()
cur.execute("select *
from PRODUCTS")
data=cur.fetchall() for i
in data: print("Product
Name:",i[0])
15 | P a g e
print("Price:₹",i[1])
print("Qty:",i[2])
print("Manufacture_DATE
:",i[4])
print("Expiry_DATE:",i[5]
)
def dispname():
n=input("Enter The
Product Name:")
cur=con.cursor()
cur.execute("select * from PRODUCTS
where PRO_NAME=%s",(n,))
data=cur.fetchall() for i in data: if i:
print("PRODUCT
NAME:",i[0]) print("PRICE:
₹",i[1])
print("QUANTITY:",i[2])
print("CATEGORY:",i[3])
print("MFG_DATE:",i[4])
print("EXP_DATE:",i[5])
else:
print("ITEM is not available")
16 | P a g e
def deletest():
n=input("Enter the Product Name=")
cur=con.cursor() cur.execute("delete
from PRODUCTS where PRO_NAME=
%s",(n,)) print("The Record is Deleted")
con.commit()
def insertst():
n=input("Enter the Product
Name:") o=input("Enter the
Manufacture Date:")
p=input("Enter the Expiry
date:") f=input("Enter the
Category of Product:")
r=int(input("Enter the
Quantity:"))
s=int(input("Enter the MRP:
₹")) cur=con.cursor()
cur.execute("insert into PRODUCTS
(PRO_NAME,MFG_DATE,EXP_DATE,CATEGORY,
QUANTITY,PRICE)VALUES('{}','
{}','{}','{}',{},
{})".format(n,o,p,f,r,s))
con.commit()
print("____New Value is
Inserted____")
print(''' ''')
17 | P a g e
def
updat
est():
s=10
while
s!=5:
print("1) To Update
Product Name") print("2)
To Update Price of
Product") print("3) To
Update Quantity of
Product")
s=int(input("ENTER YOUR
CHOICE:")) if s==1:
n=input("Enter The Product Name
You Want To Update:")
p=input("Enter The New Product
Name:") cur=con.cursor()
cur.execute("update PRODUCTS
set PRO_NAME=%s where
PRO_NAME=%s",(p,n))
con.commit() print(".......Product
Name Updated........")
elif s==2:
n=input("Enter The Product Name
You Want To Update:")
p=input("Enter The New Price Of
Product:") cur=con.cursor()
cur.execute("update PRODUCTS set
PRICE=%s where
PRO_NAME=%s",(p,n))
18 | P a g e
con.commit()
print(".......Product Price
Updated........")
elif s==3:
n=input("Enter The Product Name
You Want To Update:")
p=input("Enter The New Quantity Of
Product:") cur=con.cursor()
cur.execute("update PRODUCTS set
QUANTITY=%s where PRO_NAME=
%s",(p,n)) con.commit()
print(".......Product Quantity
Updated........")
else:
print("Invalid Choice")
def
dispstoc
k_menu(
): A=10
while A!
=5:
print("1) Display by
Name of Product")
print("2) Diplay Full
Stock") print("3) Exit")
A=int(input("Enter
Your Choice:")) if
A==1: dispname()
19 | P a g e
elif A==2:
dispfullsto
ck()
elif A==3:
break
else:
print("INVALID CHOICE")
def updatestock_menu():
r=10
while
r!=5:
print("1) Insert a
Record") print("2)
Delete a Record")
print("3) Update a
Record") print("4)
Back")
r=int(input("ENTER
YOUR CHOICE:")) if
r==1: insertst()
elif r==2:
deletest
()
elif r==3:
updates
t()
elif r==4:
break
else:
print("Invalid Choice")
20 | P a g e
def
checkingsto
ck_menu():
q=0 while
q!=2:
print("1) Display
Stock") print("2)
Update Stock")
print("3) Back")
q=int(input("Enter
your choice:")) if
q==1:
dispstock_menu()
elif q==2:
updatestock_
menu()
elif q==3:
break
else:
print("Invalid Choice")
def
bill_m
enu():
p=10
while
p!=5:
21 | P a g e
print("1)DISPLAY BY NAME OF
CUSTOMER") print("2)DISPLAY BY
DATE OF PURCHASE")
print("3)BACK")
p=int(input("ENTER
YOUR CHOICE:")) if p==1:
n=input("Enter The Customer
Name:") cur=con.cursor()
cur.execute("select * from BILLS where
CUS_NAME=%s",(n,)) data=cur.fetchall()
for i in data:
print("Customer
Name:",i[0])
print("Phone
Number:",i[1])
print("Date of
Purchase:",i[2])
print("Product
Purchase:",i[3])
print("Quantity:",i[4])
print("Total Cost:₹",i[5])
print("Payment
Method:",i[6])
print(''' ''')
22 | P a g e
elif p==2:
n=input("Enter TheDate Of
Purchase:")
cur=con.cursor()
cur.execute("select
* from BILLS
whereDATE_PUR=
%s",(n,))
data=cur.fetchall()
for i in data:
print("Customer
Name:",i[0])
print("Phone
Number:",i[1])
print("Date of
Purchase:",i[2])
print("Product
Purchase:",i[3])
print("Quantity:",i[4])
print("Total Cost:₹",i[5])
print("Payment
Method:",i[6])
print(''' ''')
elif p==3:
break
def Admin_menu():
23 | P a g e
choice=10
while
choice!=3:
print("*********************
******ADMINWINDOW*********
*****")
print("Press 1 To
Check Stock")
print("Press 2 To
Display Bills")
print("Press 3 To
Back")
choice=int(input("E
nter Your
Choice:"))
if
choice==
1:
checkingstock_menu()
elif choice==2:
bill_menu()
elif choice==3:
break
else:
print("INVALID
CHOICE")
def User_menu():
print("***********************************
*
24 | P a g e
****USERWINDOW***********************
****
*************")
print("1)MakeBill")
print("2)Back")
ch=int(input("Enter
Your Choice:")) if
ch==1:
a=input("ENTER
CUSTOMER NAME:")
b=int(input("ENTER
PHONE NO:"))
f=input("ENTER PRODUCT
NAME:")
g=int(input("ENTER THE
QUANTITY:"))
d=int(input("ENTER COST:
₹")) e=input("ENTER
PAYMENT METHOD:")
cur=con.cursor()
today=date.today()
cur.execute("INSERT INTO
bills
VALUES('{}',{},'{}','{}',{},
{},'{}')".format(a,b,t
oday,f,g,d,e)) con.commit()
r=int(input("ENTER PHONE
NUMBER:")) l=[]
cur.execute("select *
from bills where
PHONE_NO=%s",(r,))
data=cur.fetchall()
if len(data)!=0:
25 | P a g e
found=1 for i in
range(0,len(data)):
l.append(data[i])
print(tabulate(l,headers=["CUS_NAME","PHONE_N
O","DATE_PUR","PRO_PURCHA
SED","QUANTITY","COST","PAY_METHOD"],tablefm
t="outline))print'')
def
main_me
nu():
ch=10
while ch!
=5:
print(''' ''')
print(“**** WELCOME TO GENERAL
STORE*************")
print("1) ADMIN")
print("2) USER")
print("3) QUIT")
ch=int(input("Enter
Your Choice:"))
if ch==1:
Admin_menu()
elif ch==2:
26 | P a g e
User_menu()
elif ch==3:
quit()
else:
print("Invalid Choice try
again")
main_menu()
Output Screen
1) First, the Home Page will appear
27 | P a g e
2) Press “1” to enter “ADMIN” option and then an
Admin Window will appear
28 | P a g e
4) If you select display you will further get 2 options:
29 | P a g e
6) If you select “Display Full Stock”, then full record will
be printed.
30 | P a g e
7) If you want to update the stock. You will get 3 options
31 | P a g e
10) If you want to Update an existing record press “3”
32 | P a g e
12) If you want to enter “USER” menu press “2”
33 | P a g e
Testing
Technology
➢ Black-Box Testing
The technique of testing Without naming any
knowledge of the interior workings of the
application is called black-box testing. The
tester is oblivious to the system architecture
and does not have access to the source code.
Typically, while performing a black-box test, a
tester Will interact with the system's user
interface by providing inputs and examining
outputs without knowing how and where the
inputs are worked upon. This testing can be
initiated on the basis of requirement
specifications document.It is mostly done by
software testers. No knowledge of
implementation is needed.This testing can be
initiated on the basis of requirement
specifications document.
➢ White-Box Testing
34 | P a g e
White-box testing is the detailed investigation
of internal logic and structure of the code.
White-box testing is also called glass testing
or open-box testing. In order to perform
white-box testing on an application, a tester
needs to know the internal workings of the
code.
It is mostly done by software
developers.Knowledge of implementation is
required.
References
Website Used:-
https://www.python.org
https://www.learnpython.org
https://www.google.com https://RaviSharma.com
Books Used:-
Computer Science with Python for Class 12
Book by Sumita Arora
35 | P a g e
THANK YOU
36 | P a g e
37 | P a g e