Stock Management System in PHP/OOP with Source Code

Language

Introduction

This is a Stock Management System in PHP and MySQL Database. This is a web-based application that provides an online and automated platform for shops or businesses. This project can manage the company's Purchase Orders, Receiving, Back Orders, returns, and Sales Records. The application has a pleasant user interface with the help of Bootstrap Library and AdminLTE template. This has also user-friendly functionalities.

About the Stock Management System

I developed this project using the following:

  • XAMPP v3.3.0 as my local webserver that has a PHP Version 8.0.7
  • PHP Language
  • MySQL Database
  • HTML
  • CSS
  • JavaScript
  • jQuery
  • Ajax
  • Bootstrap
  • AdminLTE
  • and some other plugins/libraries.

This Stock Management System can be only accessed by 2 types of users which are the System Admins and Staff. The Admin User can access and manage all the pages, forms, and features do the web application does while the Staff Users have limited access only.

The Stock Records such as the Purchase Order, Receiving, etc. in this project have print features for each record. Talking about the flow of this project, first, the admin users must populate all the important lists which are the supplier list and the item list. Next, users will create a Purchase Order Record for a supplier. After that, users can receive the items in each purchase order which means PO Record is required in order to add stock of the item. Then, when receiving the items when the supplier will only deliver some of the items or not complete, the system will automatically create a new Back Order Record for the items that are not delivered yet. BO records work like the Purchase Order Record. Next, when the received items have problems, issues, or etc., the management can create the Return Record and upon saving this file, the system will also automatically deduct the damaged items to the stock availability. Lastly, the sales record is the record of the company for stocks that have been purchased by their clients or customers. Each stock listed in the sales record will also be deducted from the stock availability.

Features

  • Secure Login and Logout
  • Manage Supplier List (CRUD)
  • Manage Item List (CRUD)
  • Manage Purchase Order Records
    • Create New
    • Edit Record
    • View Record
    • Print Record
    • Delete Records
  • Manage Receiving Records
    • Receive From PO (Purchase Order)
    • Automatically Creates New Back Order for Lacking Items/Stocks
    • Edit Record
    • Print Record
    • Automatically adds to Item stock availability
    • Delete Record
  • Manage Back Order Records
    • View Record
    • Receive BO
    • Print Record
  • Manage Return Records
    • Create New Records
    • View Record
    • Edit Record
    • Print Record
    • Delete Record
    • Automatically updates the stock availability upon saving
  • Manage Sales Records
    • Create New Records
    • View Record
    • Edit Record
    • Print Record
    • Delete Record
    • Automatically updates the stock availability upon saving
  • Manage Users list (CRUD)
  • Manage Account Details/Credentials
  • Manage System Information

System Snapshots of some Features

Dashboard Page

Stock Management System

Purchase Order List

Stock Management System

Purchase Order Printable Details

Stock Management System

Receiving Printable Details

Stock Management System

Back Order Printable Details

Stock Management System

Return's Printable Details

Stock Management System

Sales Printable Details

Stock Management System

Stock Availablity List

Stock Management System

How to Run ??

Requirements

  • Download and Install any local web server such as XAMPP/WAMP.
  • Download the provided source code zip file. (download button is located below)

Installation/Setup

  1. Open your XAMPP/WAMP's Control Panel and start Apache and MySQL.
  2. Extract the downloaded source code zip file.
  3. If you are using XAMPP, copy the extracted source code folder and paste it into the XAMPP's "htdocs" directory. And If you are using WAMP, paste it into the "www" directory.
  4. Browse the PHPMyAdmin in a browser. i.e. http://localhost/phpmyadmin
  5. Create a new database naming sms_db.
  6. Import the provided SQL file. The file is known as sms_db.sql located inside the database folder.
  7. Browse the Stock Management System in a browser. i.e. http://localhost/sms/.

Default Admin Access Information

Username: admin
Password: admin123

DEMO VIDEO

That's it. You can now explore the features and functionalities of this Stock Management System in PHP. I hope this project will help you with what you are looking for and you'll find something useful for your future projects.

Explore more on this website for more Free Source Codes and Tutorials.

Enjoy :)

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:

1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

Comments

In reply to by ashwani gupta (not verified)

I won't to edit some things but it is not going

Hello, I want to add category list in the maintenance field and appear on the add product, I only created category.php, manage_category.php, view_category.php, and i add the save_cat and delete_cat function on Master.php. Also change all the path specifically for category, but then It says An error occurred when i am saving and deleting category, i dont know the problem.

Hi. I'm also trying to include Category. Were you able to find a solution for this? Appreciate any feedback. Thanks

Hello, I've added stock available, and when I'm at the create new sales even though the item is 0 you can save it still, and the stocks will go negative and so on

There is problem with preg_match - doesn't allow special characters and if you have database and user on cPanel with "_" there is a problem. I added "_" into set_up.php but not successful...

1. is it possibel to list all item of supplier by PO Order dont need the Dropdown.... 2. Can not add neu User.... 3. i just want to show the PO of loged User not alle PO List

how can can i add image field image to the add item list and insert it to my database

Fatal error: Uncaught mysqli_sql_exception: Access denied for user 'root'@'localhost' (using password: NO) in E:\XAMPP\htdocs\sms\classes\DBConnection.php:18 Stack trace: #0 E:\XAMPP\htdocs\sms\classes\DBConnection.php(18): mysqli->__construct('localhost', 'root', Object(SensitiveParameterValue), 'sms_db') #1 E:\XAMPP\htdocs\sms\classes\SystemSettings.php(8): DBConnection->__construct() #2 E:\XAMPP\htdocs\sms\classes\SystemSettings.php(190): SystemSettings->__construct() #3 E:\XAMPP\htdocs\sms\config.php(9): require_once('E:\\XAMPP\\htdocs...') #4 E:\XAMPP\htdocs\sms\index.php(2): require_once('E:\\XAMPP\\htdocs...') #5 {main} thrown in E:\XAMPP\htdocs\sms\classes\DBConnection.php on line 18

Fatal error: Uncaught Error: Call to a member function fetch_array() on bool in C:\xampp\htdocs\sms\admin\stocks\index.php:33 Stack trace: #0 C:\xampp\htdocs\sms\admin\index.php(26): include() #1 {main} thrown in C:\xampp\htdocs\sms\admin\stocks\index.php on line 33

Not Found The requested URL was not found on this server. Apache/2.4.56 (Win64) OpenSSL/1.1.1t PHP/8.2.4 Server at localhost Port 80

ncaught Error: Undefined constant "localhost" in C:\xampp\htdocs\sms\classes\SystemSettings.php:190 Stack trace: #0 C:\xampp\htdocs\sms\config.php(9): require_once() #1 C:\xampp\htdocs\sms\index.php(2): require_once('C:\\xampp\\htdocs...') #2 {main} thrown in C:\xampp\htdocs\sms\classes\SystemSettings.php on line 190

Fatal error: Uncaught Error: Undefined constant "localhost" in C:\xampp\htdocs\sms\classes\SystemSettings.php:190 Stack trace: #0 C:\xampp\htdocs\sms\config.php(9): require_once() #1 C:\xampp\htdocs\sms\index.php(2): require_once('C:\\xampp\\htdocs...') #2 {main} thrown in C:\xampp\htdocs\sms\classes\SystemSettings.php on line 190

if you need like this system you can message me, i have created many systems much more like this for a low price. thanks

Add new comment