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

computer project

Uploaded by

vijayscts83
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

computer project

Uploaded by

vijayscts83
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 36

CBSE AFFILIATION NO: 1930859 SCHOOL CODE: 55771

SUBJECT CODE: 083

COMPUTER SCIENCE PROJECT

MOBILE SALES BILLING

Academic Session 2024-25

SUBMITTED BY
HARINAND S
SUBMITTED TO
Mr. G. Vijayanand M.Tech
(PGT in CS)
SRI CHAITANYA TECHNO SCHOOL
SALEM – 636004
TAMILNADU
CERTIFICATE

This is to certify that HARINAND S, Reg No ___________________ a student of

class 12 (Science) has successfully completed his project work under the guidance of

subject teacher Mr.Vijayanand G during the year 2024-25 from

SRI CHAITANYA TECHNO SCHOOL in partial fulfilment of COMPUTER

SCIENCE practical examination conducted by CBSE.

_______________________ _______________________
INTERNAL EXAMINER EXTERNAL EXAMINER

__________________
PRINCIPAL
ACKNOWLEDGEMENT

The success and final outcome of this project required a lot of guidance and

assistance from many people and I am extremely fortune to have got this all along

with the completion of my project work. Whatever I have done is only due to such

guidance and assistance and I would not forget to thank them.

I respect and thank computer teacher Mr.Vijayanand G, for giving me an

opportunity to do this project work and providing me with all support and guidance

which made me complete the project on time.

Last but not least I would like to thank all my friends who supported me all the

way and my parents who helped me financially and encouraged me throughout the

completion of the project

HARINAND S
TABLE OF CONTENTS

S.No DESCRIPTION PAGENO

01 ACKNOWLEDGEMENT A

02 INTRODUCTION 1-2

03 OBJECTIVES OF THE PROJECT 2-5

04 PROPOSED SYSTEM 6-7

05 SYSTEM DEVELOPMENT LIFE CYCLE 8-10

06 PHASES OF SYSTEM DEVELOPMENT LIFE CYCLE 10-11

07 FLOW CHART 12

08 SOURCE CODE 13-24

09 OUTPUT 25 -28

10 TESTING 29

11 HARDWARE AND SOFTWARE REQUIREMENT 30-31

12 BIBLIOGRAPHY 32
INTRODUCTION
Now-a-days fast-paced and technology-driven world,
efficient sales management have become a necessity for businesses of
all sizes. Managing sales, billing, and inventory manually can often
lead to errors, inefficiencies, and wasted time. This is especially true
in retail sectors, where the need for accurate and quick billing,
inventory updates, and sales tracking is critical to maintaining smooth
operations and customer satisfaction.
The Mobile Sales Billing System is a software-based
solution developed to simplify and automate the sales and billing
processes for mobile retailers. By replacing traditional manual
systems, it ensures a more streamlined, error-free, and time-efficient
way to handle everyday sales activities. The system integrates a user-
friendly interface with a reliable backend database, enabling quick
data access, secure storage, and efficient record management’
Designed with modern requirements in mind, this system
enables retailers to focus on providing excellent service while
reducing administrative burdens. It keeps track of product inventory,
customer transactions, and billing information in a structured and
organized manner, ensuring that critical data is always available at the
user's fingertips.

1
This project showcases the application of programming and
database management to create a functional and practical solution for
businesses. The Mobile Sales Billing System not only simplifies the
sales process but also enhances productivity and ensures greater
accuracy in business operations.

OBJECTIVES OF THE PROJECT

The Mobile Sales Billing System is developed to address


the organizational need for a streamlined and automated process for
managing sales, inventory, and customer interactions. This system
seeks to overcome the limitations of traditional manual methods by
providing a reliable, efficient, and user-friendly computerized
solution. The following objectives guide the development of this
project:

MODERNIZING SALE

To replace the manual processes of maintaining sales


registers and inventory records with an automated system, ensuring
accuracy and efficiency in daily operations.

2
EFFICIENT RECORD KEEPING

To maintain detailed and systematic records of sales,


customer transactions, and inventory levels, allowing easy retrieval of
information when required.

TIME OPTIMIZATION
To minimize the time required for billing and sales
reporting by automating these tasks, thereby increasing productivity
and reducing delays in operations.

ERROR REDUCTION:
To eliminate human errors in calculations, record
management, and inventory tracking through an automated and
reliable database-driven system.

IMPROVED ACCESSIBILITY
To provide instant access to critical information, such as
product details, stock availability, and sales history, enabling better
decision-making and customer service.

REAL TIME UPDATES

To enable real-time updates of stock levels as sales are


made, ensuring that inventory data remains accurate and up to date at
all times.

3
CUSTOMER SATISFACTION
To enhance the customer experience by providing quick
billing and accurate invoices, fostering trust and satisfaction.

