Fenland Document
-
Upload
mohamed-saleem -
Category
Documents
-
view
219 -
download
0
Transcript of Fenland Document
ContentSL.NO DESCRIPTION Page no
1. Introduction 1
2. Literature Survey
3. System Study3.1 Existing system3.2 Demerits3.3 Proposed System3.4 Merits
4. System Specification 4.1 Hardware Specification 4.2 Software Specification
5. Software Specification
6. System Analysis and Design6.1 System Design6.2 Feasibility Analysis
7. Project Description8. System Testing9. Database Design10. Conclusion11. Scope and Future Enhancement12. Bibliography13. Appendix –I14. Appendix - II
1
SYNOPSIS The main aim of the project is to provide utility to maintain day to day
operations of stock. This software helps them to store all transactions electronically
in a system, which in turn saves lot time, money and energy.
An application is to automate the existing system of manually maintain the
records of the counter sales, purchases, reorder levels, Supplier and Customer
monetary positions and other related transactions made at the counter.
2
Introduction
Nowadays, more and more companies tend to use any available software to
maintain information over a long term. We design the Automated Inventory
Management System to approach this goal with features that help improve data
consistency, maintain necessary inventory level. With these goals in mind, we
decide to incorporate design philosophy as well as user friendly interface into the
system, meanwhile to have powerful functions that manifest all the users’
requirements and needs.
One concern is how to reflect inventory level as quick as possible, since the
sales of liquor occupy a large proportion compared with the daily transactions of
the entire restaurant. Therefore, liquor’s inventory level changes constantly. In
order to monitor these changes over periods, the Automated Inventory
Management System can efficiently and accurately accomplish it while provides
other services to the restaurant such as recording daily liquor sales.
To users, the system can provide instant information about all inventory
items. Therefore users who manage stock level can immediately solve any shortage
problems, since the system provides easy-to-use interface for users to see inventory
levels. By recording daily sales, the system updates inventory constantly with the
help of database management system running as the back end.
3
During the process of development, we are able to gather all the necessary
requirements over small intervals. Consequently, more and more services are
added to the system to provide better management solutions.
By separating different user’s privilege, the system can assure different level
of security to the inventory information. For example, manager’s privileges are
added to the system when non-operation errors occur. After log in to the system
with uniquely assigned password, manager will be able to modify all lists of orders
which have been processed and stored. The system not only provides static
services to restaurant, but initializes dynamic extensible inventory lists. Manager
with advanced privileges can also modify the display to reflect newly added
items. The accompanying screen shot demonstrate this convenient inventory
management system.
LITERATURY SURVEY
4
Most financial literature contains information about numerous factors
influencing the value. Among those factors is the net working capital and elements
creating it, such as the level of cash tied in accounts receivable, inventories and
operational cash balances A large majority of classic financial models proposals,
relating to the optimum current assets management, were constructed with net
profit maximization in view.
In order to make these models more suitable for firms, which want to
maximize their value, some of them must be reconstructed. In the sphere of
inventory management, the estimation of the influence of changes in a firm’s
decisions is a compromise between limiting risk by having greater inventory and
limiting the costs of inventory. It is the essential problem of the corporate financial
management.
The basic financial inventory management aim is holding the
inventory to a minimally acceptable level in relation to its costs. Holding inventory
means using capital to finance inventory and links with inventory storage,
insurance, transport, obsolescence, wasting and spoilage costs. However,
maintaining low inventory level can, in turn, lead to other problems with regard to
meeting supply demands.
It is the result of opportunity costs of money tied in with inventory and
generally of costs of inventory managing. Both the first and the second involve
modification of future free cash flows, and in consequence the firm value changes.
Inventory changes (resulting from changes in inventory management policy of the
firm) affect the net working capital level and the level of operating costs of
inventory management in a firm as well. These operating costs are result of
storage, insurance, transport, obsolescence, wasting and spoilage of inventory
System Study
5
Existing System:-
In the existing system the sales can purchase the products only manual nothing but
he went to the supermarket buying the goods in this no reliability after buying the
products some time returns is not allowed or if allow every we need go to shops
return to the goods it is time consuming process. In farmer days online shopping
sites not maintain the all much products. When we want to purchase the products
redirect into different sites and buying in case the user need to maintain all sites
transaction. It is not easy to handle.
DISADVANTAGES OF EXISTING SYSTEM
Existing system is maintaining the information about testing only in Excel
sheet. Many processing that can be done by computer is performed
manually.
This Existing system is having problem like we can’t find out particular
stock within our time. Also the daily report, weekly report and total stock
report creation is difficult.
Also, the Excel sheet is not having that much security. Anyone can open and
edit.
Proposed System:-
6
This project is to develop for an Sales and Inventory Management System
(SIMS) for a departmental store. This system can be used to store the details of the
inventory, update the inventory based on the sale details, produce receipts for sales,
generate sales and inventory reports periodically etc. This is one integrated system
that contains both the user component (used by salespersons, sales managers,
inventory managers etc) and the admin component (used by the administrators for
performing admin level functions such as adding new items to the inventory,
changing the price of an item etc).
This system runs on multiple terminals, offers a GUI interface to its users and
connects to a common database(s).
MERITS
Easy to maintain and manipulate.
Generate Reports Easily.
Generate Information to User.
Reduce the manual errors.
The reports are generated with Corresponding data’s in the database, as per
the requirements of the user
7
SYSTEM SPECIFICATION:
HARDWARE CONFIGURATION
Processor : Intel Pentium Family
Processor Speed : 250MHz to 667 MHz
RAM : 128 MB to 512 MB
Hard Disk : 4 GB or higher
Keyboard : Standard 104 enhanced keyboard
Mouse : Local PS/2
SOFTWARE CONFIGURATION
Operating System : Windows 98/2000/XP/NT
Web Server : Apache
Web Browser : Mozilla Fire fox
Front-End Tool : HTML
Client side Script : JavaScript
Server side Script : PHP
Back-End Tool : My SQL
Dynamic Tool : CSS
8
SOFTWARE SPECIFICATION
The software selected for this project is PHP, which provides a frame for
using different technology, like JavaScript, CSS. Reason for choosing PHP script is
that, it is suitable for coding server side program and we can also add JavaScript in
the source code for various validations. PHP also provides some inbuilt tools for
validating various fields in containing in a Form which is to be filled by the user.
Data base technology has been described as one of the most rapidly growing
areas of computer and information science. It is no exaggeration to say that many
thousands of organizations have become critically dependent on the continued and
successful operations of a database system. Organization needs security, scalability,
easy to install the software and capable of storing huge amount of data so we
selected MSQL as a backend.
PHP is an open-source page scripting/tinplating system that is very similar
to JSP and ASP. It defines its own scripting language, which looks and feels a lot
like Perl. JSP uses Java as its scripting language (although some implementations
support JavaScript, such as Caucho). ASP uses VBScript.
PHP is very popular -- it is used on over a million web sites -- but its main
advantage (IMHO) seems to be that the language, being more "script" and Perl-
like, is less intimidating to the great unwashed mass of HTML monkeys and
hackers. In the long run, JSP and Java provide a more powerful system.
9
PHP - What is it?
“PHP is an HTML-embedded scripting language. Much of its syntax is
borrowed from C, Java and Perl with a couple of unique PHP-specific features
thrown in. The goal of the language is to allow web developers to write
dynamically generated pages
PHP – What does it do?
It is also helpful to think of PHP in terms of what it can do for you. PHP will allow
you to:
Reduce the time to create large websites.
Create a customized user experience for visitors based on information that
you have gathered from them.
Open up thousands of possibilities for online tools.
Allow creation of shopping carts for e-commerce websites.
HTML - Know the syntax and especially HTML Forms.
Basic programming knowledge - This isn't required, but if you have any
traditional programming experience it will make learning PHP a great deal
easier.
Usage of PHP:
In year 2000 there were only few hundred web sites developed in
PHP. By year 2007 number increased to more than 2, 00, 000, 00 and number is
10
increasing and increasing. Now a day’s most popular web site with heavy traffic
has been developed in PHP.
PHP is a general-purpose scripting language that is especially suited for web
development. PHP generally runs on a web server. Any PHP code in a requested
file is executed by the PHP runtime, usually to create dynamic web page content. It
can also be used for command-line scripting and client-side GUI applications. PHP
can be deployed on most web servers, many operating systems and platforms, and
can be used with many relational database management systems. It is available free
of charge, and the PHP Group provides the complete source code for users to
build, customize and extend for their own use.
PHP Security:
The National Vulnerability Database stores all vulnerabilities found
in computer software. The overall proportion of PHP-related vulnerabilities on the
database amounted to: 20% in 2004, 28% in 2005, 43% in 2006, 36% in 2007, and
35% in 2008. Most of these PHP-related vulnerabilities can be exploited remotely:
they allow hackers to steal or destroy data from data sources linked to the web
server (such as an SQL database), send spam or contribute to DOS attacks using
malware, which itself can be installed on the vulnerable servers.
These vulnerabilities are caused mostly by not following best practice
programming rules: technical security flaws of the language itself or of its core
libraries are not frequent (23 in 2008, about 1% of the total). Recognizing that
programmers cannot be trusted, some languages include taint checking to detect
automatically the lack of input validation which induces many issues. Such a
feature is being developed for PHP, but its inclusion in a release has been rejected
several times in the past.
11
Hosting PHP applications on a server requires a careful and constant
attention to deal with these security risks. Its flexibility knows no end. There are
advanced protection patches such as Suhosin and Hardening-Patch, especially
designed for web hosting environments. Installing PHP as a CGI binary rather than
as an Apache module is the preferred method for added security.
Syntax:
<Html>
<Head>
<Title>PHP Test</title>
</head>
<Body>
<? Php echo’
Hello World
'; ?>
</body>
</html>
Zend framework:
Zend Framework (ZF) is an open source, object-oriented web
application framework implemented in PHP 5 and licensed under the New BSD
License.
12
History:
Zend Framework was conceived in early 2005 while many new frameworks,
such as Ruby on Rails and the Spring Framework, were gaining popularity in the
web development community. ZF was publicly announced at the first Zend
Conference in October 2005.On July 1, 2007, Zend Framework 1.0 was released.
Features:
Zend Framework features include:
All components are fully object-oriented PHP 5 and are E_STRICT
compliant
Use-at-will architecture with loosely coupled components and minimal
interdependencies
Extensible MVC implementation supporting layouts and PHP-based
templates by default
Support for multiple database systems and vendors, including MySQL,
Oracle, IBM DB2, Microsoft SQL Server, PostgreSQL, SQLite, and
Informix Dynamic Server
Email composition and delivery, retrieval via mbox, Maildir, POP3 and
IMAP4
Flexible caching sub-system with support for many types of backbends, such
as memory or a file system.
Zend server:
Zend Server is a Web Application Server for running business-critical
PHP applications. It installs a complete PHP stack using installers that are native to
the operating system (Zend Server supports Windows and Linux, and the
13
community edition of Zend Server also supports Mac OS X). Zend Server includes
application monitoring, problem diagnostics, performance improvement
capabilities, Web administrator console, database connectivity, Java connectivity,
and more. The product is supported by Zend.
The community edition of Zend Server can be used free of charge in
development or production. This edition does not include monitoring, diagnostics,
page caching, committed software updates and technical support.
How does MySQL work?
MySQL is a database server program and as such is installed on one
machine, but can 'serve' the database to a variety of locations. To explain look at
the following diagram.
The MySQL Server is installed on a Server and can be accessed directly via
various client interfaces, which send SQL statements to the server and then display
the results to a user. Some of these are:
14
A Local Client – is a program on the same machine as the server. An
example of this is the command line MySQL client software we will be using in
the rest of the MySQL workshops (although there are other programs including
graphical interfaces).
A Scripting Language - can pass SQL queries to the server and display the
result.
A Remote Client – is a program on a different machine that can connect to
the server and run SQL statements.
You can also use two more indirect methods.
Remote Login - You may be able to connect to the Server Machine to run
one of its local clients.
Web Browser - you can use a web browser and scripts that someone has
written (we're going to use this method for the rest of the workshop).
MySQL Architecture
It will greatly aid your thinking about storage engines and the capabilities
they bring to MySQL if you have a good mental picture of where they fit. Figure 2-
1 provides a logical view of MySQL. It doesn’t necessarily reflect the low-level
implementation, which is bound to be more complicated and less clear cut.
However, it does serve as a guide that will help you understand how storage
engines fit in to MySQL. (The NDB storage engine was added to MySQL just
before this book was printed. Watch for it in the second edition.)
15
Figure 2-1. A logical view of MySQL architecture.
The topmost layer is composed of the services that aren’t unique to MySQL.
They’re services most network-based client/server tools or servers need:
connection handling, authentication, security, etc.
The second layer is where things get interesting. Much of the brains inside
MySQL live here, including query parsing, analysis, optimization, caching, and all
the built-in functions (dates, times, math, encryption, etc.). Any functionality
provided across storage engines lives at this level. Stored procedures, which will
arrive in MySQL 5.0, also reside in this layer.
The third layer is made up of storage engines. They’re responsible for the
storage and retrieval of all data stored “in” MySQL. Like the various file systems
available for Linux, each storage engine has its own benefits and drawbacks. The
good news is that many of the differences are transparent at the query layer.
JavaScript
16
Java Script is THE scripting language of the Web. JavaScript is used in
millions of Web pages to add functionality, validate forms, detect browsers, and
much more.
JavaScript, despite the name, is essentially unrelated to the Java
programming language even though the two do have superficial similarities. Both
languages use syntaxes influenced by that of C syntax, and JavaScript copies many
Java names and naming conventions. The language's name is the result of a co-
marketing deal between Netscape and Sun, in exchange for Netscape bundling
Sun's Java runtime with their then-dominant browser.[citation needed] The key
design principles within JavaScript are inherited from the Self and Scheme
programming languages.
JavaScript was designed to add interactivity to HTML pages
JavaScript is a scripting language
A scripting language is a lightweight programming language
JavaScript is usually embedded directly into HTML pages
JavaScript is an interpreted language (means that scripts execute without
preliminary compilation)
Everyone can use JavaScript without purchasing a license
What can a JavaScript do?
JavaScript gives HTML designers a programming tool - HTML authors
are normally not programmers, but JavaScript is a scripting language with a
very simple syntax! Almost anyone can put small "snippets" of code into
their HTML pages
17
JavaScript can put dynamic text into an HTML page - A JavaScript
statement like this: document. Write("<h1>" + name + "</h1>") can write a
variable text into an HTML page
JavaScript can react to events - A JavaScript can be set to execute when
something happens, like when a page has finished loading or when a user
clicks on an HTML element
JavaScript can read and write HTML elements - A JavaScript can read
and change the content of an HTML element
JavaScript can be used to validate data - A JavaScript can be used to
validate form data before it is submitted to a server. This saves the server
from extra processing
JavaScript can be used to detect the visitor's browser - A JavaScript can
be used to detect the visitor's browser, and - depending on the browser - load
another page specifically designed for that browser
JavaScript can be used to create cookies - A JavaScript can be used to
store and retrieve information on the visitor's computer.
JavaScript How To Use:-
The HTML <script> tag is used to insert a JavaScript into an HTML page.
<script type="text/JavaScript">
document. Write ("Hello World!") ;
</script>
To insert a JavaScript into an HTML page, we use the <script> tag. Inside the
<script> tag we use the type attribute to define the scripting language.
18
So, the <script type="text/JavaScript"> and </script> tells where the
JavaScript starts and ends:
Browsers Support:
Browsers that do not support JavaScript will display JavaScript as page
content.
To prevent them from doing this, and as a part of the JavaScript standard,
the HTML comment tag should be used to "hide" the JavaScript.
Just add an HTML comment tag <! -- Before the first JavaScript statement,
and a --> (end of comment) after the last JavaScript statement, like this:
JavaScript in the body section will be executed WHILE the page loads.
JavaScript in the head section will be executed when CALLED.
Where to Put the JavaScript
JavaScript in a page will be executed immediately while the page loads into
the browser. This is not always what we want. Sometimes we want to execute a
script when a page loads, other times when a user triggers an event.
Scripts in <head>
Scripts to be executed when they are called, or when an event is triggered,
go in the head section.
If you place a script in the head section, you will ensure that the script is
loaded before anyone uses it.
Scripts in <body>
Scripts to be executed when the page loads go in the body section.
If you place a script in the body section, it generates the content of a page.
19
Using an External JavaScript
If you want to run the same JavaScript on several pages, without having to
write the same script on every page, you can write a JavaScript in an external file.
Save the external JavaScript file with a .js file extension.
Note: The external script cannot contain the <script> tag!
To use the external script, point to the .js file in the "src" attribute of the <script>
tag:
SYSTEM ANALYSIS AND DESIGN
20
Technical Feasibilities
Technical feasibility centers around the existing computer system (Hardware
and Software etc) and to what extend it support the proposed addition. For
example, if the current computer is operating at 80 percent capacity - an arbitrary
ceiling - then running another application could overload the system or require
additional Hardware. This involves financial considerations to accommodate
technical enhancements. If the budget is a serious constraint, then the project is
judged not feasible. In this project, all the necessary cautions have been taken care
to make it technically feasible. Using a key the display of text/object is very fast.
Also, the tools, operating system and programming language used in this
localization process is compatible with the existing one.
5.2 Economic Feasibilities
Economic analysis is the most frequently used method for evaluating the
effectiveness of the candidate system. More commonly known as cost/benefit
analysis, the procedure is to be determining the benefits and savings that are
expected from a candidate and compare them with costs. If benefits outweigh
costs, then the decision is made to design and implement the system.
A systems financial benefit must exceed the cost of developing that system. i.e.
a new system being developed should be a good investment for the organization.
Economic feasibility considers the following
The cost to conduct a full system investigation.
The cost of hardware and software for the class of application.
The benefits in the form of reduced cost or fewer costly errors.
The cost if nothing changes (The proposed system is not developed).
The proposed “ONLINE SUPPLY INVENTORY SYSTEM” is economically
feasible because
21
The system requires very less time factors.
The system will provide fast and efficient automated environment instead of
slow and error prone manual system, thus reducing both time and man
power spent in running the system.
The system will have GUI interface and very less user-training is required to
learn it.
5.3 Operational Feasibilities
It is the measures of how well a proposed system solves the problems and it
takes advantages of the opportunities identified during the scope definition and
problem analysis phases. Supply Office has computer literate staff so they don’t
find it hard to operate the proposed system.
5.4 Legal Feasibilities
Government constrains – since the proposed system is going to be
implemented in government institute, it may be subject to Rules and
regulation imposed and even funding constrains.
Copyright issues – Since the proposed system will be using open source
software there will be minimal licensing and related issues.
5.5 Schedule Feasibilities
The study of the proposed Online Inventory System of Bukidnon State
University Supply Office is convenient and sensible to its time frame. Conducting
personal interviews with the Supply Officer, creating the documents, designing and
developing the software were made to finish the proposal.
22
BLOCK DIAGRAM
23
SMSSupermarkets Suppliers
Managers
Order Order
Delivery SlipInvoice
Sales Analyses
Entity Relationship Diagram
24
Entity
Attribute
Relation
Supermarket
Item
Product group
Supplier
Ordered by Supplied by
Belong to
SalesPrice
Stock level
PurchasingPrice
ItemName Quantity
OrderDate
DeliveryDate
ProcessingStatus
Name Address Name Address
OrderDate
supplyDate Amount
Amount
ProcessingStatus
Phone# Phone#
Name
Data Flow Diagram
25
Supermarket Manager
Order: market, item, amount, date, time,
order id
Supplier
payment: item, order id, amount
delivery slip: item, quantity, due, date, time, id
Updated Stock Inventories
Initial Stock Inventories
Ordering System
Delayed Order Processing
Invoice to Supermarket: item, quantity, amount, supplier, shipping
Normal Order Processing
Supermarket
Orders Delayed
Orders Received
Delayed Orders Processed
Non-delayed Orders Processed
Amount Owed to Each Supplier
Amount Owed by Each Supermarket
Daily Sales Report
Weekly Sales Report
26
4.6 Data Flow Diagram
Common Page
17
27
Authorized Page
Admin Page
28
PROJECT DESCRIPTION:
The transactions related to purchase, sale and returns are maintained manually at present along with maintaining the accounts of the customers and the suppliers.
All these are to be automated and an application is required to relate all of them relatively and logically so that the current system can be replaced and accepted without major changes and problems.
The application should provide quick access to the records maintained and must reveal the important reviews about the business so that the growth can be easily compared and should provide with the various reports showing the related details so that the important decisions could be taken easily.
System Testing
29
Testing is the process of running a system with the intention
of finding errors. Testing enhances the integrity of a system by
detecting deviations in design and errors in the system. Testing aims at
detecting error-prone areas. This helps in the prevention of errors in a
system. Testing also adds value to the product by conforming to the
user requirements.
The main purpose of testing is to detect errors and error-
prone areas in a system. Testing must be thorough and well-planned. A
partially tested system is as bad as an untested system. And the price of
an untested and under-tested system is high.
The implementation is the final and important phase. It
involves user-training, system testing in order to ensure successful
running of the proposed system. The user tests the system and changes
are made according to their needs. The testing involves the testing of
the developed system using various kinds of data. While testing, errors
are noted and correctness is the mode.
OBJECTIVES OF TESTING:
Testing is a process of executing a program with the intent of finding
errors.
A Successful test case is one that uncovers an as- yet-undiscovered
error.
The various types of testing on the system are:
1. Unit Testing.
30
2. Integration Testing
3. System testing
4. User Acceptance Testing
1.1. Unit Testing:
Unit testing focuses efforts on the smallest unit of software
design. This is known as module testing. The modules are tested
separately. The test is carried out during programming stage itself. In
this step, each module is found to be working satisfactory as regards to
the expected output from the module.
1.2. Integration Testing:
Data can be lost across an interface. One module can have an
adverse effect on another, sub functions, when combined, may not be
linked in desired manner in major functions. Integration testing is a
systematic approach for constructing the program structure, while at
the same time conducting test to uncover errors associated within the
interface. The objective is to take unit tested modules and builds
program structure. All the modules are combined and tested as a
whole.
1.3. System Testing:
System testing is the stage of implementation. This is to check whether
the system works accurately and efficiently before live operation
commences. Testing is vital to the success of the system. The
candidate system is subject to a variety of tests: on line response,
volume, stress, recovery, security and usability tests. A series of tests
31
are performed for the proposed system is ready for user acceptance
testing.
1.4. User Acceptance Testing:
User acceptance of a system is the key factor for the success of
any system. The system under consideration is tested for the user
acceptance by constantly keeping in touch with the prospective system
users at the time of developing and making changes whenever
required.
Validation:
At the culmination of the integration testing, Software is
completely assembled as a package. Interfacing errors have been
uncovered and corrected and a final series of software test begin in
validation testing. Validation testing can be defined in many ways, but
a simple definition is that the validation succeeds when the software
functions in a manner that is expected by the customer. After
validation test has been conducted, one of the three possible conditions
exists.
a) The function or performance characteristics confirm to specification
and are accepted.
b) A deviation from specification is uncovered and a deficiency lists is
created.
c) Proposed system under consideration has been tested by using
validation test and found to be working satisfactory.
Output Testing:
32
After performing the validation testing, the next step is output
testing of the proposed system, since no system could be useful if it
does not produce the required output in a specific format. The output
format on the screen is found to be correct; the format was designed in
the system design time according to the user needs. For the hard copy
also; the output comes as per the specified requirements by the user.
Hence output testing did not result in any correction for the system.
33
Database Design
A data dictionary is a collection of descriptions of the data objects or items
in a data model for the benefit of programmers and others who need to refer to
them or the dictionary of data is at a time the pillar of work and the result of
research and analysis of data. It is just like a depicted picture of the entire work.
This dictionary of data defines all categories of data or data types, brief the all
essential information about the software is included.
TABLE FIELD DESCRIPTION TYPE CONTRAINTS
USER User_id User identification Integer Primary Key
Username Name use by user Varchar Not null
Password Password of the user Varchar Not null
USERTYPE Utype_id Usertypeidentification Integer Foreign key
Admin Administrator Varchar Not null
User Authorized user Varchar Not null
CATEGORY Cat_id Category
identification
Integer Primary Key
Item_name Item Identification number Foreign key
ITEM Item_id Item identification Integer Primary key
Supplier_id Supplier Identification number Foreign key
Item_name Name of the item Varchar Not null
Brand Brand of the item Varchar Not null
Price Price of the item Varchar Not null
Quantity Quantity of the item Varchar Not null
Unit_id Unit identification Integer Foreign key
Itype_id Item type number Foreign key
34
identification
Cat_id Category
identification
number Foreign key
PO Purchase_id Purchase order
identification
Integer Primary key
Supplier_id Supplier
identification
number Foreign key
Item_id Item identification number Foreign key
Brand Brand of the item Varchar Not null
Quantity Ordered quantity Varchar Not null
unit Item unit Varchar Not null
Price Item price Varchar Not null
UNIT Unit_id Unit identification Varchar Primary key
Unit_name Name of the unit Varchar Foreign key
ITEM TYPE Itype_id Item type
identification
Varchar Primary key
Type_name Item type name Varchar Foreign key
RECEIVED
ITEM
Recieveditem_id Received item
identification
Varchar Primary key
Po_id Purchase order
Identification
Varchar Foreign key
Quantity Quantity of the
received item
Varchar Foreign key
REPORT Report_id Report identification Varchar Primary key
Item_id Foreign key
Date_reported Varchar Foreign key
BARROWED Bar_id Barrowed Integer Primary key
35
ITEM identification
Item_id Item identification integer Foreign key
Person_barrowed Person barrowed the
item
Varchar Foreign key
Deparment Department Varchar Foreign key
Position Position of the person Varchar Foreign key
Item_type Type of item Varchar Foreign key
Cat_id Category
identification
integer Foreign key
Itype_id Item type
identification
integer Foreign key
Date_barrowed Date the item
barrowed
Varchar Foreign key
Date-returned Date the item returned Varchar Foreign key
SUPPLIER Supplier_id Supplier identification integer Primary key
Supplier_name Name of the supplier varchar Foreign key
Address Supplier address varchar Foreign key
Contact_person Person to be contact varchar Foreign key
Contact_number Contact number varchar Foreign key
email Supplier email varchar Foreign key
REQUEST
ITEM
Requestitem_id Request item
identification
integer Primary key
Item_name Name of the item
request
varchar Foreign key
quantity Quantity of the
request item
varchar Foreign key
36
User-id User identification integer Foreign key
RELEASE
ITEM
Release_id Release identification integer Primary key
Item_id Item identification integer Foreign key
Employee_name Name of the employee varchar Foreign key
department Department of the
employee
varchar Foreign key
position Employee position varchar Foreign key
Date_released Date the item released varchar Foreign key
37
Conclusion
This system is easily understandable and it satisfies almost all the design
issues considered during the planning stage. Thus it reduces the human effort and
saves the time of both customers and the employees. The coding is done in
simplified manner as they are more understandable and flexible in central board of
exercise duty in major changes, while designing the system all user requirements
are considered and provisions are made for further developments.
The company it decides to change the rate of process it is also specified in
the system, similarly if any change in coding have to be made is also possible.
FUTURE ENHANCEMENTS
38
There should be a lot more features that can add to the Automated Inventory
System. One of them is networking which allow several other computers to access
database simultaneously without interrupting each other. Therefore the database
should include the features of ACID which stands for Atomicity, Consistency,
Isolated and Durability. Furthermore, the sales report can be exported to excel file
which can be saved independently. When users of AIM generate sales report, they
have choices of either printing out directly or export to generate extra excel file
that can be viewed using MS Excel. Nevertheless, AIM is just the beginning of
inventory management system.
39
Bibliography
http://www.netmba.com/operations/project/pert/
http://www.sourcecodester.com/php/4481/simple-inventory-system-using-
phpmysql.html
http://en.wikipedia.org/wiki/Database_design
http://database-programmer.blogspot.com/2008/06/using-data-dictionary.html
http://osarome.blogspot.com/2011/10/1-technical-feasibility-2-operational.html
http://www.ganttchart.com/BasicGanttExample.html
40
APPENDIX-1
SCREEN SHOTS
41
EDIT PAGE
42
REQUESTS RECEIVED
43
VIEW THE REQUEST
44
PURCHASE ORDER
45
BORROW
46
REPORT
47
SUPPLIER INFORMATION
APPENDIX-11
CODING
48
Index.php
<?php require_once('includes/connection.php');?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<title>Stock control System</title>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
<link media="all" rel="stylesheet" type="text/css"
href="mainstyle.css"/>
<link rel="stylesheet" type="text/css" href="tcal.css" />
<script language="JavaScript" type="text/javascript"
src="javascript/altRows.js"></script>
<script language="JavaScript" type="text/javascript"
src="javascript/tcal.js"></script>
<script language="JavaScript" type="text/javascript"
src="javascript/formValidate.js"></script>
</head>
<body>
<div id="wrapper">
<table id="header">
<tr>
<td>
49
<div id="logo"><img
src="image/bsu_logo.png"/></div>
<div id="title1"><center>Stock control
System</center></div>
<div class="date"><script type="text/javascript">
document.write(''+Date()+'') </script></div>
</td>
</tr>
</table>
<table id="marquee">
<tr>
<td>
</td>
</tr>
</table>
<table id="sidebar">
<tr id="navbox">
<td>
<ul id="nav">
<li><a
href="index.php"class="current">Home</a></li>
<li><a href="about.php">About</a></li>
<li><a href="loginform.php">Login</a></li>
<li><a href="about.php">Gallery</a></li>
50
<li><a href="loginform.php">Contact us</a></li>
</ul>
</td>
</tr>
</table>
<table id="contentbox">
<tr>
<td id="content">
<div id="image"><img src="image/supply.jpg"/></div>
</td>
</tr>
</table>
<table id="footer">
</table>
</div>
</body>
</html>
EDIT SUPPLIER
51
<?php require_once('includes/header.php');?>
<?php require_once('includes/connection.php');?>
<?php include('includes/get_username.php');?>
<table id="sidebar">
<tr id="navbox">
<td>
<ul id="nav">
<li><a
href="user_available_item.php">Available Items</a></li>
<li><a
href="auth_received_item.php">Received Items</a></li>
<li><a
href="user_supplier.php"class="current">Suppliers</a></li>
</ul>
</td>
</tr>
</table>
<table id="contentbox">
<tr>
<td id="content">
<div class="name">Welcome, <b><?php echo
$username; ?></b> | <a href="logout.php">Logout</a></div>
<div class="label">Suppleir Details</div>
<hr />
52
<form name="formsearch" method="post"
onsubmit="return validateForm()" action="search_auth_supplier.php">
<table>
<tr>
<td class="search">Search
for :</td>
<td><input type="text"
name="search" size="40px" placeholder="Search here..." /></td>
<td><input type="submit"
value="Search" style="cursor:pointer;"/></td>
</tr>
</table>
</form>
<?php
function valid($supplier_id, $name, $address,
$contact, $person, $email, $error)
{
?>
<fieldset>
<legend><div class="legend"><b>Update supplier
details</b></div></legend>
<div id="add_supplierform">
<form name="form1" method="GET"
action="">
<table>
<tr>
53
<td><input
type="hidden" name="supplier_id" value="<?php echo $supplier_id; ?>"/></td>
</tr>
<tr>
<td>Full Name :</td>
<td><input type="text"
style="margin-left:4px;" size="30px" name="supplier_name" value="<?php echo
$name; ?>"></td>
</tr>
<tr>
<td>Address :</td>
<td><input type="text"
style="margin-left:4px;" size="50px" name="address" value="<?php echo
$address; ?>"></td>
</tr>
<tr>
<td>Contact # :</td>
<td><input type="text"
style="margin-left:4px;" size="25px" name="contact" value="<?php echo
$contact; ?>"></td>
</tr>
<tr>
<td>Contact person
:</td>
<td><input type="text"
style="margin-left:4px;" size="30px" name="contact_person" value="<?php echo
$person; ?>"></td>
54
</tr>
<tr>
<td>Email :</td>
<td><input type="text"
style="margin-left:4px;" size="30px" name="email" value="<?php echo $email; ?
>"></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td></td>
<td class="add">
<input type="submit"
name="submit" style="cursor:pointer;" value="Update">
<a
href="auth_supplier.php"><input type="Button" name="Btncancel"
style="cursor:pointer;" value="Cancel"></a></td>
</tr>
</table>
</form>
</div>
</fieldset>
<?php
}
if (isset($_GET['submit']))
55
{
if (is_numeric($_GET['supplier_id']))
{
$supplier_id = $_GET['supplier_id'];
$name =
mysql_real_escape_string(htmlspecialchars($_GET['supplier_name']));
$address =
mysql_real_escape_string(htmlspecialchars($_GET['address']));
$contact=
mysql_real_escape_string(htmlspecialchars($_GET['contact']));
$person =
mysql_real_escape_string(htmlspecialchars($_GET['contact_person']));
$email =
mysql_real_escape_string(htmlspecialchars($_GET['email']));
mysql_query("UPDATE supplier SET
supplier_name='$name', address='$address', contact='$contact', email='$email',
contact_person='$person' WHERE supplier_id='$supplier_id'")
or die(mysql_error());
header("Location: auth_supplier.php?
attempt=success");
}
else
{
echo 'Error!';
56
}
}
else
{
if (isset($_GET['supplier_id']) &&
is_numeric($_GET['supplier_id']) && $_GET['supplier_id'] > 0)
{
$supplier_id = $_GET['supplier_id'];
$result = mysql_query("SELECT *
FROM supplier WHERE supplier_id=$supplier_id")
or die(mysql_error());
$row = mysql_fetch_array($result);
if($row)
{
$name =
$row['supplier_name'];
$address = $row['address'];
$contact = $row['contact'];
$person =
$row['contact_person'];
$email = $row['email'];
valid($supplier_id, $name,
$address, $contact, $person, $email, '');
}
57
else
{
echo "No results!";
}
}
else
{
echo 'Error!';
}
}
?>
<hr />
<table class="inventory_table"
id="alternatecolor">
<tr>
<th>Id</th>
<th>Supplier Name</th>
<th>Address</th>
<th>Contact Person</th>
<th>Contact #</th>
<th>Email</th>
<th width="70">Actions</th>
</tr>
<?php
include('includes/ps_pagination.php');
$sql = 'SELECT * FROM supplier
ORDER BY supplier_id DESC';
58
//Create a PS_Pagination object
$pager = new PS_Pagination($conn,
$sql, 15, 20);
//The paginate() function returns a
mysql result set for the current page
$rs = $pager->paginate();
while($row = mysql_fetch_array($rs))
{
?>
<tr>
<td><?php echo
$row["supplier_id"];?></td>
<td><?php echo
$row["supplier_name"];?></td>
<td><?php echo $row["address"];?
></td>
<td><?php echo
$row["contact_person"];?></td>
<td><?php echo $row["contact"];?
></td>
<td><?php echo
$row["email"];?></td>
<td><a href='auth_edit_supplier.php?
supplier_id=<?php echo $row["supplier_id"];?>'>Edit</a></td>
59
</tr>
<?php
}
?>
</table>
<br />
<?php
//Display the navigation
//echo $pager->renderFullNav();
echo '<div class="pager" >'.$pager-
>renderFullNav().'</div>';
?>
</td>
</tr>
</table>
<?php require('includes/footer.php');?>
<?php require_once('includes/header.php');?>
<?php require_once('includes/connection.php');?>
<?php include('includes/get_username.php');?>
<table id="sidebar">
<tr id="navbox">
<td>
<ul id="nav">
60
<li><a
href="auth_available_item.php"class="current">Available Items</a></li>
<li><a
href="auth_received_item.php">Received Items</a></li>
<li><a
href="auth_supplier.php">Suppliers</a></li>
</ul>
</td>
</tr>
</table>
<table id="contentbox">
<tr>
<td id="content">
<div class="name">Welcome, <b><?php echo
$username; ?></b> | <a href="logout.php">Logout</a></div>
<div class="label">List of all available
items</div>
<hr />
<form name="formsearch" method="post"
onsubmit="return validateForm()" action="search_auth_avail_item.php">
<table>
<tr>
<td class="search">Search
for :</td>
<td><input type="text"
name="search" size="40px" placeholder="Search here..." /></td>
61
<td><input type="submit"
value="Search" style="cursor:pointer;"/></td>
</tr>
</table>
</form>
<br />
<table class="inventory_table"
id="alternatecolor">
<tr>
<th width="60">Code</th>
<th>Item name</th>
<th>Brand</th>
<th width="60">Qty left</th>
<th width="60">Unit</th>
</tr>
<?php
include('includes/ps_pagination.php');
$sql ='SELECT * FROM itemlist
ORDER BY item_id DESC';
//Create a PS_Pagination object
$pager = new PS_Pagination($conn,
$sql, 15, 20);
//The paginate() function returns a
mysql result set for the current page
62
$rs = $pager->paginate();
while($row = mysql_fetch_array($rs))
{
?>
<tr>
<td><?php echo $row["item_code"];?
></td>
<td><?php echo
$row["item_name"];?></td>
<td><?php echo
$row["brand_name"];?></td>
<td><?php echo $row["quantity"];?
></td>
<td><?php echo $row["unit_name"];?
></td>
</tr>
<?php
}
?>
<tr>
<td colspan="7"><?php
//Display the navigation
//echo $pager-
>renderFullNav();
echo '<div class="pager"
>'.$pager->renderFullNav().'</div>';
63
?>
</td>
</tr>
</table><br />
</td>
</tr>
</table>
<?php require('includes/footer.php');?>
AVAILABLE ITEMPHP
<?php require_once('includes/header.php');?>
<?php require_once('includes/connection.php');?>
<?php include('includes/get_username.php');?>
<table id="sidebar">
<tr id="navbox">
<td>
<ul id="nav">
<li><a
href="auth_available_item.php"class="current">Available Items</a></li>
<li><a
href="auth_received_item.php">Received Items</a></li>
<li><a
href="auth_supplier.php">Suppliers</a></li>
</ul>
</td>
</tr>
64
</table>
<table id="contentbox">
<tr>
<td id="content">
<div class="name">Welcome, <b><?php echo
$username; ?></b> | <a href="logout.php">Logout</a></div>
<div class="label">List of all available
items</div>
<hr />
<form name="formsearch" method="post"
onsubmit="return validateForm()" action="search_auth_avail_item.php">
<table>
<tr>
<td class="search">Search
for :</td>
<td><input type="text"
name="search" size="40px" placeholder="Search here..." /></td>
<td><input type="submit"
value="Search" style="cursor:pointer;"/></td>
</tr>
</table>
</form>
<br />
<table class="inventory_table"
id="alternatecolor">
<tr>
65
<th width="60">Code</th>
<th>Item name</th>
<th>Brand</th>
<th width="60">Qty left</th>
<th width="60">Unit</th>
</tr>
<?php
include('includes/ps_pagination.php');
$sql ='SELECT * FROM itemlist
ORDER BY item_id DESC';
//Create a PS_Pagination object
$pager = new PS_Pagination($conn,
$sql, 15, 20);
//The paginate() function returns a
mysql result set for the current page
$rs = $pager->paginate();
while($row = mysql_fetch_array($rs))
{
?>
<tr>
<td><?php echo $row["item_code"];?
></td>
66
<td><?php echo
$row["item_name"];?></td>
<td><?php echo
$row["brand_name"];?></td>
<td><?php echo $row["quantity"];?
></td>
<td><?php echo $row["unit_name"];?
></td>
</tr>
<?php
}
?>
<tr>
<td colspan="7"><?php
//Display the navigation
//echo $pager-
>renderFullNav();
echo '<div class="pager"
>'.$pager->renderFullNav().'</div>';
?>
</td>
</tr>
</table><br />
</td>
</tr>
</table>
<?php require('includes/footer.php');?>
67
LOGIN FORM
<?php
if(isset($_GET["attempt"]))
{
$attempt=$_GET["attempt"];
}
?>
<?php
session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<title>loginform</title>
<head>
<link media="all" rel="stylesheet" type="text/css" href="mainstyle.css"/>
</head>
<body>
<br /><br /><br /><br /><br /><br /><br /><br />
<div id="loginform">
68
<form name="form1" method="post" action="login.php">
<table align="center">
<tr>
<td id="login"colspan="2">User Login</td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td colspan="2">
<?php
if(isset($attempt))
{
if($attempt == "null")
{
?>
<div class="error">Enter your
username and password.</div>
<?php
}
elseif($attempt == "fail")
{
?>
<div class="error">Incorrect
username or password,<br />make sure caps lock key is off.</div>
69
<?php
}
}
?>
</td>
</tr>
<tr>
<td>Username:</td>
<td><input type="text" name="username"
size="25"></td>
</tr>
<tr>
<td>Password:</td>
<td><input type="password" name="password"
size="25"></td>
</tr>
<tr><td colspan="2" align="right"></td>
</tr>
<tr>
<td></td>
<td class="add" >
<input type="submit" name="submit"
style="cursor:pointer" value="Login" />
<a href="index.php"><input
type="button"name="submit" style="cursor:pointer" value="Exit" /></a>
</td>
</tr>
70
</form>
</div>
</body>
</html>
ITEM REPORT
<a href="report.php">Back </a>
<div align="center">Item Report From:<strong> <?php echo
$_POST['dayfrom']; ?></strong> To:<strong> <?php echo
$_POST['dayto']; ?>
<br />
</strong></div>
<table border="1px" style="margin:0 auto;" >
<tr>
<th width="85">Date</th>
<th width="174">Code</th>
<th width="294">Supplier Name </th>
<th width="127">Total</th>
</tr>
<?php
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("supplier_inventory", $con);
71
function formatMoney($number, $fractional=false) {
if ($fractional) {
$number = sprintf('%.2f', $number);
}
while (true) {
$replaced = preg_replace('/(-?\d+)(\d\d\d)/', '$1,$2', $number);
if ($replaced != $number) {
$number = $replaced;
} else {
break;
}
}
return $number;
}
$a=$_POST['dayfrom'];
$b=$_POST['dayto'];
$result1 = mysql_query("SELECT * FROM itemlist WHERE date BETWEEN '$a'
AND '$b'");
while($row = mysql_fetch_array($result1))
{
echo '<tr>';
echo '<td>'.$row['date'].'</td>';
echo '<td>'.$row['item_code'].'</td>';
echo '<td>'.$row['supplier_name'].'</td>';
72
echo '<td>';
$eee=$row['total'];
echo formatMoney($eee, true);
echo '</div></td>';
echo '</tr>';
}
mysql_close($con);
?>
<tr>
<td colspan="3" ><div align="right"><strong>Grand
Total</strong></div></td>
<td width="127">
<div align="center">
<?php
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("pos", $con);
$a=$_POST['dayfrom'];
$b=$_POST['dayto'];
73
$result1 = mysql_query("SELECT sum(total) FROM stockinsumarry WHERE
pdate BETWEEN '$a' AND '$b'");
while($row = mysql_fetch_array($result1))
{
$rrr=$row['sum(total)'];
echo formatMoney($rrr, true);
}
mysql_close($con);
?>
</div></td>
</tr>
</table><br /><br />
74
75