Tushar - Multiple Outlet Shoe Billing System

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 15

ARMY PUBLIC SCHOOL

DHAULA KUAN

COMPUTER SCIENCE
PROJECT FILE

“MULTIPLE OUTLETS BASED SHOE


BILLING SYSTEM”

SUBMITTED BY:
TUSHAR
12 E
Roll Number: 35
CERTIFICATE

This is to certify that the project entitled MULTIPLE


OUTLETS BASED SHOE BILLING SYSTEM is
prepared under my supervision and guidance by:
NAME : TUSHAR
ROLL NO: 35
CLASS: XII-E

SUBJECT: COMPUTER SCIENCE


SESSION: 2022-2023

SUBMITTED TO: Ms. Pallavi Sharma


SIGNATURE: ……………………
ACKNOWLEDGEMENT

I would like to express my special thanks and gratitude to


my teacher Ms. Pallavi Sharma who has always guided me
and gave me the golden opportunity to do this wonderful
project which helped me a lot with my concepts.
#Index
• Introduction

• Program

• Output

• Bibliography

Introduction
This project aims to illustrate the application of DBMS in python using the
MYSQL and MySQL-connector (Python).

An attempt is made to create a real-time in-sync DBMS that is targeted towards


shopkeepers who own and manage multiple outlets. An input/ entry by any of the
outlets will be reflected throughout the database and other outlets can also refer
to the entered data.

This project provides users the option to:-

1. Create an account where only username and password are required.


2. Add records such as shoe code, brand name of the shoe, customer's name,
customer's mobile number,

Customer’s address and amount paid for the shoes.

3. Search entries in the database on the basis of shoe


Codes.

4. Display all entries registered till that point of time.


Program
Import mysql.connector as sql

#Create a database, shoe billing during practicals,

conn=sql.connect (host=”localhost”, “users”=root passwd=”4321”, database=”


shoe billing”)

if conn.is_connected():
print("")
print("Python connection status with MYSQL Successfully")
print("Welcome to Multiple Outlets Billing System.")
print(“”)

cursor.execute("CREATE TABLE User Details (User Name VARCHAR(256),


Password VARCHAR (256)))

cursor.execute("CREATE TABLE Shoe Details(shoe code INT(10) PRIMARY


KEY,brand name varchar(258), customer_name VARCHAR(25) customer
number INT(250),customer address VARCHAR(100); amount INT(250))")

a=True

while a== True:


print("Choices available")

print("1 CREATE ACCOUNT)

print("2 LOGIN")

choice = int(input("Enter your choice."))

if choice ==1:

user_name =input("Enter a username”)

password_= input("Enter a password”)

try:
cursor.execute(“Insert into user_details(username,password)
values( “{}”,”{}).format(user_name,password_)
conn.commit()

except:

print("Problem encountered! Please check source code!1)

conn.close()

elif choice == 2:

user=input("Enter username: ")

password=input("Enter password: ")

cursor.execute("SELECT* from user_details”)


data01= cursor.fetchall())

for (USer, passwd) in data01:

if User== user and password= passwd:

print( “----------------------------------------------------------------------------“)
print(“ shoe billing “)
print( “----------------------------------------------------------------------------“)
print(“ “)

print("1: ENTER CUSTOMER DETAILS")

print(" “)

print("2: SEARCH CUSTOMERS DETAILS BY SHOE CODE”)


print(" “)
print("3: SHOW ALL CUSTOMER DETAILS.”)
print(" “)

v_choice=int(input("enter the choice: "))


if v_choice==1:

code= input("Enter code: ")


brand =str(input("Enter brand: "))
name =str(input("Enter customer name:”))

phone_number= input("Enter phone number:”)

details= input("Enter address:”)

amount =input("Enter amount paid: ")


try:
cursor.execute(“Insert into
shoe_details(shoe_code,brand_name,customer_name,customer_number,customer
_address,amount) values({},”{}”,”{}”,{},”{}”,{}).format(code, brand, name,
phone number, details, amount)
conn.commit()

except:

print("Problem encountered! Please check source codel!")

conn.close()

elif choice==2:

v_code=input("Enter the code number: ")


cursor.execute("SELECT * from shoe details WHERE shoe_code = “)

data02=cursor.fetchall()
print("Shoe code:", data02[0][0])
print("Brand name:", data02[0][1])

print("Customer name”, data02[0][2])


print("Customer number data02[0][3])

print("Customer detail, data02[0][4])

print("Amount paid:",data02[0][5])

elif v_choice == 3:

sql = "SELECT FROM shoe details"

cursor.execute(sql)
data03= cursor.fetchall()

for i in data03:

print(1)
conn.commit()

else: print("Entered invalid choice.")

else:

pass

else:

option input("Do you want to continue? (Yes or No): ")

if option =="No:
print("Hope you liked the service! Please have a nice day!")

break

else:

pass

else:
print(“Enter a valid choice please!:)
print(“”)
break
Output
Booting the code for the first time :-
Python connection status with MYSQL: Sucessfully

Welcome to Multipe Outlets Billing System.

Choices available:- 1. CREATE ACCOUNT

2. LOGIN

Enter your choice:

Creating an outlet account -


Choices available:-

1. CREATE ACCOUNT

2. LOGIN

Enter your choice: 1

Encer a username: MIFE

Enter a password: 12381K822 Values Entered

Choices availabler-

1 CREATE ACCOUNT

2. LOGIN

Enter your choice:


Logging in to an outlet account :-
Enter your choice: 2

Enter username: NIKE

Enter password: 123K922

Shoe Billing

11ENTER CUSTOMER DETAILS

21 SEARCH CUSTOMERS DETAILS BY SHOE CODE

31 SHOW ALL CUSTOMER DETAILS.

enter the choice:

Entering billing details after login :-


enter the choice: 1

Enter code: 004

Enter brand: NIKE

Enter customer name: AMAN

Enter phone number: 22763548

Enter adress: GREATER NOIDA

Enter amount paid: $450 Values Entered

Do you want to continue? (Yes or No)


Auto-lock after completing an action:-
Do you want to continue?(Yes or Boys Tex

Choices available:- CREATE ACCOUNT

2. LOGIN

Enter your choice: 2

Enter username) NIKE

Enter password: 123822

Shoe Billing

ENTER CUSTOMER DETAILS

21 SEARCH CUSTOMERS DETAILS BY SHOE CODE

3 SHOW ALL CUSTOMER DETAILS

enter the choices:

Searching about a shoe's details based on shoe


code:-
enter the choice: 2

Shoe code: 4
brand name: NIKE

Enter the code numbers 004


Customer Name :AMAM
Custome number: 22763548
Do want to continue? (Yes or No) :
Auto-lock after completing an action
Do you want to continue? (Yes or no): yes

Choices availables-

CREATE ACCOUNT

LOGIN

Enter your choice: 2

Enter username: NIKE

Enter password: 1231822

Shoe Billing

1:ENTER CUSTOMER DETAILS

2: SEARCH CUSTOMERS DETAILS ST SE COSE.

3 SHOW ALL CUSTOMER DETAILS

Enter the choice:

Viewing all entries made so far and exiting the


application :-
Shoe Billing

1:ENTER CUSTOMER DETAILS


2 :SEARCH CUSTOMERS DETAILS BT SHOE CODE.

3: SHOW ALL CUSTOMER DETAILS.

enter the choice: 3

(1,”WOODLAND”, “SIMARTH”, 98765432, “DWARKA SECTOR 7”, 9850)


(2. “LEECOOPER’, “SMASHI”, 67343250,” DHAULA KUAN” 5000)
(3, “WIKE, 'SANSKAR”, 21874545, “MOTI BAGH”, 3590)
(4, “BIKE”,” AMAN”, 22763548, “GREATER NOIDA”,4444)

Do you want to continue?(Tes or No):


Hope you liked the service! Please have a nice day!
Bibliography

1. Python Programming Using Problem Solving Approach by Reema


Thareja.
2. Computer Science with Python by Sumita Arora.
3. cs2study.com

You might also like