EDUCATIONAL VALUE
To serve as a practical learning project for students,
showcasing the integration of Python programming with MySQL
database management to create a functional and impactful system.

SCABLE SYSTEM DESIGN


To design a system that can adapt to the growing needs of
an organization, allowing for the addition of new features and
functionalities as required.

BUSINESS GROWTH FACILITATION


To empower mobile retailers with tools that streamline
their operations, reduce administrative burdens, and allow them to
focus on expanding their business and improving service delivery.
The implementation of this project is aimed at not only solving
immediate organizational challenges but also equipping retailers
with a robust system that aligns with their long-term business goals.

4
DESCRIPTION OF A 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.

5
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.
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

6
User Functionalities:

o Registration module
o Login module
o Place Order module
o Shopping Cart module
o Manage profile

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.
. 7
SYSTEM ANALYSIS AND DESIGN
Defining a System
Collections of components, which are interconnected,and
work together torealize some objective, form a system. There are
three major components inevery system, namely input, processing and
output.

SYSTEM DEVELOPMENT LIFE


CYCLE
The sequencing of various activities required for developing
and maintainingsystems in an ordered form is referred as
Systems Life Cycle. It helps inestablishing a system project
plan as it gives overall list of process and sub-processes required for
developing any system. Here, the systems life cycle willbe
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
8
 Updating
 Query /Report Design
 Testing
 Implementation
 Maintenance.

SYSTEM ANALYSIS

System analysis is a logical process; the objective of this


phase is not actually tosolve the problem but to determine what must
be done to solve the problem. Thebasic objective of the analysis stage
is to develop the logical model of thesystem using tools such as
the data flow diagram and elementary datadescription of the
elementary algorithm.

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 sothat they can enter their see by these
information to login from admin and User Interface.

9
 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.

PHASES OF SYSTEM DEVELOPMENT


LIFE CYCLE
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.

10
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
FLOW 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.

12
SOURCE CODE
FILE NAME: TABLES
python
Copy code
importmysql.connector as sql
# Establish a connection to MySQL server
conn = sql.connect(
host='localhost',
user='root',
password='manager'
)
# Create a cursor object
c1 = conn.cursor()
# Prompt user for database setup
print("Welcome to the database setup program!")
print("======================================
===")
print("Let's begin by creating a new database.")
# Input the name of the databasename_of_database =
input("Enter the name of the new database: ")
13
print(f"Creating database '{name_of_database}'...")
# Create the database
c1.execute("CREATE DATABASE " +
name_of_database)
print(f"Database '{name_of_database}' created
successfully!")

# Use the newly created database


print(f"Switching to database '{name_of_database}'...")
c1.execute("USE " + name_of_database)
print(f"Successfully switched to '{name_of_database}'.")
# Create required tables
print("Now creating the required tables...")
stock_table_query = """
CREATE TABLE stock (
product_no INT(10) PRIMARY KEY,
product_name VARCHAR(30),
cost_per_product INT(10),
stock INT(10),
purchased INT(10)
);
14
"""
c1.execute(stock_table_query)
print("Table 'stock' created successfully.")

user_table_query = """
CREATE TABLE user (
username VARCHAR(255),
passwd VARCHAR(255)
);
"""
c1.execute(user_table_query)
print("Table 'user' created successfully.")
# Commit changes and close the connection
conn.commit()
print("All changes saved to the database.")
conn.close()
print("Database setup completed! Connection closed.")
FILE NAME: MAIN.py
python
Copy code
importmysql.connector as sql
# Connect to the SMS database
15
conn = sql.connect(
host='localhost',
user='root',
password='manager',
database='sms'
)
c1 = conn.cursor()
print('''
+--------------------------+
/////////////////////////
/////////////////////////
Welcome to Game Point
/////////////////////////
/////////////////////////
+--------------------------+
''')
# Fetch and display product details
c1.execute("SELECT product_no, product_name FROM
stock;")
products = c1.fetchall()
print("PRODUCT NO PRODUCT NAME")

for product in products:


16
print(f"{product[0]} {product[1]}")
# Initialize customer variables
item_count = 0
total_bill = 0
# Main menu for user actions
while True:
print("=" * 90)
print("1. CUSTOMER")
print("2. ADMIN")
print("3. EXIT")
choice = int(input("Enter your choice: "))
if choice == 1:
# Customer menu
while True:
print("=" * 90)
product_no = input("Enter product number: ")
c1.execute(f"SELECTproduct_name, cost_per_product
FROM stock WHERE product_no={product_no};")
product_details = c1.fetchall()
ifproduct_details:
product_name, product_cost = product_details[0]
print(f"Product Name: {product_name}")
17
print(f"Cost: {product_cost}")
buy = input("Do you want to buy this product (Y/N)?
").strip().lower()
if buy == 'y':
c1.execute(f"UPDATE stock SET stock = stock - 1
WHERE product_no = {product_no};")
c1.execute(f"UPDATE stock SET purchased = purchased
+ 1 WHERE product_no = {product_no};")
conn.commit()
item_count += 1
total_bill += product_cost
print("Product added to cart successfully!")

continue_shopping = input("Do you want to buy another


product (Y/N)? ").strip().lower()
ifcontinue_shopping == 'n':
payment_mode = input("Enter payment mode
(Cash/Card): ").strip()
print("** BILL **")
print(f"Items Purchased: {item_count}")
print(f"Total Amount: {total_bill}")
print(f"Payment Mode: {payment_mode}")
18
print("Thank you for shopping with us!")
break
else:
break
else:
print("Invalid product number. Please try again.")

elif choice == 2:
# Admin menu
print("Admin Menu")
print("1. View Stock")
print("2. Add Stock")
print("3. Add New Product")
admin_choice = int(input("Enter your choice: "))

ifadmin_choice == 1:
product_no = input("Enter product number to view: ")

c1.execute(f"SELECT * FROM stock WHERE


product_no = {product_no};")
stock_details = c1.fetchall()
for detail in stock_details:
19
print(f"Product No: {detail[0]}, Name: {detail[1]}, Cost:
{detail[2]}, Stock: {detail[3]}, Purchased: {detail[4]}")

elifadmin_choice == 2:
product_no = input("Enter product number to update
stock: ")
new_stock = int(input("Enter new stock quantity: "))
c1.execute(f"UPDATE stock SET stock = stock +
{new_stock} WHERE product_no = {product_no};")
conn.commit()
print("Stock updated successfully.")

elifadmin_choice == 3:
pno = input("Enter new product number: ")
pname = input("Enter new product name: ")
cost = input("Enter product cost: ")
stock = input("Enter stock quantity: ")
c1.execute(f"INSERT INTO stock VALUES ({pno},
'{pname}', {cost}, {stock}, 0);")
conn.commit()
print("Product added successfully.")
20
elif choice == 3:
print("Exiting system. Goodbye!")
break
else:
print("Invalid choice. Please try again.")

FILE NAME: SALES MANAGEMENT SYSTEM


python
Copy code
importmysql.connector as sql
importdatetime

# Function to connect to the MySQL database


defconnect_to_database():
returnsql.connect(host='localhost', user='root',
password='manager', database='sms')
# Function to print the application header
defprint_header():
print("+------------------------------------+")
print(" SALES MANAGEMENT SYSTEM ")
print("+------------------------------------+")
21
# Function to print the current date and time
defprint_date_time():
today = datetime.date.today()
current_time = datetime.datetime.now()
print(f"Date: {today.day}/{today.month}/{today.year}")
print(f"Time:
{current_time.hour}:{current_time.minute}")

# Function to register a new user


defregister_user(cursor, connection):
username = input("Enter a new username: ")
password = input("Enter a password: ")
cursor.execute("INSERT INTO user VALUES (%s, %s)",
(username, password))
connection.commit()
print("User registered successfully.")

# Function to log in a user


deflogin_user(cursor):
username = input("Username: ")

password = input("Password: ")


22
cursor.execute("SELECT * FROM user WHERE
username = %s AND passwd = %s", (username,
password))
return bool(cursor.fetchone())
# Function to display the main menu
defmain_menu(cursor, connection):
while True:
print("1. LOGIN")
print("2. REGISTER")
print("3. EXIT")
choice = int(input("Enter your choice: "))
if choice == 1:
iflogin_user(cursor):
print("Login successful.")
else:
print("Invalid credentials.")
elif choice == 2:
register_user(cursor, connection)

elif choice == 3:
print("Exiting system. Goodbye!")
break
23
else:
print("Invalid choice. Please try again.")

if _name_ == "_main_":
print_header()
print_date_time()

connection = connect_to_database()
cursor = connection.cursor()
main_menu(cursor, connection)
cursor.close()
connection.close()

24
OUTPUT
MAIN WINDOW

LOGIN WINDOW

25
CUSTOMER WINDOW

ADMIN WINDOW

26
REGISTER WINDOW

VIEW THE USERS WINDOW

27
EXITING WINDOW

28
TESTING
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 onboth artificial and live data.

LEVELS OF TESTING

Client needs Acceptance


testing

System System
requirement testing
specification Integration
Design

Coding Unit testing

29
HARDWARE AND SOFTWARE
REQUIREMENTS
I.OPERATING SYSTEM : WINDOWS 7 ANABOVE
II. PROCESSOR : PENTIUM(ANY) OR AMD
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 module
30
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:

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.

31
BIBLIOGRAPHY
 https://www.geeksforgeeks.org/python-mysql-mobile-sales-
management-system/

 https://www.javatpoint.com/python-mysql-crud-operations

 https://www.w3schools.com/python/python_mysql_getstarte
d.asp

 Sumita Arora Class Xll Text Book


 Preethi Arora Class Xll Text Book

*****

32

You might also like