Medical Store Management

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 31

ARCHIES HIGHER

SECONARY SCHOOL

Investigatory project of
Chemistry
STUDY OF OXALATE ION IN
GUAVA FRUIT

Submitted By : Submitted
To:

Avtarit dwivedi DR. p. s. parihar

Roll No : (PGT CHEMISTRY)


CERTIFICATE

The project report entitled “ Oxalate ion in guava fruit“

Submitted by Avtarit Dwivedi of class XII Science

student for the AISSCE-2019 at Archies Higher Sec.

School , Kanpur has been examined.

External Examiner
(Signature)

Date:
ACKNOWLEDGMENT

I would like to express a deep sense of thanks &


gratitude to my project guide Dr. P.S. Parihar sir for
guiding me immensely through the course of the project.
He always evinced keen interest in my Chemistry project
work. His constructive advice & constant motivation
have been responsible for the successful completion of
the project.
My sincere thanks goes to Ms. Manisha Soni, Our
principal ma’am for his co-ordination in extending every
possible support for the completion of this project.
I also thanks to my parents for their motivation &
support. I must also thanks to my group members for
their help and support for ideas and compilation of this
project.

Class : XII B
Student name : Avtarit Dwivedi
Roll No :
Archies Higher Secondary School
600, Guruwakhera, Kanpur

CERTIFICATE
This is to certify that Avtarit Dwivedi of class XII has
prepared the report on the project entitle “ Oxalate Ion
in Guava Fruit “ . This report is the result of his efforts &
endeavors. The report is found worthy of acceptance as
final project report for the subject of Chemistry.

He has prepared the report under the guidance of P.G.T.


Chemistry Dr. P.S. Parihar.

Manisha Soni DR. P.S Parihar


(Principal) (P.G.T Chemistry)

PROJECT CONTENTS
S.NO DESCRIPTION
1. Programming Language & Concept

2. Structure of database used in a project

3. Project structure/ Description

4. Coading in Python

5. Output Screen

6. Bibiliography

1. CONCEPT USED IN PROJECT


Programming Language :-

Python is a general-purpose interpreted, interactive, object-oriented, and


high-level programming language. It was created by Guido van Rossum
during 1985- 1990. Like Perl, Python source code is also available under the
GNU General Public License (GPL). This tutorial gives enough
understanding on Python programming language.
Python is a high-level, interpreted, interactive and object-oriented scripting
language. Python is designed to be highly readable. It uses English
keywords frequently where as other languages use punctuation, and it has
fewer syntactical constructions than other languages.
Python is a MUST for students and working professionals to become a great
Software Engineer specially when they are working in Web Development
Domain. I will list down some of the key advantages of learning Python:
 Python is Interpreted − Python is processed at runtime by the
interpreter. You do not need to compile your program before executing
it. This is similar to PERL and PHP.
 Python is Interactive − You can actually sit at a Python prompt and
interact with the interpreter directly to write your programs.
 Python is Object-Oriented − Python supports Object-Oriented style or
technique of programming that encapsulates code within objects.
 Python is a Beginner's Language − Python is a great language for
the beginner-level programmers and supports the development of a
wide range of applications from simple text processing to WWW
browsers to games.

Characteristics of Python
Following are important characteristics of Python Programming −
 It supports functional and structured programming methods as well as
OOP.
 It can be used as a scripting language or can be compiled to byte-code
for building large applications.
 It provides very high-level dynamic data types and supports dynamic
type checking.
 It supports automatic garbage collection.
 It can be easily integrated with C, C++, COM, ActiveX, CORBA, and
Java.

Applications of Python
As mentioned before, Python is one of the most widely used language over
the web. I'm going to list few of them here:
 Easy-to-learn − Python has few keywords, simple structure, and a
clearly defined syntax. This allows the student to pick up the language
quickly.
 Easy-to-read − Python code is more clearly defined and visible to the
eyes.
 Easy-to-maintain − Python's source code is fairly easy-to-maintain.
 A broad standard library − Python's bulk of the library is very portable
and cross-platform compatible on UNIX, Windows, and Macintosh.
 Interactive Mode − Python has support for an interactive mode which
allows interactive testing and debugging of snippets of code.
 Portable − Python can run on a wide variety of hardware platforms and
has the same interface on all platforms.
 Extendable − You can add low-level modules to the Python interpreter.
These modules enable programmers to add to or customize their tools
to be more efficient.
 Databases − Python provides interfaces to all major commercial
databases.
 GUI Programming − Python supports GUI applications that can be
created and ported to many system calls, libraries and windows
systems, such as Windows MFC, Macintosh, and the X Window
system of Unix.
 Scalable − Python provides a better structure and support for large
programs than shell scripting.

Concept Used in a Project :-

Connectivity Python with mysql:

Arguments required to connect MySQL from Python


You need to know the following detail of the MySQL server to perform the
connection from Python.

 Username – i.e., the username that you use to work with MySQL
Server. The default username for the MySQL database is a root
 Password – Password is given by the user at the time of installing the
MySQL database. If you are using root then you won’t need the
password.
 Host Name – is the server name or Ip address on which MySQL is
running. if you are running on localhost, then you can use localhost, or it’s
IP, i.e. 127.0.0.0
 Database Name – Database name to which you want to connect. Here
we are using Database named ‘Electronics‘ because we have already
created this for our example.

Note: We are using the MySQL Connector Python module to communicate


with MySQL Server.
Lists:-

Lists are one of the most powerful tools in python. They are just like the
arrays declared in other languages. But the most powerful thing is that list
need not be always homogenous. A single list can contain strings, integers,
as well as objects. Lists can also be used for implementing stacks and
queues. Lists are mutable, i.e., they can be altered once declared.

Tuples in Python
A tuple is a sequence of immutable Python objects. Tuples are just like lists
with the exception that tuples cannot be changed once declared. Tuples are
usually faster than lists.

Functions in Python

A function is a set of statements that take inputs, do some specific


computation and produces output. The idea is to put some commonly or
repeatedly done task together and make a function, so that instead of writing
the same code again and again for different inputs, we can call the function.
Python provides built-in functions like print(), etc. but we can also create your
own functions. These functions are called user-defined functions.
# A simple Python function to check

# whether x is even or odd

defevenOdd( x ):

if(x %2==0):

print"even"

else:

print"odd"

# Driver code

evenOdd(2)

evenOdd(3)

~~~~~~~~~
STRUCTURE OF DATABASE USED IN A
PROJECT
Database name : Medical

Table : med

Field Field Type/Size


Mno integer/4
Mname Character/25
Bno Integer/4
Stock Integer/3
Rate Float/|(9,2)

Table : pur ( purchase database)

Field Field Type/Size


Mno integer/4
Bno Integer/4
Qty Integer/3
Pdate Date

Table : sales

Field Field Type/Size


Ino integer/4
Idate Date
Mno Integer/4
Qty Integer/3
Amount Float(9,2)

Table : sales

Field Field Type/Size


Ino integer/4
Idate Date
Mno Integer/4
Qty Integer/3
Amount Float(9,2)

TRUCTURE OF PROJECT / DESCRIPTION

Project is menu driven and it contains different modules

Menu1():- It is the gateway of medical store management system .


There are

1. Medicine section

2. Sales Entry Section

3. Purchase Entry Section

4. Report Section

Menu2() :- It is used to manage the medicine section in the store there


are different options such as

1. Create new medicine

2. Edit medicine section

3. Remove book from library

Menu3():- It is used to manage the library transactions the options are

1. Issue books

2. Return Books

Menu4():- It is used to manage member information of library . The


options are

1. Create new member

2. Modify member details

Create_medicine():- It is used to enter the details of medicine in a


database med. The details are as follows medicine no , medicine name,
batch no , stock and rate.
Edit_medicine():- It is used to modify the particular medicine details in a
database

Sales_entry():- This function is used for sales of medicine and it effects


the med & sales 1 database & update the stock of medicine

Purchase_entry():- This function is used for purchasing of medicine


which effects the stock of med file and store the purchase details in pur
table.

There are another sections in a projects

Sales_return():- It is used to manage the stock details of med table and


remove the data from sales 1

Our project contains several reports

Medicine _list():- It is the reports which provides complete details about


the medicine in a stock

Purchase_report():- It is the report which provides the details about the


medicine and other purchase entries.

Sales_report():- It provides the complete details of sales transaction of


medicines and stock report.

~~~~~~~~~~~
****************************** C O A D I N G **************************************

import os

from datetime import date

import pymysql

conn=pymysql.connect(host='localhost',

user='root',passwd='123',db='medical')

cur=conn.cursor()

cur1=conn.cursor()

def menu1():

os.system('cls')

print("----------- MEDICAL-STORE-MANAGEMENT-SYSTEM---------------")

print("[1] Mecine Section ")

print("[2] Sales Entry System ")

print("[3] Purchase Entry system ")

print("[4] Report management system ")

print("[5] exit from medicine management ")

print("---------------------------------------")

choice1=int(input("Enter choice {1-5}:"))

if choice1==1:

menu2()

if choice1==3:

purchase_entry()

t=input("press any key...")


menu1()

if choice1==2:

menu3()

t=input("press any key...")

menu1()

if choice1==4:

menu4()

t=input("Press any key ..")

menu1()

def menu2():

print("----------- MEDICINE - SECTION --------------")

print (" [1] Create New Medicine ")

print(" [2] Edit Medicine section")

print(" [3] Remove Medicine from stock ")

print(" [4] back to main")

print("----------------------------------------------------")

choice2=int(input("Enter choice {1-4}:"))

if choice2==1:

create_medicine()

t=input("Press any key ..")

menu2()

if choice2==2:

edit_medicine()

t=input("Press any key ..")


menu2()

if choice2==3:

remove_med()

t=input("Press any key ..")

menu2()

if choice2==4:

print("Back to main menu")

t=input("Press any key ..")

menu1()

def menu3():

os.system('cls')

print("----------- SALES-MANAGEMENT-SYSTEM---------------")

print("[1] New Sales Entry ")

print("[2] Sales Return System ")

print("[3] Remove sales bill system ")

print("[4] Back to main menu ")

print("---------------------------------------")

choice3=int(input("Enter choice {1-4}:"))

if choice3==1:

sales_entry()

t=input("Press any key to back to menu ")

menu3()

if choice3==2:

sales_return()
t=input("Press any key to back to menu ")

menu3()

def menu4():

os.system('cls')

print("----------- REPORT-MANAGEMENT-SYSTEM---------------")

print("[1] Medicine list in stock ")

print("[2] Sales Report ")

print("[3] Purchase Report ")

print("[4] Back to main menu ")

print("---------------------------------------")

choice4=int(input("Enter choice {1-4}:"))

if choice4==1:

medicine_list()

if choice4==2:

sales_report()

if choice4==3:

purchase_report()

def medicine_list():

print("--------------- List of medicines -------------------------")

print("-------------------------------------------------------------------------")

print("{0:^10}{1:^15}{2:^20}{3:^15}{4:^15}".format("medicine-
no","med-name","batch-no",

"stock(Tabs)","rate(Rs)"))

print("-------------------------------------------------------------------------")
s1=("select * from med")

cur.execute(s1)

for (mno,mname,mbno,mstock,mrate) in cur:

print("{0:^10}{1:^15}{2:^20}{3:^15}
{4:^15}".format(mno,mname,mbno,mstock,mrate))

print("-------------------------------------------------------------------------")

def medicine_list():

print("--------------- List of medicines -------------------------")

print("-------------------------------------------------------------------------")

print("{0:^10}{1:^15}{2:^20}{3:^15}{4:^15}".format("medicine-
no","med-name","batch-no",

"stock(Tabs)","rate(Rs)"))

print("-------------------------------------------------------------------------")

s1=("select * from med")

cur.execute(s1)

for (mno,mname,mbno,mstock,mrate) in cur:

print("{0:^10}{1:^15}{2:^20}{3:^15}
{4:^15}".format(mno,mname,mbno,mstock,mrate))

print("-------------------------------------------------------------------------")

def sales_report():

print("--------------- SALES REPORT -------------------------")

print("-------------------------------------------------------------------------")

print("{0:^10}{1:^15}{2:^20}{3:^15}{4:^15}".format("Invoice-No","Inv-
date","Med-Name",

"Quantity(Tabs)","Amount(Rs)"))
print("-------------------------------------------------------------------------")

s1=("select * from sales")

cur.execute(s1)

for (mino,midate,mmno,mqty,mamt) in cur:

s2=("select * from med where mno=%s")

d2=(mmno)

cur1.execute(s2,d2)

r=cur1.fetchone()

print("{0:^10}{1:^15}{2:^20}{3:^15}
{4:^15}".format(mino,str(midate),r[1],mqty,mamt))

print("-------------------------------------------------------------------------")

def purchase_report():

print("--------------- Purchase REPORT -------------------------")

print("-------------------------------------------------------------------------")

print("{0:^10}{1:^15}{2:^20}{3:^15}".format("Invoice-No","Product-
Name",

"Quantity(Tabs)","Purchase-date"))

print("-------------------------------------------------------------------------")

s1=("select * from pur")

cur.execute(s1)

for (mmno,mbno,mqty,mbdate) in cur:

s2=("select * from med where mno=%s")

d2=(mbno)

cur1.execute(s2,d2)
r=cur1.fetchone()

print("{0:^10}{1:^15}{2:^20}
{3:^15}".format(mmno,r[1],mqty,str(mbdate)))

print("-------------------------------------------------------------------------")

def edit_medicine():

print("---------------- EDIT-MEDICINE ---------------------")

mmno=int(input("Enter medicine no :"))

print("-------------- D E T A I L S ----------------------------")

s1=("select * from med where mno=%s")

d1=(mmno)

cur.execute(s1,d1)

r=cur.fetchone()

print(r)

print("--------------------------------------------------------------")

mbno=int(input("Enter batch no :"))

mstock=int(input("Enter stock :"))

mrate=float(input("Enter rate :"))

s1=("update med set bno=%s,stock=%s,rate=%s where mno=%s")

d1=(mbno,mstock,mrate,mmno)

cur.execute(s1,d1)

conn.commit()

print("Values are modified ........")


def create_medicine():

mcont='Y'

while True:

print("------------------- MEDICINE CREATION SECTION ------------------")

mmno=int(input("Enter medicine no :"))

mmname=input("Enter medicine name :")

mbno=int(input("Enter batch no :"))

mstock=int(input("Enter stock :"))

mrate=float(input("Enter rate (Rs):"))

print("-------------------------------------------------------------------")

msave=input("Save Medicine ?(Y/N)")

if msave=="Y" or msave=="y":

s1=("insert into med values(%s,%s,%s,%s,%s)")

d1=(mmno,mmname,mbno,mstock,mrate)

cur.execute(s1,d1)

conn.commit()

print("Record is saved.....")

mcont=input("do you want to create medicine ?")

if mcont=='N' or mcont=='n':

break

def remove_med():

print("---------------- REMOVE MEDICINE DETAILS ---------------------")

mmno=int(input("Enter medicine no :"))


print("-------------- D E T A I L S ----------------------------")

s1=("select * from med where mno=%s")

d1=(mmno)

cur.execute(s1,d1)

r=cur.fetchone()

print(r)

print("--------------------------------------------------------------")

mans='y'

mans=input(" Allow to remove medicine from stock (Y/N):")

if mans=='y' or mans=='Y':

s1=("delete from med where mno=%s")

d1=(mmno)

cur.execute(s1,d1)

conn.commit()

print("Medicine is removed from stock ..")

def sales_return():

print("------------------- SALES - RETURN -ENTRY -----------------------------")

mino=int(input("Enter Invoice no :"))

print("--------------------- details of invoice -------------------------------------")

s1=("select * from sales where ino=%s")

d1=(mino)

cur.execute(s1,d1)

rows=cur.fetchall()

for r in rows:
print(r)

s2=("select * from med where mno=%s")

d2=(int(r[2]))

cur.execute(s2,d2)

r1=cur.fetchone()

mstock=int(r1[3])+int(r[3])

s3=("update med set stock=%s where mno=%s")

d3=(mstock,int(r[2]))

cur.execute(s3,d3)

conn.commit()

s4=("delete from sales where ino=%s")

d4=(mino)

cur.execute(s4,d4)

conn.commit()

s5=("delete from sales1 where ino=%s")

d5=(mino)

cur.execute(s5,d5)

def sales_entry():

mcont='y'

print("--------------------- SALES - ENTRY ----------------------------------")

mino=int(input("Enter invoice no :"))

midate=date.today()

print("Invoice date %s:"%midate)

mcust=input("enter cust name or cash :")


print("-------------------------------------------------------------------")

gval=0.00

while True :

mmno=int(input("enter product no :"))

s1=("select * from med where mno=%s")

d1=(mmno)

cur.execute(s1,d1)

r=cur.fetchone()

print("Medcine name :%s"%(r[1]))

mqty=int(input("Qty (Tabs):"))

mval=mqty*float(r[4])

print("Rate (Rs):%5.2f"%(float(r[4])))

print("Value (Rs): %5.2f"%(float(mval)))

gval=gval+mval

print("------------------------------------------")

mcont=input("next product (Y/N)?")

s1=("insert into sales values(%s,%s,%s,%s,%s)")

d1=(mino,midate,mmno,mqty,mval)

cur.execute(s1,d1)

conn.commit()

mstock=int(r[3])-mqty

s1=("update med set stock=%s where mno=%s")

d1=(mstock,mmno)

cur.execute(s1,d1)
conn.commit()

if mcont=='N' or mcont=='n':

mgst=gval*0.12

print(" Gross Amount (Rs): %5.2f G.S.T value :%5.2f"%


(gval,mgst))

s1=("insert into sales1 values(%s,%s,%s,%s,%s)")

d1=(mino,midate,mcust,gval,mgst)

cur.execute(s1,d1)

conn.commit()

break

def purchase_entry():

mcont='y'

print("--------------------- Purchase - ENTRY ----------------------------------")

mino=int(input("Enter invoice no :"))

midate=date.today()

print("Invoice date %s:"%midate)

mcust=input("enter Purchaser Name :")

print("-------------------------------------------------------------------")

gval=0.00

while True :

mmno=int(input("enter product no :"))

s1=("select * from med where mno=%s")

d1=(mmno)

cur.execute(s1,d1)
r=cur.fetchone()

print("Medcine name :%s"%(r[1]))

mqty=int(input("Qty (Tabs):"))

mval=mqty*float(r[4])

print("Rate (Rs):%5.2f"%(float(r[4])))

print("Value (Rs): %5.2f"%(float(mval)))

print("------------------------------------------")

mcont=input("next product (Y/N)?")

s1=("insert into pur values(%s,%s,%s,%s)")

d1=(mino,mmno,mqty,midate)

cur.execute(s1,d1)

conn.commit()

mstock=int(r[3])+mqty

s1=("update med set stock=%s where mno=%s")

d1=(mstock,mmno)

cur.execute(s1,d1)

conn.commit()

if mcont=='N' or mcont=='n': break

def main():

menu1()

main()

**************************** OUTPUT SCREEN *************************


BIBLIOGRAPHY

No Book Name
1 Computer Science with Python ( Preeti Arora)

2 Computer Science with Python ( Sumita Arora)

3 Python Crash Course ( Eric Matthews)

4 Head first Python ( Paul Berry)

5 Learn Python The Hard Way ( Zed . A. Shaw)

You might also like

pFad - Phonifier reborn

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

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


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy