SlideShare a Scribd company logo
1 of 28
Download to read offline
Type Your School Name
Project Report
On
COSMETIC SHOP SYSTEM
…………………………………………..
(SESSION-……………)
………………………….
…...............
LOGO
ACKNOWLEDGEMENT
I would like to convey my heartful thanks to
……………………………. (Computer Science) who always
gave valuable suggestions & guidance for completion of my
project.
He helped me to understand & remember important details of
the project. My project has been a success only because of his
guidance.
I am especially indented & I am also beholden to my friends. And
finally I thank to the members of my family for their support &
encouragement.
CERTIFICATE
This is to certify that …………………… of class
………… of ……………………………. has
completed his project under my supervision. He has taken
proper care & shown sincerity in completion of this project.
I certify that this project is up to my expectation &
as per the guideline issued by CBSE.
…………………………..
(Computer Science faculty)
Content
1. Introduction
2. Flowchart Design
3. Database Structure
4. Source Code
5. Output
6. Requirement
7. Advantages and disadvantages
8. Conclusion
9. Bibliography
INTRODUCTION
Cosmetics Shop Management System is a complete solution for
managing a Shop, in other words, an enhanced tool that assists
in organizing the day-to-day activities of a Shop. There is the
need of an application for efficient management and handling
customer orders. This Cosmetics Shop Management System
keeps every record Shop and reducing paperwork.
These records are stored in the database with security. Your
data be a secure and only authorized person can take the copy
of data.
The main processes of the system focus on customer's request
where the system is able to search the most appropriate products
and deliver it to the customers. It should help the employees to
quickly identify the list of cosmetic product that have reached
the minimum quantity.
FLOWCHART DESIGN
DATABASE STRUCTURE
Table Name: cosmetic
Column Name Data type/Size Constraints
costid int(11) Primary key
costname varchar(30)
type varchar(15)
company varchar(15)
qty int(11)
price int(11)
des varchar(40)
Table Name: costinvoice
ColumnName Data Type Constraint
invoid int(11) Primary Key
costid int(11)
custnm varchar(25)
mobno varchar(15)
qty int(11)
status varchar(15)
invoiceno int(11)
amt int(11)
dateSP date
SOURCE CODE
File Name: cosmatic_menu.py
"""*************************************************************
THE MAIN FUNCTION OF PROGRAM
****************************************************************"""
import platform
import os
def myclear():
if platform.system()=="Windows":
print(os.system("cls"))
def intromain():
myclear()
print("***SMETIC*****MANAGEMENT****SYSTEM******PROJECT*******************")
print("***************************************************************************")
def intro():
print("*************************COSMETIC-MANAGEMENT***************************")
print("===========================================================")
print("****************************S=Y=S=T=E=M********************************")
print("PROJECT:")
print("MADE BY : ……………………")
print("---------------SCHOOL : DOON PUBLIC SCHOOL--------------------")
def main():
ch=0
myclear()
intromain()
print("=================MAIN MENU====================")
print("01. COSMETIC REPORT GENERATOR")
print("02. ADMINISTRATOR")
print("03. EXIT")
print("==============================================")
ch=int(input("Please Select Your Option (1-3)"))
return ch
def cosmetic_menu():
ch=0
intromain()
print("===========COSMETIC INFO MENU===========")
print("01. ADD COSMETIC INFORMATION")
print("02. MODIFY COSMETIC INFORMATION")
print("03. DELETE COSMETIC INFORMATION")
print("04. BACK TO MAIN")
print("==============================================")
ch=int(input("Please Select Your Option (1-4) "))
return ch
"""***************************************************************
ADMINSTRATOR COSMETIC FUNCTION
****************************************************************"""
def admin_menu1():
ch=0
myclear()
intromain()
print("=================COSMETIC ADD MENU====================")
print("1.CREATE COSMETIC DETAILS")
print("2.DISPLAY ALL CORMETIC DETAILS")
print("3.SEARCH RECORD BY COSMETIC PRODUCT ID")
print("4.SEARCH RECORD BY COSMETIC PRODUCT NAME")
print("5.SEARCH RECORD BY PRICE")
print("6.SEARCH RECORD BY TYPE")
print("7.SEARCH RECORD BY COMPANY")
print("8.BACK TO MAIN MENU")
ch=int(input("Please Enter Your Choice (1-8) "))
return ch
"""***************************************************************
ADMINSTRATOR GROSERY MAIN MENU FUNCTION
****************************************************************"""
def Cosmetic_ADM_menu():
ch=0
myclear()
intromain()
print("=================ADMIN MENU====================")
print("1.COSMETIC'S MENU")
print("2.COSMETIC'S SALE/PURCHASE")
print("3.BACK TO MAIN MENU")
ch=int(input("Please Enter Your Choice (1-3) "))
return ch
"""**********************************************************
MODIFY MENU
********************************************************"""
def modifyCosmetic_menu():
ch=0
myclear()
intromain()
print("===============MODIFY MENU==================")
print("1.MODIFY COSMETIC PRODUCT NAME")
print("2.MODIFY PRICE")
print("3.MODIFY QUANTITY")
print("4.MODIFY TYPE")
print("5.MODIFY COMPANY")
print("6.MODIFY DESCRIPTION")
print("7.BACK TO MAIN MENU")
ch=int(input("Please Enter Your Choice (1-7) "))
return ch
"""**********************************************************
REPORTS MENU
********************************************************"""
def SALE_PURCHASEmenu():
ch=0
myclear()
intromain()
print("===============SALE AND PURCHASE MENU==================")
print("1.COSMETIC PRODUCT SOLD OUT")
print("2.COSMETIC PRODUCT PURCHASED")
print("3.BACK TO MAIN MENU")
ch=int(input("Please Enter Your Choice (1-3) "))
return ch
def cosmeticinvoicereports():
ch=0
myclear()
intromain()
print("=================COSMETIC ADD MENU====================")
print("1.SEARCH AND PRINT SALE INVOICE")
print("2.SEARCH AND PRINT PURCHASE INVOICE")
print("3.DISPLAY ALL INVOICE(SALE/PURCHASE)")
print("4.SEARCH INVOICE BY DATEOFINVOICE")
print("5.BACK TO MAIN MENU")
ch=int(input("Please Enter Your Choice (1-5) "))
return ch
File Name: cosmatic.py
import os
import pymysql
--------SEARCH AND PRINT SALE INVOICE
def searchCOSinvoice():
try:
mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem")
C=mydb.cursor()
tot=0
gst=0
count=1
nettot=0
invo=int(input("Enter the Invoice No:"))
Query=("SELECT cosmetic.costname,costinvoice.amt,costinvoice.qty, costinvoice.dateSP,
costinvoice.custnm, costinvoice.mobno FROM cosmetic,costinvoice WHERE cosmetic.costid=
costinvoice.costid AND costinvoice.status='SALE' AND costinvoice.invoiceno=%s")
data=(invo,)
C.execute(Query,data)
rc=C.fetchall()
if rc:
print("----------------INVOICE: ",invo,"---------DATE: ",rc[0][3])
print("--NAME:--",rc[0][4],"-----------MOBILE NO.:",rc[0][5])
print("--------------------------SALE------------------------------")
print("S.NO.----|------------COSMETIC NAME-------------------TOTAL-----")
for rc1 in rc:
tot=tot+rc1[1]
print(count," |---",rc1[0],"ttttt |t",rc1[1])
count=count+1
gst=tot*12/100
nettot=tot+gst
print("============================================================")
print(" Total: ",tot)
print(" GST : ",gst)
print(" NETTOTAL: ",nettot)
input("----------------------Press any key-------------------------")
C.close()
mydb.close()
return rc
except:
mydb.close()
def searchPURinvoice():
try:
mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem")
C=mydb.cursor()
tot=0
gst=0
count=1
nettot=0
invo=int(input("Enter the Invoice No:"))
Query=("SELECT cosmetic.costname, costinvoice.amt, costinvoice.qty, costinvoice.dateSP,
costinvoice.custnm,costinvoice.mobno FROM cosmetic,costinvoice WHERE cosmetic.costid =
costinvoice.costid AND costinvoice.status='PURCHASE' AND costinvoice.invoiceno=%s")
data=(invo,)
C.execute(Query,data)
rc=C.fetchall()
if rc:
print("----------------INVOICE: ",invo,"---------DATE: ",rc[0][3])
print("--NAME:--",rc[0][4],"-----------MOBILE NO.:",rc[0][5])
print("--------------------------PURCHASE------------------------------")
print("S.NO.----|------------COSMETIC NAME-------------------TOTAL-----")
for rc1 in rc:
tot=tot+rc1[1]
print(count," |---",rc1[0],"ttttt |t",rc1[1])
count=count+1
gst=tot*12/100
nettot=tot+gst
print("============================================================")
print(" Total: ",tot)
print(" GST : ",gst)
print(" NETTOTAL: ",nettot)
input("----------------------Press any key-------------------------")
C.close()
mydb.close()
return rc
except:
mydb.close()
#----------display all invoice SALE or PURCHASE wise
def displayinvoiceSP():
try:
mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem")
C=mydb.cursor()
count=1
ch=int(input("Enter the Choice 1- SALE Wise 2- PURCHASE Wise:"))
Query=("SELECT cosmetic.costname,costinvoice.amt,costinvoice.qty,costinvoice.dateSP,
costinvoice.invoiceno FROM cosmetic,costinvoice WHERE cosmetic.costid=costinvoice.costid AND
costinvoice.status=%s")
if(ch==1):
data=('SALE',)
else:
data=('PURCHASE',)
C.execute(Query,data)
rc=C.fetchall()
if rc:
print("---------------------INVOICE LIST---------------------------")
print("------------------------------------------------------------")
print("S.NO.ttCOSTPROD-NAMEttQUANTITYttAMOUNTttDATEtINVOICE NO")
for rc1 in rc:
print(count,"tt",rc1[0],"tt",rc1[2],"tt",rc1[1],"tt",rc1[3],"t",rc1[4])
count=count+1
print("============================================================")
input("----------------------Press any key-------------------------")
C.close()
mydb.close()
return rc
except:
mydb.close()
#----------display all invoice SALE or PURCHASE by date
def displayinvoiceSPdate():
try:
mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem")
C=mydb.cursor()
count=1
ch=int(input("Enter the Choice 1- SALE Wise 2- PURCHASE Wise:"))
dt=input("Enter the date(yyyy-mm-dd)")
Query=("SELECT
cosmetic.costname,costinvoice.amt,costinvoice.qty,costinvoice.dateSP,costinvoice.invoiceno FROM
cosmetic,costinvoice WHERE cosmetic.costid=costinvoice.costid AND costinvoice.status=%s AND
costinvoice.dateSP=%s")
if(ch==1):
data=('SALE',dt)
info='SALE'
else:
data=('PURCHASE',dt)
info='PURCHASE'
C.execute(Query,data)
rc=C.fetchall()
if rc:
print("---------------------INVOICE LIST---------------------------")
print("---------------------",info,"---------------------------")
print("S.NO.ttCOSTPROD-NAMEttQUANTITYttAMOUNTttDATEttINVOICENO")
for rc1 in rc:
print(count,"tt",rc1[0],"tt",rc1[2],"tt",rc1[1],"tt",rc1[3],"tt",rc1[4])
count=count+1
print("============================================================")
input("----------------------Press any key-------------------------")
C.close()
mydb.close()
return rc
except:
mydb.close()
#--------------------------------
#---Search Product no
def prodsearchdata(scid):
try:
mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem")
C=mydb.cursor()
Query=("SELECT * FROM cosmetic WHERE costid=%s")
data=(scid,)
C.execute(Query,data)
rc=C.fetchone()
if rc:
print("COST-IDtCOST-NAMEtttPRICEtQUANTITYtPROD-TYPEtBRANDtDESCRIPTION")
print(rc[0],"t",rc[1],"ttt",rc[5],"t",rc[4],"t",rc[2],"t",rc[3],"t",rc[6])
input("--------------------press the key---------------------------------")
os.system('cls')
C.close()
mydb.close()
return rc
except:
mydb.close()
#---Search Product no
#----Modify Name of the Cosmetic Product
def search_mod_Prodnm():
try:
mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem")
C=mydb.cursor()
pno=int(input("ENTER Cosmetic Product No"))
rc1=prodsearchdata(pno)
if rc1:
pnm=input("Enter the new Costmetic Product name to update:")
Query=("UPDATE cosmetic SET costname=%s WHERE costid=%s")
data=(pnm,pno)
C.execute(Query,data)
mydb.commit()
print(C.rowcount, "record(s) affected")
C.close()
mydb.close()
except:
mydb.close()
#----Modify price of Product
def search_mod_price():
try:
mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem")
C=mydb.cursor()
pno=int(input("ENTER Cosmetic Product No"))
rc1=prodsearchdata(pno)
if rc1:
pr=int(input("Enter the price to update:"))
Query=("UPDATE cosmetic SET price=%s WHERE costid=%s")
data=(pr,pno)
C.execute(Query,data)
mydb.commit()
print(C.rowcount, "record(s) affected")
C.close()
mydb.close()
except:
mydb.close()
#----Modify Quantity of Product
def search_mod_qty():
try:
mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem")
C=mydb.cursor()
pno=int(input("ENTER Cosmetic Product No"))
rc1=prodsearchdata(pno)
if rc1: #--- and f==1:
qt=int(input("Enter the new Quantity to update:"))
Query=("UPDATE cosmetic SET qty=qty+%s WHERE costid=%s")
data=(qt,pno)
C.execute(Query,data)
mydb.commit()
print(C.rowcount, "record(s) affected")
C.close()
mydb.close()
except:
mydb.close()
#----Modify Type of Product
def search_mod_type():
try:
mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem")
C=mydb.cursor()
pno=int(input("ENTER Cosmetic Product No"))
rc1=prodsearchdata(pno)
if rc1:
ty=input("Enter the new Type to update:")
Query=("UPDATE cosmetic SET type=%s WHERE costid=%s")
data=(ty,pno)
C.execute(Query,data)
mydb.commit()
print(C.rowcount, "record(s) affected")
C.close()
mydb.close()
except:
mydb.close()
#----Modify company of Product
def search_mod_company():
try:
mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem")
C=mydb.cursor()
pno=int(input("ENTER Cosmetic Product No"))
rc1=prodsearchdata(pno)
if rc1:
ty=input("Enter the new Company to update:")
Query=("UPDATE cosmetic SET company=%s WHERE costid=%s")
data=(ty,pno)
C.execute(Query,data)
mydb.commit()
print(C.rowcount, "record(s) affected")
C.close()
mydb.close()
except:
mydb.close()
#----Modify company of Product
def search_mod_desc():
try:
mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem")
C=mydb.cursor()
pno=int(input("ENTER Cosmetic Product No"))
rc1=prodsearchdata(pno)
if rc1:
ds=input("Enter the new Description to update:")
Query=("UPDATE cosmetic SET des=%s WHERE costid=%s")
data=(ds,pno)
C.execute(Query,data)
mydb.commit()
print(C.rowcount, "record(s) affected")
C.close()
mydb.close()
except:
mydb.close()
#-- to generate the autonumbers
def giveno():
count=0
mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem")
mycursor=mydb.cursor()
query=("SELECT COUNT(*) FROM cosmetic")
q=("SELECT MAX(costid) FROM cosmetic")
mycursor.execute(query)
rc=mycursor.fetchone()
tmp=rc[0]
print(tmp)
if tmp==0:
count=int(input("Enter the New Cosmetic Product No:"))
else:
q=("SELECT MAX(costid) FROM cosmetic")
mycursor.execute(q)
rc=mycursor.fetchone()
count=rc[0]
count=count+1
mycursor.close()
mydb.close()
return count
#-To add new record of Products
def write_cosmeticrecord():
try:
mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem")
print(mydb)
C=mydb.cursor()
Query=("INSERT INTO cosmetic VALUES(%s,%s,%s,%s,%s,%s,%s)")
pno=giveno()
pdid=pno
pname=input("Enter Cosmetic Product Name")
pr=int(input("Enter Price"))
print("(Example:Compact/Eye shadow/Eye shadow/Lipstick/Moisturizer/Nail Polish/Face pack/etc.)")
ty=input("Enter Product Type:")
bnm=input("Enter Cosmetic Product Brand name")
qt=int(input("Enter quantity"))
dsc=input("Enter Product description")
data=(pdid,pname,ty,bnm,qt,pr,dsc)
C.execute(Query,data)
mydb.commit()
C.close()
mydb.close()
except:
mydb.close()
#--show all Cosmetic Products
def showallCosmeticprod():
try:
mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem")
C=mydb.cursor()
Query=("SELECT * FROM cosmetic")
#data=(scid,)
C.execute(Query)
rc=C.fetchall()
if rc:
print("COSTIDtCOSMETIC-NAMEtttPRICEtQUANTITYtCOST-TYPEtBRANDt
DESCRIPTION")
for x in rc:
print(x[0],"t",x[1],"ttt",x[5],"t",x[4],"t",x[2],"t",x[3],"t",x[6
input("--------------------press the key---------------------------------")
os.system('cls')
C.close()
mydb.close()
return rc
except:
mydb.close()
#----search and display Product by ID
def showprodID():
try:
mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem")
C=mydb.cursor()
scid=int(input("Enter the COSMETIC Product ID:"))
Query=("SELECT * FROM cosmetic WHERE costid=%s")
data=(scid,)
C.execute(Query,data)
rc=C.fetchone()
if rc:
print("COSTIDtCOSMETIC-NAMEtttPRICEtQUANTITYtTYPEtBRANDtDESCRIPTION")
print(rc[0],"t",rc[1],"ttt",rc[5],"t",rc[4],"t",rc[2],"t",rc[3],"t",rc[6])
input("--------------------press the key---------------------------------")
os.system('cls')
C.close()
mydb.close()
return rc
except:
mydb.close()
#----search and display Product Name
def showprodnm():
try:
mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem")
C=mydb.cursor()
scid=input("Enter the Costmetic Product Name:")
Query=("SELECT * FROM cosmetic WHERE costname=%s")
data=(scid,)
C.execute(Query,data)
rc=C.fetchone()
if rc:
print("COSTIDtCOSMETIC-NAMEtttPRICEtQUANTITYtTYPEtBRANDtDESCRIPTION")
print(rc[0],"t",rc[1],"ttt",rc[5],"t",rc[4],"t",rc[2],"t",rc[3],"t",rc[6])
input("--------------------press the key---------------------------------")
os.system('cls')
C.close()
mydb.close()
return rc
except:
mydb.close()
#----search and display Product by price
def showbyProdprice():
try:
mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem")
C=mydb.cursor()
low=int(input("Enter the Price lowest value:"))
high=int(input("Enter the Price Highest value:"))
Query=("SELECT * FROM grosproduct WHERE price BETWEEN %s AND %s ")
data=(low,high)
C.execute(Query,data)
rc=C.fetchall()
if rc:
print("COSTIDtCOSMETIC-NAMEtttPRICEtQUANTITYtTYPEtBRANDtDESCRIPTION")
for rc1 in rc:
print(rc1[0],"t",rc1[1],"ttt",rc1[5],"t",rc1[4],"t",rc1[2],"t",rc1[3],"t",rc1[6])
input("--------------------press the key---------------------------------")
os.system('cls')
C.close()
mydb.close()
return rc
except:
mydb.close()
#----search and display Product by type
def showProdtype():
try:
mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem")
C=mydb.cursor()
print("(Example:Compact/Eye shadow/Eye shadow/Lipstick/Moisturizer/Nail Polish/Face pack/etc.)")
scid=input("Enter the Cosmetic Product type:")
Query=("SELECT * FROM cosmetic WHERE type=%s")
data=(scid,)
C.execute(Query,data)
rc=C.fetchall()
if rc:
print("COSTIDtCOSMETIC-NAMEtttPRICEtQUANTITYtTYPEtBRANDtDESCRIPTION")
for rc1 in rc:
print(rc1[0],"t",rc1[1],"ttt",rc1[5],"t",rc1[4],"t",rc1[2],"t",rc1[3],"t",rc1[6])
input("--------------------press the key---------------------------------")
os.system('cls')
C.close()
mydb.close()
return rc
except:
mydb.close()
#----search and display Product by brand
def showProdcompy():
try:
mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem")
C=mydb.cursor()
scid=input("Enter the Cosmetic Product Brand name:")
Query=("SELECT * FROM cosmetic WHERE company=%s")
data=(scid,)
C.execute(Query,data)
rc=C.fetchall()
if rc:
print("COSTIDtCOSMETIC-NAMEtttPRICEtQUANTITYtTYPEtBRANDtDESCRIPTION")
for rc1 in rc:
print(rc1[0],"t",rc1[1],"ttt",rc1[5],"t",rc1[4],"t",rc1[2],"t",rc1[3],"t",rc1[6])
input("--------------------press the key---------------------------------")
os.system('cls')
C.close()
mydb.close()
return rc
except:
mydb.close()
#---delete the cosmetic record from the table
def deletecosmetic():
try:
mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem")
C=mydb.cursor()
gno=int(input("ENTER Cosmetic Product No"))
rc1=prodsearchdata(gno)
if rc1: #--- and f==1:
Query=("DELETE FROM cosmetic WHERE costid=%s")
data=(gno,)
C.execute(Query,data)
mydb.commit()
print(C.rowcount, "record(s) affected")
C.close()
mydb.close()
except:
mydb.close()
#-------invoice to sell the Cosmetic
def Med_Sale():
try:
mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem")
print(mydb)
C=mydb.cursor()
netamt=0
Query=("INSERT INTO costinvoice VALUES(%s,%s,%s,%s,%s,%s,%s,%s,%s)")
invono=int(input("Enter the invoice no:"))
dosp=input("Enter the date of sale(yyyy-mm-dd)")
custnm=input("Enter the Customer Name:")
mob=input("enter the mobile no:")
while True:
no=givemeno()
invoiceid=no
gno=int(input("Enter the Cosmetic Product no"))
rc1=prodsearchdata(gno)
if rc1:
qt=int(input("Enter the quantity:"))
pr=int(input("Enter the price"))
netamt=pr*qt
data=(invoiceid,gno,custnm,mob,qt,'SALE',invono,netamt,dosp)
C.execute(Query,data)
mydb.commit()
print(C.rowcount, "record(s) affected")
changeqty(gno,qt,'S')
else:
print("No such Cosmetic record please try again")
ch=input("Do you want to add more Cosmetic to sell(y/n)")
if(ch=='n' or ch=='N'):
break
C.close()
mydb.close()
except:
mydb.close()
#------Update the qty----
def changeqty(mno,qt,ch):
try:
mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem")
C=mydb.cursor()
if(ch=='S'):
Query=("UPDATE cosmetic SET qty=qty-%s WHERE costid=%s")
elif(ch=='A'):
Query=("UPDATE cosmetic SET qty=qty+%s WHERE costid=%s")
data=(qt,mno)
C.execute(Query,data)
mydb.commit()
print(C.rowcount, "record(s) affected")
C.close()
mydb.close()
except:
mydb.close()
#-------invoice to Purchase the Cosmetic
def Gar_Purchase():
try:
mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem")
print(mydb)
C=mydb.cursor()
netamt=0
Query=("INSERT INTO costinvoice VALUES(%s,%s,%s,%s,%s,%s,%s,%s,%s)")
invono=int(input("Enter the invoice no:"))
dosp=input("Enter the date of sale")
custnm=input("Enter the Distributer Name:")
mob=input("enter the mobile no:")
while True:
no=givemeno()
invoiceid=no
gno=int(input("Enter the Cosmetic Product no"))
rc1=prodsearchdata(gno)
if rc1:
qt=int(input("Enter the quantity:"))
pr=int(input("Enter the price"))
netamt=pr*qt
data=(invoiceid,gno,custnm,mob,qt,'PURCHASE',invono,netamt,dosp)
C.execute(Query,data)
mydb.commit()
print(C.rowcount, "record(s) affected")
changeqty(gno,qt,'A')
else:
print("No such Cosmetic record please try again")
ch=input("Do you want to add more Cosmetic to sell(y/n)")
if(ch=='n' or ch=='N'):
break
C.close()
mydb.close()
except:
mydb.close()
#-- to generate the autonumbers
def givemeno():
count=0
mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem")
print(mydb)
mycursor=mydb.cursor()
query=("SELECT COUNT(*) FROM costinvoice")
q=("SELECT MAX(costid) FROM costinvoice")
mycursor.execute(query)
rc=mycursor.fetchone()
tmp=rc[0]
print(tmp)
if tmp==0:
count=1
else:
q=("SELECT MAX(costid) FROM costinvoice")
mycursor.execute(q)
rc=mycursor.fetchone()
count=rc[0]
count=count+1
mycursor.close()
mydb.close()
return count
File Name: cosmaticmainpage.py
import cosmatic_menu as CM
import sys
import cosmatic as GM
def invoice_show():
choice1=CM.cosmeticinvoicereports()
while True:
if choice1==1:
GM.searchCOSinvoice()
break
elif choice1==2:
GM.searchPURinvoice()
break
elif choice1==3:
GM.displayinvoiceSP()
break
elif choice1==4:
GM.displayinvoiceSPdate()
break
elif choice1==5:
main()
else:
#print("Enter the correct choice")
input("Enter any key to continue")
choice1=0
invoice_show()
def modifycosmeticshow():
choice1=" "
choice1=CM.modifyCosmetic_menu()
while True:
if choice1==1:
GM.search_mod_Prodnm()
break
elif choice1==2:
#-------2.MODIFY PRICE
GM.search_mod_price()
break
elif choice1==3:
#-------3.MODIFY QUANTITY
GM.search_mod_qty()
break
elif choice1==4:
#-------4.MODIFY type
GM.search_mod_type()
break
elif choice1==5:
#-------5.MODIFY
GM.search_mod_company()
break
elif choice1==6:
GM.search_mod_desc()
break
elif choice1==7:
main()
else:
#print("Enter the correct choice")
input("Enter any key to continue")
modifycosmeticshow()
#-----------------COSMETIC MENU
def Cosmeticmenu_show():
choice1=" "
choice1=CM.Cosmetic_ADM_menu()
while True:
if choice1==1:
cosmeticmidmenu()
break
elif choice1==2:
salepurchase_show()
break
elif choice1==3:
main()
else:
print("Enter the correct choice")
input("Enter any key to continue")
Groserymenu_show()
#-------------------------
def cosmetic_show():
choice1=CM.admin_menu1()
while True:
if choice1==1:
GM.write_cosmeticrecord()
break
elif choice1==2:
GM.showallCosmeticprod()
break
elif choice1==3:
GM.showprodID()
break
elif choice1==4:
GM.showprodnm()
break
elif choice1==5:
GM.showbyProdprice()
break
elif choice1==6:
GM.showProdtype()
break
elif choice1==7:
GM.showProdcompy()
break
elif choice1==8:
main()
break
else:
print("Enter the correct choice")
input("Enter any key to continue")
choice1=0
cosmetic_show()
#--------administrator menu
def cosmeticmidmenu():
choice1=CM.cosmetic_menu()
while True:
if choice1==1:
cosmetic_show()
break
elif choice1==2:
modifycosmeticshow()
break
elif choice1==3:
GM.deletecosmetic()
break
elif choice1==4:
print("a")
break
else:
print("Enter the correct choice")
input("Enter any key to continue")
choice1=0
cosmeticmidmenu()
def salepurchase_show():
choice1=CM.SALE_PURCHASEmenu()
while True:
if choice1==1:
GM.Med_Sale()
break
elif choice1==2:
GM.Gar_Purchase()
break
elif choice1==3:
main()
else:
#print("Enter the correct choice")
input("Enter any key to continue")
choice1=0
salepurchase_show()
#-------------Main MENU------------------------------
def main():
CM.intro()
choice=0
while(True):
choice=CM.main()
if choice==1:
CM.myclear()
invoice_show()
elif choice==2:
CM.myclear()
Cosmeticmenu_show()
elif choice==3:
exit(1)
else:
print("Enter the correct choice")
input("Enter any key to continue")
main()
OUTPUTS
=================MAIN MENU====================
01. COSMETIC REPORT GENERATOR
02. ADMINISTRATOR
03. EXIT
==============================================
Please Select Your Option (1-3)
If choice: 1
=================COSMETIC ADD MENU====================
1.SEARCH AND PRINT SALE INVOICE
2.SEARCH AND PRINT PURCHASE INVOICE
3.DISPLAY ALL INVOICE(SALE/PURCHASE)
4.SEARCH INVOICE BY DATEOFINVOICE
5.BACK TO MAIN MENU
If choice : 1
Enter the Invoice No:5600
----------------INVOICE: 5600 ---------DATE: 2020-12-02
--NAME:-- Sam -----------MOBILE NO.: 885569632
--------------------------SALE------------------------------
S.NO.----|------------COSMETIC NAME-------------------TOTAL-----
1 |--- LipToGlow | 75
2 |--- M-Eye | 36
============================================================
Total: 111
GST : 13.32
NETTOTAL: 124.32
----------------------Press any key-------------------------
If choice : 3
Please Enter Your Choice (1-5) 3
Enter the Choice 1- SALE Wise 2- PURCHASE Wise:1
---------------------INVOICE LIST---------------------------
------------------------------------------------------------
S.NO. COSTPROD-NAME QUANTITY AMOUNT DATE INVOICE NO
1 LipToGlow 5 75 2020-12-02 5600
2 M-Eye 3 36 2020-12-02 5600
============================================================
If choice : 2
1.COSMETIC'S MENU
2.COSMETIC'S SALE/PURCHASE
3.BACK TO MAIN MENU
Please Enter Your Choice (1-3)
If choice : 1
===========COSMETIC INFO MENU===========
01. ADD COSMETIC INFORMATION
02. MODIFY COSMETIC INFORMATION
03. DELETE COSMETIC INFORMATION
04. BACK TO MAIN
==============================================
Please Select Your Option (1-4)
If choice : 1
=================COSMETIC ADD MENU====================
1.CREATE COSMETIC DETAILS
2.DISPLAY ALL CORMETIC DETAILS
3.SEARCH RECORD BY COSMETIC PRODUCT ID
4.SEARCH RECORD BY COSMETIC PRODUCT NAME
5.SEARCH RECORD BY PRICE
6.SEARCH RECORD BY TYPE
7.SEARCH RECORD BY COMPANY
8.BACK TO MAIN MENU
Please Enter Your Choice (1-8)
If choice: 1
Enter Cosmetic Product NameHairFLy
Enter Price785
(Example:Compact/Eye shadow/Eye shadow/Lipstick/Moisturizer/Nail Polish/Face pack/etc.)
Enter Product Type:Hair Dryer
Enter Cosmetic Product Brand nameFACE
Enter quantity10
Enter Product descriptionDryer
If choice: 2
Please Enter Your Choice (1-8) 2
COSTID COSMETIC-NAME PRICE QUANTITY COST-TYPE BRAND DESCRIPTION
1200 Lipstic 50 20 Lipstick Lakme Red colour lipstick box
1201 LipToGlow 15 45 Lip Glow Lakme Light lip glow
1202 M-Eye 12 22 Eye Shadow Lakme Shadow
1203 HairFLy 785 10 Hair Dryer FACE Dryer
If choice : Modify 2
===============MODIFY MENU==================
1.MODIFY COSMETIC PRODUCT NAME
2.MODIFY PRICE
3.MODIFY QUANTITY
4.MODIFY TYPE
5.MODIFY COMPANY
6.MODIFY DESCRIPTION
7.BACK TO MAIN MENU
Please Enter Your Choice (1-7)
REQUIREMENTS
HARDWARE REQUIRED
 Printer, to print the required documents of the project
 Processor : intel or any other
 Ram : 512 MB or above
 Harddisk : 80 GB or more
 SOFTWARE REQUIRED
 Operating system : Windows 7 or above
 Python 2 or above
 IDE Atom, PyCharm, Thonny, or any other.
 Database: MySQL
 WebServer: XAMPP
ADVANTAGES AND DISADVANTAGES
 Provide a Single environment from where an administrator can interact
with the beauty shop system resources within the beauty center network.
 Provides interface to interact with the beauty shop system
 Paperwork is removed.
 Customer records are records through this system
Disadvantage:
 The current system doesn’t allow the remote access of the cosmetic
system resources of one system with other
 This system need updating of product every time
CONCLUSION
In this project we put all the things that needed for the cosmetic
shop, to manage all the work related to products sale and purchase
and the customer’s information. But it need more updating as it can
be perfect for small shops of cosmetic.
BIBLIOGRAPHY
 www.mysql.org
 www.google.co.in
 www.w3schools.com
 www.tutorialspoint.com
 www.javapoint.com
 www.programiz.com
 www.guru99.com

More Related Content

What's hot

Computer science project.pdf
Computer science project.pdfComputer science project.pdf
Computer science project.pdfHarshitSachdeva17
 
computer science with python project for class 12 cbse
computer science with python project for class 12 cbsecomputer science with python project for class 12 cbse
computer science with python project for class 12 cbsemanishjain598
 
IP Project for Class 12th CBSE
IP Project for Class 12th CBSEIP Project for Class 12th CBSE
IP Project for Class 12th CBSESylvester Correya
 
Informatics Practices/ Information Practices Project (IP Project Class 12)
Informatics Practices/ Information Practices Project (IP Project Class 12)Informatics Practices/ Information Practices Project (IP Project Class 12)
Informatics Practices/ Information Practices Project (IP Project Class 12)KushShah65
 
Computer Science Investigatory Project Class 12
Computer Science Investigatory Project Class 12Computer Science Investigatory Project Class 12
Computer Science Investigatory Project Class 12Self-employed
 
Computer science project on Online Banking System class 12
Computer science project on Online Banking System class 12Computer science project on Online Banking System class 12
Computer science project on Online Banking System class 12OmRanjan2
 
Computer science class 12 project on Super Market Billing
Computer science class 12 project on Super Market BillingComputer science class 12 project on Super Market Billing
Computer science class 12 project on Super Market BillingHarsh Kumar
 
SYNOPSIS ON BANK MANAGEMENT SYSTEM
SYNOPSIS ON BANK MANAGEMENT SYSTEMSYNOPSIS ON BANK MANAGEMENT SYSTEM
SYNOPSIS ON BANK MANAGEMENT SYSTEMNitish Xavier Tirkey
 
Ip library management project
Ip library management projectIp library management project
Ip library management projectAmazShopzone
 
Computer science Project for class 11th and 12th(library management system)
Computer science Project for class 11th and 12th(library management system)Computer science Project for class 11th and 12th(library management system)
Computer science Project for class 11th and 12th(library management system)lokesh meena
 
Python Project on Computer Shop
Python Project on Computer ShopPython Project on Computer Shop
Python Project on Computer Shopvikram mahendra
 
Banking Management System Project documentation
Banking Management System Project documentationBanking Management System Project documentation
Banking Management System Project documentationChaudhry Sajid
 
Project front page, index, certificate, and acknowledgement
Project front page, index, certificate, and acknowledgementProject front page, index, certificate, and acknowledgement
Project front page, index, certificate, and acknowledgementAnupam Narang
 
Computer Science Practical File class XII
Computer Science Practical File class XIIComputer Science Practical File class XII
Computer Science Practical File class XIIYugenJarwal
 
IP Final project 12th
IP Final project 12thIP Final project 12th
IP Final project 12thSantySS
 
computer science project on movie booking system
computer science project on movie booking systemcomputer science project on movie booking system
computer science project on movie booking systemAnurag Yadav
 
Computer Science Investigatory Project Class XII CBSE(Latest Syllabus)(Python...
Computer Science Investigatory Project Class XII CBSE(Latest Syllabus)(Python...Computer Science Investigatory Project Class XII CBSE(Latest Syllabus)(Python...
Computer Science Investigatory Project Class XII CBSE(Latest Syllabus)(Python...ArkaSarkar23
 
A project report on chat application
A project report on chat applicationA project report on chat application
A project report on chat applicationKumar Gaurav
 
CSE Final Year Project Presentation on Android Application
CSE Final Year Project Presentation on Android ApplicationCSE Final Year Project Presentation on Android Application
CSE Final Year Project Presentation on Android ApplicationAhammad Karim
 

What's hot (20)

Computer science project.pdf
Computer science project.pdfComputer science project.pdf
Computer science project.pdf
 
computer science with python project for class 12 cbse
computer science with python project for class 12 cbsecomputer science with python project for class 12 cbse
computer science with python project for class 12 cbse
 
IP Project for Class 12th CBSE
IP Project for Class 12th CBSEIP Project for Class 12th CBSE
IP Project for Class 12th CBSE
 
Informatics Practices/ Information Practices Project (IP Project Class 12)
Informatics Practices/ Information Practices Project (IP Project Class 12)Informatics Practices/ Information Practices Project (IP Project Class 12)
Informatics Practices/ Information Practices Project (IP Project Class 12)
 
Computer Science Investigatory Project Class 12
Computer Science Investigatory Project Class 12Computer Science Investigatory Project Class 12
Computer Science Investigatory Project Class 12
 
Computer science project on Online Banking System class 12
Computer science project on Online Banking System class 12Computer science project on Online Banking System class 12
Computer science project on Online Banking System class 12
 
Computer science class 12 project on Super Market Billing
Computer science class 12 project on Super Market BillingComputer science class 12 project on Super Market Billing
Computer science class 12 project on Super Market Billing
 
SYNOPSIS ON BANK MANAGEMENT SYSTEM
SYNOPSIS ON BANK MANAGEMENT SYSTEMSYNOPSIS ON BANK MANAGEMENT SYSTEM
SYNOPSIS ON BANK MANAGEMENT SYSTEM
 
Ip library management project
Ip library management projectIp library management project
Ip library management project
 
Computer science Project for class 11th and 12th(library management system)
Computer science Project for class 11th and 12th(library management system)Computer science Project for class 11th and 12th(library management system)
Computer science Project for class 11th and 12th(library management system)
 
Python Project on Computer Shop
Python Project on Computer ShopPython Project on Computer Shop
Python Project on Computer Shop
 
Banking Management System Project documentation
Banking Management System Project documentationBanking Management System Project documentation
Banking Management System Project documentation
 
Project front page, index, certificate, and acknowledgement
Project front page, index, certificate, and acknowledgementProject front page, index, certificate, and acknowledgement
Project front page, index, certificate, and acknowledgement
 
Computer Science Practical File class XII
Computer Science Practical File class XIIComputer Science Practical File class XII
Computer Science Practical File class XII
 
IP Final project 12th
IP Final project 12thIP Final project 12th
IP Final project 12th
 
computer science project on movie booking system
computer science project on movie booking systemcomputer science project on movie booking system
computer science project on movie booking system
 
ASL/ALS CLASS 12 ENGLISH PROJECT
ASL/ALS CLASS 12 ENGLISH PROJECTASL/ALS CLASS 12 ENGLISH PROJECT
ASL/ALS CLASS 12 ENGLISH PROJECT
 
Computer Science Investigatory Project Class XII CBSE(Latest Syllabus)(Python...
Computer Science Investigatory Project Class XII CBSE(Latest Syllabus)(Python...Computer Science Investigatory Project Class XII CBSE(Latest Syllabus)(Python...
Computer Science Investigatory Project Class XII CBSE(Latest Syllabus)(Python...
 
A project report on chat application
A project report on chat applicationA project report on chat application
A project report on chat application
 
CSE Final Year Project Presentation on Android Application
CSE Final Year Project Presentation on Android ApplicationCSE Final Year Project Presentation on Android Application
CSE Final Year Project Presentation on Android Application
 

Similar to Python Project On Cosmetic Shop system

SUPER MARKET COMPUTER SYSTEM IN C++
SUPER MARKET COMPUTER SYSTEM IN C++SUPER MARKET COMPUTER SYSTEM IN C++
SUPER MARKET COMPUTER SYSTEM IN C++vikram mahendra
 
Library Management System in c++
Library Management System in c++Library Management System in c++
Library Management System in c++vikram mahendra
 
CAPE Unit1 Computer Science IA Sample .pdf
CAPE Unit1 Computer Science IA Sample .pdfCAPE Unit1 Computer Science IA Sample .pdf
CAPE Unit1 Computer Science IA Sample .pdfIsaacRamdeen
 
computerscience-170129081612.pdf
computerscience-170129081612.pdfcomputerscience-170129081612.pdf
computerscience-170129081612.pdfKiranKumari204016
 
6 tableau visualization tips to inspire your creative eyes
6 tableau visualization tips to inspire your creative eyes6 tableau visualization tips to inspire your creative eyes
6 tableau visualization tips to inspire your creative eyesGrazitti Interactive
 
Final Year MCA Presentation
Final Year MCA PresentationFinal Year MCA Presentation
Final Year MCA PresentationBharat Lakhiyani
 
Informatica complex transformation ii
Informatica complex transformation iiInformatica complex transformation ii
Informatica complex transformation iiAmit Sharma
 
Database Management System - SQL Advanced Training
Database Management System - SQL Advanced TrainingDatabase Management System - SQL Advanced Training
Database Management System - SQL Advanced TrainingMoutasm Tamimi
 
Business Intelligence Portfolio
Business Intelligence PortfolioBusiness Intelligence Portfolio
Business Intelligence PortfolioChris Seebacher
 
The ultimate-guide-to-sql
The ultimate-guide-to-sqlThe ultimate-guide-to-sql
The ultimate-guide-to-sqlMcNamaraChiwaye
 
Informatica complex transformation i
Informatica complex transformation iInformatica complex transformation i
Informatica complex transformation iAmit Sharma
 
on SQL Managment studio(For the following exercise, use the Week 5.pdf
on SQL Managment studio(For the following exercise, use the Week 5.pdfon SQL Managment studio(For the following exercise, use the Week 5.pdf
on SQL Managment studio(For the following exercise, use the Week 5.pdfformaxekochi
 
Build .NET Applications with Reporting and Dashboard
Build .NET Applications with Reporting and DashboardBuild .NET Applications with Reporting and Dashboard
Build .NET Applications with Reporting and DashboardIron Speed
 
The ultimate-guide-to-sql
The ultimate-guide-to-sqlThe ultimate-guide-to-sql
The ultimate-guide-to-sqlMcNamaraChiwaye
 
Sap basis administration handbook
Sap basis administration handbookSap basis administration handbook
Sap basis administration handbookblackgoldboy
 
Priyanka Bhatia.BCA Final year 2015
Priyanka Bhatia.BCA Final year 2015Priyanka Bhatia.BCA Final year 2015
Priyanka Bhatia.BCA Final year 2015dezyneecole
 
CIS 310 ACCESS AssignmentObjective of this assignment is to pr.docx
CIS 310 ACCESS AssignmentObjective of this assignment is to pr.docxCIS 310 ACCESS AssignmentObjective of this assignment is to pr.docx
CIS 310 ACCESS AssignmentObjective of this assignment is to pr.docxclarebernice
 

Similar to Python Project On Cosmetic Shop system (20)

SUPER MARKET COMPUTER SYSTEM IN C++
SUPER MARKET COMPUTER SYSTEM IN C++SUPER MARKET COMPUTER SYSTEM IN C++
SUPER MARKET COMPUTER SYSTEM IN C++
 
Library Management System in c++
Library Management System in c++Library Management System in c++
Library Management System in c++
 
CAPE Unit1 Computer Science IA Sample .pdf
CAPE Unit1 Computer Science IA Sample .pdfCAPE Unit1 Computer Science IA Sample .pdf
CAPE Unit1 Computer Science IA Sample .pdf
 
ASAD Project Report
ASAD Project ReportASAD Project Report
ASAD Project Report
 
computerscience-170129081612.pdf
computerscience-170129081612.pdfcomputerscience-170129081612.pdf
computerscience-170129081612.pdf
 
6 tableau visualization tips to inspire your creative eyes
6 tableau visualization tips to inspire your creative eyes6 tableau visualization tips to inspire your creative eyes
6 tableau visualization tips to inspire your creative eyes
 
Hospitalmanagement
HospitalmanagementHospitalmanagement
Hospitalmanagement
 
Final Year MCA Presentation
Final Year MCA PresentationFinal Year MCA Presentation
Final Year MCA Presentation
 
Informatica complex transformation ii
Informatica complex transformation iiInformatica complex transformation ii
Informatica complex transformation ii
 
Database Management System - SQL Advanced Training
Database Management System - SQL Advanced TrainingDatabase Management System - SQL Advanced Training
Database Management System - SQL Advanced Training
 
Business Intelligence Portfolio
Business Intelligence PortfolioBusiness Intelligence Portfolio
Business Intelligence Portfolio
 
The ultimate-guide-to-sql
The ultimate-guide-to-sqlThe ultimate-guide-to-sql
The ultimate-guide-to-sql
 
Informatica complex transformation i
Informatica complex transformation iInformatica complex transformation i
Informatica complex transformation i
 
on SQL Managment studio(For the following exercise, use the Week 5.pdf
on SQL Managment studio(For the following exercise, use the Week 5.pdfon SQL Managment studio(For the following exercise, use the Week 5.pdf
on SQL Managment studio(For the following exercise, use the Week 5.pdf
 
Build .NET Applications with Reporting and Dashboard
Build .NET Applications with Reporting and DashboardBuild .NET Applications with Reporting and Dashboard
Build .NET Applications with Reporting and Dashboard
 
The ultimate-guide-to-sql
The ultimate-guide-to-sqlThe ultimate-guide-to-sql
The ultimate-guide-to-sql
 
Sap basis administration handbook
Sap basis administration handbookSap basis administration handbook
Sap basis administration handbook
 
BOOK SHOP SYSTEM C++
BOOK SHOP SYSTEM C++BOOK SHOP SYSTEM C++
BOOK SHOP SYSTEM C++
 
Priyanka Bhatia.BCA Final year 2015
Priyanka Bhatia.BCA Final year 2015Priyanka Bhatia.BCA Final year 2015
Priyanka Bhatia.BCA Final year 2015
 
CIS 310 ACCESS AssignmentObjective of this assignment is to pr.docx
CIS 310 ACCESS AssignmentObjective of this assignment is to pr.docxCIS 310 ACCESS AssignmentObjective of this assignment is to pr.docx
CIS 310 ACCESS AssignmentObjective of this assignment is to pr.docx
 

More from vikram mahendra

FLOW OF CONTROL-NESTED IFS IN PYTHON
FLOW OF CONTROL-NESTED IFS IN PYTHONFLOW OF CONTROL-NESTED IFS IN PYTHON
FLOW OF CONTROL-NESTED IFS IN PYTHONvikram mahendra
 
FLOWOFCONTROL-IF..ELSE PYTHON
FLOWOFCONTROL-IF..ELSE PYTHONFLOWOFCONTROL-IF..ELSE PYTHON
FLOWOFCONTROL-IF..ELSE PYTHONvikram mahendra
 
FLOW OF CONTROL-INTRO PYTHON
FLOW OF CONTROL-INTRO PYTHONFLOW OF CONTROL-INTRO PYTHON
FLOW OF CONTROL-INTRO PYTHONvikram mahendra
 
OPERATOR IN PYTHON-PART1
OPERATOR IN PYTHON-PART1OPERATOR IN PYTHON-PART1
OPERATOR IN PYTHON-PART1vikram mahendra
 
OPERATOR IN PYTHON-PART2
OPERATOR IN PYTHON-PART2OPERATOR IN PYTHON-PART2
OPERATOR IN PYTHON-PART2vikram mahendra
 
USE OF PRINT IN PYTHON PART 2
USE OF PRINT IN PYTHON PART 2USE OF PRINT IN PYTHON PART 2
USE OF PRINT IN PYTHON PART 2vikram mahendra
 
USER DEFINE FUNCTIONS IN PYTHON[WITH PARAMETERS]
USER DEFINE FUNCTIONS IN PYTHON[WITH PARAMETERS]USER DEFINE FUNCTIONS IN PYTHON[WITH PARAMETERS]
USER DEFINE FUNCTIONS IN PYTHON[WITH PARAMETERS]vikram mahendra
 
USER DEFINE FUNCTIONS IN PYTHON
USER DEFINE FUNCTIONS IN PYTHONUSER DEFINE FUNCTIONS IN PYTHON
USER DEFINE FUNCTIONS IN PYTHONvikram mahendra
 
FUNCTIONS IN PYTHON[RANDOM FUNCTION]
FUNCTIONS IN PYTHON[RANDOM FUNCTION]FUNCTIONS IN PYTHON[RANDOM FUNCTION]
FUNCTIONS IN PYTHON[RANDOM FUNCTION]vikram mahendra
 
INTRODUCTION TO FUNCTIONS IN PYTHON
INTRODUCTION TO FUNCTIONS IN PYTHONINTRODUCTION TO FUNCTIONS IN PYTHON
INTRODUCTION TO FUNCTIONS IN PYTHONvikram mahendra
 
LIST IN PYTHON[SELECTION SORT]
LIST IN PYTHON[SELECTION SORT]LIST IN PYTHON[SELECTION SORT]
LIST IN PYTHON[SELECTION SORT]vikram mahendra
 

More from vikram mahendra (20)

Communication skill
Communication skillCommunication skill
Communication skill
 
FLOW OF CONTROL-NESTED IFS IN PYTHON
FLOW OF CONTROL-NESTED IFS IN PYTHONFLOW OF CONTROL-NESTED IFS IN PYTHON
FLOW OF CONTROL-NESTED IFS IN PYTHON
 
FLOWOFCONTROL-IF..ELSE PYTHON
FLOWOFCONTROL-IF..ELSE PYTHONFLOWOFCONTROL-IF..ELSE PYTHON
FLOWOFCONTROL-IF..ELSE PYTHON
 
FLOW OF CONTROL-INTRO PYTHON
FLOW OF CONTROL-INTRO PYTHONFLOW OF CONTROL-INTRO PYTHON
FLOW OF CONTROL-INTRO PYTHON
 
OPERATOR IN PYTHON-PART1
OPERATOR IN PYTHON-PART1OPERATOR IN PYTHON-PART1
OPERATOR IN PYTHON-PART1
 
OPERATOR IN PYTHON-PART2
OPERATOR IN PYTHON-PART2OPERATOR IN PYTHON-PART2
OPERATOR IN PYTHON-PART2
 
USE OF PRINT IN PYTHON PART 2
USE OF PRINT IN PYTHON PART 2USE OF PRINT IN PYTHON PART 2
USE OF PRINT IN PYTHON PART 2
 
DATA TYPE IN PYTHON
DATA TYPE IN PYTHONDATA TYPE IN PYTHON
DATA TYPE IN PYTHON
 
USER DEFINE FUNCTIONS IN PYTHON[WITH PARAMETERS]
USER DEFINE FUNCTIONS IN PYTHON[WITH PARAMETERS]USER DEFINE FUNCTIONS IN PYTHON[WITH PARAMETERS]
USER DEFINE FUNCTIONS IN PYTHON[WITH PARAMETERS]
 
USER DEFINE FUNCTIONS IN PYTHON
USER DEFINE FUNCTIONS IN PYTHONUSER DEFINE FUNCTIONS IN PYTHON
USER DEFINE FUNCTIONS IN PYTHON
 
FUNCTIONS IN PYTHON[RANDOM FUNCTION]
FUNCTIONS IN PYTHON[RANDOM FUNCTION]FUNCTIONS IN PYTHON[RANDOM FUNCTION]
FUNCTIONS IN PYTHON[RANDOM FUNCTION]
 
INTRODUCTION TO FUNCTIONS IN PYTHON
INTRODUCTION TO FUNCTIONS IN PYTHONINTRODUCTION TO FUNCTIONS IN PYTHON
INTRODUCTION TO FUNCTIONS IN PYTHON
 
Python Introduction
Python IntroductionPython Introduction
Python Introduction
 
GREEN SKILL[PART-2]
GREEN SKILL[PART-2]GREEN SKILL[PART-2]
GREEN SKILL[PART-2]
 
GREEN SKILLS[PART-1]
GREEN SKILLS[PART-1]GREEN SKILLS[PART-1]
GREEN SKILLS[PART-1]
 
Dictionary in python
Dictionary in pythonDictionary in python
Dictionary in python
 
Entrepreneurial skills
Entrepreneurial skillsEntrepreneurial skills
Entrepreneurial skills
 
Boolean logic
Boolean logicBoolean logic
Boolean logic
 
Tuple in python
Tuple in pythonTuple in python
Tuple in python
 
LIST IN PYTHON[SELECTION SORT]
LIST IN PYTHON[SELECTION SORT]LIST IN PYTHON[SELECTION SORT]
LIST IN PYTHON[SELECTION SORT]
 

Recently uploaded

MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupJonathanParaisoCruz
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 

Recently uploaded (20)

MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 

Python Project On Cosmetic Shop system

  • 1. Type Your School Name Project Report On COSMETIC SHOP SYSTEM ………………………………………….. (SESSION-……………) …………………………. …............... LOGO
  • 2. ACKNOWLEDGEMENT I would like to convey my heartful thanks to ……………………………. (Computer Science) who always gave valuable suggestions & guidance for completion of my project. He helped me to understand & remember important details of the project. My project has been a success only because of his guidance. I am especially indented & I am also beholden to my friends. And finally I thank to the members of my family for their support & encouragement.
  • 3. CERTIFICATE This is to certify that …………………… of class ………… of ……………………………. has completed his project under my supervision. He has taken proper care & shown sincerity in completion of this project. I certify that this project is up to my expectation & as per the guideline issued by CBSE. ………………………….. (Computer Science faculty)
  • 4. Content 1. Introduction 2. Flowchart Design 3. Database Structure 4. Source Code 5. Output 6. Requirement 7. Advantages and disadvantages 8. Conclusion 9. Bibliography
  • 5. INTRODUCTION Cosmetics Shop Management System is a complete solution for managing a Shop, in other words, an enhanced tool that assists in organizing the day-to-day activities of a Shop. There is the need of an application for efficient management and handling customer orders. This Cosmetics Shop Management System keeps every record Shop and reducing paperwork. These records are stored in the database with security. Your data be a secure and only authorized person can take the copy of data. The main processes of the system focus on customer's request where the system is able to search the most appropriate products and deliver it to the customers. It should help the employees to quickly identify the list of cosmetic product that have reached the minimum quantity.
  • 7. DATABASE STRUCTURE Table Name: cosmetic Column Name Data type/Size Constraints costid int(11) Primary key costname varchar(30) type varchar(15) company varchar(15) qty int(11) price int(11) des varchar(40) Table Name: costinvoice ColumnName Data Type Constraint invoid int(11) Primary Key costid int(11) custnm varchar(25) mobno varchar(15) qty int(11) status varchar(15) invoiceno int(11) amt int(11) dateSP date
  • 8. SOURCE CODE File Name: cosmatic_menu.py """************************************************************* THE MAIN FUNCTION OF PROGRAM ****************************************************************""" import platform import os def myclear(): if platform.system()=="Windows": print(os.system("cls")) def intromain(): myclear() print("***SMETIC*****MANAGEMENT****SYSTEM******PROJECT*******************") print("***************************************************************************") def intro(): print("*************************COSMETIC-MANAGEMENT***************************") print("===========================================================") print("****************************S=Y=S=T=E=M********************************") print("PROJECT:") print("MADE BY : ……………………") print("---------------SCHOOL : DOON PUBLIC SCHOOL--------------------") def main(): ch=0 myclear() intromain() print("=================MAIN MENU====================") print("01. COSMETIC REPORT GENERATOR") print("02. ADMINISTRATOR") print("03. EXIT") print("==============================================") ch=int(input("Please Select Your Option (1-3)")) return ch def cosmetic_menu(): ch=0 intromain() print("===========COSMETIC INFO MENU===========") print("01. ADD COSMETIC INFORMATION") print("02. MODIFY COSMETIC INFORMATION") print("03. DELETE COSMETIC INFORMATION") print("04. BACK TO MAIN") print("==============================================") ch=int(input("Please Select Your Option (1-4) ")) return ch
  • 9. """*************************************************************** ADMINSTRATOR COSMETIC FUNCTION ****************************************************************""" def admin_menu1(): ch=0 myclear() intromain() print("=================COSMETIC ADD MENU====================") print("1.CREATE COSMETIC DETAILS") print("2.DISPLAY ALL CORMETIC DETAILS") print("3.SEARCH RECORD BY COSMETIC PRODUCT ID") print("4.SEARCH RECORD BY COSMETIC PRODUCT NAME") print("5.SEARCH RECORD BY PRICE") print("6.SEARCH RECORD BY TYPE") print("7.SEARCH RECORD BY COMPANY") print("8.BACK TO MAIN MENU") ch=int(input("Please Enter Your Choice (1-8) ")) return ch """*************************************************************** ADMINSTRATOR GROSERY MAIN MENU FUNCTION ****************************************************************""" def Cosmetic_ADM_menu(): ch=0 myclear() intromain() print("=================ADMIN MENU====================") print("1.COSMETIC'S MENU") print("2.COSMETIC'S SALE/PURCHASE") print("3.BACK TO MAIN MENU") ch=int(input("Please Enter Your Choice (1-3) ")) return ch """********************************************************** MODIFY MENU ********************************************************""" def modifyCosmetic_menu(): ch=0 myclear() intromain() print("===============MODIFY MENU==================") print("1.MODIFY COSMETIC PRODUCT NAME") print("2.MODIFY PRICE") print("3.MODIFY QUANTITY") print("4.MODIFY TYPE") print("5.MODIFY COMPANY") print("6.MODIFY DESCRIPTION")
  • 10. print("7.BACK TO MAIN MENU") ch=int(input("Please Enter Your Choice (1-7) ")) return ch """********************************************************** REPORTS MENU ********************************************************""" def SALE_PURCHASEmenu(): ch=0 myclear() intromain() print("===============SALE AND PURCHASE MENU==================") print("1.COSMETIC PRODUCT SOLD OUT") print("2.COSMETIC PRODUCT PURCHASED") print("3.BACK TO MAIN MENU") ch=int(input("Please Enter Your Choice (1-3) ")) return ch def cosmeticinvoicereports(): ch=0 myclear() intromain() print("=================COSMETIC ADD MENU====================") print("1.SEARCH AND PRINT SALE INVOICE") print("2.SEARCH AND PRINT PURCHASE INVOICE") print("3.DISPLAY ALL INVOICE(SALE/PURCHASE)") print("4.SEARCH INVOICE BY DATEOFINVOICE") print("5.BACK TO MAIN MENU") ch=int(input("Please Enter Your Choice (1-5) ")) return ch File Name: cosmatic.py import os import pymysql --------SEARCH AND PRINT SALE INVOICE def searchCOSinvoice(): try: mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem") C=mydb.cursor() tot=0 gst=0 count=1 nettot=0 invo=int(input("Enter the Invoice No:")) Query=("SELECT cosmetic.costname,costinvoice.amt,costinvoice.qty, costinvoice.dateSP, costinvoice.custnm, costinvoice.mobno FROM cosmetic,costinvoice WHERE cosmetic.costid= costinvoice.costid AND costinvoice.status='SALE' AND costinvoice.invoiceno=%s") data=(invo,) C.execute(Query,data)
  • 11. rc=C.fetchall() if rc: print("----------------INVOICE: ",invo,"---------DATE: ",rc[0][3]) print("--NAME:--",rc[0][4],"-----------MOBILE NO.:",rc[0][5]) print("--------------------------SALE------------------------------") print("S.NO.----|------------COSMETIC NAME-------------------TOTAL-----") for rc1 in rc: tot=tot+rc1[1] print(count," |---",rc1[0],"ttttt |t",rc1[1]) count=count+1 gst=tot*12/100 nettot=tot+gst print("============================================================") print(" Total: ",tot) print(" GST : ",gst) print(" NETTOTAL: ",nettot) input("----------------------Press any key-------------------------") C.close() mydb.close() return rc except: mydb.close() def searchPURinvoice(): try: mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem") C=mydb.cursor() tot=0 gst=0 count=1 nettot=0 invo=int(input("Enter the Invoice No:")) Query=("SELECT cosmetic.costname, costinvoice.amt, costinvoice.qty, costinvoice.dateSP, costinvoice.custnm,costinvoice.mobno FROM cosmetic,costinvoice WHERE cosmetic.costid = costinvoice.costid AND costinvoice.status='PURCHASE' AND costinvoice.invoiceno=%s") data=(invo,) C.execute(Query,data) rc=C.fetchall() if rc: print("----------------INVOICE: ",invo,"---------DATE: ",rc[0][3]) print("--NAME:--",rc[0][4],"-----------MOBILE NO.:",rc[0][5]) print("--------------------------PURCHASE------------------------------") print("S.NO.----|------------COSMETIC NAME-------------------TOTAL-----") for rc1 in rc: tot=tot+rc1[1] print(count," |---",rc1[0],"ttttt |t",rc1[1]) count=count+1
  • 12. gst=tot*12/100 nettot=tot+gst print("============================================================") print(" Total: ",tot) print(" GST : ",gst) print(" NETTOTAL: ",nettot) input("----------------------Press any key-------------------------") C.close() mydb.close() return rc except: mydb.close() #----------display all invoice SALE or PURCHASE wise def displayinvoiceSP(): try: mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem") C=mydb.cursor() count=1 ch=int(input("Enter the Choice 1- SALE Wise 2- PURCHASE Wise:")) Query=("SELECT cosmetic.costname,costinvoice.amt,costinvoice.qty,costinvoice.dateSP, costinvoice.invoiceno FROM cosmetic,costinvoice WHERE cosmetic.costid=costinvoice.costid AND costinvoice.status=%s") if(ch==1): data=('SALE',) else: data=('PURCHASE',) C.execute(Query,data) rc=C.fetchall() if rc: print("---------------------INVOICE LIST---------------------------") print("------------------------------------------------------------") print("S.NO.ttCOSTPROD-NAMEttQUANTITYttAMOUNTttDATEtINVOICE NO") for rc1 in rc: print(count,"tt",rc1[0],"tt",rc1[2],"tt",rc1[1],"tt",rc1[3],"t",rc1[4]) count=count+1 print("============================================================") input("----------------------Press any key-------------------------") C.close() mydb.close() return rc except: mydb.close() #----------display all invoice SALE or PURCHASE by date def displayinvoiceSPdate(): try:
  • 13. mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem") C=mydb.cursor() count=1 ch=int(input("Enter the Choice 1- SALE Wise 2- PURCHASE Wise:")) dt=input("Enter the date(yyyy-mm-dd)") Query=("SELECT cosmetic.costname,costinvoice.amt,costinvoice.qty,costinvoice.dateSP,costinvoice.invoiceno FROM cosmetic,costinvoice WHERE cosmetic.costid=costinvoice.costid AND costinvoice.status=%s AND costinvoice.dateSP=%s") if(ch==1): data=('SALE',dt) info='SALE' else: data=('PURCHASE',dt) info='PURCHASE' C.execute(Query,data) rc=C.fetchall() if rc: print("---------------------INVOICE LIST---------------------------") print("---------------------",info,"---------------------------") print("S.NO.ttCOSTPROD-NAMEttQUANTITYttAMOUNTttDATEttINVOICENO") for rc1 in rc: print(count,"tt",rc1[0],"tt",rc1[2],"tt",rc1[1],"tt",rc1[3],"tt",rc1[4]) count=count+1 print("============================================================") input("----------------------Press any key-------------------------") C.close() mydb.close() return rc except: mydb.close() #-------------------------------- #---Search Product no def prodsearchdata(scid): try: mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem") C=mydb.cursor() Query=("SELECT * FROM cosmetic WHERE costid=%s") data=(scid,) C.execute(Query,data) rc=C.fetchone() if rc: print("COST-IDtCOST-NAMEtttPRICEtQUANTITYtPROD-TYPEtBRANDtDESCRIPTION") print(rc[0],"t",rc[1],"ttt",rc[5],"t",rc[4],"t",rc[2],"t",rc[3],"t",rc[6]) input("--------------------press the key---------------------------------") os.system('cls')
  • 14. C.close() mydb.close() return rc except: mydb.close() #---Search Product no #----Modify Name of the Cosmetic Product def search_mod_Prodnm(): try: mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem") C=mydb.cursor() pno=int(input("ENTER Cosmetic Product No")) rc1=prodsearchdata(pno) if rc1: pnm=input("Enter the new Costmetic Product name to update:") Query=("UPDATE cosmetic SET costname=%s WHERE costid=%s") data=(pnm,pno) C.execute(Query,data) mydb.commit() print(C.rowcount, "record(s) affected") C.close() mydb.close() except: mydb.close() #----Modify price of Product def search_mod_price(): try: mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem") C=mydb.cursor() pno=int(input("ENTER Cosmetic Product No")) rc1=prodsearchdata(pno) if rc1: pr=int(input("Enter the price to update:")) Query=("UPDATE cosmetic SET price=%s WHERE costid=%s") data=(pr,pno) C.execute(Query,data) mydb.commit() print(C.rowcount, "record(s) affected") C.close() mydb.close() except: mydb.close() #----Modify Quantity of Product def search_mod_qty(): try: mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem")
  • 15. C=mydb.cursor() pno=int(input("ENTER Cosmetic Product No")) rc1=prodsearchdata(pno) if rc1: #--- and f==1: qt=int(input("Enter the new Quantity to update:")) Query=("UPDATE cosmetic SET qty=qty+%s WHERE costid=%s") data=(qt,pno) C.execute(Query,data) mydb.commit() print(C.rowcount, "record(s) affected") C.close() mydb.close() except: mydb.close() #----Modify Type of Product def search_mod_type(): try: mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem") C=mydb.cursor() pno=int(input("ENTER Cosmetic Product No")) rc1=prodsearchdata(pno) if rc1: ty=input("Enter the new Type to update:") Query=("UPDATE cosmetic SET type=%s WHERE costid=%s") data=(ty,pno) C.execute(Query,data) mydb.commit() print(C.rowcount, "record(s) affected") C.close() mydb.close() except: mydb.close() #----Modify company of Product def search_mod_company(): try: mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem") C=mydb.cursor() pno=int(input("ENTER Cosmetic Product No")) rc1=prodsearchdata(pno) if rc1: ty=input("Enter the new Company to update:") Query=("UPDATE cosmetic SET company=%s WHERE costid=%s") data=(ty,pno) C.execute(Query,data) mydb.commit()
  • 16. print(C.rowcount, "record(s) affected") C.close() mydb.close() except: mydb.close() #----Modify company of Product def search_mod_desc(): try: mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem") C=mydb.cursor() pno=int(input("ENTER Cosmetic Product No")) rc1=prodsearchdata(pno) if rc1: ds=input("Enter the new Description to update:") Query=("UPDATE cosmetic SET des=%s WHERE costid=%s") data=(ds,pno) C.execute(Query,data) mydb.commit() print(C.rowcount, "record(s) affected") C.close() mydb.close() except: mydb.close() #-- to generate the autonumbers def giveno(): count=0 mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem") mycursor=mydb.cursor() query=("SELECT COUNT(*) FROM cosmetic") q=("SELECT MAX(costid) FROM cosmetic") mycursor.execute(query) rc=mycursor.fetchone() tmp=rc[0] print(tmp) if tmp==0: count=int(input("Enter the New Cosmetic Product No:")) else: q=("SELECT MAX(costid) FROM cosmetic") mycursor.execute(q) rc=mycursor.fetchone() count=rc[0] count=count+1 mycursor.close() mydb.close() return count
  • 17. #-To add new record of Products def write_cosmeticrecord(): try: mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem") print(mydb) C=mydb.cursor() Query=("INSERT INTO cosmetic VALUES(%s,%s,%s,%s,%s,%s,%s)") pno=giveno() pdid=pno pname=input("Enter Cosmetic Product Name") pr=int(input("Enter Price")) print("(Example:Compact/Eye shadow/Eye shadow/Lipstick/Moisturizer/Nail Polish/Face pack/etc.)") ty=input("Enter Product Type:") bnm=input("Enter Cosmetic Product Brand name") qt=int(input("Enter quantity")) dsc=input("Enter Product description") data=(pdid,pname,ty,bnm,qt,pr,dsc) C.execute(Query,data) mydb.commit() C.close() mydb.close() except: mydb.close() #--show all Cosmetic Products def showallCosmeticprod(): try: mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem") C=mydb.cursor() Query=("SELECT * FROM cosmetic") #data=(scid,) C.execute(Query) rc=C.fetchall() if rc: print("COSTIDtCOSMETIC-NAMEtttPRICEtQUANTITYtCOST-TYPEtBRANDt DESCRIPTION") for x in rc: print(x[0],"t",x[1],"ttt",x[5],"t",x[4],"t",x[2],"t",x[3],"t",x[6 input("--------------------press the key---------------------------------") os.system('cls') C.close() mydb.close() return rc except: mydb.close() #----search and display Product by ID def showprodID():
  • 18. try: mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem") C=mydb.cursor() scid=int(input("Enter the COSMETIC Product ID:")) Query=("SELECT * FROM cosmetic WHERE costid=%s") data=(scid,) C.execute(Query,data) rc=C.fetchone() if rc: print("COSTIDtCOSMETIC-NAMEtttPRICEtQUANTITYtTYPEtBRANDtDESCRIPTION") print(rc[0],"t",rc[1],"ttt",rc[5],"t",rc[4],"t",rc[2],"t",rc[3],"t",rc[6]) input("--------------------press the key---------------------------------") os.system('cls') C.close() mydb.close() return rc except: mydb.close() #----search and display Product Name def showprodnm(): try: mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem") C=mydb.cursor() scid=input("Enter the Costmetic Product Name:") Query=("SELECT * FROM cosmetic WHERE costname=%s") data=(scid,) C.execute(Query,data) rc=C.fetchone() if rc: print("COSTIDtCOSMETIC-NAMEtttPRICEtQUANTITYtTYPEtBRANDtDESCRIPTION") print(rc[0],"t",rc[1],"ttt",rc[5],"t",rc[4],"t",rc[2],"t",rc[3],"t",rc[6]) input("--------------------press the key---------------------------------") os.system('cls') C.close() mydb.close() return rc except: mydb.close() #----search and display Product by price def showbyProdprice(): try: mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem") C=mydb.cursor() low=int(input("Enter the Price lowest value:")) high=int(input("Enter the Price Highest value:")) Query=("SELECT * FROM grosproduct WHERE price BETWEEN %s AND %s ")
  • 19. data=(low,high) C.execute(Query,data) rc=C.fetchall() if rc: print("COSTIDtCOSMETIC-NAMEtttPRICEtQUANTITYtTYPEtBRANDtDESCRIPTION") for rc1 in rc: print(rc1[0],"t",rc1[1],"ttt",rc1[5],"t",rc1[4],"t",rc1[2],"t",rc1[3],"t",rc1[6]) input("--------------------press the key---------------------------------") os.system('cls') C.close() mydb.close() return rc except: mydb.close() #----search and display Product by type def showProdtype(): try: mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem") C=mydb.cursor() print("(Example:Compact/Eye shadow/Eye shadow/Lipstick/Moisturizer/Nail Polish/Face pack/etc.)") scid=input("Enter the Cosmetic Product type:") Query=("SELECT * FROM cosmetic WHERE type=%s") data=(scid,) C.execute(Query,data) rc=C.fetchall() if rc: print("COSTIDtCOSMETIC-NAMEtttPRICEtQUANTITYtTYPEtBRANDtDESCRIPTION") for rc1 in rc: print(rc1[0],"t",rc1[1],"ttt",rc1[5],"t",rc1[4],"t",rc1[2],"t",rc1[3],"t",rc1[6]) input("--------------------press the key---------------------------------") os.system('cls') C.close() mydb.close() return rc except: mydb.close() #----search and display Product by brand def showProdcompy(): try: mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem") C=mydb.cursor() scid=input("Enter the Cosmetic Product Brand name:") Query=("SELECT * FROM cosmetic WHERE company=%s") data=(scid,) C.execute(Query,data) rc=C.fetchall()
  • 20. if rc: print("COSTIDtCOSMETIC-NAMEtttPRICEtQUANTITYtTYPEtBRANDtDESCRIPTION") for rc1 in rc: print(rc1[0],"t",rc1[1],"ttt",rc1[5],"t",rc1[4],"t",rc1[2],"t",rc1[3],"t",rc1[6]) input("--------------------press the key---------------------------------") os.system('cls') C.close() mydb.close() return rc except: mydb.close() #---delete the cosmetic record from the table def deletecosmetic(): try: mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem") C=mydb.cursor() gno=int(input("ENTER Cosmetic Product No")) rc1=prodsearchdata(gno) if rc1: #--- and f==1: Query=("DELETE FROM cosmetic WHERE costid=%s") data=(gno,) C.execute(Query,data) mydb.commit() print(C.rowcount, "record(s) affected") C.close() mydb.close() except: mydb.close() #-------invoice to sell the Cosmetic def Med_Sale(): try: mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem") print(mydb) C=mydb.cursor() netamt=0 Query=("INSERT INTO costinvoice VALUES(%s,%s,%s,%s,%s,%s,%s,%s,%s)") invono=int(input("Enter the invoice no:")) dosp=input("Enter the date of sale(yyyy-mm-dd)") custnm=input("Enter the Customer Name:") mob=input("enter the mobile no:") while True: no=givemeno() invoiceid=no gno=int(input("Enter the Cosmetic Product no")) rc1=prodsearchdata(gno) if rc1:
  • 21. qt=int(input("Enter the quantity:")) pr=int(input("Enter the price")) netamt=pr*qt data=(invoiceid,gno,custnm,mob,qt,'SALE',invono,netamt,dosp) C.execute(Query,data) mydb.commit() print(C.rowcount, "record(s) affected") changeqty(gno,qt,'S') else: print("No such Cosmetic record please try again") ch=input("Do you want to add more Cosmetic to sell(y/n)") if(ch=='n' or ch=='N'): break C.close() mydb.close() except: mydb.close() #------Update the qty---- def changeqty(mno,qt,ch): try: mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem") C=mydb.cursor() if(ch=='S'): Query=("UPDATE cosmetic SET qty=qty-%s WHERE costid=%s") elif(ch=='A'): Query=("UPDATE cosmetic SET qty=qty+%s WHERE costid=%s") data=(qt,mno) C.execute(Query,data) mydb.commit() print(C.rowcount, "record(s) affected") C.close() mydb.close() except: mydb.close() #-------invoice to Purchase the Cosmetic def Gar_Purchase(): try: mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem") print(mydb) C=mydb.cursor() netamt=0 Query=("INSERT INTO costinvoice VALUES(%s,%s,%s,%s,%s,%s,%s,%s,%s)") invono=int(input("Enter the invoice no:")) dosp=input("Enter the date of sale") custnm=input("Enter the Distributer Name:") mob=input("enter the mobile no:")
  • 22. while True: no=givemeno() invoiceid=no gno=int(input("Enter the Cosmetic Product no")) rc1=prodsearchdata(gno) if rc1: qt=int(input("Enter the quantity:")) pr=int(input("Enter the price")) netamt=pr*qt data=(invoiceid,gno,custnm,mob,qt,'PURCHASE',invono,netamt,dosp) C.execute(Query,data) mydb.commit() print(C.rowcount, "record(s) affected") changeqty(gno,qt,'A') else: print("No such Cosmetic record please try again") ch=input("Do you want to add more Cosmetic to sell(y/n)") if(ch=='n' or ch=='N'): break C.close() mydb.close() except: mydb.close() #-- to generate the autonumbers def givemeno(): count=0 mydb=pymysql.connect(host="localhost", user="root", passwd="", database="cosmeticsystem") print(mydb) mycursor=mydb.cursor() query=("SELECT COUNT(*) FROM costinvoice") q=("SELECT MAX(costid) FROM costinvoice") mycursor.execute(query) rc=mycursor.fetchone() tmp=rc[0] print(tmp) if tmp==0: count=1 else: q=("SELECT MAX(costid) FROM costinvoice") mycursor.execute(q) rc=mycursor.fetchone() count=rc[0] count=count+1 mycursor.close() mydb.close() return count
  • 23. File Name: cosmaticmainpage.py import cosmatic_menu as CM import sys import cosmatic as GM def invoice_show(): choice1=CM.cosmeticinvoicereports() while True: if choice1==1: GM.searchCOSinvoice() break elif choice1==2: GM.searchPURinvoice() break elif choice1==3: GM.displayinvoiceSP() break elif choice1==4: GM.displayinvoiceSPdate() break elif choice1==5: main() else: #print("Enter the correct choice") input("Enter any key to continue") choice1=0 invoice_show() def modifycosmeticshow(): choice1=" " choice1=CM.modifyCosmetic_menu() while True: if choice1==1: GM.search_mod_Prodnm() break elif choice1==2: #-------2.MODIFY PRICE GM.search_mod_price() break elif choice1==3: #-------3.MODIFY QUANTITY GM.search_mod_qty() break elif choice1==4: #-------4.MODIFY type GM.search_mod_type() break elif choice1==5: #-------5.MODIFY GM.search_mod_company() break elif choice1==6: GM.search_mod_desc() break elif choice1==7: main() else: #print("Enter the correct choice") input("Enter any key to continue") modifycosmeticshow() #-----------------COSMETIC MENU def Cosmeticmenu_show(): choice1=" " choice1=CM.Cosmetic_ADM_menu() while True: if choice1==1: cosmeticmidmenu() break elif choice1==2: salepurchase_show() break elif choice1==3: main() else: print("Enter the correct choice") input("Enter any key to continue") Groserymenu_show() #------------------------- def cosmetic_show(): choice1=CM.admin_menu1() while True: if choice1==1: GM.write_cosmeticrecord() break elif choice1==2: GM.showallCosmeticprod() break elif choice1==3: GM.showprodID() break elif choice1==4: GM.showprodnm()
  • 24. break elif choice1==5: GM.showbyProdprice() break elif choice1==6: GM.showProdtype() break elif choice1==7: GM.showProdcompy() break elif choice1==8: main() break else: print("Enter the correct choice") input("Enter any key to continue") choice1=0 cosmetic_show() #--------administrator menu def cosmeticmidmenu(): choice1=CM.cosmetic_menu() while True: if choice1==1: cosmetic_show() break elif choice1==2: modifycosmeticshow() break elif choice1==3: GM.deletecosmetic() break elif choice1==4: print("a") break else: print("Enter the correct choice") input("Enter any key to continue") choice1=0 cosmeticmidmenu() def salepurchase_show(): choice1=CM.SALE_PURCHASEmenu() while True: if choice1==1: GM.Med_Sale() break elif choice1==2: GM.Gar_Purchase() break elif choice1==3: main() else: #print("Enter the correct choice") input("Enter any key to continue") choice1=0 salepurchase_show() #-------------Main MENU------------------------------ def main(): CM.intro() choice=0 while(True): choice=CM.main() if choice==1: CM.myclear() invoice_show() elif choice==2: CM.myclear() Cosmeticmenu_show() elif choice==3: exit(1) else: print("Enter the correct choice") input("Enter any key to continue") main()
  • 25. OUTPUTS =================MAIN MENU==================== 01. COSMETIC REPORT GENERATOR 02. ADMINISTRATOR 03. EXIT ============================================== Please Select Your Option (1-3) If choice: 1 =================COSMETIC ADD MENU==================== 1.SEARCH AND PRINT SALE INVOICE 2.SEARCH AND PRINT PURCHASE INVOICE 3.DISPLAY ALL INVOICE(SALE/PURCHASE) 4.SEARCH INVOICE BY DATEOFINVOICE 5.BACK TO MAIN MENU If choice : 1 Enter the Invoice No:5600 ----------------INVOICE: 5600 ---------DATE: 2020-12-02 --NAME:-- Sam -----------MOBILE NO.: 885569632 --------------------------SALE------------------------------ S.NO.----|------------COSMETIC NAME-------------------TOTAL----- 1 |--- LipToGlow | 75 2 |--- M-Eye | 36 ============================================================ Total: 111 GST : 13.32 NETTOTAL: 124.32 ----------------------Press any key------------------------- If choice : 3 Please Enter Your Choice (1-5) 3 Enter the Choice 1- SALE Wise 2- PURCHASE Wise:1 ---------------------INVOICE LIST--------------------------- ------------------------------------------------------------ S.NO. COSTPROD-NAME QUANTITY AMOUNT DATE INVOICE NO 1 LipToGlow 5 75 2020-12-02 5600 2 M-Eye 3 36 2020-12-02 5600 ============================================================ If choice : 2 1.COSMETIC'S MENU 2.COSMETIC'S SALE/PURCHASE 3.BACK TO MAIN MENU Please Enter Your Choice (1-3) If choice : 1 ===========COSMETIC INFO MENU===========
  • 26. 01. ADD COSMETIC INFORMATION 02. MODIFY COSMETIC INFORMATION 03. DELETE COSMETIC INFORMATION 04. BACK TO MAIN ============================================== Please Select Your Option (1-4) If choice : 1 =================COSMETIC ADD MENU==================== 1.CREATE COSMETIC DETAILS 2.DISPLAY ALL CORMETIC DETAILS 3.SEARCH RECORD BY COSMETIC PRODUCT ID 4.SEARCH RECORD BY COSMETIC PRODUCT NAME 5.SEARCH RECORD BY PRICE 6.SEARCH RECORD BY TYPE 7.SEARCH RECORD BY COMPANY 8.BACK TO MAIN MENU Please Enter Your Choice (1-8) If choice: 1 Enter Cosmetic Product NameHairFLy Enter Price785 (Example:Compact/Eye shadow/Eye shadow/Lipstick/Moisturizer/Nail Polish/Face pack/etc.) Enter Product Type:Hair Dryer Enter Cosmetic Product Brand nameFACE Enter quantity10 Enter Product descriptionDryer If choice: 2 Please Enter Your Choice (1-8) 2 COSTID COSMETIC-NAME PRICE QUANTITY COST-TYPE BRAND DESCRIPTION 1200 Lipstic 50 20 Lipstick Lakme Red colour lipstick box 1201 LipToGlow 15 45 Lip Glow Lakme Light lip glow 1202 M-Eye 12 22 Eye Shadow Lakme Shadow 1203 HairFLy 785 10 Hair Dryer FACE Dryer If choice : Modify 2 ===============MODIFY MENU================== 1.MODIFY COSMETIC PRODUCT NAME 2.MODIFY PRICE 3.MODIFY QUANTITY 4.MODIFY TYPE 5.MODIFY COMPANY 6.MODIFY DESCRIPTION 7.BACK TO MAIN MENU Please Enter Your Choice (1-7)
  • 27. REQUIREMENTS HARDWARE REQUIRED  Printer, to print the required documents of the project  Processor : intel or any other  Ram : 512 MB or above  Harddisk : 80 GB or more  SOFTWARE REQUIRED  Operating system : Windows 7 or above  Python 2 or above  IDE Atom, PyCharm, Thonny, or any other.  Database: MySQL  WebServer: XAMPP ADVANTAGES AND DISADVANTAGES  Provide a Single environment from where an administrator can interact with the beauty shop system resources within the beauty center network.  Provides interface to interact with the beauty shop system  Paperwork is removed.  Customer records are records through this system Disadvantage:  The current system doesn’t allow the remote access of the cosmetic system resources of one system with other  This system need updating of product every time
  • 28. CONCLUSION In this project we put all the things that needed for the cosmetic shop, to manage all the work related to products sale and purchase and the customer’s information. But it need more updating as it can be perfect for small shops of cosmetic. BIBLIOGRAPHY  www.mysql.org  www.google.co.in  www.w3schools.com  www.tutorialspoint.com  www.javapoint.com  www.programiz.com  www.guru99.com