Design and Implementation of A Stock Management System
Design and Implementation of A Stock Management System
Design and Implementation of A Stock Management System
BY
Supervisor
DR. DATUKUN. KALAMBA. ARISTARKUS
JULY, 2023
i
DECLARATION
I hereby certify that this project presented for submission was composed and written by me, and it
has not been submitted in any previous application for degree. This project was conducted by me at
Plateau State University, Bokkos from January, 2023 to July, 2023 towards the fulfilments of the
requirements of Plateau State University for the degree B.Sc. in Computer science, under the
supervision of Dr. Datukun Kalamba Aristarkus. In submitting this copy to Plateau State University,
Bokkos, I give permission for it to be made available for academic use in accordance with the
regulations of the University Library. I retain the copyright in this work.
_______________________ ________________________________
Date Student’s Name
ii
APPROVAL PAGE
_________________________________ __________________________
Project Supervisor Date
[Dr. Datukun Kalamba Aristarkus]
___________________________ _____________________
Head of Department Date
[Dr. Datukun Kalamba Aristarkus]
___________________________ _____________________
Dean of Faculty of Natural and Applied Sciences Date
[ Ass Prof. Luhutyit. Peter. Damuut]
__________________________ _____________________
External Examiner Date
[Dr. Philip Oshiokhaimhele Odion]
iii
ACKNOWLEDGEMENT
My immense gratitude goes to God almighty who gave me the grace and privilege to carry out this
project work, may his name be praise forever.
My appreciation goes to my project supervisor, Dr. Datukun Kalamba Aristarkus, whose criticism,
corrections and advice proved useful for this work. Thank you indeed and God bless you.
My lecturers are not left out of this. All of them, in one way or the other contributed to the success
of my studies at the institution. I appreciate you all.
I will not forget the contribution of my course mates. They were of great help in their own ways.
May God bless your future. Amen
iv
DEDICATION
This project is dedicated to Almighty God who has being the alpha and omega who has seen me
through from the beginning to the end of my studies. And also to my parent for their moral and
financial support during the course of my studies.
v
Contents
DECLARATION.................................................................................................................................II
APPROVAL PAGE...........................................................................................................................III
ACKNOWLEDGEMENT................................................................................................................IV
DEDICATION.....................................................................................................................................V
TABLE OF FIGURES...................................................................................................................VIII
CHAPTER ONE...................................................................................................................................1
INTRODUCTION................................................................................................................................1
1.1 Background of project..................................................................................................................................................1
CHAPTER TWO.................................................................................................................................4
REVIEW OF LITERATURES...........................................................................................................4
2.1 Introduction by others...................................................................................................................................................4
vi
2.4 Components of the System by others...........................................................................................................................8
2.8.1 Designing...............................................................................................................................................................8
2.8.1 Development..........................................................................................................................................................9
CHAPTER THREE...........................................................................................................................10
RESEARCH METHODOLOGY.....................................................................................................10
3.1 Introduction................................................................................................................................................................10
3.3.2 Flowchart.............................................................................................................................................................12
CHAPTER FOUR..............................................................................................................................18
SYSTEM IMPLEMENTATION......................................................................................................18
4.1 Coding Process....................................................................................................................................................18
vii
4.3 Outputs........................................................................................................................................................................19
4.3.1 Front-ends............................................................................................................................................................19
4.3.3 Back-ends............................................................................................................................................................22
CHAPTER FIVE................................................................................................................................25
5.3 Conclusion..................................................................................................................................................................25
5.4 Recommendation........................................................................................................................................................25
REFERENCES...................................................................................................................................27
APPENDIX.........................................................................................................................................28
viii
TABLE OF FIGURES
Figure Page
Figure 2.1: interface of stock controller application 15
Figure 2.2: interface of stock count 16
Figure 2.3: interface of stock system 17
Figure 2.4: comparison table of three existing applications 17
Figure 3.1: flowchat 21
Figure 3.2: use-case diagram 22
Figure 3.3: relational diagram 23
Figure 4.1: loginscreen 29
Figure 4.2: dashboard 29
Figure 4.3: list of categories 30
Figure 4.4: list of products 30
Figure 4.5: outgoing product 31
Figure 4.6: list of system users 31
Figure 4.7: add user 32
Figure 4.8: authcontroller 32
Figure 4.9: dashboard controller 33
Figure 4.10: usercontroller 33
Figure 4.11: product controller 34
Figure 4.12: category controller 34
ix
ABSTRACT
Currently, most of organization are still using the manual system which is native recorded by hand
by their workers. This may sometime lead to the situation where the worker forgot to update the
stock and will cause of time wasted as they have to wait for stock ordering when it is in need. This
system can be used to store the details of the stock, stock maintenance, update the stock based on the
sales details, and generate sales and stock report daily or weekly based This project is categorize
individual aspects for the sales and stock management system. In this system we are solving different
problem affecting to direct sales management and purchase management. Stock Management System
is important to ensure quality control in businesses that handle transactions resolving around
consumer goods. The proposed system could also remind the person in-charge of the remaining
stock as it needed to be ordered or not. Lastly, the system will use barcode scanner from mobile
phone to automatically update the data in inventory database. The person-in-charge also can monitor
the movement of the stock as the stock will be updated online to the database. The success of this
product could eventually change the future usage of inventory system.
x
CHAPTER ONE
INTRODUCTION
1.1 Background of project
Stock management system is a web application system that handles the product management for
company equipment or any items to stored. The main aim of the project is to develop Stock
Management System Model software in which all the information regarding the stock of the
organization will be presented. Nowadays, many companies use the system to avoid overstock,
miscount and outages. It is a system for organizing a better stock data than that was used before
which is generally stored in manual form books or in spreadsheets. This application has admin
component to manage the stock and maintenance of the stock system. The application has general
organization profile, stock details, purchase details and the remaining stock that are presented in the
organization. This application also provides the remaining balance of the stock as well as the details
of the balance of transaction. Each new stock is created and entitled with the named and the entry
date of that stock and it can also be update any time when required as per the transaction or the sales
is returned in case. Here the login page is created to protect the management of the stock of
organization in order to prevent it from the threads and misuse of the stock. This management system
can be used by staffs that can enables the user to view the product and item information that have
been key-in. Staff or user can update any other information directly by using online system just like
any other online systems.
1
1.3 Research Questions
It is possible to create a cheap and user friendly system which could handle the information of items
or products and also calculated it to manage the information system.?
Can a program find or located products and quantity stored.?
of items or product.
• To help staffs in order to find location and the quantity of stocks that have
been stored.
• To design and develop a system that generate reports on all the activities in
the store.
2
1.6 Significance of study
A stock management system is crucial to a production organization, super market, and stores, to keep
record of items or products in stock and day-to-day transactions. The following are some key
significance:
It provides a general organization profile, stock details, purchase details and the remaining
stock that are presented in the organization
It automated the manual process of calculation and report generation.
It provides easy way of managing invoices and product information.
It will reduce the work load of the Cashier or staff.
The study will be useful for researchers seeking similar information.
3
4
CHAPTER TWO
REVIEW OF LITERATURES
5
2.3 Types of the system as said by others
2.3.1 Stock Controller - Inventories (2018)
This is a mobile based application that can be consider fulfill the requirement of the stock
management system. However, this application is not quite intelligence application because it
does not provide QR or Bar-code scanner functional in the system but it got some attractive
features in the application such as notification if the quantity of stock is low and user can
insert image in the database to organize the group of stock.
6
application was from Indonesia. The application is intelligent because it provides Barcode
scanner function but the interface of the application is very simple and bored. It also provides
database for local if the emergency case happens such as loss internet connection or no
internet connection, the user still can access it offline.
7
Figure 2.3 : Figure show the interface of smart stock system
2.2.2 Comparison Table of the Existing Application
8
2.4 Components of the System by others
User
Product
Invoice
Report
9
ensure compatibility on designing the system. Class Responsibilities and Collaboration
(CRC). This allows for a departure from the traditional procedural mindset and make possible
object oriented technology. Which allows all user and developer of the project to contribute
ideas, and collate the best ideas into the design.
2.8.1 Development
Coding constitutes the most important phase in the Extreme Programming life cycle. XP
programming gives priority to the actual coding over all other tasks such as documentation to
ensure that the customer receives something substantial in value at the end of the day. I have
developing the code based on the agreed metaphors and standards, and adopting a policy of
collective code ownership.
10
CHAPTER THREE
RESEARCH METHODOLOGY
3.1 Introduction
This chapter would mainly discuss about the methodology that is going to be used during the system
development. A system development methodology in software engineering is the main guidance for
constructing, planning and also controlling the process of developing an information system.
Common methodologies used were waterfall model, prototyping, spiral development, extreme
programming and also some other various types of methodologies. In this system development, agile
software development model methodology was used as the guidance. Rather than traditional
software development like the Waterfall method, where we might spend several months or years on a
project without showing it to the user, Agile is all about moving fast, releasing often, and reacting to
the real needs of your users.
3.2 System Requirement
3.2.1 Hardware Requirements
The section of hardware configuration is an important task related to the software development
insufficient random access memory may affect adversely on the speed and efficiency of the entire
system. The process should be powerful to handle the entire operations. The hard disk should
have sufficient capacity to store the file application.
Processor: Pentium IV and above
Process speed 1.4 GHz upwards
Processor memory: 128Mb minimum 256 Mb recommended
Cache size: 512 KB
RAM 512 MB (Minimum)
Mouse: 104 keys US Key Serial, USB or PS/2
Hard disk 80gb upward
Monitor: SVGA Color 15”
A CD-ROM drive
11
3.2.2 Software Requirements
A major element in building a system is the section compatibility since the software in the market
is experiencing in geometric progression. Selected software should be acceptable by the firm and
one user as well as it should be feasible for the system.
The document gives a detailed description of the software requirement specifications. The study
of requirement specification is focused specially on the functioning of the system. It allows the
developer or analyst to understand the system, function to be carried out the performance level to
be obtained and corresponding interfaces to be established.
Operating system: Minimum windows 7 software
Front end tool: HTML, CSS AND JAVASCRIPT
Client side: HTML, CSS, PHP, JAVASCRIPT
Back end: Laravel PHP
Database: MySQL Database
Browser: Google Chrome, Microsoft Edge or Mozilla Firefox browser
Data Flow Diagram of this stock management system. Only Admin/Manager have the privileges
to manage other users of this system. The process of adding and deleting users will be controlled
by Admin/Manager. Admin also can gain access to the system by login into the system and
manage new stocks, reports and stock reordering process. Contractors should also login to this
system to manage their profile, manage reports and request new stock orders from
Manager/Admin. All the transaction of stock in and out will be saved in Transaction database.
12
3.3.2 Flowchart
13
3.3.4 Relational Diagram
14
Hypertext Preprocessor (PHP)
Tim Converse and Joyce Park (2012) in their book PHP5 and MySQL Bible stated that, “PHP
was invented by Rasmus Lerdorf, Zeev Suraski and Andi Gutmans. The language enables
developers to produce dynamic web application by including complex function calls or
database queries within the HTML code. Lerdorf (1994) proposed the meaning of PHP to be
personal Home Page, but was later known to be its existing meaning (i.e. PHP Hypertext
Preprocessor). It is one of the most popular Web-development languages in the world. PHP is a
server-side scripting language and it is propose in the web-server before sending the
information to web browser (Jason 2004). According to Brawley and Fuller (2010) PHP was
invented in 1995 as Personal Home Page/Forms Interpreter or PHP/FI. They further highlighted
that this language can now be interpreted as a recursive acronym which stands for “PHP
Hypertext Preprocessor”. However, Rasmus (1994) consider PHP as a server-side, HTML-
embedded, cross-platform script language, in which terms; PHP provides a way for putting
instruction in HTML files to create a dynamic page”.
Php Capabilities
PHP would create dynamic web pages like a Common Gateway Interface (CGI) application. It
provides equal functionalities as the ASP does. PHP also provides database connectivity and
strong security measure. PHP can also deploy cookies and manage session. The database
management systems that provide connectivity through PHP are Adabas D, Dbase, Emress,
FilePro, Informix, Hyperwave, InterBase Solid, MySQL, Oracle, PostgreSQL, ODBC,
Microsoft Access, Sybase, Velocis, Unix dbm, MS SQL Server, etc.
The Strength of PHP
Among other scripting languages such as APS, Perl, Python, JPS and JavaScript, PHP is
preferred due to the following:
Price
Open source
Platform agnostic
Cost
Ease of maintenance
Maturity
Database compatibility The greatest strength of PHP is its faithful legion of open source
supporters.
15
MySQL The Database Management System
(DBMS) is a collection of programs that enables users to create and maintain databases. The
DBMS is hence general purpose software that facilitates the purpose of defining, constructing
and manipulating database for various applications. The DBMS used for handling the data in
this research work is MySQL. MySQL is a fast easy-to-use DBMS used on many websites. The
main focus of the developers was speed from the beginning. In the interest of the speed, they
made the decision to offer fewer features than their major competitors such as Oracle and
Sybase. However even though MySQL is less full-featured than its commercial competitors, it
has all the features needed by majority of database developers. It’s easier to install and use than
its commercial competitors, and the difference in price is strongly in Missal’s favor. Some of
the benefits and Advantages of MYSQL are:
Cost Effective: MySQL database is an open source system and from everyone to
anyone can use it as it is under General Public License. This gives developers the
opportunity to create Free MySQL Database. At the same time, you can make changes
to the code and customize the same as per your requirement and with the features that
are available anyone would love to opt for MySQL database. However, there are some
limitations though for people planning to use MySQL database for commercial use as
they might have to purchase standard edition of SQL server for a very nominal charge.
Cross Platform Operability: One of the biggest factors which make MySQL the most
opted form of database is Cross Platform Operability. It has proved itself in getting
installed in all the major platforms such as Linux, Windows, Solaris and so on and at
the same time performance has not been affected. Apart from that, the presence of APIs
makes its integration with C, C++, Perl, Java and Python etc. pretty easy.
Security: Databases setup on MySQL are very, very secure as all the passwords that are
stored are in encrypted form, hence restricting unauthorized access to the database. This
project research is going to use MySQL Database as the back-end storage for all
records. All data saved from the registration of consumers, adding of cashiers, billing
and payment processes and feedback will be saved on the SQL Database.
JavaScript
According to Mora (2010), JavaScript’s original name was Live Script created by Brendan
Eich at Netscape in 1995. JavaScript is an object-based scripting language modeled after C+
+. JavaScript is a client-side scripting language in which it performs all necessary actions
16
within the browser without consulting any server before it can perform any function. It also
supports event handling and validation of inputs. JavaScript code can make sure that user
enters valid information and when the submit button is pressed; the script checks the values
of all necessary fields; and as a result prevent the request from happening. It also supports
regular expression pattern. Button can be associated with JavaScript events. The JavaScript
language is a Web-enhancing technology. When employed on client computer, the language
can help turn a static page of content into an engaging, interactive, and intelligent experience.
Applications can be as subtle as welcoming a site’s visitor with the greeting “Good
morning!” when it is morning in the client computer’s time zone – even though it is
dinnertime where the server is located.
JavaScript Capabilities
Add content to a web page dynamically
Alter a web in response to user actions
Reacts to user events
Interact with frames
Manipulates HTTP cookies
Limited network programming.
17
3.4.3 Testing Plan
Extreme program integrates testing with the development phase rather than at the end of the
development phase. All codes have unit tests to eliminate bugs, and the code passes all such unit
tests before release.
Another key test is customer acceptance tests, based on the customer specifications. Acceptance test
run at the completion of the coding, and the developers provide the customer with the results of the
acceptance tests along with demonstrations.
18
CHAPTER FOUR
SYSTEM IMPLEMENTATION
19
4.3 Outputs
4.3.1 Front-ends
20
Figure 4.3: List of Categories
21
Figure 4.5: Outgoing Products
22
Figure 4.7: Add user (admin only)
4.3.3 Back-ends
23
Figure 4.9: DashboardController
24
Figure 4.11: ProductsController
25
CHAPTER FIVE
5.3 Conclusion
In practice, successful stock management system solutions are generally designed to merge computer
hardware, software, and peripheral equipment with improved operating practices for managing
inventory, space, labor, and capital equipment in an organization and distribution centers.
Implementation of stock management system allows a company to increase its competitive
advantage by reducing labor costs, improving customer service, increasing inventory accuracy, and
improving flexibility and responsiveness. It helps a company to manage inventory in real time, with
information as current as the most recent order, shipment, or receipt and any movement in between.
Also bear in mind that the package you settle on can perform a variety of functions. For example,
enterprise management software can perform financial management, business analytics, quality
management, materials management and inventory control, traceability and data collection among
other things. Evaluate both your business needs and the capability of the package in question to see if
you have an optimal fit.
26
5.4 Recommendation
It is hoped that increased familiarity, ease-of-use and end-user computing mainly to reduce lags
between the cost and benefits of ICT. The need to spend up insurance operation among them
processing of claims and liabilities have left most insurance companies with no choice but to adopt
the integrate ICTs to operational scheme. Most companies now see the need to include ICTs in their
business goals but formulating the right policies that should strategically position ICTs for effective
service delivery remains a problem. Nonetheless a good percentage of their annual income goes into
servicing ICTs.
27
REFERENCES
▪ Lee, J. K., Lee, I. S., & Kwon, Y. J. (2011). Scan & learn! Use of quick response codes
& smartphones in a biology field study. The American Biology Teacher, 73(8), 485-492.
▪ Chen, Yu-Hsiang. "System and method for identifying qr code." U.S. Patent Application
12/849,005, filed February 2, 2012.
▪ Blanchard, Jean-Louis, et al. "System and method for stock options market management."
U.S. Patent No. 7,181,423. 20 Feb. 2007
▪ Xie, Y., & WANG, H. W. (2007). Research on Automated Stock Management System Based
on Internet of Goods and its Application [J]. Logistics Technology, 4, 90-93.
▪ Yasarcan, H., & Barlas, Y. (2005). A generalized stock control formulation for stock
management problems involving composite delays and secondary stocks. System Dynamics
Review: The Journal of the System Dynamics Society, 21(1), 33-68.
▪ Gadd, R. J. (2003). U.S. Patent No. 6,561,417. Washington, DC: U.S. Patent and Trademark
Office.
▪ Cristofich, J. M., & Warner, S. E. (1997). U.S. Patent No. 5,671,363. Washington, DC: U.S.
Patent and Trademark Office.
▪ Overhultz, G. L., Hardman, G. E., & Pyne, J. W. (2007). U.S. Patent No. 7,233,241.
Washington, DC: U.S. Patent and Trademark Office.
▪ Bontis, N., Crossan, M. M., & Hulland, J. (2002). Managing an organizational learning
system by aligning stocks and flows. Journal of management studies
28
APPENDIX
USERS CONTROLLER
<?php
namespace App\Http\Controllers;
use App\Exports\ExportSuppliers;
use App\Imports\SuppliersImport;
use App\User;
use Excel;
use Illuminate\Http\Request;
use PDF;
use Yajra\DataTables\DataTables;
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create() {
//
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request) {
29
APPENDIX
$this->validate($request, [
'name' => 'required',
'email' => 'required|unique:suppliers',
]);
User::create($request->all());
return response()->json([
'success' => true,
'message' => 'Suppliers Created',
]);
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id) {
//
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id) {
$users = User::find($id);
return $users;
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id) {
$this->validate($request, [
30
APPENDIX
'name' => 'required|string|min:2',
'email' => 'required|string|email|max:255|unique:suppliers',
]);
$users = User::findOrFail($id);
$users->update($request->all());
return response()->json([
'success' => true,
'message' => 'users Updated',
]);
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id) {
User::destroy($id);
return response()->json([
'success' => true,
'message' => 'User Delete',
]);
}
return Datatables::of($users)
->addColumn('action', function ($users) {
return '<a onclick="editForm(' . $users->id . ')" class="btn btn-
primary btn-xs"><i class="glyphicon glyphicon-edit"></i> Edit</a> ' .
'<a onclick="deleteData(' . $users->id . ')" class="btn btn-danger
btn-xs"><i class="glyphicon glyphicon-trash"></i> Delete</a>';
})
->rawColumns(['action'])->make(true);
}
31
APPENDIX
$this->validate($request, [
'file' => 'required|mimes:xls,xlsx',
]);
if ($request->hasFile('file')) {
//UPLOAD FILE
$file = $request->file('file'); //GET FILE
Excel::import(new SuppliersImport, $file); //IMPORT FILE
return redirect()->back()->with(['success' => 'Upload file data
suppliers !']);
}
COSTOMER CONTROLLER
<?php
namespace App\Http\Controllers;
use App\Customer;
use App\Exports\ExportCustomers;
use App\Imports\CustomersImport;
use Illuminate\Http\Request;
use Yajra\DataTables\DataTables;
use Excel;
use PDF;
32
APPENDIX
{
$this->middleware('role:admin,staff');
}
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$customers = Customer::all();
return view('customers.index');
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
//
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
$this->validate($request, [
'nama' => 'required',
'alamat' => 'required',
'email' => 'required|unique:customers',
'telepon' => 'required',
]);
Customer::create($request->all());
return response()->json([
'success' => true,
'message' => 'Customer Created'
33
APPENDIX
]);
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
//
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
$customer = Customer::find($id);
return $customer;
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
$this->validate($request, [
'nama' => 'required|string|min:2',
'alamat' => 'required|string|min:2',
'email' => 'required|string|email|max:255|unique:customers',
'telepon' => 'required|string|min:2',
]);
$customer = Customer::findOrFail($id);
34
APPENDIX
$customer->update($request->all());
return response()->json([
'success' => true,
'message' => 'Customer Updated'
]);
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
Customer::destroy($id);
return response()->json([
'success' => true,
'message' => 'Customer Delete'
]);
}
return Datatables::of($customer)
->addColumn('action', function($customer){
return '<a onclick="editForm('. $customer->id .')" class="btn btn-primary btn-
xs"><i class="glyphicon glyphicon-edit"></i> Edit</a> ' .
'<a onclick="deleteData('. $customer->id .')" class="btn btn-danger btn-xs"><i
class="glyphicon glyphicon-trash"></i> Delete</a>';
})
->rawColumns(['action'])->make(true);
}
35
APPENDIX
if ($request->hasFile('file')) {
//UPLOAD FILE
$file = $request->file('file'); //GET FILE
Excel::import(new CustomersImport, $file); //IMPORT FILE
return redirect()->back()->with(['success' => 'Upload file data customers !']);
}
36