Mayoor School Noida
ACADEMIC YEAR : 2021-22
PROJECT REPORT ON
MOBILE SALES BILLING
ROLL NO : 7
NAME : Ansh Thakur
CLASS : XII C
SUBJECT : COMPUTER SCIENCE
SUB CODE : 083
PROJECT GUIDE: Sonia Pardasani
PGT (CS)
Mayoor School, Noida
1|Page
MAYOOR SCHOOL, NOIDA
CERTIFICATE
This is to certify that Ansh Thakur Roll No: 7 has successfully completed the project
work entitled Mobile Sales Billing in the subject Computer Science (083) laid down
in the regulations of CBSE for the purpose of Practical Examination in Class XII
to be held in Mayoor School, Noida on 12 November 2021.
Sonia Pardasani
PGT Computer Science
External Examiner:
Name: _______________
Signature:
2|Page
TABLE OF CONTENTS [ T O C ]
SER DESCRIPTION PAGE NO
01 ACKNOWLEDGEMENT 04
02 INTRODUCTION 05
03 OBJECTIVES OF THE PROJECT 05
04 PROPOSED SYSTEM 06
05 SYSTEM DEVELOPMENT LIFE CYCLE (SDLC) 07
06 PHASES OF SYSTEM DEVELOPMENT LIFE CYCLE 08
07 FLOW CHART 16
08 SOURCE CODE 17
09 OUTPUT 24
10 TESTING 28
11 HARDWARE AND SOFTWARE REQUIREMENTS 30
INSTALLATION PROCEDURE
12 31
13 BIBLIOGRAPHY 32
ACKNOWLEDGEMENT
3|Page
Apart from the efforts of me, the success of any project depends largely on
the encouragement and guidelines of many others. I take this opportunity to express
my gratitude to the people who have been instrumental in the successful completion
of this project.
I express my heartfelt gratitude to my parents and teachers for constant
encouragement while carrying out this project.
I gratefully acknowledge the contribution of the individuals who contributed in
bringing this project up to this level, who continues to look after me despite my flaws,
Other sources I used were Google , Wikipedia
Mobile sales billing
4|Page
INTRODUCTION
The mobile sales billing is basically a database project done with help of python
language. this project is very useful for the retailers to keep a count on what types of
mobiles they have and how much they sold.
OBJECTIVES OF THE PROJECT
Billing System Project in Python is
an easy python undertaking for novices from which they can discover ways
to develop python language project. This Mobile billing system can
be extremely useful for every one of those understudies,
programmer, software program engineers and python
learner students to discover how the code execute and work inside
the program.
5|Page
Description of System
In Mobile Store Management System use to maintain their sales detail in files and
folders. They use to keep the record of product sold, Customers, Suppliers,
etc in a register. A daily register is maintained to keep track of complaints. Preparing
report is very time consuming and tedious task. For searching of single record, whole
register is to be searched which is very time-consuming task.
Proposed System
The proposed system is computerized and has been developed using advance
language therefore it gives more facilities than present system. It provides quick
access to any data. In this system user have to enter the data only once and then it
get linked with all files. This reduces the workload of user and it is also a time saving
process.The information about any Subscriber can be easily retrieved. The system
maintains all records easy.
6|Page
Modules
import mysql.connecter:
By importing this package, we are able to
establish the connection between SQL and
Python.
import datetime:
This package provides basic functions for
display date related values in the program.
import random:
This package has functionality to generate
random numbers and select numbers within a
range.
Admin Functionalities:
o Login module
o Manage Category: Add, update or delete
o Manage Item: Add, update or delete
User Functionalities:
o Registration module
o Login module
o Place Order module
o Shopping Cart module
o Manage profile
7|Page
Functions
connect():
This function establishes connection between
Python and MySQL.
cursor():
It is a special control structure that facilitates
the row-by-row processing of records in the
result set.
The syntax is:
<cursor object>=<connection object>.cursor()
execute():
This function is use to execute the sql query
and retrieve records using python.
The syntax is:
<cursor object>.execute(<sql query string>)
fetchall():
This function will return all the rows from the
result set in the form of a tuple containing the
records.
commit():
This function provides changes in the
database physically.
8|Page
REQUIREMENTS ANALYSIS PHASE
The Online Mobile Shopping website is a web based application, which helps
consumer to find latest mobile with different specifications on internet. This website
allow people to directly buy latest mobile from website. Online Mobile Shopping
project has two main modules : Customer and Admin. Admin will maintain whole
system. The customer is a user who want to buy products from website. To buy
mobiles user need to register first and after that he can buy product and finally make
a online payment(dummy) to confirm the order.
9|Page
SYSTEM ANALYSIS AND DESIGN
Defining A System
Collections of components, which are interconnected, and work together to realize some
objective, form a system. There are three major components in every system, namely input,
processing and output.
Systems Life Cycle
The sequencing of various activities required for developing and maintaining
systems in an ordered form is referred as Systems Life Cycle. It helps
in establishing a system project plan as it gives overall list of process and sub-
processes required for developing any system. Here, the systems life cycle will be
discussed with reference to the development of Employee Management
System .Broadly, following are the different activities to be considered while defining
the systems development cycle for the said project:
Problem Definition
Systems analysis
Drawbacks of the existing system
Systems Requirement study Data flow analysis
Feasibility study
Systems design
Input Design (Database & Forms)
Updating
Query /Report Design
Testing
Implementation
Maintenance
System Analysis
System analysis is a logical process; the objective of this phase is not actually to
solve the problem but to determine what must be done to solve the problem. The
basic objective of the analysis stage is to develop the logical model of the
system using tools such as the data flow diagram and elementary data
description of the elementary algorithm. The logical model is Subject to review
10 | P a g e
Project Overview
Product prospective
It will be able to manage information about different tutorial in more user
friendly way. This system will manage tutorial information at various pages.
User ID and password has been given to all the field in admin accounts so
that they can enter their see by these information to login from admin and.
User Interface
The system will be having user privileges based menu.
User will have to select the options form the given menu.
The system will be selecting desire tutorial information from database.
The forms will be designed to enter the data.
Buttons will be used to insert, delete, clear and modify the data.
Buttons to exit from the forms.
OPERATIONS AND MAINTENANCE PHASE
The system operation is ongoing. The system is monitored for continued
performance in accordance with user requirements and needed system
modifications are incorporated. Operations continue as long as the system can be
effectively adapted to respond to the organization’s needs. When modifications or
changes are identified, the system may re enter the planning phase.
The purpose of this phase is to:
• Operate, maintain, and enhance the system.
• Certify that the system can process sensitive information.
• Conduct periodic assessments of the system to ensure the functional
requirements continue to be satisfied.
• Determine when the system needs to be modernized, replaced, or retired.
11 | P a g e
LOW CHART
1.COMMANDED PROGRAM WILL BE EXECUTED IN PYTHON IDLE .
2.AS THE PYTHON AND MYSQL ARE CONNECTED THE COMMAND WILL BE SENT TO MYSQL.
3.THE REQUIRED DATA WILL BE TAKEN FROM THE DATABASE.
4.THEN THE DATA WILL BE SEND TO THE PYTHON IDLE.
SOURCE CODE
FILE NAME : TABLES
12 | P a g e
import mysql.connector as sql
conn= sql.connect(host='localhost', user = 'root',
password ='manager')
c1=conn.cursor()
c1.execute("create database "+name_of_database)
c1.execute('use {}'.format(puj))
c1.execute("create table stock (product_no int(10)
primary key,product_name varchar(30),cost_per_product
int(10),stock int(10),purchased int(10) );")
c1.execute("create table user(username
varchar(255),passwd varchar(255));")
conn.commit()
FILE NAME : MAIN.py
import mysql.connector as sql
conn= sql.connect(host='localhost', user = 'root',
password ='manager',database ='sms')
c1=conn.cursor()
chpasswd='d'
print('''+--------------------------+
/////////////////////////
/////////////////////////
welcome to Game Point
////////////////////////
///////////////////////
+--------------------------+''')
c1.execute('select product_no,product_name from
stock;')
peee=c1.fetchall()
peee1=list(peee)
print('''PRODUCT PRODUCT NAME
NO''')
for i in range(0,int(len(peee))):
print(peee[i] )
it=0
bill=0
while 5>1:
13 | P a g e
print("==============================================
=============================================")
print("1. CUSTOMER")
print("2. ADMIN")
print("3.EXIT")
loggin=int(input('enter the
choice:'))
if loggin==1:
while 3>1:
print("==============================================
=============================================")
b=input('product number: ')
c1.execute('select product_name,cost_per_product from
stock where product_no =' + b)
data=
c1.fetchall()
data1=list(data[0])
print('product name :', data1[0])
print('cost of the product :', data1[1] )
appr=
input('do you want to buy it (Y/N) :')
if
appr == 'y' or appr =='Y' :
c1.execute("update stock set stock = stock-1 where
product_no= " + b )
c1.execute("update stock set purchased = purchased+1
where product_no=" + b )
bill+=int(data1[1])
it+=1
print("bought successfully!!!!")
opn = input(" Do you want buy any other thing (Y/N) :
")
14 | P a g e
if opn == 'y' or opn == 'Y':
continue
elif opn=='n' or opn=='N':
break
elif
appr =='n' or appr =='N':
opn = input(" Do you want buy any other thing (Y/N) :
")
if opn == 'y' or opn == 'Y':
continue
elif opn == 'n' or opn =='N':
just=input('MODE OF PAYMENT (Cash/Card):')
print(' BILL')
print(''' GAME POINT
NUMBER OF ITEMS PURCHASED:''',it)
print('''GRAND TOTAL AMOUNT:''',bill)
print('''MODE OF PAYMENT:''',just)
print('''*******THANK YOU*******
*******PLEASE VIST AGAIN*******''')
break
else:
print('####invalid command####')
break
conn.commit()
elif loggin==2:
print("1. veiw stock")
print("2. add stock")
15 | P a g e
print("3. Adding a new product")
ch=int(input("Enter your choice :"))
if
ch==1:
a=input('Enter the product number :')
c1.execute("select * from stock where product_no="+a)
dt=c1.fetchall()
dt1=list(dt[0])
print("product name :",dt1[1])
print("cost per product:",dt1[2])
print("stock available:",dt1[3])
print(" Number items purchased :",dt1[4])
elif
ch==2:
prdno=input("Enter the product number of the product
for which the stock is going to be updated:")
upd_value=int(input("enter the number of new stocks
came:"))
c1.execute("update stock set stock=stock+" +
str(upd_value) + " where product_no="+prdno)
conn.commit()
elif
ch==3:
pno1=input('Enter the product number of new
product:')
pna=input('Enter the product name of the new
product:')
cst=input('Enter the cost of the product:')
16 | P a g e
stock12=input('Enter the number of stocks of the new
product arrived:')
pch='0'
c1.execute("insert into stock values(" + pno1
+','+'"'+pna+'"'+','+cst+','+stock12+','+pch+')')
print("Added sucessfully!!!!!!!")
conn.commit()
else:
print('####INVALID OPTION ####')
elif loggin== 3:
print("...QUITING...
")
break
else:
print("###INVALID
OPTION####")
FILE NAME: SALES MANAGEMENT SYSTEM
import mysql.connector as sql
import datetime
d_day=datetime.date.today()
d_time=datetime.datetime.now()
conn= sql.connect(host='localhost', user = 'root',
password ='manager',database ='sms')
c1=conn.cursor()
print("SALES MANAGEMENT SYSTEM")
17 | P a g e
print(d_day.day,"/",d_day.month,"/",d_day.year,"
",d_time.hour,":",d_time.minute,)
chpasswd='d'
while 5>1:
print("1.LOGIN")
print("2.REGISTER")
print("3.VEIW ALL USERS")
print("4.EXIT")
choice=int(input('ENTER THE
CHOICE:'))
print("==============================================
==============================")
if choice == 1:
us=input('USERNAME:')
ps=input('PASSWORD:')
c1.execute("select *
from user where username = '{}' and passwd =
'{}'".format(us , ps))
data = c1.fetchall()
if any(data) :
import main
else:
print('''..SORRY..
WRONG.......USERNAME OR PASSWORD''')
elif choice == 2:
print("==============================================
=============================================")
li=input('ENTER THE
NEW USER ID:')
while 8>1:
li2=input('ENTER YOUR PASSWORD:')
li3=input('ENTER YOUR PASSWORD AGAIN(to confirm):')
if
li2== li3:
18 | P a g e
c1.execute("insert into user
values("+'"'+li+'",'+'"'+li3+'")')
print("ID has been successfully created:")
conn.commit()
break
elif choice ==3:
c1.execute("select
username from user")
data = c1.fetchall()
for row in data :
print(row)
elif choice == 4:
print(".......................LOGGING...........OUT..
..............")
break
else:
print('please enter
the right option')
OUTPUT
MAIN WINDOW
19 | P a g e
LOGIN WINDOW
CUSTOMER WINDOW
20 | P a g e
ADMIN WINDOW
REGISTER WINDOW
21 | P a g e
VEIW THE USERS WINDOW
22 | P a g e
EXIITING WINDOW
TESTING
23 | P a g e
Testing is vital to the success of any system. Testing is done at different stages
within the phase. System testing makes a logical assumption that if all phases of
the system are correct, the goals will be achieved successfully.
Inadequate
testing at all leads to errors that may come up after a long time when correction
would be extremely difficult. Another objective of testing is its utility as a user-
oriented vehicle before implementation. The testing of the system was done on
both artificial and live data.
HARDWARE AND SOFTWARE REQUIREMENTS
I.OPERATING SYSTEM : WINDOWS 7 AND ABOVE
II. PROCESSOR : PENTIUM(ANY) OR AMD
24 | P a g e
ATHALON(3800+- 4200+ DUAL CORE)
III. MOTHERBOARD : 1.845 OR 915,995 FOR PENTIUM 0R MSI
K9MM-V VIA K8M800+8237R PLUS
CHIPSET FOR AMD ATHALON
IV. RAM : 512MB+
V. Hard disk : SATA 40 GB OR ABOVE
VI. CD/DVD r/w multi drive combo: (If back up required)
VII. FLOPPY DRIVE 1.44 MB : (If Backup required)
VIII. MONITOR 14.1 or 15 -17 inch
IX. Key board and mouse
X. Printer : (if print is required – [Hard copy])
SOFTWARE REQUIREMENTS:
• Windows OS
• Python
• mysql connector modulle
INSTALLATION PROCEDURE
STEPS TO INSTALL SALES MANAGEMENT SOFTWARE:
1.FIRST OPEN THE FILE NAMED TABLE AND RUN IT.
2.SECOND OPEN THE SALES MANAGEMENT
SYSTEM FILE AND USE IT.
IMPORTANT THINGS TO BE NOTED:
25 | P a g e
1. THE SALES MANAGEMENT SYSTEM FILE SHOULD
BE PLACED AT THE MAIN PYTHON FILE.
2. FIRST, REGISTER YOUR ACCOUNT.
3.THEN ENTER YOUR PRODUCT DETAILS.
BIBLIOGRAPHY
• Computer science With Python - Class XII By : Sumita Arora
• A Project Report On SALES MANAGEMENT SYSTEM.
By :
• Website: https://www.w3resource.com
***
26 | P a g e