0% found this document useful (0 votes)
116 views55 pages

Sales and Stock Management System

This document describes a project for developing a web application system to manage sales and stock for a grocery store. The system aims to automate the sales and inventory processes and provide real-time data visibility to enable better decision making. It seeks to improve the customer experience, streamline inventory management, and provide analytics to help track store performance. The key goals are to reduce manual errors, increase efficiency, provide real-time data access, and integrate with other systems like point-of-sale. Developing this system would help address limitations of using spreadsheets for sales and inventory tracking as the amount of data grows.

Uploaded by

learns7861
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
116 views55 pages

Sales and Stock Management System

This document describes a project for developing a web application system to manage sales and stock for a grocery store. The system aims to automate the sales and inventory processes and provide real-time data visibility to enable better decision making. It seeks to improve the customer experience, streamline inventory management, and provide analytics to help track store performance. The key goals are to reduce manual errors, increase efficiency, provide real-time data access, and integrate with other systems like point-of-sale. Developing this system would help address limitations of using spreadsheets for sales and inventory tracking as the amount of data grows.

Uploaded by

learns7861
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 55

California State University, San Bernardino

CSUSB ScholarWorks

Electronic Theses, Projects, and Dissertations Office of Graduate Studies

8-2023

Sales and Stock Management System


Rashmika Gaddam Ms
California State University - San Bernardino

Follow this and additional works at: https://scholarworks.lib.csusb.edu/etd

Part of the Computer Engineering Commons

Recommended Citation
Gaddam, Rashmika Ms, "Sales and Stock Management System" (2023). Electronic Theses, Projects, and
Dissertations. 1791.
https://scholarworks.lib.csusb.edu/etd/1791

This Project is brought to you for free and open access by the Office of Graduate Studies at CSUSB ScholarWorks.
It has been accepted for inclusion in Electronic Theses, Projects, and Dissertations by an authorized administrator
of CSUSB ScholarWorks. For more information, please contact [email protected].
SALES AND STOCK MANAGEMENT SYSTEM

A Project

Presented to the

Faculty of

California State University,

San Bernardino

In Partial Fulfillment

of the Requirements for the Degree

Master of Science

in

Computer Science

by

Rashmika Gaddam

August 2023
SALES AND STOCK MANAGEMENT SYSTEM

A Project

Presented to the

Faculty of

California State University,

San Bernardino

by

Rashmika Gaddam

August 2023

Approved by:

Dr. Quingquan Sun, Advisor, Computer Science and Engineering

Dr. Khalil Dajani, Committee Member

Dr.Ronald Sollum, Committee Member


© 2023 Rashmika Gaddam
ABSTRACT

Many stores uses Excel sheets to monitor sales and inventory by keeping

separate distinct sheets for sales and inventory data within the cost. This project

is helpful in accounting and analysis, which can determine the fluctuations in sales

and stock levels .However, we face many issues while using excel to record the

sales and stock levels. For example, If more than one person works on the Excel

sheets, then it may lead to many inaccuracies, inconsistencies and loss of data.

Also, if number of stocks and sales increases then it is really hard to maintain large

amounts of data which is also hard to retrieve when needed. Furthermore, excel

does not offer real-time updates or integration with other systems, such as point-

of-sale (POS) systems, which can lead to inaccuracies and inefficiencies in the

sales and stock management process. These limitations highlight the need for a

more robust and integrated solution for sales and stock management in a grocery

store.

iii
ACKNOWLEDGEMENT

My heartfelt thanks go to my excellent Advisor, Dr. Quingquan Sun, for his

crucial assistance, patience, time, and advice in seeing this project through to

completion. My thanks also go to my department leader, Dr. Khalil Dajani,

who patiently guided me through the completion of this project.

I would like to express my gratitude and appreciation to my committee

members, Dr. Ronald Salloum and Dr. Khalil Dajani, for their invaluable

assistance and advise.

Finally, I'd want to express my gratitude to the school of computer science at

California State University, San Bernardino, for developing the best curriculum that

has helped me improve my abilities and achieve my future goals.

iv
TABLE OF CONTENTS

ABSTRACT…………………………………………………………………………..iii

ACKNOWLEDGEMENTS………………………………………………………..…iv

LIST OF FIGURES……………………………………………………………..…...vii

CHAPTER ONE:INTRODUCTION……………………………………………...….1

Background…………………………………………….………………………..1

Significance………………………………………………………….………......1

Purpose………………………………………………………….………............2

Motivation……………………………………………………………………......2

CHAPTER TWO: LITERATURE REVIEW………………………………..…........3

Challenges……………………………………………………...…………….....3

CHAPTER THREE: SYSTEM REQUIREMENTS……………………..….….......4

Hardware Requirements………………………………………………….........4

Software Requirements…………………………………………………...……4

CHAPTER FOUR: TOOLS AND TECHNOLOGIES…………..……………….....5

HTML……………………………………………………………………….........5

CSS…………………………………………………………………………........5

BOOTSTRAP…………………….………………………………………….......5

PHP………………………………………….……………………………….......5

MY SQL……………………………………………………………………….....5

CHAPTER FIVE: SYSTEM DESIGN…………………………………………........6

Use Case Diagram……………………………………………………………...6

ER Diagram……………………………………………………………………...7

CHAPTER SIX: SYSTEM ANALYSIS………………………………………..…….8

v
Proposed System………………………………………………………….........8

Web Application…………………………………………………………………8

User Requirement…………………………………………………………..…..9

Admin……………………………………………………….……………..…......9

Inventory Control………..………………………………………………..……...9

CHAPTER SEVEN: IMPLEMENTATION……………………………………..….10

Primary Implementation…………………………………………………...…..10

Exploring Database……………………………………………….……….…..11

CHAPTER EIGHT: TESTING……………………………………………..……....21

Introduction……………………………………………..………………..…..…21

Unit Testing…………………..…………………………………………..…….21

Testing Scenarios…………………………..………………………………….22

CHAPTER NINE: CONCLUSION………………………………………..…..……25

Conclusion……………………………………………………..…………..…...25

Project Limitations……………………..…………………………………........25
CHAPTER TEN: FUTURE ENHANCEMENTS…………….…………………….27

APPENDIX A:CODE……………………………………………..…...………..…..28

REFERENCES……………………………………………………...……………...46

vi
LIST OF FIGURES

Figure 1: Dashboard…………………………………………….…………….……..12

Figure 2: Add Sale…………...………………………………………………….…...13

Figure 3: Add Inventory.……………………………………………………………..13

Figure 4: Add Vendor..……..………………………………………………………..14

Figure 5: Add Customer.……………………….………………………………........14

Figure 6: List Inventory…………..…………………………………………………..15

Figure 7: List of Vendors……………………………..…………………….………..16

Figure 8: List of Customers………………………………………………………….17

Figure 9: List of Sales………………………………………………………………..18

Figure 10: Defaulters………………..……………………………………………....18

Figure 11: Out of Stock Products………………..……………….……………..….19

Figure 12: Products in Stock………..…………………………………….………...19

Figure 13: Pending Payments………………………………………………….…..20

Figure 14: Cannot be Sold to a Customer Error…………………………..……....20

Figure 15: Warning if Quantity Cannot be Sold to a Customer………………….22

Figure 16: Customer Has Not Paid Pending Payment……………..…………….23

Figure 17: Quantity of Item Goes Below 0………………..………………………..23

vii
CHAPTER ONE

INTRODUCTION

Background

Grocery stores used to do their inventory manually before the new dawn of

technology to mankind, large stores found it hard to maintain their operations

efficiently and effectively. Sales and stock management systems were

developed to carry out the daily activities whether in grocery stores or

companies. With a proper and timely determination of the system, the strategy

allows for freeing a significant number of stocks increasing resource

efficiency. Excel spreadsheets are used for data entry manually which can

lead to great inaccuracies in the information processed.

Significance

Using Excel sheets for maintaining sales and stock in a store may result in lot

of challenges. Some of them are getting errors while entering the data manually,

as the data increases scalability decreases and difficult to interact with other

systems like point -of-sales system. Due to all these reasons, it is really difficult to

decide about sales and stocks based on real -time details. Hence we need to

have an integrated system for all kinds of store in order to monitor sales and

stock.

1
Purpose

The key goals of this initiative are as follows:

1. Automate the sales and stock management processes, reducing manual

errors and increasing efficiency.

2. Provide real-time visibility into sales and stock data, enabling informed

decision-making.

3. Enhance the customer experience through improved checkout processes

and customer management.

4. Streamline the inventory management process, including stock levels,

reordering, and reporting.

5. Provide detailed sales and stock analytics, including graphs and charts, to

help the retail store track its performance.

Motivation

In the world we belong to rightnow,every business tries to achieve a balance

between what is required and what is desired, with reducing expenses as the

primary objective. Goods and materials that are used in any business are

controlled by sales and stock management tools. It examines the amount of

supplies that is accessible and exactly where it is kept so that it is readily

available to utilize whenever needed. For predicting the demand in future, the

system deals with forecasting the demand,controlling assets items and supplies

inventory with a cost,estimation,valuation of commodities and validation of

products.

2
CHAPTER TWO
LITERATURE REVIEW

Challenges

There are numerous sales and stock systems used in almost every business

enterprise for managing their inventory and sales, although inaccurate records

od stock is universal among the systems. The proposed system will develop a

method for delivering real-time insights into the activities carried along the

grocery store. Existing systems are using the same type of database technology

for data visualization, the study of presented abstract information in certain

schematic forms. The data visualization goal is to relay information graphically

using shapes, arts, or charts with percentages

Database is a group of connected files that are structured to be accessible to

end users simultaneously.It gathers and organizes data so that it can be

displayed in a single location. They are created and carried by a software known

as Database Management System, which deals with the way of information

maintained,structured and accessed. Structured Query Language is

implemented by other applications for processing data in a relational database

management systems.MY SQL and PHP are used in this system for remote

server services.

3
CHAPTER THREE

SYSTEM REQUIREMENTS

Hardware Requirements

Display: 1920x1080 resolution Monitor.

Processor: Intel Core i5 or higher.

Network: Internet connectivity or Wi-Fi.

Storage: At least 256GB SSD.

RAM: 8GB or higher.

Software Requirements

Visual Studio Code.

Xampp.

4
CHAPTER FOUR

TOOLS AND TECHNOLOGIES

Graphical User Interface will be the preferred front-end interface to information

display, since easy to use even for inexperienced users, it is attractive, provide

shortcuts, and allows room for multitasking.

HTML

Hyper Text Markup Language is used for developing front-end Graphical user

interface.It is standard language used for web pages.

CSS

Cascading style sheets are a style sheet language used to show a document

or content written in markup language.

BOOTSTRAP

Bootstrap is used for front end framework which enable global options like

gradients and shadows and writes own CSS with our variables, maps, functions.

PHP

The system was created with the Laravel PHP framework.The software will be

developed using PHP one of the most widely used and reliable technologies for

developing custom software solutions.

MYSQL

For database MYSQL is used.This technology will ensure that the software is

scalable, reliable, and secure.


5
CHAPTER FIVE

SYSTEM DESIGN

Use Case Diagram

6
ER Diagram

7
CHAPTER SIX

SYSTEM ANALYSIS

Proposed System

The Primary components of this system are as follows:

1. Point of Sale (POS): A simple-to-use interface that permits sales

operations like management of clients, handling payments, and the

scanning of barcodes efficiently and effectively.

2. Inventory Management: This application can help us in determining the

current stock and handles the stock, reports and reordering.

3. Customer Management: This system will maintain and arrange data

regarding the customers, which includes their contact details, purchase

history and reward points.

4. Sales and Profit Analytics: This platform can display graphical and visual

representations of both revenue and sales, which helps in assisting the

store to make prudent decisions.

5. Reports: This application will create statistics regarding transactions,

materials, consumers, and other aspects that can assist the business to

maintain records of the manner in which it is accomplished.

Web Application

The main purpose of this application is to supervise the inventory management

process of the business. When all the operations are automated, they can be

carried out accurately and the business will acquire the edge over competitors.

8
The following details are added to the business requirements discussed in the

Scope section:

1.Aids in the search for a specific product and its remaining supply.

2.Information regarding product sales and purchases.

3.Brief information on the organization's current news status.

4. Display inventory as of the date entered.

5.It aids in determining the total presented inventory in the organization.

6.To determine the amount and specifics of sales distributed on a certain day.

7.Inventory transactions are properly managed.

8.Each transaction has a unique entry date, as well as a quantity and rate.

9.Only the administrator has access to the page.

User Prerequisites

The user type determines the user requirements.

Admin
1.Ability to build new stores with dates.

2.Ability to alter the entry according to the entry.

3.Ability to add, change, and delete stock entries.

Inventory Control

1.Ability to verify stock availability.

2. Capable of checking the balance payment.

3.Ability to view the remaining sales inventory.

9
CHAPTER SEVEN

IMPLEMENTATION

Primary Implementation

Admin: The administrator is responsible for handling the system. This involves

setting up and dealing with the user accounts, operating the database and

maintaining how efficiently the system performs.

Store Manager: The store manager will be responsible for running the store

daily.He is also responsible for maintaining the data on sales and inventory,

making reports. Implementing decisions on sales and inventory information.

Inventory Manager: The inventory manager will be responsible for dealing with

stock data, which involves incorporating new goods, keeping stock levels up to

date and keeping record of expenses.

Reports User: The reports user will be responsible for creating reports,

examining sales and stock data, and coming up with alternatives based on what

they discover through the data.

Each customer will be given individual login information and access.Thus

confidential data will remain encrypted and every individual will be allowed to

access the details they require to carry out the job.The PHP and MYSQL based

inventory and sales management system will make it simpler and precise count

of sales and stock data.

10
Exploring Database

Implementation of the PHP and MySQL-based Sales and Stock Management

System for a small retail has the following steps:

• Hosting: A cloud-based hosting platform should be selected. This hosting

site should have enough storage space, bandwidth to deal with large

volumes of data is required.

• Database Design: For storing data regarding transactions and supplies.It

is necessary to develop well organized database.The database must

contain fields for transactions, products and inventory and the fields need

to be interconnected in a proper way.

• User Interface Design: The entire system should have a user -friendly

dashboard which allows customers to enter and display both sales and

inventory data.The interface should be customizable and function properly

on a number of platforms likes laptops and mobile phones.

• PHP Programming: PHP scripts need to be developed to provide the

system all the features like entering information, searching the data and

generating reports.The code should be developed to be secure as well as

expanding and must deal with error management and store them

appropriately.

• Integration with Point-of-Sale (POS) Systems: PHP and My-SQL systems

should be interconnected inorder to get real-time data.

• Testing and Deployment: The system needs to be tested properly inorder

to ensure that it functions as planned also ensuring that the date precise

11
and secured.When the testing is completed the system can be uploaded

on the hosting site and made accessible to all the clients.

• Maintenance and Upgrades: Regular maintenance and upgrades must be

performed on the system to ensure that it continues to function effectively

and provide the necessary. level of service. This may involve fixing bugs,

adding new features, and upgrading the underlying software and

hardware components.

Figure 1: Dashboard

12
Figure 2: Add Sale

Figure 3: Add Inventory

13
Figure 4: Add Vendor

Figure 5: Add Customer

14
Figure 6: List Inventory

15
Figure 7: List of Vendors

16
Figure 8: List of Customers

17
Figure 9: List of Sales

Figure 10 : Defaulters

18
Figure 11: Out of Stock Products

Figure 12: Products in Stock

19
Figure 13: List of Payments

Figure 14: Pending Payments

20
CHAPTER EIGHT

TESTING

Introduction

The goal of software testing is to evaluate software program capabilities

or attributes to ensure that it meets the application standards.Testing does not

guarantee quality, and its objective is not to detect bugs.Testing might consist

of verification and validation as well as dependability estimation.

The fundamental goal of testing is to find errors in application.The most

crucial function of testing is to provide information.Check ensure that the

program is functioning properly while creating, updating, and deleting product

entries.

Unit Testing

Individual software components are tested in this manner. It is usually done

by the programmer rather than the testers.This demands detailed information

and expertise of the internal program design and code.We performed numerous

testing tasks during unit testing, such as the reflection of the unit data on the

database and its interface. Several sorts of bugs linked with the component

were discovered and resolved. To test our software, we use a variety of

functional keys.Our software unit testing is concerned with stock units, opening

stock units, and product unit validation.

21
Test Scenarios

Figure 15: Warning if Quantity Cannot be Sold to a Customer.

22
Figure 16: When Customer Has Not Paid Pending Amount

Figure 17: When Quantity of Item Goes Below Certain Quantity.

23
The project took some time, and I learnt a lot, including how the parent and child

models are associated in relational databases. I found that reducing the stock

quantity after a sale will result in an inaccurate profit report; instead, create a new

record for the transaction and display the profit in the view. I discovered that if the

validation guidelines are not followed, the buyer cannot buy the product. The

project was enjoyable even though it was challenging to construct the database

relationships.

24
CHAPTER NINE

CONCLUSION

The implementation of a PHP and MySQL-based sales and stock

management system for a small retail store can provide significant benefits

over the traditional method of using Excel spreadsheets. By having real-time

data and capacity to work with POS systems, recommended system(this

project) will give us more accurate record of sales and stock easily. Increasing

demands of the many stores can be satisfied by this system as it is versatile

and reliable.This system can be turned into a well-defined process by building

a database, developing a user interface, developing PHP code, merging with

POS system, regular testing, proper deployments and carrying out regular

upgrades and maintenance.Replacement of automated and interconnected

solution by manual processes the retail store can make superior decisions

based on real time time.Thus making the store more productive and

successful.

Project Limitation

In this project there are certain limitations. We were unable to meet all of our

goals due to a lack of understanding in specific disciplines and a lack of time

when the project began. We hope these constraints are significant. Some of the

project's constraints are as follows:

1.This application is not appropriate for organizations with a high volume.

2.Products and various warehouse levels.

25
3.This software application can only generate rudimentary reports.

4.It only has a single admin panel.

5.It is not ideal for huge organizations.

26
CHAPTER TEN

FUTURE ENHANCEMENTS

Because we began this project with little knowledge of the inventory

management system, we learned about enhancement capacity while creating it.

Some of the areas we can expand for betterment and effectiveness are given

below:

1.Design of an interactive user interface.

2.Manage Inventory by stores

3. Oracle is used as the database.

4. An online payment mechanism can be included.

5. The system should be adaptable to any situation.

6.For product returns sales and purchase system should be added.

7.Lost and broken items.

27
APPENDIX A

CODE

CREATE TABLE `customers` (

`id` bigint(20) UNSIGNED NOT NULL,

`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,

`telephone` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,

`address` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,

`created_at` timestamp NULL DEFAULT NULL,

`updated_at` timestamp NULL DEFAULT NULL

28
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4

COLLATE=utf8mb4_unicode_ci;

--

-- Dumping data for table `customers`

INSERT INTO `customers` (`id`, `name`, `telephone`, `address`, `created at`,

`updated at`) VALUES

(1, 'Customer One', '123456789101', 'New York 001', '2022-11-21 14:09:02',

'2022-11-21 14:09:02'),

(2, 'Zelenia Barton', '11237625971', 'Repellents Rerum i', '2022-11-21 18:19:52',

'2022-11-21 18:19:52'),

(3, 'Kyle Marsh', '+1 (371) 318-6403', 'Sunt dolor Quis pers', '2022-11-21

18:20:35', '2022-11-21 18:20:35'),

(4, 'Natalie Ellison', '+1 (262) 637-1224', 'Aut et hic est et co', '2022-11-21

18:20:39', '2022-11-21 18:20:39'),

(5, 'Amy Craig', '+1 (617) 876-8058', 'Veritatis et animi', '2022-11-21 18:20:42',

'2022-11-21 18:20:42'),

(6, 'Odessa Higgins', '+1 (837) 663-8249', 'Dolor eiusmod aut re', '2022-11-21

18:20:45', '2022-11-21 18:20:45'),

(7, 'Tiger Osborne', '+1 (205) 182-6075', 'Et est ipsa est dol', '2022-11-21

18:20:47', '2022-11-21 18:20:47'),

29
(8, 'Leonard Hodges', '+1 (939) 982-5623', 'Dolorem excepteur au', '2022-11-21

18:20:50', '2022-11-21 18:20:50'),

(9, 'Hadassah Wolf', '+1 (991) 167-7137', 'Quis quae voluptatem', '2022-11-21

18:20:52', '2022-11-21 18:20:52'),

(10, 'Aiko Burks', '+1 (124) 601-2458', 'Irure voluptatem har', '2022-11-21

18:20:55', '2022-11-21 18:20:55'),

(11, 'Charde Workman', '+1 (233) 808-3068', 'Deleniti dolorem arc', '2022-11-21

18:21:01', '2022-11-21 18:21:01'),

(12, 'Whoopi Rodriquez', '+1 (108) 444-7755', 'Debitis quidem persp', '2022-11-

21 18:21:03', '2022-11-21 18:21:03'),

(13, 'Lamar Golden', '+1 (915) 673-3816', 'Aperiam eveniet qui', '2022-11-21

18:21:06', '2022-11-21 18:21:06'),

(14, 'Calvin Burnett', '+1 (393) 394-4923', 'Repudiandae eu eveni', '2022-11-21

18:21:09', '2022-11-21 18:21:09'),

(15, 'Justina Townsend', '+1 (895) 787-4702', 'Quia laboriosam qui', '2022-11-21

18:21:11', '2022-11-21 18:21:11'),

(16, 'Shaine Gardner', '+1 (282) 662-7428', 'Ipsa ut aperiam qui', '2022-11-21

18:21:14', '2022-11-21 18:21:14'),

(17, 'Flynn Emerson', '+1 (912) 592-8395', 'Nam repellendus Aut', '2022-11-21

18:21:17', '2022-11-21 18:21:17'),

30
(18, 'Quintessa Terry', '+1 (285) 814-8427', 'Possimus deleniti e', '2022-11-21

18:21:21', '2022-11-21 18:21:21'),

(19, 'Keefe Curry', '+1 (677) 984-2181', 'Mollitia voluptatibu', '2022-11-21

18:21:24', '2022-11-21 18:21:24'),

(20, 'Arthur Ellison', '+1 (657) 312-7287', 'Ut vero quas explica', '2022-11-21

18:21:26', '2022-11-21 18:21:26'),

(21, 'Colton Mcbride', '+1 (869) 713-3881', 'Voluptatem veritati', '2022-11-21

18:21:31', '2022-11-21 18:21:31'),

(22, 'Jaden Garza', '+1 (281) 623-1939', 'Lorem consequatur e', '2022-11-21

18:21:34', '2022-11-21 18:21:34'),

(23, 'Germaine Cabrera', '+1 (905) 282-1211', 'Quo commodi voluptat', '2022-11-

21 18:21:40', '2022-11-21 18:21:40'),

(24, 'Ralph Tanner', '+1 (295) 983-9606', 'Dolor mollitia corru', '2022-11-21

18:21:43', '2022-11-21 18:21:43'),

(25, 'Fallon Tanner', '+1 (359) 565-8998', 'Magnam nulla omnis d', '2022-11-21

18:21:46', '2022-11-21 18:21:46'),

(26, 'Violet Daniels', '+1 (759) 873-3963', 'Qui perspiciatis iu', '2022-11-21

18:21:49', '2022-11-21 18:21:49'),

(27, 'Leonard Patel', '+1 (434) 643-5553', 'Dolore voluptate qui', '2022-11-21

18:21:52', '2022-11-21 18:21:52'),

31
(28, 'Kato Vaughan', '+1 (163) 788-1864', 'Anim ex veniam dese', '2022-11-21

18:21:55', '2022-11-21 18:21:55'),

(29, 'Aubrey Lopez', '+1 (776) 674-5685', 'Deserunt facere blan', '2022-11-21

18:22:02', '2022-11-21 18:22:02'),

(30, 'Brooke Baird', '+1 (977) 327-9312', 'Ea voluptatem est pe', '2022-11-21

18:22:05', '2022-11-21 18:22:05'),

(31, 'Kalia Levy', '+1 (611) 865-3732', 'Consequat Ut dolor', '2022-11-21

18:22:08', '2022-11-21 18:22:08');

-- ----------------------------------------------------------

INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES

(1, '2014_10_12_000000_create_users_table', 1),

(2, '2019_12_14_000001_create_personal_access_tokens_table', 1),

(3, '2022_11_20_191406_create_suppliers_table', 1),

(4, '2022_11_20_191456_create_stocks_table', 1),

(5, '2022_11_20_191522_create_customers_table', 1),

(6, '2022_11_20_191546_create_orders_table', 1);

-- --------------------------------------------------------

--

-- Table structure for table `orders`

CREATE TABLE `orders` (

32
`id` bigint(20) UNSIGNED NOT NULL,

`stock_id` bigint(20) UNSIGNED NOT NULL,

`customer_id` bigint(20) UNSIGNED NOT NULL,

`quantity` int(11) NOT NULL,

`paid` tinyint(1) NOT NULL,

`created_at` timestamp NULL DEFAULT NULL,

`updated_at` timestamp NULL DEFAULT NULL

) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4

COLLATE=utf8mb4_unicode_ci;

--

-- Dumping data for table `orders`

--

INSERT INTO `orders` (`id`, `stock_id`, `customer_id`, `quantity`, `paid`,

`created_at`, `updated_at`) VALUES

(1, 1, 1, 5, 1, '2022-11-21 16:54:09', '2022-11-21 16:54:09'),

(2, 1, 1, 1, 0, '2022-11-21 16:54:58', '2022-11-21 16:54:58'),

(3, 1, 1, 3, 1, '2022-11-21 16:57:54', '2022-11-21 16:57:54'),

(4, 1, 1, 1, 1, '2022-11-21 17:24:36', '2022-11-21 17:24:36'),

(5, 1, 1, 1, 1, '2022-11-21 17:25:38', '2022-11-21 17:25:38'),

33
(6, 1, 1, 1, 1, '2022-11-21 17:36:22', '2022-11-21 17:36:22'),

(7, 1, 31, 8, 1, '2022-11-21 18:53:55', '2022-11-21 18:53:55'),

(8, 22, 28, 2, 0, '2022-11-21 19:27:36', '2022-11-21 19:27:36'),

(9, 23, 18, 3, 0, '2022-11-21 19:27:49', '2022-11-21 19:27:49'),

(10, 31, 29, 2, 0, '2022-11-21 19:28:43', '2022-11-21 19:28:43'),

(11, 2, 27, 10, 1, '2022-11-21 19:29:02', '2022-11-21 19:29:02');

-- Table structure for table `personal_access_tokens`

--

CREATE TABLE `personal_access_tokens` (

`id` bigint(20) UNSIGNED NOT NULL,

`tokenable_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,

`tokenable_id` bigint(20) UNSIGNED NOT NULL,

`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,

`token` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,

`abilities` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,

`last_used_at` timestamp NULL DEFAULT NULL,

`expires_at` timestamp NULL DEFAULT NULL,

`created_at` timestamp NULL DEFAULT NULL,

`updated_at` timestamp NULL DEFAULT NULL

34
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4

COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--

-- Table structure for table `stocks`

--

CREATE TABLE `stocks` (

`id` bigint(20) UNSIGNED NOT NULL,

`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,

`buying_price` double NOT NULL,

`selling_price` double NOT NULL,

`quantity` int(11) NOT NULL,

`supplier_id` bigint(20) UNSIGNED NOT NULL,

`created_at` timestamp NULL DEFAULT NULL,

`updated_at` timestamp NULL DEFAULT NULL

) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4

COLLATE=utf8mb4_unicode_ci;

--

-- Dumping data for table `stocks`

35
--

INSERT INTO `stocks` (`id`, `name`, `buying_price`, `selling_price`, `quantity`,

`supplier_id`, `created_at`, `updated_at`) VALUES

(1, 'Ventilator', 500, 1200, 20, 2, '2022-11-21 14:42:26', '2022-11-21 16:57:54'),

(2, 'Cadiopulmonary bypas device', 1000, 1800, 20, 12, '2022-11-21 18:25:13',

'2022-11-21 18:25:13'),

(21, 'Dialysis machine', 2000, 3200, 23, 16, NULL, NULL),

(22, 'Infusion pumps', 3251, 4236, 40, 8, NULL, NULL),

(23, 'LASIK surgical machine', 1430, 3245, 25, 17, NULL, NULL),

(24, 'Medical lasers', 2000, 2200, 24, 8, NULL, NULL),

(25, 'Consult 120 Urine analyzer', 1000, 4000, 16, 11, NULL, NULL),

(26, 'Urine reagent strips 10 parameter', 900, 1900, 60, 1, NULL, NULL),

(27, 'Consult Liquid urine control', 500, 999, 70, 20, NULL, NULL),

(28, 'Plastic urine containers, sterile or unsterile', 700, 1600, 45, 14, NULL,

NULL),

(29, 'Conical centrifuge tube, 15ml', 300, 1200, 9, 2, NULL, NULL),

(30, 'Microscope slides and 1 coverslip', 2750, 4560, 4, 16, NULL, NULL),

(31, 'Clinical centrifuge', 3000, 7050, 2, 21, NULL, NULL),

(32, 'Flow cytometers', 550, 1190, 7, 15, NULL, NULL),

36
(33, 'Blood gas analyzers', 2890, 3900, 9, 14, NULL, NULL),

(34, 'Electrolyte analyzers', 565, 2000, 7, 13, NULL, NULL),

(35, 'Differential counters', 777, 1179, 8, 5, NULL, NULL),

(36, 'Coagulation analyzers', 900, 2000, 10, 6, NULL, NULL),

(37, 'Slide strainers', 999, 1999, 9, 6, NULL, NULL),

(38, 'Magnetic resonance imaging(MRI)', 888, 2899, 7, 8, NULL, NULL);

-- ----------------------------------------------------------

-- Table structure for table `suppliers`

CREATE TABLE `suppliers` (

`id` bigint(20) UNSIGNED NOT NULL,

`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,

`address` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,

`created_at` timestamp NULL DEFAULT NULL,

`updated_at` timestamp NULL DEFAULT NULL

) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4

COLLATE=utf8mb4_unicode_ci;

--

-- Dumping data for table `suppliers`

--

37
INSERT INTO `suppliers` (`id`, `name`, `address`, `created_at`, `updated_at`)

VALUES

(1, 'Buyer One', 'Address One', '2022-11-21 13:58:26', '2022-11-21 13:58:26'),

(2, 'Buyer Two', 'Address Two', '2022-11-21 14:01:10', '2022-11-21 14:01:10'),

(3, 'Buyer Three', 'Address Three', '2022-11-21 18:14:48', '2022-11-21 18:14:48'),

(4, 'Darryl Shaffer', 'Enim id velit ducimu', '2022-11-21 18:16:48', '2022-11-21

18:16:48'),

(5, 'Candace Evans', 'Dolorem molestiae do', '2022-11-21 18:16:52', '2022-11-21

18:16:52'),

(6, 'Mercedes Hawkins', 'Incidunt est mollit', '2022-11-21 18:16:56', '2022-11-21

18:16:56'),

(7, 'Ashely Hudson', 'Accusantium dolore d', '2022-11-21 18:17:00', '2022-11-21

18:17:00'),

(8, 'Quincy Cantu', 'Est praesentium con', '2022-11-21 18:17:03', '2022-11-21

18:17:03'),

(9, 'Clementine Willis', 'Qui quasi et volupta', '2022-11-21 18:17:06', '2022-11-21

18:17:06'),

(10, 'Nicholas Reeves', 'Sit unde placeat et', '2022-11-21 18:17:08', '2022-11-21

18:17:08'),

(11, 'Tallulah Estes', 'Sit harum et at in i', '2022-11-21 18:17:11', '2022-11-21

18:17:11'),

38
(12, 'Richard Mathis', 'Commodo molestiae na', '2022-11-21 18:17:13', '2022-11-

21 18:17:13'),

(13, 'Jeanette Barker', 'Aperiam ipsam quod e', '2022-11-21 18:17:16', '2022-11-

21 18:17:16'),

(14, 'Abel Schwartz', 'Aliquip aut aut sint', '2022-11-21 18:17:18', '2022-11-21

18:17:18'),

(15, 'Sierra Keller', 'Duis consequuntur vo', '2022-11-21 18:17:20', '2022-11-21

18:17:20'),

(16, 'Quincy Gomez', 'Veniam elit recusa', '2022-11-21 18:17:29', '2022-11-21

18:17:29'),

(17, 'Britanni Hayden', 'Dolores officia sequ', '2022-11-21 18:17:32', '2022-11-21

18:17:32'),

(18, 'Uriah Bowen', 'Minus tempore ullam', '2022-11-21 18:17:35', '2022-11-21

18:17:35'),

(19, 'John Lopez', 'New York', '2022-11-21 18:17:52', '2022-11-21 18:17:52'),

(20, 'Smith Martin', 'Chicago', '2022-11-21 18:18:04', '2022-11-21 18:18:04'),

(21, 'Daren Fletcher', 'Washington DC', '2022-11-21 18:18:22', '2022-11-21

18:18:22');--

-- Table structure for table `users`

--

CREATE TABLE `users` (


39
`id` bigint(20) UNSIGNED NOT NULL,

`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,

`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,

`email_verified_at` timestamp NULL DEFAULT NULL,

`password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,

`remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT

NULL,

`created_at` timestamp NULL DEFAULT NULL,

`updated_at` timestamp NULL DEFAULT NULL

) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4

COLLATE=utf8mb4_unicode_ci;

--

-- Indexes for dumped tables

--

-- Indexes for table `customers`

--

ALTER TABLE `customers`

ADD PRIMARY KEY (`id`);

--

40
-- Indexes for table `migrations`

ALTER TABLE `migrations`

ADD PRIMARY KEY (`id`);

--

-- Indexes for table `orders`

--

ALTER TABLE `orders`

ADD PRIMARY KEY (`id`),

ADD KEY `orders_stock_id_foreign` (`stock_id`),

ADD KEY `orders_customer_id_foreign` (`customer_id`);

--

-- Indexes for table `personal_access_tokens`

--

ALTER TABLE `personal_access_tokens`

ADD PRIMARY KEY (`id`),

ADD UNIQUE KEY `personal_access_tokens_token_unique` (`token`),

ADD KEY `personal_access_tokens_tokenable_type_tokenable_id_index`

(`tokenable_type`,`tokenable_id`);--

-- Indexes for table `stocks`

41
--ALTER TABLE `stocks`

ADD PRIMARY KEY (`id`),

ADD KEY `stocks_supplier_id_foreign` (`supplier_id`);

--

-- Indexes for table `suppliers`

--

ALTER TABLE `suppliers`

ADD PRIMARY KEY (`id`);

--

-- Indexes for table `users`

--

ALTER TABLE `users`

ADD PRIMARY KEY (`id`),

ADD UNIQUE KEY `users_email_unique` (`email`);

--

-- AUTO_INCREMENT for dumped tables

--

-- AUTO_INCREMENT for table `customers`

--

42
ALTER TABLE `customers`

MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,

AUTO_INCREMENT=32;

--

-- AUTO_INCREMENT for table `migrations`

--

ALTER TABLE `migrations`

MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,

AUTO_INCREMENT=7;

--

-- AUTO_INCREMENT for table `orders`

--

ALTER TABLE `orders`

MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,

AUTO_INCREMENT=12;

--

-- AUTO_INCREMENT for table `personal_access_tokens`

--

ALTER TABLE `personal_access_tokens`

43
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

-- AUTO_INCREMENT for table `stocks`

--

ALTER TABLE `stocks`

MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,

AUTO_INCREMENT=39;

--

-- AUTO_INCREMENT for table `suppliers`

--

ALTER TABLE `suppliers`

MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,

AUTO_INCREMENT=22;

--

-- AUTO_INCREMENT for table `users`

--

ALTER TABLE `users`

MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--

-- Constraints for dumped tables

44
-- Constraints for table `orders`

ALTER TABLE `orders`

ADD CONSTRAINT `orders_customer_id_foreign` FOREIGN KEY

(`customer_id`) REFERENCES `customers` (`id`) ON DELETE CASCADE ON

UPDATE CASCADE,

ADD CONSTRAINT `orders_stock_id_foreign` FOREIGN KEY (`stock_id`)

REFERENCES `stocks` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--

-- Constraints for table `stocks`

--

ALTER TABLE `stocks`

ADD CONSTRAINT `stocks_supplier_id_foreign` FOREIGN KEY (`supplier_id`)

REFERENCES `suppliers` (`id`) ON DELETE CASCADE ON UPDATE

CASCADE;

COMMIT;

/*!40101 SET

CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;

/*!40101 SET

CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;

/*!40101 SET

COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
45
REFERENCES

Babu. (2018). Development of Sales and Inventory Management System Using

PHP. International Journal of Advancements in Research & Technology,

7(4), 89-93. http://www.ijoart.org/papers/Vol7Issue4/Version-

3/E0704030689.pdf

Kashif. (2018). Sales and Inventory Management System using PHP/MySQL.

International Journal of Advanced Research in Computer Science and

Software Engineering, 8(2), 97-102.

https://doi.org/10.26483/ijarcsse.2018.8207

Ravi. (2017). Inventory Management System using PHP and MySQL.

International Journal of Innovative Research in Computer Science &

Technology, 5(4), 87-93. https://doi.org/10.17148/IJIRCCT.2017.5412

Shekhar, S. (2019). A Study on Sales and Inventory Management System.

International Journal of Computer Science and Mobile Computing, 8(3),

194-199. https://doi.org/10.5121/ijcsmc.2019.8319

Zheng, J. G. (2017). Data visualization in business intelligence. In Global

business intelligence (pp. 67-81). Routledge.

Songa, I. W. (2017). INVENTORY CONTROL AS A STRATEGY FOR

EFFECTIVE PERFORMANCE OF AN ORGANIZATION: A CASE OF

NAKUMATT SUPERMARKET IN KENYA (Doctoral dissertation, MUA).

46

You might also like