computer project
computer project
SUBMITTED BY
HARINAND S
SUBMITTED TO
Mr. G. Vijayanand M.Tech
(PGT in CS)
SRI CHAITANYA TECHNO SCHOOL
SALEM – 636004
TAMILNADU
CERTIFICATE
class 12 (Science) has successfully completed his project work under the guidance of
_______________________ _______________________
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
opportunity to do this project work and providing me with all support and guidance
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
HARINAND S
TABLE OF CONTENTS
01 ACKNOWLEDGEMENT A
02 INTRODUCTION 1-2
07 FLOW CHART 12
09 OUTPUT 25 -28
10 TESTING 29
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.
MODERNIZING SALE
2
EFFICIENT RECORD KEEPING
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.
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.
4
DESCRIPTION OF A SYSTEM
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 ANALYSIS
PRODUCT PROSPECTIVE
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.
10
OPERATIONS AND MAINTENANCE PHASE
11
FLOW CHART
1.COMMANDED
PROGRAM WILL BE
EXECUTED IN PYTHON
IDLE.
3.THE REQUIRED
DATA WILL BE TAKEN
FROM THE
DATABASE.
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!")
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")
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: ")
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.")
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
27
EXITING WINDOW
28
TESTING
Testing is vital to the success of any system. Testing is done
assumption that if all phases of the system are correct, the goals
errors that may come up after a long time when correction would be
LEVELS OF TESTING
System System
requirement testing
specification Integration
Design
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
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
*****
32