You are on page 1of 46

INVENTORY MANAGEMENT

A project Report
Submitted to the

FACULITY OF DEPARTMENT OF COMPUTER ENGINEERING


By
SREEKUTTAN
Reg. No: 14135053

In partial fulfilment of requirements


For the award
Of

DIPLOMA IN COMPUTER ENGINEERING

DEPARTMENT OF COMPUTER ENGINEERING


CENTRAL POLYTECHNIC COLLEGE
T HIRUVANANTHAPURAM
OCTOBER 2016

ABSTRACT
inventory Management System is software which is helpful for the businesses operate hardware
stores, where storeowner keeps the records of sales and purchase. Mismanaged inventory means
disappointed customers, too much cash tied up in warehouses and slower sales. This project
eliminates the paper work, human faults, manual delay and speed up process.Inventory
Management System will have the ability to track sales and available inventory,tells a storeowner
when it's time to reorder and how much to purchase.Inventory Management System is a windows
application developed for Windows operating systems which focused in the area of Inventory
control and generates the various required reports.

CERTIFICATE

Certified that this is the bonafide record of the project entitled INVENTORY MANAGEMENT
work done and submitted by SREEKUTTAN A S Reg.No:14135053,5th Semester Student towards
partial fulfilment of the requirement for the award of the Diploma In Computer Engineering at
Central

Polytechnic

College,

Vattiyoorkavu

under

the

Directorate

of

Technical

Education,Government of Kerala during the academic year 2014-2017.

Mr.Mohan S
Lecturer in Computer Engineering
Depatment Of Computer Engineering
Central Polytechnic College
Trivandrum

Mrs.Sheena C
Head of the Department
Department Of Computer Engineering
Central Polytechnic College,
Trivandum

CHAPTER 1

Introduction

For optimal sales and inventory management processes, you need robust functionality for managing
your logistics facilities. Support for inventory management helps you record and track materials on
the basis of both quantity and value.

Warehouse inventory management functions cover internal warehouse movements and storage.

Using this software we can reduce costs for warehousing, order fulfillment, and material handling
while improving customer service.

You can significantly improve inventory turns, optimize the flow of goods, and shorten routes
within your warehouse or distribution center. Additional benefits of inventory management include
improved cash flow, visibility, and decision making.

This software is user friendly and hence easy to use.


Manager can plan, enter, and document warehouse and internal stock movements by managing
goods receipts, goods issues, storage, picking and packing, physical stock transfers, and transfer
postings.

CHAPTER 2

SYSTEM ANALYSIS AND DESIGN

2.1 SYSTEM ANALYSIS

System Analysis refers into the process of examining a situation with the intent of improving it
through better procedures and methods. System Analysis is the process of planning a new system to
either replace or complement an existing system. The existing manual systems are examined through
sheer observation and researches to understand its flaws and to develop a new application avoiding
those particular problems.

In this desktop system, information retrieved is very quick and provides modification of records. It
provides a reliable and dynamic system which will satisfy and users requirements and provide a better
working environment.

The major features of the system are outlined below


1 Security of data and ensure data accuracy's
2 Greater efficiency
3 User friendly and interactive
4 Time saving

2.2 REQUIREMENT ANALYSIS

When analysed about

the requirement of Inventory Management to run on a system,it was

found that it requires only standard hardware and software systems paradigms.
2.2.1 SOFTWARE REQUIREMENT
Frontend : HTML,PHP,JAVA Script
Backend :MYSQL
Platform :LINUX /WINDOWS
2.2.2 HARDWARE REQUIREMENTS
Processor : Pentium 4 Or More For Optimum Performance
RAM

:Recommended 250 MB

Hard Disk : Minimum 20 GB

2.3 SYSTEM DESIGN

System design is a reduction of an entire system by studying the various operations performed and
their relationship within the system and the requirements of its success. System design refers to the
description of a new system based on the information that is collected during the analysis phase and
the process by which it is developed. It is the creative process of inventing and developing new inputs,
data base procedures and outputs to meet the system objectives. System design built on the
information gathered during system analysis. The system analysis must have a clear cut understanding
about the objectives, which the design aims to fulfill.

2.3.1 OVERALL ARCHITECTURE

Inventory Management system is very much user friendly and assure a well and fully automated
application
system through
1 The Admin has provision to view the Stock of theInventory/Godown
2 The Admin has provision to Moderate the details of the Stock

2.3.2CASE DIAGRAM FOR ADMIN

LOGIN

INSERT PRODUCTS

UPDATE PRODUCT
QUANTITY&PRICE

KNOW THE SHORTAGE


OF
PRODUCTS
ADMIN
PRINT THE SOLD
RECORD

2.3.3DATA FLOW DIAGRAM(DFD)

DATA FLOW DIAGRAM FOR ADMIN

LOGIN TABLE(tbllogin)

ADMIN

URL

CHECK VALIDITY

WEB SERVER
MAIN PAGE

In The Admin Login Page Application Asked To Enter Username & Password And If He/She Is The
Valid Admin The Main Page Will Be Displayed

DATA FLOW DIAGRAM FOR PRINT BILL

ITEMS TABLE(items)

MAIN PAGE

SELECT
SELL
ITEMS

SELECT
ITEMS
TO
SELL

IF
SELECT
PRINT

UPDATE
NO OF
ITEMS

AVAILABLE

ITEMS TABLE(items)

PRINT BILL

It Is A Second Level Data Flow Diagram Where After Entering ADMIN MAIN Page He/She Can
Select Sell Item Option Where After Entering The Item Details He/She Can Print The Bill

2.3.4 INPUT SCREENS


1.LOGIN PAGE

2.MAIN PAGE(STOCK DETAILS)

3.ADD PRODUCT

4.UPDATE QUANTITY(Add Item)

5.UPDATE PRICE(Edit Price)

6.TO BE ORDER

7.SELL ITEM

8.CUSTOMER & PRODUCT DETAILS FORM

9.PRINT BILL

2.3.5TABLE SPECIFICATION
Database Name : inventory
1.Table Name : tbllogin
Column Name

Data Type

Size

Discription

user

varchar

30

Username Of Admin

password

varchar

30

Password Of Admin

type

varchar

10

Admin/User

Column Name

Data Type

Size

Discription

date

date

proid

int

20

Product Id

pdname

varchar

60

Product Name

price

int

20

Product Price

quantity

int

20

Product Quantity

2.Table Name : items


Date
Of
Purchase

Product

2.3.6 CODE DESIGN


1.LOGIN PAGE(index.php)
<html>
<head>
<meta http-equiv=e"Content-Type" content="text/html; charset=iso-8859-1" />
<title>login </title>
<br /><br /><br /><br /><br /><br /><br /><h1><center><font color="#FF0000">Inventory
Management</font></center></h1><br

/><h1><center><font

color="#FF0000">Login

Here</font></center></h1>
</head>

<body><body bgcolor="#006699">
<form action="" method="post" enctype="multipart/form-data">
<table width="295" border="0" align="center">
<tr>
<td colspan="2"></td>
</tr>
<tr>
<td width="111" height="37">User Name</td>
<td width="168"><input name="user" type="text" /></td>
</tr>
<tr>
<td height="45">Password</td>
<td><input name="pass" type="password" /></td>
</tr>
<tr>
<td colspan="2"><center><input name="sub" type="submit" value="Login" />
</center></td>
</tr>
</table>

</form>
<?php
mysql_connect ("localhost","root","");
mysql_select_db ("inventory");
if (isset($_POST['sub']))
{
$user=$_POST['user'];
$pass=$_POST['pass'];
$result=mysql_query("select * from tbllogin where user='$user' and password='$pass' ");
$r=mysql_fetch_array($result);
$u=$r['type'];
if ($u == "admin")
{
session_start();
session_destroy();
session_start();
$_SESSION['adm']=$user;
echo '<script>window.location="main.php";</script>';
}
else
{
mysql_error();
}
}
?>
</body>
</html>

2.STOCK DETAILS(main.php)
<html>
<head>
<title>Inventory Management System</title>
</head>
<body>
<form action="" method="post" enctype="multipart/form-data">
<table width="99%" height="100%" border="1" align="center">
<tr>
<td

width="98"

height="23"

align="center"

bgcolor="skyblue"><a

href="main.php">Inventory</a></td>
<td width="95" bgcolor="skyblue" align="center"><a href="order.php">To Be Order</a></td>
<td width="89" bgcolor="skyblue" align="center"><a href="additem.php">Add Item</a></td>
<td

width="119"

bgcolor="skyblue"

align="center"><a

href="addprod.php">Add

Product</a></td>
<td width="90" bgcolor="skyblue" align="center"><a href="editprice.php">Edit Price</a></td>
<td width="90" bgcolor="skyblue" align="center"><a href="sell.php">Sell Item</a></td>
<td width="84" bgcolor="skyblue" align="center"><a href="logout.php">Logout</a></td>
</tr>
<tr>
<td colspan="8">
<center><table width="435" height="143" border="0">
<?php
mysql_connect ("localhost","root","");
mysql_select_db ("inventory");
$sql= mysql_query("select * from items");
echo "<table border='1'color=skyblue width=80% <tr><td bgcolor=skyblue>DATE</td><td
bgcolor=skyblue>PRODUCT

ID</td><td

bgcolor=skyblue>PRICE</td>
<td bgcolor=skyblue>QUANTITY</td>";

bgcolor=skyblue>PRODUCT</td><td

while($sql2=mysql_fetch_array($sql))
{
echo "<tr><td bgcolor=pink>".$sql2['date']."</td>";
echo "<td bgcolor=pink>" .$sql2['proid']."</td>";
echo "<td bgcolor=pink>" .$sql2['pdname']."</td>";
echo "<td bgcolor=pink>" .$sql2['price']."</td>";
echo "<td bgcolor=pink>" .$sql2['quantity']."</td>";
}
?>
</center>
</table>
</ol>
</body>
</html>
</td>
</tr>
</table>
</form>
</body>
</html>

3.ADD PRODUCT(addprod.php)
<html>
<head>
<title>Inventory Management System</title>
</head>
<body>
<form action="" method="post" enctype="multipart/form-data">
<table width="99%" height="100%" border="1" align="center">
<tr>
<td

width="102"

height="27"

align="center"

bgcolor="skyblue"><a

href="main.php">Inventory</a></td>
<td width="99" bgcolor="skyblue" align="center"><a href="order.php">To Be Order</a></td>
<td width="93" bgcolor="skyblue" align="center"><a href="additem.php">Add Item</a></td>
<td

width="124"

bgcolor="skyblue"

align="center"><a

href="addprod.php">Add

Product</a></td>
<td width="94" bgcolor="skyblue" align="center"><a href="editprice.php">Edit Price</a></td>
<td width="90" bgcolor="skyblue" align="center"><a href="sell.php">Sell Item</a></td>
<td width="82" bgcolor="skyblue" align="center"><a href="logout.php">Logout</a></td>
</tr>
<tr>
<td colspan="8"><table width="258" height="247" border="0" align="center">
<tr>
<td colspan="2"> <h1 align="center"> Add Product</h1></td>
</tr>
<tr>
<th width="76" height="46" scope="row">Date</th>
<td width="166"><input name="date" type="text"></td>
</tr>
<tr>
<th width="76" height="46" scope="row">Product Id</th>
<td width="166"><input name="proid" type="text"></td>

</tr>
<tr>
<th height="52" scope="row">Product</th>
<td><input name="pro" type="text"></td>
</tr>
<tr>
<th height="54" scope="row">Price</th>
<td><input name="pri" type="text"></td>
</tr>
<tr>
<th height="51" scope="row">Quantity</th>
<td><input name="qua" type="text"></td>
</tr>
<tr>
<th height="30" colspan="2" scope="row"><input name="sub" type="submit"
value="Add"></th>
</tr>
</table></td>
</tr>
</table>
</form>
<?php
mysql_connect ("localhost","root","");
mysql_select_db ("inventory");
if (isset ($_POST['sub']))
{
$date = $_POST['date'];
$proid = $_POST['proid'];
$prod = $_POST['pro'];
$price = $_POST['pri'];
$quan = $_POST['qua'];
$ins=mysql_query("insert

into

('$date','$proid','$prod','$price','$quan')");

items

(date,proid,pdname,price,quantity)

values

if ($ins>0)
{
echo "<script> alert ('Successfully Registered') </script>";
}
else
{
mysql_error();
}
}
?>
</body>
</html>

4.UPDATE QUANTITY(additem.php & itemedit.php)


4.1additem.php
<html>
<head>
<title>Inventory Management System</title>
</head>
<body>
<form action="" method="post" enctype="multipart/form-data">
<table width="99%" height="100%" border="1" align="center">
<tr>
<td

width="98"

height="24"

align="center"

bgcolor="skyblue"><a

href="main.php">Inventory</a></td>
<td width="95" bgcolor="skyblue" align="center"><a href="order.php">To Be Order</a></td>
<td width="89" bgcolor="skyblue" align="center"><a href="additem.php">Add Item</a></td>
<td

width="119"

bgcolor="skyblue"

align="center"><a

href="addprod.php">Add

Product</a></td>
<td width="90" bgcolor="skyblue" align="center"><a href="editprice.php">Edit Price</a></td>
<td width="90" bgcolor="skyblue" align="center"><a href="sell.php">Sell Item</a></td>
<td width="84" bgcolor="skyblue" align="center"><a href="logout.php">Logout</a></td>
</tr>
<tr>
<td colspan="8">
<table width="435" height="143" border="0" align="center">
<?php
$con = mysql_connect("localhost","root","") or die(mysql_error());
mysql_select_db("inventory",$con) or die(mysql_error());
$query1=mysql_query("select date, proid, pdname, price,quantity from items");
echo

"<table

border='1'color=#FAEBD7

align=center

width=80%><tr

bgcolor=skyblue><td>DATE</td><td>PRODUCT ID</td><td>PRODUCT</td><td>PRICE</td>
<td>QUANTITY</td><td></td>";
while($query2=mysql_fetch_array($query1))
{

echo "<tr><td bgcolor=yellow>".$query2['date']."</td>";


echo "<td bgcolor=yellow>".$query2['proid']."</td>";
echo "<td bgcolor=yellow>".$query2['pdname']."</td>";
echo "<td bgcolor=yellow>".$query2['price']."</td>";
echo "<td bgcolor=yellow>".$query2['quantity']."</td>";
echo "<td bgcolor=orange><a href='itemedit.php?d=".$query2['proid']."'>Edit</a></td>";
}
?>
</ol>
</table>
</body>
</html>

4.2itemedit.php
<html>
<head>
<title>Inventory Management System</title>
</head>
<body>
<form action="" method="post" enctype="multipart/form-data">
<table width="99%" height="100%" border="1" align="center">
<tr>
<td

width="98"

height="24"

align="center"

bgcolor="skyblue"><a

href="main.php">Inventory</a></td>
<td width="95" bgcolor="skyblue" align="center"><a href="order.php">To Be Order</a></td>
<td width="89" bgcolor="skyblue" align="center"><a href="additem.php">Add Item</a></td>
<td

width="119"

bgcolor="skyblue"

align="center"><a

href="addprod.php">Add

Product</a></td>
<td width="90" bgcolor="skyblue" align="center"><a href="editprice.php">Edit Price</a></td>
<td width="90" bgcolor="skyblue" align="center"><a href="sell.php">Sell Item</a></td>
<td width="84" bgcolor="skyblue" align="center"><a href="logout.php">Logout</a></td>
</tr>
<tr>
<td colspan="8">
<table width="435" height="143" border="0" align="center">
<?php
$con = mysql_connect("localhost","root","password") or die(mysql_error());
mysql_select_db("inventory",$con) or die(mysql_error());
if(isset($_GET['d']))
{
$id=$_GET['d'];
if(isset($_POST['submit']))
{
$date=$_POST['date'];
$proid=$_POST['proid'];

$pdname=$_POST['pdname'];
$price=$_POST['price'];
$qty=$_POST['quantity'];
$query3=mysql_query("update items set quantity='$qty'+quantity where proid='$id'");
if($query3)
{
header('location:additem.php');
}
}
$query1=mysql_query("select * from items where proid='$id'");
$query2=mysql_fetch_array($query1);
?>
<form method="post" action="">
<table border='1'color=#FAEBD7 align="center"><tr>
<tr>
<td bgcolor="skyblue">
PRODUCT ID:</td>
<td bgcolor="skyblue"><input type="text" name="proid" value="<?php echo $query2['proid']; ?
>" /></td></tr>
<tr>
<td bgcolor="skyblue">
PRODUCT:</td>
<td

bgcolor="skyblue"><input

type="text"

name="pdname"

value="<?php

echo

$query2['pdname']; ?>" /></td></tr>


<tr>
<td bgcolor="skyblue">
QUANTITY:</td>
<td><input type="text" name="quantity" value="<?php echo $query2['quantity']; ?>" /></td></tr>
<td>
<input type="submit" name="submit" value="update" />
</td>

</table>
</form>
<?php
}
?>
</body>
</html>

5.UPDATE PRICE(editprice.php & priceedit.php)

5.1editprice.php
<html>
<head>
<title>Inventory Management System</title>
</head>
<body>
<form action="" method="post" enctype="multipart/form-data">
<table width="99%" height="100%" border="1" align="center">
<tr>
<td

width="98"

height="24"

align="center"

bgcolor="skyblue"><a

href="main.php">Inventory</a></td>
<td width="95" bgcolor="skyblue" align="center"><a href="order.php">To Be Order</a></td>
<td width="89" bgcolor="skyblue" align="center"><a href="additem.php">Add Item</a></td>
<td

width="119"

bgcolor="skyblue"

align="center"><a

href="addprod.php">Add

Product</a></td>
<td width="90" bgcolor="skyblue" align="center"><a href="editprice.php">Edit Price</a></td>
<td width="90" bgcolor="skyblue" align="center"><a href="sell.php">Sell Item</a></td>
<td width="84" bgcolor="skyblue" align="center"><a href="logout.php">Logout</a></td>
</tr>
<tr>
<td colspan="8">
<table width="435" height="143" border="0" align="center">
<?php
$con = mysql_connect("localhost","root","") or die(mysql_error());
mysql_select_db("inventory",$con) or die(mysql_error());
$query1=mysql_query("select date, proid, pdname, price,quantity from items");
echo

"<table

border='1'color=#FAEBD7

align=center

width=80%><tr

bgcolor=skyblue><td>DATE</td><td>PRODUCT ID</td><td>PRODUCT</td><td>PRICE</td>
<td>QUANTITY</td><td></td>";
while($query2=mysql_fetch_array($query1))
{

echo "<tr><td bgcolor=yellow>".$query2['date']."</td>";


echo "<td bgcolor=yellow>".$query2['proid']."</td>";
echo "<td bgcolor=yellow>".$query2['pdname']."</td>";
echo "<td bgcolor=yellow>".$query2['price']."</td>";
echo "<td bgcolor=yellow>".$query2['quantity']."</td>";
echo "<td bgcolor=orange><a href='priceedit.php?d=".$query2['proid']."'>Edit</a></td>";
}
?>
</ol>
</table>
</body>
</html>

5.2priceedit.php

<html>
<head>
<title>Inventory Management System</title>
</head>
<body>
<form action="" method="post" enctype="multipart/form-data">
<table width="99%" height="100%" border="1" align="center">
<tr>
<td

width="98"

height="24"

align="center"

bgcolor="skyblue"><a

href="main.php">Inventory</a></td>
<td width="95" bgcolor="skyblue" align="center"><a href="order.php">To Be Order</a></td>
<td width="89" bgcolor="skyblue" align="center"><a href="additem.php">Add Item</a></td>
<td

width="119"

bgcolor="skyblue"

align="center"><a

href="addprod.php">Add

Product</a></td>
<td width="90" bgcolor="skyblue" align="center"><a href="editprice.php">Edit Price</a></td>
<td width="90" bgcolor="skyblue" align="center"><a href="sell.php">Sell Item</a></td>
<td width="84" bgcolor="skyblue" align="center"><a href="logout.php">Logout</a></td>
</tr>
<tr>
<td colspan="8">
<table width="435" height="143" border="0" align="center">
<?php
$con = mysql_connect("localhost","root","") or die(mysql_error());
mysql_select_db("inventory",$con) or die(mysql_error());
if(isset($_GET['d']))
{
$id=$_GET['d'];
if(isset($_POST['submit']))
{
$date=$_POST['date'];
$proid=$_POST['proid'];
$pdname=$_POST['pdname'];

$price=$_POST['price'];
$qty=$_POST['quantity'];
$query3=mysql_query("update items set price='$price' where proid='$id'");
if($query3)
{
header('location:editprice.php');
}
}
$query1=mysql_query("select * from items where proid='$id'");
$query2=mysql_fetch_array($query1);
?>
<form method="post" action="">
<table border='1'color=#FAEBD7 align="center"><tr>
<tr>
<td bgcolor="skyblue">
PRODUCT ID:</td>
<td bgcolor="skyblue"><input type="text" name="proid" value="<?php echo $query2['proid']; ?
>" /></td></tr>
<tr>
<td bgcolor="skyblue">
PRODUCT:</td>
<td

bgcolor="skyblue"><input

type="text"

name="pdname"

value="<?php

$query2['pdname']; ?>" /></td></tr>


<tr>
<td bgcolor="skyblue" >
PRICE:</td>
<td><input type="text" name="price" value="<?php echo $query2['price']; ?>" /></td></tr>
<td>
<input type="submit" name="submit" value="update" />
</td>
</table>

echo

</form>
<?php
}
?>
</body>
</html>

6.TO BE ORDER
<html>
<head>
<title>Inventory Management System</title>
</head>
<body>
<form action="" method="post" enctype="multipart/form-data">
<table width="99%" height="100%" border="1" align="center">
<tr>
<td

width="98"

height="27"

align="center"

bgcolor="skyblue"><a

href="main.php">Inventory</a></td>
<td width="95" bgcolor="skyblue" align="center"><a href="order.php">To Be Order</a></td>
<td width="89" bgcolor="skyblue" align="center"><a href="additem.php">Add Item</a></td>
<td

width="119"

bgcolor="skyblue"

align="center"><a

href="addprod.php">Add

Product</a></td>
<td width="90" bgcolor="skyblue" align="center"><a href="editprice.php">Edit Price</a></td>
<td width="90" bgcolor="skyblue" align="center"><a href="sell.php">Sell Item</a></td>
<td width="84" bgcolor="skyblue" align="center"><a href="logout.php">Logout</a></td>
</tr>
<tr>
<td colspan="8">
<?php
mysql_connect ("localhost","root","");
mysql_select_db ("inventory");
$CRITICAL=5;
$sql2=mysql_query("select * from items where quantity<='$CRITICAL'");
while($row2=mysql_fetch_array($sql2))
{
echo "<table border='1'color=skyblue width=75% align=center <tr><td align=center
bgcolor=skyblue>PRODUCT</td><td align =center bgcolor=skyblue>QUANTITY</td>";
echo '<tr><td bgcolor=pink align=center>'.$row2['pdname'].'</td>';
echo '<td bgcolor=pink align=center>'.$row2['quantity'].'</td>';

}
?>
</td>
</tr>
</table>
</form>
<?php
?>
</body>
</html>

7.SELL ITEM(sell.php)
<?php
include("config.php");
session_start();
?>
<html>
<head>

<title>Inventory Management System</title>


</head>
<body>
<table width="99%" height="100%" border="1" align="center">
<tr>
<td

width="98"

height="24"

align="center"

bgcolor="skyblue"><a

href="main.php">Inventory</a></td>
<td width="95" bgcolor="skyblue" align="center"><a href="order.php">To Be Order</a></td>
<td width="89" bgcolor="skyblue" align="center"><a href="additem.php">Add Item</a></td>
<td

width="119"

bgcolor="skyblue"

align="center"><a

href="addprod.php">Add

Product</a></td>
<td width="90" bgcolor="skyblue" align="center"><a href="editprice.php">Edit Price</a></td>
<td width="90" bgcolor="skyblue" align="center"><a href="sell.php">Sell Item</a></td>
<td width="84" bgcolor="skyblue" align="center"><a href="logout.php">Logout</a></td>
</tr>
<tr>
<td colspan="8">
<center><table width="435" height="143" border="0">
<form action="" method="post" enctype="multipart/form-data">

<table width="99%" border="1">


<tr>
<thead bgcolor="#99FF00">

<td bgcolor="#0099CC">DATE</td>
<td bgcolor="#0099CC">PRODUCT NAME</td>
<td bgcolor="#0099CC">PRICE</td>
<td bgcolor="#0099CC">QUANTITY</td>
<td bgcolor="#0099CC">PRODUCT ID</td>
<td bgcolor="#0099CC">ACTION</td>
</thead>
</tr>
<?php
$vtb=mysql_query("select *from items ");
while($r=mysql_fetch_row($vtb))
{
echo "<tr class='light'>
<td bgcolor='pink'>$r[0]</td>
<td bgcolor='pink'>$r[1]</td>
<td bgcolor='pink'>$r[2]</td>
<td bgcolor='pink'>$r[3]</td>
<td bgcolor='pink'>$r[4]</td>

<td bgcolor='pink'><a href='sellitem.php?proid=$r[4]'><font color='green'>Sell


Now</font></a></td>
</tr>";
}
?>

</table>
</td>
</tr>
</table>
</form>
</body>
</html>

8.CUSTOMER & PRODUCT DETAILS FORM(sellitem.php)


<?php
include("config.php");
session_start();
?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<script type="text/javascript" src="js/jquery.js"></script>
<title>Inventory Management System</title>
</head>
<body>
<table width="99%" height="100%" border="1" align="center">
<tr>
<td

width="98"

height="24"

align="center"

bgcolor="skyblue"><a

href="main.php">Inventory</a></td>
<td width="95" bgcolor="skyblue" align="center"><a href="order.php">To Be Order</a></td>
<td width="89" bgcolor="skyblue" align="center"><a href="additem.php">Add Item</a></td>
<td

width="119"

bgcolor="skyblue"

align="center"><a

href="addprod.php">Add

Product</a></td>
<td width="90" bgcolor="skyblue" align="center"><a href="editprice.php">Edit Price</a></td>
<td width="90" bgcolor="skyblue" align="center"><a href="sell.php">Sell Item</a></td>
<td width="84" bgcolor="skyblue" align="center"><a href="logout.php">Logout</a></td>
</tr>
<tr>
<td colspan="8">
<center><h2>Sell Product</h2></center>
<?php
$viewid=$_REQUEST['proid'];

$vtb=mysql_query("select *from items where proid='$viewid'");


$r=mysql_fetch_array($vtb);
?>
<form action="print.php" method="post">
<table class="table">
<tr>
<td>
<label>Name</label>
<input type="text" class="form-control" name="order_name">
</td>
<td>
<label>Location</label>
<input type="text" class="form-control" name="location">
</td>
</tr>
<tr>
<td>
<label>Order Date</label>
<input type="date" class="form-control" name="date_order" value="">
</td>
</tr>
</table>
<hr style="border:1px dashed black">
<table class="table table-hover">
<thead>
<tr>
<th>ProductName</th>
<th>Quantity</th>
<th>Price</th>
<th>Amount</th>
<th>Remove</th>
<th><input type="button" class="btn btn-primary add" value="+"></th>
</tr>

</thead>
<tbody class="details">
<tr>
<td><input type="text" name="product_name" class="form-control
product_name" value="<?php echo $r['pdname'] ?>"></td>
<td><input

type="text"

name="quantity"

class="form-control

quantity"></td>
<td><input type="text" name="price" class="form-control price" value="<?
php echo $r['price'] ?>"></td>
<td><input

type="text"

name="amount"

class="form-control

amount"></td>
<td><input

type="button"

class="btn

btn-danger

remove"

value="Remove"></td>
</tr>
</tbody>
<tfoot>
<tr>
<td></td>
<td></td>
<td></td>
<td>
<label>Sub Total</label>
<input type="text" name="subtotal" class="subtotal form-control">

<br><input type="submit" class="btn btn-primary" name="submit"


value="Print">
</td>
</tr>
</tfoot>
</table>
</form>
</div>
</body>
</html>

<script type="text/javascript">

function total()
{
var gg = 0;
$('.amount').each(function(i,e){
var amt = $(this).val()-0;
gg += amt;
});
$('.subtotal').val(gg);
}

$(function(){

// add new row


$('.add').click(function(){
var tr = '<tr>'+
'<td><input

type="text"

name="product_name[]"

class="form-control product_name"></td>'+
'<td><input type="text" name="quantity[]" class="formcontrol quantity"></td>'+
'<td><input type="text" name="price[]" class="form-control
price"></td>'+
'<td><input type="text" name="amount[]" class="formcontrol amount"></td>'+
'<td><input type="button" class="btn btn-danger remove"
value="Remove"></td>'+
'</tr>';
$('.details').append(tr);
});
// end

// total amount
$('.details').delegate('.quantity,.price','keyup',function(){
var tr = $(this).parent().parent();
var price = tr.find('.price').val();
var qty = tr.find('.quantity').val();
var amount = price * qty;
tr.find('.amount').val(amount);
total();
});
// end

// delete row
$('.details').delegate('.remove','click',function(){
var con = confirm("Do you want to remove it ?");
if(con)
{
$(this).parent().parent().remove();
total();
}
});
// end

});
</script>

9.PRINT BILL(print.php)
<?php

if(!empty($_POST['submit']))
{
$name=$_POST['order_name'];
$loc=$_POST['location'];
$date=$_POST['date_order'];
$pname=$_POST['product_name'];
$qty=$_POST['quantity'];
$price=$_POST['price'];
$amt=$_POST['amount'];
$subt=$_POST['subtotal'];
require("fpdf/fpdf.php");
$pdf=new FPDF();
$pdf->Addpage();
$pdf->SetFont("Arial","B",16);
$pdf->Cell(0,10,"Inventory",1,1);
$pdf->Cell(50,10,"Name :",1,0);
$pdf->Cell(0,10,"{$name}",1,1);
$pdf->Cell(50,10,"Location :",1,0);
$pdf->Cell(0,10,"{$loc}",1,1);
$pdf->Cell(50,10,"Order Date :",1,0);
$pdf->Cell(0,10,"{$date}",1,1);
$pdf->Cell(50,10,"Product Name :",1,0);
$pdf->Cell(0,10,"{$pname}",1,1);
$pdf->Cell(50,10,"Quantity :",1,0);
$pdf->Cell(0,10,"{$qty}",1,1);
$pdf->Cell(50,10,"Price :",1,0);
$pdf->Cell(0,10,"{$price}",1,1);
$pdf->Cell(50,10,"Amount :",1,0);
$pdf->Cell(0,10,"{$amt}",1,1);
$pdf->Cell(50,10,"Sub Total :",1,0);
$pdf->Cell(0,10,"{$subt}",1,1);
$pdf->output();
}
?>

CONCLUSION
Inventory management software is a computer-based system for tracking inventory levels, orders,
sales and deliveries.It can also be used in the manufacturing industry to create a stock details, bill of
materials and other production-related documents. Companies use inventory management software
to avoid product overstock and outages. It is a tool for organizing inventory data that before was
generally store

You might also like