0% found this document useful (0 votes)
32 views25 pages

Cloth Store Management System

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views25 pages

Cloth Store Management System

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

SARVODYA KANYA VIDYALAYA

NO.1

2024-25
IN
COMPUTER SCIENCE [083]
SUBMITTED TO:
Mrs.Rajni
Submitted by:
Drishti Rajpoot
XII-A
50
CERTIFICATE

This is to certify that Drishti Rajpoot, a student of class XII has


successfully completed the research on the project under the
guidance of Mrs Rajni subject teacher during the year 2024-
2025 in partial fulfilment of COMPUTER SCIENCE conducted by
CBSE, New Delhi.

Name of External Examiner Name of Internal Examiner

Signature Signature
ACKNOWLEDGEMENT

I, Drishti Rajpoot of class XIIth-A

I would like to express my sincere gratitude to my computer


science teacher Mrs. RAJNI, PGT COMPUTER SCIENCE, for her
vital support, guidance and encouragement - without which this
project would not have come forth.

I would also like to express my gratitude to my school


SARVODAYA KANYA VIDALAYA (M.PK) No.1 for letting me use
the school laboratory.
INDEX
INDEX

Brief overview of the project


Input and Output Data Validation
Hardware Requirements
Software Requirements
Functions And Modules
Source Code
Source Code Screening
Output of the Code
Bibliography
Objective of the project
The main objective of the python project on cloth store
management system is to manage the details of sales, purchase
payments, products, and inventory digitally.
The project is totally built at administrative end and customers
can also get access to shop from the store and administrator is
also guaranteed the access .The purpose of the project is to
build an application program to reduce the manual work for
managing the sales, purchase, stock, and payments.
It tracks all the details about stocks, products, and inventory, it
also prints various reports as per input given by the user.

INPUT DATA AND VALIDATION OF PROJECT


 All the fields such as sales payments discounts are validated
and do not take invalid values.
 Each form of sales, discounts, stock cannot accept the blank
values.
 Avoiding errors in data.
 Controlling amount of input.
HARDWARE REQUIREMENTS:

A computer for coding and typing the required documents of the


program.
Printer to print the required documents of the project.
A computer drive
Processor Pentium quad core
Ram
Hard Disk

SOFTWARE REQUIREMENTS:

Opening system ,Windows 10


Python IDLE for execution of the program
My sql for storing data in the database
Python-My SQL connector for database management system
 Microsoft Word for presentation of output
SOURCE
SOURCECODE
CODE

import mysql.connector

print("""

****************************SKV No.1 MADANPUR KHADAR************************

****************************Welcome to Cloth store**************************

""")

mydb=mysql.connector.connect(host="localhost",user='root',passwd='0123456789')

mycursor=mydb.cursor()

mycursor.execute("create database if not exists sales_dr")

mycursor.execute("use sales_dr")

mycursor.execute("create table if not exists login(username varchar(25) not null,password


varchar(25) not null)")

mycursor.execute("create table if not exists purchase(odate date not null,name varchar(25)not


null,pcode int not null,amount int not null)")

mycursor.execute("create table if not exists stock(pcode int not null,pname varchar(25)not


null,quantity int not null,price int not null)")
mydb.commit()

z=0

mycursor.execute("select*from login")

for i in mycursor:

z+=1

if(z==0):

mycursor.execute("insert into login values('username','ng')")

mydb.commit()

while True:

print("""

1.Admin

2.Customer

3.Exit

""")

ch=int(input("Enter your choice:"))

if(ch==1):

passs=input("Enter password:")

mycursor.execute("select*from login")

for i in mycursor:

username,password=i

if(passs==password):

print("welcome to cloth store")

loop2='y'

while(loop2=='y'or loop2=='Y'):

print(""" 1.Add new item

2.updating price

3.Deleting items

4.Display all items

5.chang password
6.Log out

""")

ch=int(input("Enter your choice:"))

if(ch==1):

loop='y'

while(loop=='y'or loop=='Y'):

pcode=int(input("Enter product code:"))

pname=input("Enter product name:")

quantity=int(input("Enter Quantity:"))

price=int(input("Enter product price:"))

mycursor.execute("insert into stock


values('"+str(pcode)+"','"+pname+"','"+str(quantity)+"','"+str(price)+"')")

mydb.commit()

print("record inserted")

loop=input("Do you want to add more item(y/n):")

loop2=input("Do you want continue editing stock(y/n):")

elif(ch==2):

loop='y'

while(loop=='y'or loop=='Y'):

pcode=int(input("Enter product code:"))

new_price=int(input("Enter new price:"))

print("**pirce updated successfully**")

mycursor.execute("update stock set price='"+str(new_price)+"'where


pcode='"+str(pcode)+"'")

mydb.commit()

loop=input("Do you want to change price of any other item(y/n):")

loop2=input("Do you want to continue editing stock(y/n):")

elif(ch==3):

loop='y'

while(loop=='y'or loop=='Y'):
pcode=int(input("Enter product code:"))

mycursor.execute("delete from stock where pcode='"+str(pcode)+"'")

print("**product deleted successfully**")

mydb.commit()

loop=input("Do you want to delete any other data(y/n):")

loop2=input("Do you want to editing stock(y/n):")

elif(ch==4):

mycursor.execute("select*from stock")

print("pcode||pname||quantity||price")

for i in mycursor:

t_code,t_name,t_quan,t_price=i

print(f"{t_code}||{t_name}||{t_quan}||{t_price}")

elif(ch==5):

old_passs=input("Enter old password:")

mycursor.execute("select*from login")

for i in mycursor:

username,password=i

if(old_passs==password):

new_passs=input(" Enter new password:")

mycursor.execute("update login set password='"+new_passs+"'")

print("**new password updateted**")

else:

print("**wrong old password**")

mydb.commit()

elif(ch==6):

print("**you are logged out**")

break

######################customer section
elif(ch==2):

print("""1.Item Bucket

2.Payment

3.Veiw available items

4.go back

""")

ch2=int(input("enter your choice:"))

if(ch2==1):

name=input("Enter your name:")

pcode=int(input("Enter product code:"))

quantity=int(input("Enter product quantity:"))

mycursor.execute("select * from stock where pcode='"+str(pcode)+"'")

for i in mycursor:

t_code,t_name,t_quan,t_price=i

amount=t_price *quantity

net_quan=t_quan-quantity

mycursor.execute("update stock set quantity='"+str(net_quan)+"'where


pcode='"+str(pcode)+"'")

mycursor.execute("insert into purchase values(now(),'"+str(pcode)+"','"+str(amount)+"')")

mydb.commit()

elif(ch2==2):

print(f"amount to be paid{amount}")

elif(ch2==3):

print("CODE||NAME||PRICE")

mycursor.execute("select* from stock")

for i in mycursor:

t_code,t_name,t_quan,t_price=i

print(f"{t_code}||{t_name}||{t_price}")

elif(ch2==4):
print("you have been logged out")

break

elif(ch==3):

print("YOU HAVE BEEN EXITED")

break
SOURCE
SOURCECODE
CODESCREENING:
SCREENING:

#login table

#purchase table
#stock table
OUTPUT
OUTPUT OF
OF CODE:
CODE:

#Main menu

#add new items

#update price
#deleting items

#view all items

#to change password


#log out

#customer(item bucket)
#view available items

# go back

#exit
Bibliography
Bibliography
 The Complete Reference python
 MySQL, Black Book
 Understanding SQL
 http://www.mysql.org/
 NCERT Book for class XII
 Together with Informatics Practices
 Various Websites of Discussion Forum and software
development activities.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy