SlideShare a Scribd company logo
1 of 27
Download to read offline
Name Of School or University
Project Report
On
COMPUTER 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
The Computer Shop System is designed & developed for a computer shop to manage their records
of selling and purchasing of the computer parts from the dealers and sell them to the customers.
This system makes the work of the computer shopkeepers easy as it keeps all the records of the
computer product and also keep the records of the product that is sold to the customers. This
system first checks the availability of the computer parts and their quantity then enter the record
to the record table after deducting number of the computer parts from the quantity and then print
the invoice after adding all the discounts and VAT% and save the record for future use if needed.
It also prints the reports in a tabular form as well as according to the search of a particular
computer product available at that time, if product is less than it provides the facility to modify
the product by adding more. It automates the Systems records, their Selling and Maintenance,
Balance evaluation, due to calculation other functions. In other words, you can say it a complete
computer-shop management System. In this project we can easily maintain systems sales details.
We can see the Systems details before selling the particular items.
FLOWCHART DESIGN
DATABASE STRUCTURE
Table Name: compinfo
Column Name Data Type Constraints
compID int(11) Primary Key
prodname varchar(25)
price int(11)
qty int(11)
type varchar(45)
companynm varchar(35)
description varchar(80)
Table Name: compinvoice
Column Name Data Type Constraints
compinno int(11) Primary Key
compID int(11)
qty int(11)
status varchar(35)
invoiceno int(11)
amount int(11)
dateSP date
SOURCE CODE
File Name: comp_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("**********COMPUTER******SHOP****SYSTEM******PROJECT*******************")
print("***************************************************************************")
def intro():
print("****************************COMPUTER SHOP*************************")
print("===========================================================")
print("****************************S=Y=S=T=E=M********************************")
print("PROJECT:")
print("MADE BY : ……………………")
print("---------------SCHOOL : Name of School--------------------")
def main():
ch=0
myclear()
intromain()
print("=================MAIN MENU====================")
print("01. REPORTS GENERATOR")
print("02. ADMINISTRATOR")
print("03. EXIT")
print("==============================================")
ch=int(input("Please Select Your Option (1-3)"))
return ch
def comp_menu1():
ch=0
intromain()
print("===========COMPUTERS PRODUCT INFO MENU===========")
print("01. ADD COMPUTERS PRODUCT INFORMATION")
print("02. MODIFY INFORMATION")
print("03. DELETE INFORMATION")
print("04. BACK TO MAIN")
print("==============================================")
ch=int(input("Please Select Your Option (1-4) "))
return ch
"""***************************************************************
ADMINSTRATOR COMPUTERS PRODUCT FUNCTION
****************************************************************"""
def comp_menu_medicine():
ch=0
myclear()
intromain()
print("=================COMPUTERS PRODUCT ADD MENU====================")
print("1.CREATE COMPUTERS PRODUCT DETAILS")
print("2.DISPLAY ALL COMPUTERS PRODUCT DETAILS")
print("3.SEARCH RECORD BY COMPID")
print("4.SEARCH RECORD BY COMPUTER PRODCUCT 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 COMPUTERS PRODUCT MAIN MENU FUNCTION
****************************************************************"""
def COMP_menu():
ch=0
myclear()
intromain()
print("=================ADMIN MENU====================")
print("1.COMPUTERS PRODUCT MENU")
print("2.COMPUTERS PRODUCT SALE/PURCHASE")
print("3.BACK TO MAIN MENU")
ch=int(input("Please Enter Your Choice (1-3) "))
return ch
"""**********************************************************
MODIFY MENU
********************************************************"""
def modifycomp_menu():
ch=0
myclear()
intromain()
print("===============MODIFY MENU==================")
print("1.MODIFY COMPUTER PRODUCT NAME")
print("2.MODIFY PRICE")
print("3.MODIFY QUANTITY")
print("4.MODIFY COMPANY NAME")
print("5.MODIFY DESCRIPTION")
print("6.BACK TO MAIN MENU")
ch=int(input("Please Enter Your Choice (1-6) "))
return ch
"""**********************************************************
REPORTS MENU
********************************************************"""
def SALE_PURCHASEmenu():
ch=0
myclear()
intromain()
print("===============SALE AND PURCHASE MENU==================")
print("1.COMPUTER PRODUCT SOLD OUT")
print("2.COMPUTER PRODUCT PURCHASED")
print("3.BACK TO MAIN MENU")
ch=int(input("Please Enter Your Choice (1-3) "))
return ch
def compinvoicereports():
ch=0
myclear()
intromain()
print("=================COMPUTER PRODUCT INVOICE 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: computer.py
import os
import pymysql
#-- to generate the autonumbers
def giveno():
count=0
mydb=pymysql.connect(host="localhost", user="root", passwd="", database="computershop")
print(mydb)
mycursor=mydb.cursor()
query=("SELECT COUNT(*) FROM compinfo")
q=("SELECT MAX(compID) FROM compinfo")
mycursor.execute(query)
rc=mycursor.fetchone()
tmp=rc[0]
print(tmp)
if tmp==0:
count=int(input("Enter the New No:"))
else:
q=("SELECT MAX(compID) FROM compinfo")
mycursor.execute(q)
rc=mycursor.fetchone()
count=rc[0]
count=count+1
mycursor.close()
mydb.close()
return count
#-- to generate the autonumbers
#-To add new record of computer shop
def write_comprecord():
try:
mydb=pymysql.connect(host="localhost", user="root", passwd="", database="computershop")
print(mydb)
C=mydb.cursor()
Query=("INSERT INTO compinfo VALUES(%s,%s,%s,%s,%s,%s,%s)")
cno=giveno()
compid=cno
pname=input("Enter Product Name:")
pr=int(input("Enter Price of product"))
typenm=input("Enter type(Ex-HDD,motherboard,keyboard,mouse....) name")
cmpnm=input("Enter Company Name")
desc=input("Enter Other details abour product")
data=(compid,pname,pr,0,typenm,cmpnm,desc)
C.execute(Query,data)
mydb.commit()
C.close()
mydb.close()
except:
mydb.close()
#--show all computer products
def showallcomp():
try:
conn=pymysql.connect(host="localhost", user="root", passwd="", database="computershop")
C=conn.cursor()
Query=("SELECT * FROM compinfo")
#data=(scid,)
C.execute(Query)
rc=C.fetchall()
if rc:
print("COMPIDtPRODUCT-NAMEttPRICEtQUANTITYtTYPEtCOMPANYttDESCRIPTION")
for x in rc:
print(x[0],"t",x[1],"tt",x[2],"t",x[3],"t",x[4],"t",x[5],"t",x[6])
input("--------------------press the key---------------------------------")
os.system('cls')
C.close()
conn.close()
return rc
except:
conn.close()
#----search and display computer by ID
def showcompID():
try:
conn=pymysql.connect(host="localhost", user="root", passwd="", database="computershop")
C=conn.cursor()
compid=int(input("Enter the Computer ID:"))
Query=("SELECT * FROM compinfo WHERE compid=%s")
data=(compid,)
C.execute(Query,data)
rc=C.fetchone()
if rc:
print("COMPIDtPRODUCTttPRICEtQUANTITYtTYPEtCOMPANYtDESCRIPTION")
print(rc[0],"t",rc[1],"tt",rc[2],"t",rc[3],"t",rc[4],"t",rc[5],"t",rc[6])
input("--------------------press the key---------------------------------")
os.system('cls')
C.close()
conn.close()
return rc
except:
conn.close()
#----search and display computer information by product name
def showproduct():
try:
conn=pymysql.connect(host="localhost", user="root", passwd="", database="computershop")
C=conn.cursor()
cmppdnm=input("Enter the product name:")
Query=("SELECT * FROM compinfo WHERE prodname=%s")
data=(cmppdnm,)
C.execute(Query,data)
rc=C.fetchall()
if rc:
print("COMPIDtPRODUCT-NAMEttPRICEtQUANTITYtTYPEtCOMPANYtDESCRIPTION")
for rc1 in rc:
print(rc1[0],"t",rc1[1],"tt",rc1[2],"t",rc1[3],"t",rc1[4],"t",rc1[5],"t",rc1[6])
input("--------------------press the key---------------------------------")
os.system('cls')
C.close()
conn.close()
return rc
except:
conn.close()
#----search and display computer prodcts by price
def showbyprice():
try:
conn=pymysql.connect(host="localhost", user="root", passwd="", database="computershop")
C=conn.cursor()
low=int(input("Enter the Price lowest value:"))
high=int(input("Enter the Price Highest value:"))
Query=("SELECT * FROM compinfo WHERE price BETWEEN %s AND %s ")
data=(low,high)
C.execute(Query,data)
rc=C.fetchall()
if rc:
print("COMPIDtPRODUCT-NAMEttPRICEtQUANTITYtTYPEtCOMPANYtDESCRIPTION")
for rc1 in rc:
print(rc1[0],"t",rc1[1],"tt",rc1[2],"t",rc1[3],"t",rc1[4],"t",rc1[5],"t",rc1[6])
input("--------------------press the key---------------------------------")
os.system('cls')
C.close()
conn.close()
return rc
except:
conn.close()
#----search and display COMPUTER Products by type
def showtype():
try:
conn=pymysql.connect(host="localhost", user="root", passwd="", database="computershop")
C=conn.cursor()
scid=input("Enter the computer product type(HDD/CPU/KEYBOARD/MOUSE/MONITOR/UPS):")
Query=("SELECT * FROM compinfo WHERE type=%s")
data=(scid,)
C.execute(Query,data)
rc=C.fetchall()
if rc:
print("COMPIDtPRODUCT-NAMEttPRICEtQUANTITYtTYPEtCOMPANYtDESCRIPTION")
for rc1 in rc:
print(rc1[0],"t",rc1[1],"tt",rc1[2],"t",rc1[3],"t",rc1[4],"t",rc1[5],"t",rc1[6])
input("--------------------press the key---------------------------------")
os.system('cls')
C.close()
conn.close()
return rc
except:
conn.close()
#----search and display products by company
def showcompany():
try:
conn=pymysql.connect(host="localhost", user="root", passwd="", database="computershop")
C=conn.cursor()
scid=input("Enter the company name:")
Query=("SELECT * FROM compinfo WHERE companynm=%s")
data=(scid,)
C.execute(Query,data)
rc=C.fetchall()
if rc:
print("COMPIDtPRODUCT-NAMEttPRICEtQUANTITYtTYPEtCOMPANYtDESCRIPTION")
for rc1 in rc:
print(rc1[0],"t",rc1[1],"tt",rc1[2],"t",rc1[3],"t",rc1[4],"t",rc1[5],"t",rc1[6])
input("--------------------press the key---------------------------------")
os.system('cls')
C.close()
conn.close()
return rc
except:
conn.close()
#----Modify Computer Product Name
def search_mod_product():
try:
mydb=pymysql.connect(host="localhost", user="root", passwd="", database="computershop")
C=mydb.cursor()
cno=int(input("ENTER Computer ID"))
rc1=compsearchdata(cno)
if rc1:
pnm=input("Enter the Product name to update:")
Query=("UPDATE compinfo SET prodname=%s WHERE compid=%s")
data=(pnm,cno)
C.execute(Query,data)
mydb.commit()
print(C.rowcount, "record(s) affected")
C.close()
mydb.close()
except:
mydb.close()
#----Modify price of computer product
def search_mod_price():
try:
mydb=pymysql.connect(host="localhost", user="root", passwd="", database="computershop")
C=mydb.cursor()
bno=int(input("ENTER Computer ID"))
rc1=compsearchdata(bno)
if rc1: #--- and f==1:
tnm=int(input("Enter the price to update:"))
Query=("UPDATE compinfo SET price=%s WHERE compid=%s")
data=(tnm,bno)
C.execute(Query,data)
mydb.commit()
print(C.rowcount, "record(s) affected")
C.close()
mydb.close()
except:
mydb.close()
#----Modify Quantity of computer product
def search_mod_qty():
try:
mydb=pymysql.connect(host="localhost", user="root", passwd="", database="computershop")
C=mydb.cursor()
bno=int(input("ENTER Computer ID"))
rc1=compsearchdata(bno)
if rc1:
tnm=int(input("Enter the new Quantity to update:"))
Query=("UPDATE compinfo SET qty=qty+%s WHERE compid=%s")
data=(tnm,bno)
C.execute(Query,data)
mydb.commit()
print(C.rowcount, "record(s) affected")
C.close()
mydb.close()
except:
mydb.close()
#----Modify comapany name
def search_mod_company():
try:
mydb=pymysql.connect(host="localhost", user="root", passwd="", database="computershop")
C=mydb.cursor()
bno=int(input("ENTER Computer ID"))
rc1=compsearchdata(bno)
if rc1:
tnm=input("Enter the Company name to update:")
Query=("UPDATE compinfo SET companynm=%s WHERE compid=%s")
data=(tnm,bno)
C.execute(Query,data)
mydb.commit()
print(C.rowcount, "record(s) affected")
C.close()
mydb.close()
except:
mydb.close()
#----Modify Decription
def search_mod_desc():
try:
mydb=pymysql.connect(host="localhost", user="root", passwd="", database="computershop")
C=mydb.cursor()
bno=int(input("ENTER Computer ID"))
rc1=compsearchdata(bno)
if rc1:
tnm=input("Enter the Computer Description to update:")
Query=("UPDATE compinfo SET description=%s WHERE compid=%s")
data=(tnm,bno)
C.execute(Query,data)
mydb.commit()
print(C.rowcount, "record(s) affected")
C.close()
mydb.close()
except:
mydb.close()
#---delete the computer product record from the table
def deletecompprod():
try:
mydb=pymysql.connect(host="localhost", user="root", passwd="", database="computershop")
C=mydb.cursor()
bno=int(input("ENTER Computer ID"))
rc1=compsearchdata(bno)
if rc1:
Query=("DELETE FROM compinfo WHERE compid=%s")
data=(bno,)
C.execute(Query,data)
mydb.commit()
print(C.rowcount, "record(s) affected")
C.close()
mydb.close()
except:
mydb.close()
#---Search Computer ID
def compsearchdata(scid):
try:
conn=pymysql.connect(host="localhost", user="root", passwd="", database="computershop")
C=conn.cursor()
Query=("SELECT * FROM compinfo WHERE compid=%s")
data=(scid,)
C.execute(Query,data)
rc=C.fetchone()
if rc:
print("COMPIDtPRODUCT-NAMEtPRICEtQUANTITYtTYPEtCOMPANYtDESCRIPTION")
print(rc[0],"t",rc[1],"t",rc[2],"t",rc[3],"t",rc[4],"t",rc[5],"t",rc[6])
input("--------------------press the key---------------------------------")
os.system('cls')
C.close()
conn.close()
return rc
except:
conn.close()
#-------invoice to sell the computers products
def comp_Sale():
try:
mydb=pymysql.connect(host="localhost", user="root", passwd="", database="computershop")
print(mydb)
C=mydb.cursor()
netamt=0
Query=("INSERT INTO compinvoice VALUES(%s,%s,%s,%s,%s,%s,%s)")
invono=int(input("Enter the invoice no:"))
dosp=input("Enter the date of sale(yyyy-mm-dd)")
while True:
no=givemeno()
invoiceid=no
bno=int(input("Enter the Computer ID"))
rc1=compsearchdata(bno)
if rc1:
qt=int(input("Enter the quantity:"))
pr=int(input("Enter the price"))
netamt=pr*qt
data=(invoiceid,bno,qt,'SALE',invono,netamt,dosp)
C.execute(Query,data)
mydb.commit()
print(C.rowcount, "record(s) affected")
changeqty(bno,qt,'S')
else:
print("No such record please try again")
ch=input("Do you want to add more to sell(y/n)")
if(ch=='n' or ch=='N'):
break
C.close()
mydb.close()
except:
mydb.close()
#-------invoice to sell the computer products
#-- to generate the autonumbers
def givemeno():
count=0
mydb=pymysql.connect(host="localhost", user="root", passwd="", database="computershop")
print(mydb)
mycursor=mydb.cursor()
query=("SELECT COUNT(*) FROM compinvoice")
q=("SELECT MAX(compinno) FROM compinvoice")
mycursor.execute(query)
rc=mycursor.fetchone()
tmp=rc[0]
print(tmp)
if tmp==0:
count=1
else:
q=("SELECT MAX(compinno) FROM compinvoice")
mycursor.execute(q)
rc=mycursor.fetchone()
count=rc[0]
count=count+1
mycursor.close()
mydb.close()
return count
#------Update the qty----
def changeqty(bno,qt,ch):
try:
mydb=pymysql.connect(host="localhost", user="root", passwd="", database="computershop")
C=mydb.cursor()
if(ch=='S'):
Query=("UPDATE compinfo SET qty=qty-%s WHERE compid=%s")
elif(ch=='P'):
Query=("UPDATE compnfo SET qty=qty+%s WHERE compid=%s")
data=(qt,bno)
C.execute(Query,data)
mydb.commit()
print(C.rowcount, "record(s) affected")
C.close()
mydb.close()
except:
mydb.close()
#-------invoice to Purchase the computers products
def comp_Purchase():
try:
mydb=pymysql.connect(host="localhost", user="root", passwd="", database="computershop")
print(mydb)
#mycursor=mydb.cursor()
C=mydb.cursor()
netamt=0
Query=("INSERT INTO compinvoice VALUES(%s,%s,%s,%s,%s,%s,%s)")
invono=int(input("Enter the invoice no:"))
dosp=input("Enter the date of Purchase(yyyy-mm-dd)")
while True:
no=givemeno()
invoiceid=no
bno=int(input("Enter the Computer ID"))
rc1=compsearchdata(bno)
if rc1:
qt=int(input("Enter the quantity:"))
pr=int(input("Enter the price"))
netamt=pr*qt
data=(invoiceid,bno,qt,'PURCHASE',invono,netamt,dosp)
C.execute(Query,data)
mydb.commit()
print(C.rowcount, "record(s) affected")
changeqty(bno,qt,'P')
else:
print("No such record please try again")
ch=input("Do you want to add more to sell(y/n)")
if(ch=='n' or ch=='N'):
break
C.close()
mydb.close()
except:
mydb.close()
#--------SEARCH AND PRINT SALE INVOICE
def searchinvoice():
try:
conn=pymysql.connect(host="localhost", user="root", passwd="", database="computershop")
C=conn.cursor()
tot=0
gst=0
count=1
nettot=0
invo=int(input("Enter the Invoice No:"))
Query=("SELECT compinfo.prodname,compinvoice.amount,compinvoice.qty,compinvoice.dateSP FROM
compinfo,compinvoice WHERE compinfo.compid=compinvoice.compid AND compinvoice.status='SALE'
AND compinvoice.invoiceno=%s")
data=(invo,)
C.execute(Query,data)
rc=C.fetchall()
if rc:
print("----------------INVOICE: ",invo,"---------DATE: ",rc[0][3])
print("--------------------------SALE------------------------------")
print("S.NO.----|----------COMPUTER PRODUCT 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()
conn.close()
return rc
except:
conn.close()
#--------SEARCH AND PRINT PURCHASE INVOICE
def searchinvoicePUR():
try:
conn=pymysql.connect(host="localhost", user="root", passwd="", database="computershop")
C=conn.cursor()
tot=0
gst=0
count=1
nettot=0
invo=int(input("Enter the Invoice No:"))
Query=("SELECT compinfo.prodname,compinvoice.amount,compinvoice.qty,compinvoice.dateSP FROM
compinfo,compinvoice WHERE compinfo.compID=compinvoice.compID AND
compinvoice.status='PURCHASE' AND compinvoice.invoiceno=%s")
data=(invo,)
C.execute(Query,data)
rc=C.fetchall()
if rc:
print("----------------INVOICE: ",invo,"---------DATE: ",rc[0][3])
print("--------------------------PURCHASE--------------------------")
print("S.NO.----|----------COMPUTER PRODUCT 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()
conn.close()
return rc
except:
conn.close()
#----------display all invoice SALE or PURCHASE wise
def displayinvoiceSP():
try:
conn=pymysql.connect(host="localhost", user="root", passwd="", database="computershop")
C=conn.cursor()
count=1
ch=int(input("Enter the Choice 1- SALE Wise 2- PURCHASE Wise:"))
Query=("SELECT
compinfo.prodname,compinvoice.amount,compinvoice.qty,compinvoice.dateSP,compinvoice.invoiceno FROM
compinfo,compinvoice WHERE compinfo.compID=compinvoice.compID AND compinvoice.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.ttPRODUCT-NAMEttQUANTITYttAMOUNTttDATEtINVOICENO")
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()
conn.close()
return rc
except:
conn.close()
#----------display all invoice SALE or PURCHASE by date
def displayinvoiceSPdate():
try:
conn=pymysql.connect(host="localhost", user="root", passwd="", database="computershop")
C=conn.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
compinfo.prodname,compinvoice.amount,compinvoice.qty,compinvoice.dateSP,compinvoice.invoiceno FROM
compinfo,compinvoice WHERE compinfo.compid=compinvoice.compid AND compinvoice.status=%s and
compinvoice.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.ttTitlettQUANTITYttAMOUNTttDATEttINVOICENO")
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()
conn.close()
return rc
except:
conn.close()
File Name: computermainpage.py
import comp_menu as CM
import sys
import computer as compsh
def invoice_show():
choice1=CM.compinvoicereports()
while True:
if choice1==1:
compsh.searchinvoice()
break
elif choice1==2:
compsh.searchinvoicePUR()
break
elif choice1==3:
compsh.displayinvoiceSP()
break
elif choice1==4:
compsh.displayinvoiceSPdate()
break
elif choice1==5:
main()
else:
input("Enter any key to continue")
choice1=0
invoice_show()
def modifyCOMPshow():
choice1=" "
choice1=CM.modifycomp_menu()
while True:
if choice1==1:
compsh.search_mod_product()
break
elif choice1==2:
compsh.search_mod_price()
break
elif choice1==3:
compsh.search_mod_qty()
break
elif choice1==4:
compsh.search_mod_company()
break
elif choice1==5:
compsh.search_mod_desc()
break
elif choice1==6:
main()
else:
input("Enter any key to continue")
modifyCOMPshow()
#-----------------COMPUTERS MENU
def compmenu_show():
choice1=" "
choice1=CM.COMP_menu()
while True:
if choice1==1:
compmainshow()
break
elif choice1==2:
salepurchase_show()
break
elif choice1==3:
main()
else:
input("Enter any key to continue")
compmenu_show()
#--------COMPUERS PRODUCT MAIN MENU
AREA
def compmainshow():
choice1=CM.comp_menu1()
while True:
if choice1==1:
compmidmenu()
break
elif choice1==2:
modifyCOMPshow()
break
elif choice1==3:
compsh.deletecompprod()
break
elif choice1==4:
print("a")
break
else:
input("-----Press any key to continue-----")
choice1=0
compmainshow()
#-------------------------
#--------administrator menu
def compmidmenu():
choice1=CM.comp_menu_medicine()
while True:
if choice1==1:
compsh.write_comprecord()
break
elif choice1==2:
compsh.showallcomp()
break
elif choice1==3:
compsh.showcompID()
break
elif choice1==4:
compsh.showproduct()
break
elif choice1==5:
compsh.showbyprice()
break
elif choice1==6:
compsh.showtype()
break
elif choice1==7:
compsh.showcompany()
break
elif choice1==8:
main()
break
else:
input("Enter any key to continue")
choice1=0
compmidmenu()
def salepurchase_show():
choice1=CM.SALE_PURCHASEmenu()
while True:
if choice1==1:
compsh.comp_Sale()
break
elif choice1==2:
compsh.comp_Purchase()
break
elif choice1==3:
main()
else:
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()
compmenu_show()
elif choice==3:
exit(1)
else:
input("Enter any key to continue")
main()
OUTPUTS
=================MAIN MENU====================
01. REPORTS GENERATOR
02. ADMINISTRATOR
03. EXIT
==============================================
Please Select Your Option (1-3)
If choice : 1
=================COMPUTER PRODUCT INVOICE 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
Please Enter Your Choice (1-5)
If choice : 1
Enter the Invoice No:7008
----------------INVOICE: 7008 ---------DATE: 2021-01-05
--------------------------SALE------------------------------
S.NO.----|----------COMPUTER PRODUCT NAME---------TOTAL-----
1 |--- Hard-disk | 25500
2 |--- Key-200 | 0
3 |--- HARDDISK2DX | 0
============================================================
Total: 25500
GST : 3060.0
NETTOTAL: 28560.0
If choice : 2
=================ADMIN MENU====================
1.COMPUTERS PRODUCT MENU
2.COMPUTERS PRODUCT SALE/PURCHASE
3.BACK TO MAIN MENU
Please Enter Your Choice (1-3)
If choice : 1
===========COMPUTERS PRODUCT INFO MENU===========
01. ADD COMPUTERS PRODUCT INFORMATION
02. MODIFY INFORMATION
03. DELETE INFORMATION
04. BACK TO MAIN
==============================================
If choice: 1
=================COMPUTERS PRODUCT ADD MENU====================
1.CREATE COMPUTERS PRODUCT DETAILS
2.DISPLAY ALL COMPUTERS PRODUCT DETAILS
3.SEARCH RECORD BY COMPID
4.SEARCH RECORD BY COMPUTER PRODCUCT NAME
5-SEARCH RECORD BY PRICE
6.SEARCH RECORD BY TYPE
7.SEARCH RECORD BY COMPANY
8.BACK TO MAIN MENU
If choice: 1
Please Enter Your Choice (1-8)
Enter Product Name:M-200
Enter Price of product55
Enter Quantity: 10
Enter type(Ex-HDD,motherboard,keyboard,mouse....) nameMouse
Enter Company NameMTOD
Enter Other details abour productMouse with LED
If choice : 2
COMPID PRODUCT-NAME PRICE QUANTITY TYPE COMPANY DESCRIPTION
1201 Hard-disk 8750 55 HDD HTC 2 TB hard disk with
1203 Key-200 1200 30 keyboard prodot prodot EX keyboard
1204 HARDDISK2DX 5500 32 HDD Samsung 1TB hard disk
1205 RX-K400 480 12 Keyboard TRAX Gaming Keyboard
1206 M-200 55 10 Mouse MTOD Mouse with LED
===============MODIFY MENU==================
1.MODIFY COMPUTER PRODUCT NAME
2.MODIFY PRICE
3.MODIFY QUANTITY
4.MODIFY COMPANY NAME
5.MODIFY DESCRIPTION
6.BACK TO MAIN MENU
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
Advantage:
1. Provides the searching facilities based on various factors. Such as ProductID, Product name, Price etc.
2. It tracks all the information of Seller, Customer etc.
3. Shows the information and description of the Computer and products
4. It generates the report on computer products, sellers and Customers.
Disadvantage:
1. Require much man power i.e. much efforts, much cost and hard to operate and maintain.
2. Since, all the work is done in papers so it is very hard to locate a particular student record when it is
required.
CONCLUSION
Nothing is perfect in this world. So, we are also no exception. Although, we have tried our best
to present the information effectively, yet, there can be further enhancement in the Application.
We have taken care of all the critical aspects, which need to take care of during the development
of the Project. Like the things this project also has some limitations and can further be enhances
by someone, because there are certain drawbacks that do not permit the system to be 100%
accurate.
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

Python Project On Cosmetic Shop system
Python Project On Cosmetic Shop systemPython Project On Cosmetic Shop system
Python Project On Cosmetic Shop systemvikram mahendra
 
Employee Management System
Employee Management SystemEmployee Management System
Employee Management SystemBhavya Chawla
 
Project for Student Result System
Project for Student Result SystemProject for Student Result System
Project for Student Result SystemKuMaR AnAnD
 
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
 
Student result mamagement
Student result mamagementStudent result mamagement
Student result mamagementMickey
 
Online movie ticket booking system
Online movie ticket booking systemOnline movie ticket booking system
Online movie ticket booking systemSikandar Pandit
 
Hotel Management system in C++
Hotel Management system in C++ Hotel Management system in C++
Hotel Management system in C++ Prince Kumar
 
cbse 12 computer science IP
cbse 12 computer science IPcbse 12 computer science IP
cbse 12 computer science IPD. j Vicky
 
COMPUTER SCIENCE PROJECT OF RAILWAY RESERVATION SYSTEM PYTHON PROGRAMMING.pdf
COMPUTER SCIENCE PROJECT OF RAILWAY RESERVATION SYSTEM PYTHON PROGRAMMING.pdfCOMPUTER SCIENCE PROJECT OF RAILWAY RESERVATION SYSTEM PYTHON PROGRAMMING.pdf
COMPUTER SCIENCE PROJECT OF RAILWAY RESERVATION SYSTEM PYTHON PROGRAMMING.pdfAkshatTiwari530170
 
Clothing Store and Management System
Clothing Store and Management SystemClothing Store and Management System
Clothing Store and Management SystemAshwini0951
 
Employee work management system project using codeIgniter
Employee work management system project using codeIgniter Employee work management system project using codeIgniter
Employee work management system project using codeIgniter Shahinul Islam Sujon
 
Documentation project of college management [1]
Documentation project of college management [1]Documentation project of college management [1]
Documentation project of college management [1]Priyaranjan Verma
 
Employee management system
Employee management systemEmployee management system
Employee management systemDeepák Soni
 
C.S. project report on railway ticket reservation
C.S. project report on railway ticket reservationC.S. project report on railway ticket reservation
C.S. project report on railway ticket reservationVirat Prasad
 

What's hot (20)

School Management (c++)
School Management (c++) School Management (c++)
School Management (c++)
 
BANK MANAGEMENT SYSTEM report
BANK MANAGEMENT SYSTEM reportBANK MANAGEMENT SYSTEM report
BANK MANAGEMENT SYSTEM report
 
Python Project On Cosmetic Shop system
Python Project On Cosmetic Shop systemPython Project On Cosmetic Shop system
Python Project On Cosmetic Shop system
 
PHP || [Student Result Management System]
PHP || [Student Result Management System]PHP || [Student Result Management System]
PHP || [Student Result Management System]
 
Bank Management System
Bank Management SystemBank Management System
Bank Management System
 
Employee Management System
Employee Management SystemEmployee Management System
Employee Management System
 
C++ super market
C++ super marketC++ super market
C++ super market
 
Project for Student Result System
Project for Student Result SystemProject for Student Result System
Project for Student Result 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++
 
Student result mamagement
Student result mamagementStudent result mamagement
Student result mamagement
 
Online movie ticket booking system
Online movie ticket booking systemOnline movie ticket booking system
Online movie ticket booking system
 
Hotel Management system in C++
Hotel Management system in C++ Hotel Management system in C++
Hotel Management system in C++
 
cbse 12 computer science IP
cbse 12 computer science IPcbse 12 computer science IP
cbse 12 computer science IP
 
COMPUTER SCIENCE PROJECT OF RAILWAY RESERVATION SYSTEM PYTHON PROGRAMMING.pdf
COMPUTER SCIENCE PROJECT OF RAILWAY RESERVATION SYSTEM PYTHON PROGRAMMING.pdfCOMPUTER SCIENCE PROJECT OF RAILWAY RESERVATION SYSTEM PYTHON PROGRAMMING.pdf
COMPUTER SCIENCE PROJECT OF RAILWAY RESERVATION SYSTEM PYTHON PROGRAMMING.pdf
 
Clothing Store and Management System
Clothing Store and Management SystemClothing Store and Management System
Clothing Store and Management System
 
Online notice board
Online notice boardOnline notice board
Online notice board
 
Employee work management system project using codeIgniter
Employee work management system project using codeIgniter Employee work management system project using codeIgniter
Employee work management system project using codeIgniter
 
Documentation project of college management [1]
Documentation project of college management [1]Documentation project of college management [1]
Documentation project of college management [1]
 
Employee management system
Employee management systemEmployee management system
Employee management system
 
C.S. project report on railway ticket reservation
C.S. project report on railway ticket reservationC.S. project report on railway ticket reservation
C.S. project report on railway ticket reservation
 

Similar to Computer Shop System Project Report

PYTHON PROJECT ON CARSHOP SYSTEM
PYTHON PROJECT ON CARSHOP SYSTEMPYTHON PROJECT ON CARSHOP SYSTEM
PYTHON PROJECT ON CARSHOP SYSTEMvikram mahendra
 
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
 
computerscience-170129081612.pdf
computerscience-170129081612.pdfcomputerscience-170129081612.pdf
computerscience-170129081612.pdfKiranKumari204016
 
BOOK SHOP SYSTEM Project in Python
BOOK SHOP SYSTEM Project in PythonBOOK SHOP SYSTEM Project in Python
BOOK SHOP SYSTEM Project in Pythonvikram mahendra
 
Dynamics gp insights to manufacturing
Dynamics gp insights to manufacturingDynamics gp insights to manufacturing
Dynamics gp insights to manufacturingSteve Chapman
 
PROJECT REPORT ON COMPUTER SHOP SYSTEM IN C++
PROJECT REPORT ON COMPUTER SHOP SYSTEM IN C++PROJECT REPORT ON COMPUTER SHOP SYSTEM IN C++
PROJECT REPORT ON COMPUTER SHOP SYSTEM IN C++vikram mahendra
 
project report on Gas booking system in c++
project report on Gas booking system in c++ project report on Gas booking system in c++
project report on Gas booking 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
 
14 mass data engineering v1.00_en
14 mass data engineering v1.00_en14 mass data engineering v1.00_en
14 mass data engineering v1.00_enconfidencial
 
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
 
Devry cis 321 week 7 milestone 5 and milestone 6
Devry cis 321 week 7 milestone 5 and milestone 6Devry cis 321 week 7 milestone 5 and milestone 6
Devry cis 321 week 7 milestone 5 and milestone 6uopassignment
 
Sap basis administration handbook
Sap basis administration handbookSap basis administration handbook
Sap basis administration handbookblackgoldboy
 
The ultimate-guide-to-sql
The ultimate-guide-to-sqlThe ultimate-guide-to-sql
The ultimate-guide-to-sqlMcNamaraChiwaye
 
AutoCount Accounting User Manual
AutoCount Accounting User ManualAutoCount Accounting User Manual
AutoCount Accounting User ManualAngela Shin
 
Quick functional UI sketches with Lua templates and mermaid.js
Quick functional UI sketches with Lua templates and mermaid.jsQuick functional UI sketches with Lua templates and mermaid.js
Quick functional UI sketches with Lua templates and mermaid.jsAlexander Gladysh
 
Informatica complex transformation i
Informatica complex transformation iInformatica complex transformation i
Informatica complex transformation iAmit Sharma
 
solve 6 , quiz 2link of book httpwww.irccyn.ec-nantes.fr~mart.pdf
solve 6 , quiz 2link of book httpwww.irccyn.ec-nantes.fr~mart.pdfsolve 6 , quiz 2link of book httpwww.irccyn.ec-nantes.fr~mart.pdf
solve 6 , quiz 2link of book httpwww.irccyn.ec-nantes.fr~mart.pdfarihantcomputersddn
 

Similar to Computer Shop System Project Report (20)

PYTHON PROJECT ON CARSHOP SYSTEM
PYTHON PROJECT ON CARSHOP SYSTEMPYTHON PROJECT ON CARSHOP SYSTEM
PYTHON PROJECT ON CARSHOP SYSTEM
 
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
 
computerscience-170129081612.pdf
computerscience-170129081612.pdfcomputerscience-170129081612.pdf
computerscience-170129081612.pdf
 
BOOK SHOP SYSTEM Project in Python
BOOK SHOP SYSTEM Project in PythonBOOK SHOP SYSTEM Project in Python
BOOK SHOP SYSTEM Project in Python
 
Dynamics gp insights to manufacturing
Dynamics gp insights to manufacturingDynamics gp insights to manufacturing
Dynamics gp insights to manufacturing
 
PROJECT REPORT ON COMPUTER SHOP SYSTEM IN C++
PROJECT REPORT ON COMPUTER SHOP SYSTEM IN C++PROJECT REPORT ON COMPUTER SHOP SYSTEM IN C++
PROJECT REPORT ON COMPUTER SHOP SYSTEM IN C++
 
project report on Gas booking system in c++
project report on Gas booking system in c++ project report on Gas booking system in c++
project report on Gas booking system in c++
 
Library Management System in c++
Library Management System in c++Library Management System in c++
Library Management System in c++
 
14 mass data engineering v1.00_en
14 mass data engineering v1.00_en14 mass data engineering v1.00_en
14 mass data engineering v1.00_en
 
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
 
Devry cis 321 week 7 milestone 5 and milestone 6
Devry cis 321 week 7 milestone 5 and milestone 6Devry cis 321 week 7 milestone 5 and milestone 6
Devry cis 321 week 7 milestone 5 and milestone 6
 
Sap basis administration handbook
Sap basis administration handbookSap basis administration handbook
Sap basis administration handbook
 
The ultimate-guide-to-sql
The ultimate-guide-to-sqlThe ultimate-guide-to-sql
The ultimate-guide-to-sql
 
Durgesh
DurgeshDurgesh
Durgesh
 
ASAD Project Report
ASAD Project ReportASAD Project Report
ASAD Project Report
 
AutoCount Accounting User Manual
AutoCount Accounting User ManualAutoCount Accounting User Manual
AutoCount Accounting User Manual
 
Quick functional UI sketches with Lua templates and mermaid.js
Quick functional UI sketches with Lua templates and mermaid.jsQuick functional UI sketches with Lua templates and mermaid.js
Quick functional UI sketches with Lua templates and mermaid.js
 
Informatica complex transformation i
Informatica complex transformation iInformatica complex transformation i
Informatica complex transformation i
 
solve 6 , quiz 2link of book httpwww.irccyn.ec-nantes.fr~mart.pdf
solve 6 , quiz 2link of book httpwww.irccyn.ec-nantes.fr~mart.pdfsolve 6 , quiz 2link of book httpwww.irccyn.ec-nantes.fr~mart.pdf
solve 6 , quiz 2link of book httpwww.irccyn.ec-nantes.fr~mart.pdf
 

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

Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
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
 
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
 
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
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 

Recently uploaded (20)

Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
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
 
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
 
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
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
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🔝
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 

Computer Shop System Project Report

  • 1. Name Of School or University Project Report On COMPUTER 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 The Computer Shop System is designed & developed for a computer shop to manage their records of selling and purchasing of the computer parts from the dealers and sell them to the customers. This system makes the work of the computer shopkeepers easy as it keeps all the records of the computer product and also keep the records of the product that is sold to the customers. This system first checks the availability of the computer parts and their quantity then enter the record to the record table after deducting number of the computer parts from the quantity and then print the invoice after adding all the discounts and VAT% and save the record for future use if needed. It also prints the reports in a tabular form as well as according to the search of a particular computer product available at that time, if product is less than it provides the facility to modify the product by adding more. It automates the Systems records, their Selling and Maintenance, Balance evaluation, due to calculation other functions. In other words, you can say it a complete computer-shop management System. In this project we can easily maintain systems sales details. We can see the Systems details before selling the particular items.
  • 7. DATABASE STRUCTURE Table Name: compinfo Column Name Data Type Constraints compID int(11) Primary Key prodname varchar(25) price int(11) qty int(11) type varchar(45) companynm varchar(35) description varchar(80) Table Name: compinvoice Column Name Data Type Constraints compinno int(11) Primary Key compID int(11) qty int(11) status varchar(35) invoiceno int(11) amount int(11) dateSP date
  • 8. SOURCE CODE File Name: comp_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("**********COMPUTER******SHOP****SYSTEM******PROJECT*******************") print("***************************************************************************") def intro(): print("****************************COMPUTER SHOP*************************") print("===========================================================") print("****************************S=Y=S=T=E=M********************************") print("PROJECT:") print("MADE BY : ……………………") print("---------------SCHOOL : Name of School--------------------") def main(): ch=0 myclear() intromain() print("=================MAIN MENU====================") print("01. REPORTS GENERATOR") print("02. ADMINISTRATOR") print("03. EXIT") print("==============================================") ch=int(input("Please Select Your Option (1-3)")) return ch def comp_menu1(): ch=0 intromain() print("===========COMPUTERS PRODUCT INFO MENU===========") print("01. ADD COMPUTERS PRODUCT INFORMATION") print("02. MODIFY INFORMATION") print("03. DELETE INFORMATION") print("04. BACK TO MAIN")
  • 9. print("==============================================") ch=int(input("Please Select Your Option (1-4) ")) return ch """*************************************************************** ADMINSTRATOR COMPUTERS PRODUCT FUNCTION ****************************************************************""" def comp_menu_medicine(): ch=0 myclear() intromain() print("=================COMPUTERS PRODUCT ADD MENU====================") print("1.CREATE COMPUTERS PRODUCT DETAILS") print("2.DISPLAY ALL COMPUTERS PRODUCT DETAILS") print("3.SEARCH RECORD BY COMPID") print("4.SEARCH RECORD BY COMPUTER PRODCUCT 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 COMPUTERS PRODUCT MAIN MENU FUNCTION ****************************************************************""" def COMP_menu(): ch=0 myclear() intromain() print("=================ADMIN MENU====================") print("1.COMPUTERS PRODUCT MENU") print("2.COMPUTERS PRODUCT SALE/PURCHASE") print("3.BACK TO MAIN MENU") ch=int(input("Please Enter Your Choice (1-3) ")) return ch """********************************************************** MODIFY MENU ********************************************************""" def modifycomp_menu(): ch=0 myclear() intromain() print("===============MODIFY MENU==================") print("1.MODIFY COMPUTER PRODUCT NAME") print("2.MODIFY PRICE")
  • 10. print("3.MODIFY QUANTITY") print("4.MODIFY COMPANY NAME") print("5.MODIFY DESCRIPTION") print("6.BACK TO MAIN MENU") ch=int(input("Please Enter Your Choice (1-6) ")) return ch """********************************************************** REPORTS MENU ********************************************************""" def SALE_PURCHASEmenu(): ch=0 myclear() intromain() print("===============SALE AND PURCHASE MENU==================") print("1.COMPUTER PRODUCT SOLD OUT") print("2.COMPUTER PRODUCT PURCHASED") print("3.BACK TO MAIN MENU") ch=int(input("Please Enter Your Choice (1-3) ")) return ch def compinvoicereports(): ch=0 myclear() intromain() print("=================COMPUTER PRODUCT INVOICE 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: computer.py import os import pymysql #-- to generate the autonumbers def giveno(): count=0 mydb=pymysql.connect(host="localhost", user="root", passwd="", database="computershop") print(mydb) mycursor=mydb.cursor() query=("SELECT COUNT(*) FROM compinfo") q=("SELECT MAX(compID) FROM compinfo") mycursor.execute(query)
  • 11. rc=mycursor.fetchone() tmp=rc[0] print(tmp) if tmp==0: count=int(input("Enter the New No:")) else: q=("SELECT MAX(compID) FROM compinfo") mycursor.execute(q) rc=mycursor.fetchone() count=rc[0] count=count+1 mycursor.close() mydb.close() return count #-- to generate the autonumbers #-To add new record of computer shop def write_comprecord(): try: mydb=pymysql.connect(host="localhost", user="root", passwd="", database="computershop") print(mydb) C=mydb.cursor() Query=("INSERT INTO compinfo VALUES(%s,%s,%s,%s,%s,%s,%s)") cno=giveno() compid=cno pname=input("Enter Product Name:") pr=int(input("Enter Price of product")) typenm=input("Enter type(Ex-HDD,motherboard,keyboard,mouse....) name") cmpnm=input("Enter Company Name") desc=input("Enter Other details abour product") data=(compid,pname,pr,0,typenm,cmpnm,desc) C.execute(Query,data) mydb.commit() C.close() mydb.close() except: mydb.close() #--show all computer products def showallcomp(): try: conn=pymysql.connect(host="localhost", user="root", passwd="", database="computershop") C=conn.cursor() Query=("SELECT * FROM compinfo") #data=(scid,) C.execute(Query) rc=C.fetchall() if rc:
  • 12. print("COMPIDtPRODUCT-NAMEttPRICEtQUANTITYtTYPEtCOMPANYttDESCRIPTION") for x in rc: print(x[0],"t",x[1],"tt",x[2],"t",x[3],"t",x[4],"t",x[5],"t",x[6]) input("--------------------press the key---------------------------------") os.system('cls') C.close() conn.close() return rc except: conn.close() #----search and display computer by ID def showcompID(): try: conn=pymysql.connect(host="localhost", user="root", passwd="", database="computershop") C=conn.cursor() compid=int(input("Enter the Computer ID:")) Query=("SELECT * FROM compinfo WHERE compid=%s") data=(compid,) C.execute(Query,data) rc=C.fetchone() if rc: print("COMPIDtPRODUCTttPRICEtQUANTITYtTYPEtCOMPANYtDESCRIPTION") print(rc[0],"t",rc[1],"tt",rc[2],"t",rc[3],"t",rc[4],"t",rc[5],"t",rc[6]) input("--------------------press the key---------------------------------") os.system('cls') C.close() conn.close() return rc except: conn.close() #----search and display computer information by product name def showproduct(): try: conn=pymysql.connect(host="localhost", user="root", passwd="", database="computershop") C=conn.cursor() cmppdnm=input("Enter the product name:") Query=("SELECT * FROM compinfo WHERE prodname=%s") data=(cmppdnm,) C.execute(Query,data) rc=C.fetchall() if rc: print("COMPIDtPRODUCT-NAMEttPRICEtQUANTITYtTYPEtCOMPANYtDESCRIPTION") for rc1 in rc: print(rc1[0],"t",rc1[1],"tt",rc1[2],"t",rc1[3],"t",rc1[4],"t",rc1[5],"t",rc1[6]) input("--------------------press the key---------------------------------") os.system('cls')
  • 13. C.close() conn.close() return rc except: conn.close() #----search and display computer prodcts by price def showbyprice(): try: conn=pymysql.connect(host="localhost", user="root", passwd="", database="computershop") C=conn.cursor() low=int(input("Enter the Price lowest value:")) high=int(input("Enter the Price Highest value:")) Query=("SELECT * FROM compinfo WHERE price BETWEEN %s AND %s ") data=(low,high) C.execute(Query,data) rc=C.fetchall() if rc: print("COMPIDtPRODUCT-NAMEttPRICEtQUANTITYtTYPEtCOMPANYtDESCRIPTION") for rc1 in rc: print(rc1[0],"t",rc1[1],"tt",rc1[2],"t",rc1[3],"t",rc1[4],"t",rc1[5],"t",rc1[6]) input("--------------------press the key---------------------------------") os.system('cls') C.close() conn.close() return rc except: conn.close() #----search and display COMPUTER Products by type def showtype(): try: conn=pymysql.connect(host="localhost", user="root", passwd="", database="computershop") C=conn.cursor() scid=input("Enter the computer product type(HDD/CPU/KEYBOARD/MOUSE/MONITOR/UPS):") Query=("SELECT * FROM compinfo WHERE type=%s") data=(scid,) C.execute(Query,data) rc=C.fetchall() if rc: print("COMPIDtPRODUCT-NAMEttPRICEtQUANTITYtTYPEtCOMPANYtDESCRIPTION") for rc1 in rc: print(rc1[0],"t",rc1[1],"tt",rc1[2],"t",rc1[3],"t",rc1[4],"t",rc1[5],"t",rc1[6]) input("--------------------press the key---------------------------------") os.system('cls') C.close() conn.close() return rc
  • 14. except: conn.close() #----search and display products by company def showcompany(): try: conn=pymysql.connect(host="localhost", user="root", passwd="", database="computershop") C=conn.cursor() scid=input("Enter the company name:") Query=("SELECT * FROM compinfo WHERE companynm=%s") data=(scid,) C.execute(Query,data) rc=C.fetchall() if rc: print("COMPIDtPRODUCT-NAMEttPRICEtQUANTITYtTYPEtCOMPANYtDESCRIPTION") for rc1 in rc: print(rc1[0],"t",rc1[1],"tt",rc1[2],"t",rc1[3],"t",rc1[4],"t",rc1[5],"t",rc1[6]) input("--------------------press the key---------------------------------") os.system('cls') C.close() conn.close() return rc except: conn.close() #----Modify Computer Product Name def search_mod_product(): try: mydb=pymysql.connect(host="localhost", user="root", passwd="", database="computershop") C=mydb.cursor() cno=int(input("ENTER Computer ID")) rc1=compsearchdata(cno) if rc1: pnm=input("Enter the Product name to update:") Query=("UPDATE compinfo SET prodname=%s WHERE compid=%s") data=(pnm,cno) C.execute(Query,data) mydb.commit() print(C.rowcount, "record(s) affected") C.close() mydb.close() except: mydb.close() #----Modify price of computer product def search_mod_price(): try: mydb=pymysql.connect(host="localhost", user="root", passwd="", database="computershop") C=mydb.cursor()
  • 15. bno=int(input("ENTER Computer ID")) rc1=compsearchdata(bno) if rc1: #--- and f==1: tnm=int(input("Enter the price to update:")) Query=("UPDATE compinfo SET price=%s WHERE compid=%s") data=(tnm,bno) C.execute(Query,data) mydb.commit() print(C.rowcount, "record(s) affected") C.close() mydb.close() except: mydb.close() #----Modify Quantity of computer product def search_mod_qty(): try: mydb=pymysql.connect(host="localhost", user="root", passwd="", database="computershop") C=mydb.cursor() bno=int(input("ENTER Computer ID")) rc1=compsearchdata(bno) if rc1: tnm=int(input("Enter the new Quantity to update:")) Query=("UPDATE compinfo SET qty=qty+%s WHERE compid=%s") data=(tnm,bno) C.execute(Query,data) mydb.commit() print(C.rowcount, "record(s) affected") C.close() mydb.close() except: mydb.close() #----Modify comapany name def search_mod_company(): try: mydb=pymysql.connect(host="localhost", user="root", passwd="", database="computershop") C=mydb.cursor() bno=int(input("ENTER Computer ID")) rc1=compsearchdata(bno) if rc1: tnm=input("Enter the Company name to update:") Query=("UPDATE compinfo SET companynm=%s WHERE compid=%s") data=(tnm,bno) C.execute(Query,data) mydb.commit() print(C.rowcount, "record(s) affected") C.close()
  • 16. mydb.close() except: mydb.close() #----Modify Decription def search_mod_desc(): try: mydb=pymysql.connect(host="localhost", user="root", passwd="", database="computershop") C=mydb.cursor() bno=int(input("ENTER Computer ID")) rc1=compsearchdata(bno) if rc1: tnm=input("Enter the Computer Description to update:") Query=("UPDATE compinfo SET description=%s WHERE compid=%s") data=(tnm,bno) C.execute(Query,data) mydb.commit() print(C.rowcount, "record(s) affected") C.close() mydb.close() except: mydb.close() #---delete the computer product record from the table def deletecompprod(): try: mydb=pymysql.connect(host="localhost", user="root", passwd="", database="computershop") C=mydb.cursor() bno=int(input("ENTER Computer ID")) rc1=compsearchdata(bno) if rc1: Query=("DELETE FROM compinfo WHERE compid=%s") data=(bno,) C.execute(Query,data) mydb.commit() print(C.rowcount, "record(s) affected") C.close() mydb.close() except: mydb.close() #---Search Computer ID def compsearchdata(scid): try: conn=pymysql.connect(host="localhost", user="root", passwd="", database="computershop") C=conn.cursor() Query=("SELECT * FROM compinfo WHERE compid=%s") data=(scid,) C.execute(Query,data)
  • 17. rc=C.fetchone() if rc: print("COMPIDtPRODUCT-NAMEtPRICEtQUANTITYtTYPEtCOMPANYtDESCRIPTION") print(rc[0],"t",rc[1],"t",rc[2],"t",rc[3],"t",rc[4],"t",rc[5],"t",rc[6]) input("--------------------press the key---------------------------------") os.system('cls') C.close() conn.close() return rc except: conn.close() #-------invoice to sell the computers products def comp_Sale(): try: mydb=pymysql.connect(host="localhost", user="root", passwd="", database="computershop") print(mydb) C=mydb.cursor() netamt=0 Query=("INSERT INTO compinvoice VALUES(%s,%s,%s,%s,%s,%s,%s)") invono=int(input("Enter the invoice no:")) dosp=input("Enter the date of sale(yyyy-mm-dd)") while True: no=givemeno() invoiceid=no bno=int(input("Enter the Computer ID")) rc1=compsearchdata(bno) if rc1: qt=int(input("Enter the quantity:")) pr=int(input("Enter the price")) netamt=pr*qt data=(invoiceid,bno,qt,'SALE',invono,netamt,dosp) C.execute(Query,data) mydb.commit() print(C.rowcount, "record(s) affected") changeqty(bno,qt,'S') else: print("No such record please try again") ch=input("Do you want to add more to sell(y/n)") if(ch=='n' or ch=='N'): break C.close() mydb.close() except: mydb.close() #-------invoice to sell the computer products #-- to generate the autonumbers
  • 18. def givemeno(): count=0 mydb=pymysql.connect(host="localhost", user="root", passwd="", database="computershop") print(mydb) mycursor=mydb.cursor() query=("SELECT COUNT(*) FROM compinvoice") q=("SELECT MAX(compinno) FROM compinvoice") mycursor.execute(query) rc=mycursor.fetchone() tmp=rc[0] print(tmp) if tmp==0: count=1 else: q=("SELECT MAX(compinno) FROM compinvoice") mycursor.execute(q) rc=mycursor.fetchone() count=rc[0] count=count+1 mycursor.close() mydb.close() return count #------Update the qty---- def changeqty(bno,qt,ch): try: mydb=pymysql.connect(host="localhost", user="root", passwd="", database="computershop") C=mydb.cursor() if(ch=='S'): Query=("UPDATE compinfo SET qty=qty-%s WHERE compid=%s") elif(ch=='P'): Query=("UPDATE compnfo SET qty=qty+%s WHERE compid=%s") data=(qt,bno) C.execute(Query,data) mydb.commit() print(C.rowcount, "record(s) affected") C.close() mydb.close() except: mydb.close() #-------invoice to Purchase the computers products def comp_Purchase(): try: mydb=pymysql.connect(host="localhost", user="root", passwd="", database="computershop") print(mydb) #mycursor=mydb.cursor()
  • 19. C=mydb.cursor() netamt=0 Query=("INSERT INTO compinvoice VALUES(%s,%s,%s,%s,%s,%s,%s)") invono=int(input("Enter the invoice no:")) dosp=input("Enter the date of Purchase(yyyy-mm-dd)") while True: no=givemeno() invoiceid=no bno=int(input("Enter the Computer ID")) rc1=compsearchdata(bno) if rc1: qt=int(input("Enter the quantity:")) pr=int(input("Enter the price")) netamt=pr*qt data=(invoiceid,bno,qt,'PURCHASE',invono,netamt,dosp) C.execute(Query,data) mydb.commit() print(C.rowcount, "record(s) affected") changeqty(bno,qt,'P') else: print("No such record please try again") ch=input("Do you want to add more to sell(y/n)") if(ch=='n' or ch=='N'): break C.close() mydb.close() except: mydb.close() #--------SEARCH AND PRINT SALE INVOICE def searchinvoice(): try: conn=pymysql.connect(host="localhost", user="root", passwd="", database="computershop") C=conn.cursor() tot=0 gst=0 count=1 nettot=0 invo=int(input("Enter the Invoice No:")) Query=("SELECT compinfo.prodname,compinvoice.amount,compinvoice.qty,compinvoice.dateSP FROM compinfo,compinvoice WHERE compinfo.compid=compinvoice.compid AND compinvoice.status='SALE' AND compinvoice.invoiceno=%s") data=(invo,) C.execute(Query,data) rc=C.fetchall() if rc: print("----------------INVOICE: ",invo,"---------DATE: ",rc[0][3])
  • 20. print("--------------------------SALE------------------------------") print("S.NO.----|----------COMPUTER PRODUCT 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() conn.close() return rc except: conn.close() #--------SEARCH AND PRINT PURCHASE INVOICE def searchinvoicePUR(): try: conn=pymysql.connect(host="localhost", user="root", passwd="", database="computershop") C=conn.cursor() tot=0 gst=0 count=1 nettot=0 invo=int(input("Enter the Invoice No:")) Query=("SELECT compinfo.prodname,compinvoice.amount,compinvoice.qty,compinvoice.dateSP FROM compinfo,compinvoice WHERE compinfo.compID=compinvoice.compID AND compinvoice.status='PURCHASE' AND compinvoice.invoiceno=%s") data=(invo,) C.execute(Query,data) rc=C.fetchall() if rc: print("----------------INVOICE: ",invo,"---------DATE: ",rc[0][3]) print("--------------------------PURCHASE--------------------------") print("S.NO.----|----------COMPUTER PRODUCT 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)
  • 21. print(" GST : ",gst) print(" NETTOTAL: ",nettot) input("----------------------Press any key-------------------------") C.close() conn.close() return rc except: conn.close() #----------display all invoice SALE or PURCHASE wise def displayinvoiceSP(): try: conn=pymysql.connect(host="localhost", user="root", passwd="", database="computershop") C=conn.cursor() count=1 ch=int(input("Enter the Choice 1- SALE Wise 2- PURCHASE Wise:")) Query=("SELECT compinfo.prodname,compinvoice.amount,compinvoice.qty,compinvoice.dateSP,compinvoice.invoiceno FROM compinfo,compinvoice WHERE compinfo.compID=compinvoice.compID AND compinvoice.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.ttPRODUCT-NAMEttQUANTITYttAMOUNTttDATEtINVOICENO") 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() conn.close() return rc except: conn.close() #----------display all invoice SALE or PURCHASE by date def displayinvoiceSPdate(): try: conn=pymysql.connect(host="localhost", user="root", passwd="", database="computershop") C=conn.cursor() count=1 ch=int(input("Enter the Choice 1- SALE Wise 2- PURCHASE Wise:")) dt=input("Enter the date(yyyy-mm-dd)")
  • 22. Query=("SELECT compinfo.prodname,compinvoice.amount,compinvoice.qty,compinvoice.dateSP,compinvoice.invoiceno FROM compinfo,compinvoice WHERE compinfo.compid=compinvoice.compid AND compinvoice.status=%s and compinvoice.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.ttTitlettQUANTITYttAMOUNTttDATEttINVOICENO") 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() conn.close() return rc except: conn.close() File Name: computermainpage.py import comp_menu as CM import sys import computer as compsh def invoice_show(): choice1=CM.compinvoicereports() while True: if choice1==1: compsh.searchinvoice() break elif choice1==2: compsh.searchinvoicePUR() break elif choice1==3: compsh.displayinvoiceSP() break elif choice1==4: compsh.displayinvoiceSPdate() break elif choice1==5: main() else: input("Enter any key to continue") choice1=0 invoice_show() def modifyCOMPshow(): choice1=" " choice1=CM.modifycomp_menu() while True: if choice1==1: compsh.search_mod_product() break elif choice1==2: compsh.search_mod_price() break elif choice1==3: compsh.search_mod_qty() break elif choice1==4:
  • 23. compsh.search_mod_company() break elif choice1==5: compsh.search_mod_desc() break elif choice1==6: main() else: input("Enter any key to continue") modifyCOMPshow() #-----------------COMPUTERS MENU def compmenu_show(): choice1=" " choice1=CM.COMP_menu() while True: if choice1==1: compmainshow() break elif choice1==2: salepurchase_show() break elif choice1==3: main() else: input("Enter any key to continue") compmenu_show() #--------COMPUERS PRODUCT MAIN MENU AREA def compmainshow(): choice1=CM.comp_menu1() while True: if choice1==1: compmidmenu() break elif choice1==2: modifyCOMPshow() break elif choice1==3: compsh.deletecompprod() break elif choice1==4: print("a") break else: input("-----Press any key to continue-----") choice1=0 compmainshow() #------------------------- #--------administrator menu def compmidmenu(): choice1=CM.comp_menu_medicine() while True: if choice1==1: compsh.write_comprecord() break elif choice1==2: compsh.showallcomp() break elif choice1==3: compsh.showcompID() break elif choice1==4: compsh.showproduct() break elif choice1==5: compsh.showbyprice() break elif choice1==6: compsh.showtype() break elif choice1==7: compsh.showcompany() break elif choice1==8: main() break else: input("Enter any key to continue") choice1=0 compmidmenu() def salepurchase_show(): choice1=CM.SALE_PURCHASEmenu() while True: if choice1==1: compsh.comp_Sale() break elif choice1==2: compsh.comp_Purchase()
  • 24. break elif choice1==3: main() else: 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() compmenu_show() elif choice==3: exit(1) else: input("Enter any key to continue") main() OUTPUTS =================MAIN MENU==================== 01. REPORTS GENERATOR 02. ADMINISTRATOR 03. EXIT ============================================== Please Select Your Option (1-3) If choice : 1 =================COMPUTER PRODUCT INVOICE 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 Please Enter Your Choice (1-5) If choice : 1 Enter the Invoice No:7008 ----------------INVOICE: 7008 ---------DATE: 2021-01-05 --------------------------SALE------------------------------ S.NO.----|----------COMPUTER PRODUCT NAME---------TOTAL----- 1 |--- Hard-disk | 25500 2 |--- Key-200 | 0 3 |--- HARDDISK2DX | 0 ============================================================ Total: 25500 GST : 3060.0 NETTOTAL: 28560.0
  • 25. If choice : 2 =================ADMIN MENU==================== 1.COMPUTERS PRODUCT MENU 2.COMPUTERS PRODUCT SALE/PURCHASE 3.BACK TO MAIN MENU Please Enter Your Choice (1-3) If choice : 1 ===========COMPUTERS PRODUCT INFO MENU=========== 01. ADD COMPUTERS PRODUCT INFORMATION 02. MODIFY INFORMATION 03. DELETE INFORMATION 04. BACK TO MAIN ============================================== If choice: 1 =================COMPUTERS PRODUCT ADD MENU==================== 1.CREATE COMPUTERS PRODUCT DETAILS 2.DISPLAY ALL COMPUTERS PRODUCT DETAILS 3.SEARCH RECORD BY COMPID 4.SEARCH RECORD BY COMPUTER PRODCUCT NAME 5-SEARCH RECORD BY PRICE 6.SEARCH RECORD BY TYPE 7.SEARCH RECORD BY COMPANY 8.BACK TO MAIN MENU If choice: 1 Please Enter Your Choice (1-8) Enter Product Name:M-200 Enter Price of product55 Enter Quantity: 10 Enter type(Ex-HDD,motherboard,keyboard,mouse....) nameMouse Enter Company NameMTOD Enter Other details abour productMouse with LED If choice : 2 COMPID PRODUCT-NAME PRICE QUANTITY TYPE COMPANY DESCRIPTION 1201 Hard-disk 8750 55 HDD HTC 2 TB hard disk with 1203 Key-200 1200 30 keyboard prodot prodot EX keyboard 1204 HARDDISK2DX 5500 32 HDD Samsung 1TB hard disk 1205 RX-K400 480 12 Keyboard TRAX Gaming Keyboard 1206 M-200 55 10 Mouse MTOD Mouse with LED ===============MODIFY MENU================== 1.MODIFY COMPUTER PRODUCT NAME 2.MODIFY PRICE 3.MODIFY QUANTITY 4.MODIFY COMPANY NAME 5.MODIFY DESCRIPTION 6.BACK TO MAIN MENU
  • 26. 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 Advantage: 1. Provides the searching facilities based on various factors. Such as ProductID, Product name, Price etc. 2. It tracks all the information of Seller, Customer etc. 3. Shows the information and description of the Computer and products 4. It generates the report on computer products, sellers and Customers. Disadvantage: 1. Require much man power i.e. much efforts, much cost and hard to operate and maintain. 2. Since, all the work is done in papers so it is very hard to locate a particular student record when it is required.
  • 27. CONCLUSION Nothing is perfect in this world. So, we are also no exception. Although, we have tried our best to present the information effectively, yet, there can be further enhancement in the Application. We have taken care of all the critical aspects, which need to take care of during the development of the Project. Like the things this project also has some limitations and can further be enhances by someone, because there are certain drawbacks that do not permit the system to be 100% accurate. BIBLIOGRAPHY  www.mysql.org  www.google.co.in  www.w3schools.com  www.tutorialspoint.com  www.javapoint.com  www.programiz.com  www.guru99.com