Download as pdf or txt
Download as pdf or txt
You are on page 1of 201

Point of Sales and Inventory System

for DA28 Enterprises Hardware

In partial fulfillment of the requirements in

IS311/L – System Analysis and Design

Submitted by:

Men in Gray

Cirunay, John Edgie Q.

Guiraldo, Kenneth John C.

Macapala, Lawrence John G.

Submitted to:

Professor Oneil Victoriano

October 2019
Table of Contents

Acknowledgement ------------------------------------------------------------------------ 4
CHAPTER 1 - The Company ----------------------------------------------------------- 5
Company Profile ---------------------------------------------------------------------------- 5
History ------------------------------------------------------------------------------------ 5
VMGO ------------------------------------------------------------------------------------ 5
Organization Chart -------------------------------------------------------------------- 6
Business Environment --------------------------------------------------------------- 6
Description of the Existing System ------------------------------------------------ 7
Data Flow Diagram ------------------------------------------------------------------------- 10
Context Flow Diagram ---------------------------------------------------------------- 10
Level Zero DFD ------------------------------------------------------------------------ 11
Lower Level Diagrams --------------------------------------------------------------- 12
Document Analysis ------------------------------------------------------------------------- 15
Definition of Terms ------------------------------------------------------------------------- 19

Chapter 2 – The Proposal--------------------------------------------------------------- 20


Statement of the Problem ---------------------------------------------------------------- 20
System Objectives -------------------------------------------------------------------------- 24
Feasibility Study ----------------------------------------------------------------------------- 27
Technical --------------------------------------------------------------------------------- 27
Economic -------------------------------------------------------------------------------- 27
Operational ------------------------------------------------------------------------------ 32
Schedule (Gantt Chart) -------------------------------------------------------------- 33
Scope and Limitation ---------------------------------------------------------------------- 34

CHAPTER 3 – The Solution------------------------------------------------------------- 35


Functional Requirements ----------------------------------------------------------------- 35
Entity Relationship Diagram(ERD) ----------------------------------------------------- 38
Use Case Diagram ------------------------------------------------------------------------- 39
Data Dictionary ------------------------------------------------------------------------------ 42
Network Design / Architecture Design ------------------------------------------------ 77
Menu Tree / Hierarchy --------------------------------------------------------------------- 78

2
Prototypes ------------------------------------------------------------------------------------ 79

CHAPTER 4 – The Implementation-------------------------------------------------- 93


User Acceptance Testing ----------------------------------------------------------------- 93
Deployment Plan ---------------------------------------------------------------------------- 94
Installation of hardware and software ------------------------------------------------- 94
User Training -------------------------------------------------------------------------------- 95
User’s Manual ------------------------------------------------------------------------------- 96

CHAPTER 5 – The Source Code------------------------------------------------------ 125

APPENDICES-------------------------------------------------------------------------------- 183
Letters for the company ------------------------------------------------------------------ 183
Letter for IT consultant ------------------------------------------------------------------- 185
Company Forms --------------------------------------------------------------------------- 186
Questionnaire for survey ----------------------------------------------------------------- 188
Functional Testing Rubrics -------------------------------------------------------------- 189
Client Progress Report Rubrics --------------------------------------------------------- 191
Consultant Progress Report Rubrics -------------------------------------------------- 192
User Acceptance Certification ---------------------------------------------------------- 197
Deployment Certification ----------------------------------------------------------------- 198
Curriculum Vitae of proponents -------------------------------------------------------- 199

3
Acknowledgement

The researchers would like to convey their deepest gratitude to the people who
never failed to show their love, support and guidance throughout the completion of the
system. The researchers would also like to express their deepest thanks and
appreciation to the following person:

To our Adviser, Professor. Oneil B. Victoriano for guiding and helping us on


what are the right things to do on our system.

To our Consultant, Professor Somercet Elcid Siang who guided and supported
us throughout the completion of the system.

To our company, DA28 Enterprises for allowing us to conduct a research in


their company. And to their owner and staffs for the warm support and cooperation
during the gathering of data.

To our panelist who shared their thoughts and opininons to further improve our
research.

To all our classmates, friends, family and other people who consistently gave
their full support throught the ups and downs of the completion of the research.

And most of all, to our Lord Jesus Christ, who was our source of strength,
patience and understanding against one another. And for making all of this things
possible.

We really appreciate all your help and efforts and we are very thankful for that.

We thank you for everything.

4
Chapter 1

THE COMPANY

Company Profile

History

DA28 Enterprises is a Hardware located at Amakan, Buhangin Davao City


which is operated by Mr. Domingo Fabro and Mrs. Juditha Caubang. Mrs. Judith
Caubang graduated BS Marketing in Rizal Memorial College. The letter D in DA28
stands for Domingo and A stands for Alex which was one of the co-owner of the
company and the number 28 was one of the owner’s birthdays. DA28’s previous owner
was Engineer. Joel Mola and the company’s first name was Venlexgab Enterprises.
In 2015 the married couple later took over after its bankruptcy. Mrs. Juditha Caubang
also owns a Marketing business called DA28 Marketing and another Hardware located
at Tibungco called Verakah Hardware. Mrs. Juditha Caubang works for Green Leaves
Enterprises which happens to be their major supplier. DA28 Enterprises will be
celebrating their 5th anniversary on August 8, 2019.

Vision and Mission / Goals and Objectives

Vision

To become a leader in providing high class items and to be recognized as one


of the best enterprises for hardware materials.

Mission

Striving to become an exceptional enterprise for hardware tools and equipment.


We also want to provide high class items to our customers. A leader in providing
excellent and exceptional service to our customers.

Goals and Objectives

DA28 Enterprises is dedicated in providing the best quality of hardware


materials to our customers.

To ensure customer satisfaction with our top of the line products.

To become one of the best and most trusted enterprise for hardware materials. To
provide more opportunities, professional growth and development for our employees.
5
Organizational Chart

Figure 1 – Organizational Chart

Business Environment

DA28 Enterprises offers a lot of different kinds of hardware materials such as


bulbs, bolts, hose, padlocks, shovel and other hardware tools that are so affordable
and high quality. The company also manufactures hollow-blocks.

The company is the only major hardware in their area that’s why the hardware
that can only be considered as their competitor is The DAfort Hardware. The company
has been operating for more than half a decade that’s one of the main reasons why
the company has acquired a lot of customers and regular clients. DA28 Enterprises
caters 50-100 walk-in clients daily. The company also considered as one of the major
supplier from different hardware in Cabantian and Indangan area.
As the only major hardware in their area DA28 Enterprises have gained popularity
with its good quality products and good services. These are DA28’s major suppliers:
Green Leaves Enterprises (Main Supplier), MZ Trading, VSMC and HCQ.

6
Description of the existing system

Sales Transaction

First the customer will ask the personnel in-charge if the item he/she will buy is
available. Then the personnel in-charge will search for the said item and if it’s available
the sales person will be going to ask back the customer if how many he/she would like
to buy and if the product has different available brands, the sales person would also
offer or ask the customer if what brand he/she would like to buy. The customer would
now tell the sales person how many, what item and brand it will buy. Then the sales
person would write the customer’s order that contains the unit price, quantity, item
description and amount that the customer order in the Cash Invoice, after that the
sales person would give the Cash Invoice to the cashier, then the cashier would mark
the Cash Invoice paid before giving it to the customer.

There are also cases where they have customer that’s in a rush and doesn’t
have time to wait. The sales person will just let the customer pay and take the product
and leave. And then the sales person will just write the orders of the customer in the
Cash Invoice and give it to the cashier.

DA28 Enterprises generates daily sales report from Monday-Saturday except


Sunday because the personnel in-charge is not available and sometimes they are also
closed that day.

A customer buys a product and after a few hours the customer noticed that the
item is damaged, then the customer decides to go back to the hardware to return the
item where the customer bought it from. But the thing is the company does not allow
customer return or refunds after buying the item. Because if a customer buys a
product, the personnel in charge will test first the item in their store if it’s really working
before giving it to the customer. But if the customer returns to the hardware and
complains that the item he/she bought was damaged or not working anymore and ask
for a refund or to change the item. The one and only thing that the hardware would
always do is they won’t give the customer a refund and they won’t also replace the
said item that was damaged. Because they made sure that the item they sold to the
customer doesn’t have any damage.

7
They tested it first before handing it to the customer. That’s why they won’t replace or
refund the item.

Inventory System

Their inventory process a couple of years ago was this; they check and count
their items manually, they check how many stocks they have and how many items left
in their inventory. But now The Company currently doesn’t have an inventory, they also
base their inventory on their sales. The employee checks their inventory daily and if
the employee notices that there are items that are not available anymore the employee
immediately informs the assistant and then the employee writes down the items that
they don’t have and then orders it from their suppliers. They have a small place at the
back on where they store their items. They also don’t have product codes or numbers
in their items. The hardware also has items that are repacked by pieces; dozen and
some items are just in boxes or part of a whole.

The employee checks the stocks in their inventory where they put all the stocks
of their items. If the employee finds out that there are items that are not available
anymore in their stocks the employee lists down all those items that they want to order
in their supplier and then calls the supplier to order those items that they need, when
the supplier arrives in the hardware with all the items that the hardware ordered. The
hardware issues a delivery receipt containing all the items that the hardware ordered.
The hardware always checks immediately the items that the supplier delivered before
they go and if they find items that’s already damaged they immediately inform the
supplier and instead of changing the damaged item. The supplier will just deduct their
total payment from those damaged items.

The employees double checks every item that the supplier has delivered to
them. Then if they find an item that’s already damaged then they will put it somewhere
in their store where all the damaged items are stored, the same process if the customer
buys a product and then noticed immediately that the item is already damaged the
sales person will instantly replace the item and bring the damaged item in where all
other damaged items are stored. The company also puts note “return upon delivery”
to the items that’s already damaged and then the supplier will automatically deduct
those damaged item to their payment.

8
The company counts the items that they ordered from their supplier based on
their delivery receipt and also in their place on where they store all their items aside
from their display area.

The company’s stock-out is only for their cements. After counting the total
cements during the delivery, they will base their stock-out on their sales. But based on
what we noticed they declare stock-out if their employee checks their inventory and
notices that there are items that are not available anymore and then lists those items
down.

Hollow Blocks Production

The Hollow blocks production. The hardware orders materials like sands and
cements for their hollow blocks that are delivered to them by a 10 wheeler truck.
They usually order 20 bags of sands or cements. One bag of sand or cement can
produce 120 hollow blocks. They add 1 drum of molasses to harden their hollow
blocks. They sell their hollow blocks for 4 pesos each. The staff records how many
hollow blocks they produce, how many hollow blocks sold and how many hollow
blocks left daily.

9
Data Flow Diagram

Figure 2 – Context Flow Diagram

10
Figure 3 – Level 0 Data Flow Diagram

11
Figure 4 – Lower Level Diagram (Sales Transaction)

12
Figure 5 – Lower Level Diagram (Inventory System)

13
Figure 6 – Lower Level Diagram (Hollow Blocks Production)

14
Document Analysis

Figure 7 – Cash Invoice

The company issues a cash invoice whenever a sales transaction is completed.


After the customer pays for its order the company will issue a cash invoice and another
copy for them to record it later on their daily sales report. A cash invoice contains the
customer’s name, date, quantity of the product, unit, description, unit price, amount
and the total amount of how much the customer will pay.

With the company’s current manual system. Using a cash invoice with a hand
written data and information about the transaction may cause a delay in generating
the daily sales, because it may encounter a lot of erasures and messy handwritings
that leads to confusion of what the exact data to write in generating the daily sales.

15
Figure 8 – Delivery Receipt

The supplier issues a delivery receipt or a cash invoice of their own whenever
a certain company makes a purchase order. A delivery receipt contains the items the
company ordered, date, quantity and the total amount they’re going to pay. This will
also serve as an evidence that the items delivered matched with their order and paid
their purchase.

This type of document could be written imprecisely and misread that can lead
to confusion with the list of items you ordered to the supplier because this uncertainty
caused by the unsureness of what exactly are written on the delivery receipt, by the
time the company will stock in the items they will experience a lot of confusion by
misreading what was written in the document and could to poor monitoring of items in
the inventory.

16
Figure 9 – Purchase Order

This is a purchase order in an excel file. A purchase order contains the item
description and quantity of the items they want to order to their supplier. They list down
the items they want to order from the excel file. The purchase order is a written or
electronic document meant to record business transactions between a buyer and a
seller. The buyer issues the purchase order, and once the seller accepts the order, a
legally binding contract forms between the two parties. Purchase orders are commonly
used whenever a buyer wants to purchase supplies or inventory on account and
needed to fulfill orders and process payments. In other words, a purchase order is
created before an invoice is sent since it defines the contract of the sale. Also keep in
mind that having a properly managed purchase order system will quickly share
information like what’s been ordered, shipped and received but not invoiced.
17
Figure 10 – Item list

This figure is the item list it shows the list of items of the company and its
price. This is where the staff looks for the item’s price if the staff forgets the actual
price of the items.

This document is more likely to be crumpled, ripped and get wet that leads to
slow process in the sales transaction, for example a customer wants to buy an item
and when they look for the item’s price in their item list and let’s say that the item list
is crumpled or got wet. The sales associate would have to take a lot of time trying to
find or guess the exact price of the item and make the customer wait making their
sales transaction slow.

18
Definition of Terms

Cash Invoice – also known as the official receipt. Issues after the customer pays for
its products that it ordered.

Sales Report – a summary report that contains all the sales transaction within the
day.

Purchase Order – a term that means a shopping or order list and the company wants
to order items to their supplier.

Delivery Receipt – a document issued by the company’s suppliers that contains the
items they ordered and the total payment for what they ordered.

Stock in - a term that means stocks or additional items have been added to the
inventory.

Stock out – a term that means depletion of stocks.

Inventory – it is where the company stores their item supplies.

Stocks – the current amount of stocks left in the inventory.

Accounts Payable – payments owed by the company to its supplier.

Logbook – it’s where the company records data from most of their transactions.

19
Chapter 2

THE PROPOSAL

Statement of the Problem

As the researchers conducts interview and gathered data from the DA28
Enterprises Hardware about their current business process, they identify the
following problems:

Slow process in the sales transaction

The company caters 50-100 customers daily. The company currently has 2
sales associates in their store, the assistant and staff that entertains and gets the
customer’s order and 1 assigned to do the cashiering process. Since the company
caters 50-100 customers in a day, there are instances that multiple customers buys a
lot of items simultaneously. What makes their sales transaction slow is that, aside from
having only 2 sales associates that will get the customer’s order, their current way of
getting the customer’s order is also very tiresome making their sales transaction
process slow. For an instance, a number of customer’s will come to the hardware at
the same time. The assistant will ask all the customer’s order one by one causing a
delay in entertaining the customers. After that, the staff will look in the display or in
their inventory for the availability of each items from different customers. So that
means each of those customers would have to wait for the confirmation of the
availability of the items they want to buy. When the inquiry is done and confirms the
availability of the items and the customers decides what items they will buy. The
assistant and staff will now write all the quantity, unit, articles, unit price, amount and
total of the items that each of their customer’s order. Since there are only 2 of them
each customer would have to wait for their orders to be written and the total payment
they’re going to pay for the items they order. What makes this even slower is that after
writing it all down in the cash invoice, the staff will now give it to the cashier and mark
the cash invoice paid one by one and calculate their change with their total payment
before giving it to the customer.

20
Slow process or delay in the sales transaction’s consequences are possible
loss of customers because there are some customers that’s in a hurry and there are
also customers that doesn’t want to wait long and also possible loss profit because
having a slow process in the sales transaction means if the customer gets bored of
waiting for its turn to be entertain by the sales associate it will leave and look for
another hardware losing a customer means you loss a profit.

Tedious process in computing daily sales

DA28 Enterprises is one of the most known hardware in their area. DA28
accommodates approximately 100-200 customers daily. Every end of the day after
they close their shop at 5pm. The cashier stays in the shop to compute their daily
sales. The cashier checks first every receipt they gathered during end of the day
transaction. After the cashier checks every receipt one by one, the cashier will record
the details of every receipt to their logbook. For the cashier to ensure that it is accurate,
the cashier will compare the details of every receipt it records in their logbook from the
receipt where the cashier copied it from. What makes this very difficult for the cashier
is that the cashier will write down every sold item’s details from its cash invoice one by
one during end of the day transaction. The cashier might skip or forget to write down
the receipt’s details in their logbook. There are also instances that the cashier
mistakenly records the wrong details from the receipt even though the cashier double
checks it when writing the details. If the cashier notices that the receipt details in the
written records of its details in their logbook does not match, the cashier will repeat the
entire process just to make sure that written records in their logbook matches the
details from the receipt.

Since the cashier is the only one who makes the generation of their daily sales
report, it takes 3-4 hours for the cashier to complete the process and generate their
daily sales, the cashier takes a lot of time in completing the calculation of their daily
sales that means the working hours of the cashier will be extended causing the
company money for an overtime pay for extended hours. Making the generation of
their sales report very tedious.

21
Poor monitoring of inventory items

DA28 Enterprises has a poor inventory check-up. They don’t do a weekly


or monthly inventory monitoring with their items. One of the ways that they will know
their inventory status of their items is that if a customer asks for an item and the
employee search it in their inventory, and if that item is not available or its stocks are
low, that’s the time they’ll know the status of the stocks of their inventory and writes
down the depleted items. Another way of knowing the stocks of their inventory is by
their sales report. After end of the day transaction the cashier produce a sales report
and if they notice that certain items have a lot of sales, they will list down and consider
that those item’s stocks are running low because it was bought a lot of times.

What makes poor monitoring of inventory items a problem in their business is


that it will cause overstocking and empty stocks. For an instance, since they don’t have
a proper monitoring of inventory items that means they will not know what are the
items that are out of stocks. So basically if a customer will ask for a certain item and
since they don’t have a proper monitoring of their inventory and if the staff checks the
item in the inventory and is not available they will loss that customer since the item it
wants to buy is not available anymore because of the poor monitoring of their
inventory. Another problem of not having a proper inventory monitoring is the
overstock, if the company keeps on purchasing order to their supplier without knowing
that those items that they purchase to their supplier is still available and plenty because
of poor inventory monitoring it will result to overstocking and overloading that leads to
storage problem in their inventory.

22
Unreliable and Delay generation of inventory report

One of the main reason why the generation of the inventory report in the
company is tiresome and causes delay whenever the owner of the company is asking
for it, is their process. The company doesn’t really have a timely or scheduled
monitoring of their inventory that’s why they don’t always produce daily or weekly
inventory report. What makes the generation of inventory report very tiresome is if the
staff starts to count and writes down the physical counts of all the items in the inventory
the staff often commits erasures and duplications when writing down the physical
count of all the items.

Since the company doesn’t always do a proper inventory monitoring there are
instances that when a customer asks for a certain item they sometimes use and check
the last inventory report to check there if the item is still available and when the staff
sees that the item is still available in the inventory report, the staff will immediately get
the item and again since they don’t do a proper inventory check-up after minutes of
searching for that item in the inventory. The staff finds out that the item is already out
of stock although it’s still written in the last inventory report that the item is still
available. This causes confusion in their inventory report of what are the items that are
still available and out of stock since they don’t do a timely or schedule inventory
monitoring and they don’t often produce an inventory report. This could lead to a lot of
confusions from what items to purchase to their supplier since their inventory report is
unreliable due to not having a proper inventory monitoring and producing daily/weekly
inventory report.

Difficulty in collating data due to unorganized storage records

The researcher noticed during their visit in the company that collecting or
gathering their data was very hard for them since all their data are just written in their
logbooks or in a piece of paper and not properly organize. For example, when
purchasing items to the supplier. let’s say the company ordered 10 different items with
the same quantity. And let’s say that 3 of those items has only half of the quantity from
the actual quantity that the company wants to purchase to the supplier. And since the
supplier only has half available quantity of those items the supplier would inform the
company and they would still deliver those items although 3 of those items lacks the
right quantity that the company wanted, and when the supplier delivers all the items to

23
the company and since 3 of those items lacks the exact quantity. The company would
either cancel the remaining quantity of the items that weren’t delivered to them or wait
until the supplier have enough stocks for those items. So let us say that the company
chooses to wait for the remaining quantity if the items that the supplier lacks, so what
the supplier will do is they will give the delivery receipt to the company that contains
the items that are not delivered completely. Then let’s say the supplier took a few
weeks before gaining enough stocks for those items that they partially delivered. And
let’s say the staff forgot where he/she left it and since the company’s storage is
unorganized and the delivery receipt that they’re looking for was few of weeks ago
they will have a hard time and difficulty in finding it to present to the supplier as an
evidence that the supplier still owes them some items that they lack from the last
delivery. Since the company has a lot of invoices, records that are unorganized it would
be really difficult for the staff to find that delivery receipt making the retrieval of records
difficult and time consuming.

System Objectives

The proposed system’s objectives are to help and provide solution to the
company’s problems by making their manual system an automated Point of sales and
Inventory system.

To provide a system that will make the sales transaction faster

The proposed system will help the company in finding the customer’s order
faster and will also be able to entertain and get the order of multiple customers at the
same time in a faster way and eliminates the waiting time of multiple customers in
completing their transactions.

The proposed system also eliminates the papers because they will no longer
write the details in paper. It will also provide accurate and faster calculations in their
sales transaction.

24
Fast and accurate generation of daily sales report

The company’s current system that they’re using which is a Manual system is
very hard and takes a lot of time to make a daily sales report. The proposed system
will help the company to make their work accurately, easy and effortless. It will only
take one click of the sales report button and the system will automatically calculate
and generate a sales report which will prevent inaccurate calculations.

The good thing about this system is that it will save the company’s cashier and
staff from the burden of manually counting and recording each daily transactions. They
won’t worry anymore about having an inconsistent sales report calculation result.

To easily track and monitor the inventory

The proposed system will provide an option to allow the user to update stocks
and record the date whenever the tries to modify or update the stocks by just clicking
the mouse. The proposed system features also provides real-time monitoring of their
item’s stocks in the inventory.

Inaccurate monitoring and counting their stocks will lessen because the system
will automatically calculate the remaining stocks based on every transaction that’s
going to happen. Providing the company, the exact remaining stocks of their inventory.
The proposed system will also eliminate empty stocks and storage problems cause by
overstocking of inventory.

Reliable and fast generation of inventory report

The proposed system will help the company with their problem of having an
unreliable and slow generation of their inventory report. The user can now easily print
an inventory report without any hassle since it will eliminate the manual process of
counting the items in the inventory to produce an inventory report. The system
automatically records every sold items, remaining quantity of every items and what
items that are out of stock and needs to be reorder to the supplier.

25
To provide a faster way of collating storage records

The proposed system aims to provide an easier way of collating the records of
their storage. because one of the system features are viewing of data in an easy and
efficient way with less hassle for the user.

To secure and backup data records

The problem of a company that still uses a Manual system is that since records
of the company’s daily transaction is just handwritten changing and erasing it would
be very easy for other employees that are not authorized to touch it for their own
consumption. Since the company’s logbook is just place in the cashier’s desk. Anyone
can easily access it whenever the cashier takes a break to eat. It’s also not safe from
accidents specially if someone accidentally spills water in their logbook. those written
data won’t be readable anymore. That means that these cases put their data integrity
at risk. The proposed system will help the company to secure their transaction records
because the system will require a log-in before you can get inside. There are also two
types of user, the admin and the staff. The admin type of user has full access of the
system and the admin is the only one who can create, add and edit the staff user’s
information. While the staff has limited access of the system. The proposed system
well help fix the problem of data integrity and security. Because if someone tries to
change something from the records the system will be able to trace of who made the
changes because it will record the User ID, Name and time every time someone tries
to make changes.

26
Feasibility Study

Technical

DA28 Enterprises is technically feasible in implementing the proposed system


since they already have a Computer set and a laptop that contains the product’s unit
price, description, invoice number, quantity and sold items, that is stored in Microsoft
Excel. The owner and her daughter including her niece are educated enough to use a
Computerized System. The researchers will also provide a User’s Manual so that they
won’t be able to feel any difficulty in testing the system.

Economic

The proposed system aims to save more time in doing their manual processes
and reduce the company’s resource cost. It can generate faster sales and inventory
reports, easy and efficient monitoring in their inventory and makes their sales
transaction faster.

Since the company already have a computer. Therefore, the additional


expenses in buying the necessary materials and devices in automating their system
will no longer be necessary, the proposed software is easy to install and does not
require an internet connection to operate, making the proposed system economically
feasible.

Payback period is the length of time that it takes for the cumulative gains from
an investment to equal the cumulative cost. As you can see in the graph (See Figure
11 and 12) The Payback and Return on Investment as well as the Net Present Value
of the company are so good each year. It illustrates that the payback analysis graph
gets higher every year.

27
Cost Benefit

Cost Benefit
a. Provide accurate data and computation

b. Maintain accuracy and data integrity


A. Software Installation Cost
c. Efficient processing of transactions

d. High Level file security

a. Fast and reliable transactions on sales

b. More secured files and records

c. Easy sorting of records

d. Prevents data redundancy

B. System Installation e. Accuracy and consistency on


processing of the transactions
f. Fast and reliable tracking of stocks and
products status
g. Easy retrieval and storing of data
h. Fast and accurate reports

a. Improves the quality of services

C. Employees/User’s Training
b. Familiarization and understanding on
the functionalities of the system

Development Cost

Personnel Cost

Position Estimated Salary for 5 Months


Project Manager ₱30,000.00
Systems Analyst ₱28,000.00
Programmer ₱20,000.00
Total ₱78,000.00

28
Software Requirements

Software Requirements Cost


Operating System - Windows 10 64-bit Available
Microsoft Visual Studio 2015 Pro ₱5,000.00
XAMPP Open Source

Total ₱5,000.00

Hardware Requirements

Hardware Requirements Cost

Processor Intel Core i3-7100 ₱10,000.00

Memory 4 GB RAM ₱3,000.00

Hard Disk Drive 500 GB ₱15,000.00

Video Card 1GB built-in ₱1,000.00

Keyboard ₱500.00

Input Devices

Mouse ₱500.00

Monitor Acer Monitor ₱5,000.00

Printer Epson Printer ₱10,000.00

Total ₱45,000.00

29
Summary of Cost

Cost Price

Personnel Cost ₱78,000.00

Software Installation Cost ₱5,000.00

Hardware Installation Cost ₱45,000.00

Total Cost ₱178,000.00

Total Development
Costs: ₱128,000.00

Increased efficiency in sales department ₱1,000.00

Increased earnings due to automated Point of sales and inventory ₱1,000.00


system

Savings on Inventory and supplies ₱1,000.00

Total ₱3,000.00

Projected annual tangible benefits

Employee Overtime Fee (Payroll System) (14/hr * 9 hrs * 24 bi- ₱3,024.00


months)

Increased Profit due to Reduced late payments ₱3,000.00


(Estimated loss due to delinquent clients per month)
( 1% * 25,000 per month * 12 months)

Employee Overtime Fee (Billing System) (10/hr * 9 hrs * 12 months) ₱1,080.00

(Payroll System) ₱1,896.00


Reduced Penalty Payments (Tax, GSIS, SSS, Loan Premiums) @
158 * 12 months

Total ₱9,000.00

Total projected annual benefits ₱12,000.00

30
Figure 11 – Payback and Return on Investment

Figure 12 – Net Present Value

31
Operational

The proposed system is operationally feasible because the company supports the
proposed system and they are also very helpful in gathering and giving us the data
that we need. The company also considers upgrading their manual system into a
computerized and automated system. The system is user friendly and there’s no need
for the company to train their staffs since most of them are computer literate and
knowledgeable enough to use it. But some of the staffs are willing to be train on how
to use the system. The researchers will also provide a user manual with simple
instructions for the company’s staff so that they will know exactly the functions and
how to use it properly. The researcher’s top priority is to provide a system that will
automate their transactions and a faster, better processing that eliminates extended
working hours, slow transaction process and tedious process of generating daily sales,
poor monitoring of inventories.

32
Figure 13 - Gantt Chart

33
Scope and Limitation

Scope

The purpose of the proposed system is to provide and fix the company’s
problems with their manual system by automating it. The proposed system also
focuses in the company’s sales and inventory system. The proposed system will be
able to view the availability and price of the items, checks for the remaining items in
their inventory. Add and change quantity of items, Total amount to be paid The user
can also generate easily their daily sales report after saving the transaction. The
system can add and update the numbers of items received from the supplier. The
system will be able to deduct stocks from every sold items. It will help the company in
solving their problems specially with their major transactions such as, sales, inventory
and generating sales report. And also make their job easier and less hassle.

The company can also benefit with the system’s security features since the
system requires the user to log-in first before it can get inside. The system will also
have two types of user, the admin which has full access in everything in the system
and the staff which has limited access.

By automating the company’s manual system, it can help them fix and lessen
inconsistent and inaccurate results, calculations in their transactions.

Limitations

Credit Card Payment. The system won’t be able to accept credit card payment
and it can’t also produce purchase order in their supplier.

Payroll System. The system doesn’t have the luxury of providing a payroll
system for the company’s employees.

Stand Alone. The proposed system might have 2 different types of user but
the system won’t be able to operate with multiple computers at the same time and can
only be use by a single person at a time.

Network Based System. The system cannot perform network database that
syncs data in multiple computers at a time.
Web Based System. The system doesn’t have online accessibility, that means
it can’t work over the web.
34
Chapter 3

THE SOLUTION

Functional Requirements

Login Module

 A user must login first before it can use the features of the system
 There will be two types of user, the admin and the staff.
 Certain features of the system will not be available depending on the
type of user that will login.

Dashboard Module

 The dashboard module serves as the welcome panel or the first thing
that will show up after logging-in.
 It contains certain buttons that will lead you to different transactions
once clicking it.
 The dashboard basically contains all the modules of the system.

Sales Transaction Module

 The user can search the availability of the items by name, category and
brand.
 The user can add items to cart
 The user can select a customer if it’s a walk-in or regular customer.
 The user can update quantity of the items in the cart
 The user can remove an item to the cart
 The user can Cancel the order
 The user can click the pay button to finish the transaction and generate
a cash invoice.
 There are two types of user that can access the POS, the admin and
the staff.
 The POS is one of the features of the system that the staff has access.
 The user can choose and add items and check the remaining stocks of
that item.

35
Inventory Module

 The inventory displays all the items with its price and quantity.
 The staff can view the remaining quantity of the item.
 The admin can add and update items in the inventory.
 The system can print inventory report.
 The user can stock out items in the inventory.
 The user can view the stocked out items in the stock out tab in the
inventory.
 The user can view the depleted or out of stock items in the inventory.
 The user can add to cart the reorder items to the purchase order.
 The user can add new reorder item for the purchase order.

Supplier Module

 Only the admin can add and update the supplier details.
 The staff has no access to the supplier module

Reports

 The admin can easily print the reports


 The user can generate daily, weekly and monthly sales report
 The user can also generate daily, weekly and monthly inventory report
 The user can generate hollow blocks production report
 The user can generate supplier return report.

Purchase Order Module

 It allows the admin to create purchase order based on the depleted


stocks.
 The user can declare that an item is damaged while checking it during
the delivery so they can return it to the supplier.
 The user has an option to wait or cancel the remaining quantity of the
item they ordered that they didn’t receive to their supplier.
 The system automatically records the delivery history after receiving
the purchase ordered items.

36
Users Module

 The admin is the only one who can access the user’s module.
 The Admin can also add and update new user.
 It also enables the admin to change all the user’s information.

Backup and Restore Module

 The user can back up all the data by exporting the sql file.
 The user can restore data by importing the exported sql file.

Stock in

 The user can stock-in the items after receiving it to their supplier.
 After stocking in, the items in the inventory automatically updates the
item’s quantity.

Stock out

 The user can stock out an item if that item is no longer supplied by their
supplier.
 The user can also stock out an item with its quantity for their own use.
 After stocking out an item the quantity in the inventory will automatically
deducted.

Hollow Blocks Module

 The user can produce hollow blocks quantity per day.


 The user can update the price of the hollow blocks
 The system automatically records the user who created hollow blocks
quantity per day
 The system records how many hollow blocks were created, sold and
how many hollow blocks are left.

37
Entity Relationship Diagram

Figure 14 – Entity Relationship Diagram (ERD)


38
Use Case Diagram

Figure 15 – Sales Use Case Diagram

Figure 16 – Inventory Use Case Diagram

39
Figure 17 - Reports Use Case Diagram

Figure 18 – Accounts Use Case Diagram

40
Figure 19 – Purchase Order Use Case Diagram

Figure 20 – Hollow Blocks Use Case Diagram

41
Data Dictionary
Table Name: tbl_user Primary Key: user_id

Database Name: dbsad Foreign Key(s): acc_type_id, Gender_id

Data Field Unit of Maintenance


Name Coding Data Integrity Rules Formula Referential Integrity Ownership
Type Size Measure Controls

A number cannot be A user_id in a


duplicated, cannot be User_id can’t change Previous tbl_user table must
User_id Int 15 None none used more than once, once it is created and value plus match an user_id in Admin
increments only by is unique 1 the tbl_account_type
one or tbl_gender table

User_fname can still


User_fname Varchar 255 None none none be change once it is none none Admin
created

User_lname can still


User_lname varchar 255 None none none be change once it is none none Admin
created

An acc_type_id in a
Unique ID, numeric Acc_type_id can’t Previous tbl_user table must
Acc_type_id int 10 None none characters only, can't change once it is value plus match an acc_type_id Admin
be duplicated created 1 in tbl_account_type
table

User _contact can still


User_contact int 15 None none none be changed once it is none none Admin
created

42
A gender_id in a
Unique ID, numeric gender_id can’t Previous
tbl_user table must
Gender_id Int 15 none none characters only, can't change once it is value plus Admin
match a gender_id in
be duplicated created and is unique 1
the tbl_gender table

User_email can still


User_email Varchar 255 none none none be change once it is none none Admin
created

username can still be


Username varchar 255 none none none change once it is none none Admin
created

password can still be


Password varchar 255 none none none change once it is none none Admin
created

password can still be


User_status varchar 255 none none none change once it is none none Admin
created

43
Table Name: tbl_account_type

Primary Key: acc_type_id

Foreign Key(s): None

Database Name: dbsad

Data Field Unit of Data Integrity Maintenance


Name Coding Formula Referential Integrity Ownership
Type Size Measure Rules Controls

A number cannot be An acc_type_id in a


Acc_type_id can’t
duplicated, cannot Previous tbl_account_type table
change once it is
Acc_type_id Int 10 none none be used more than value plus must match an Admin
created and is
once, increments 1 acc_type_id in the
unique
only by one tbl_user table

Acc_type can still be


Acc_type varchar 255 none none none change once it is none None Admin
created

44
Table Name: tbl_gender

Primary Key: gender_id

Foreign Key(s): None

Database Name: dbsad

Data Field Unit of Data Integrity Maintenance


Name Coding Formula Referential Integrity Ownership
Type Size Measure Rules Controls

A number cannot be A gender_id in a


gender_id can’t
duplicated, cannot Previous tbl_gender table must
change once it is
Gender_id Int 10 none none be used more than value plus match a gender_id in Admin
created and is
once, increments 1 the tbl_user and
unique
only by one tbl_customer table

Gender_desc can
Gender_desc varchar 255 none none none still be change once none none Admin
it is created

45
Table Name: tbl_unit

Primary Key: unit_id

Foreign Key(s): None

Database Name: dbsad

Data Field Unit of Data Integrity Maintenance


Name Coding Formula Referential Integrity Ownership
Type Size Measure Rules Controls

A number cannot be
A unit_id in a tbl_unit
duplicated, cannot unit_id can’t change Previous
table must match a
unit_id Int 15 none none be used more than once it is created and value plus Admin
unit_id in the tbl_item
once, increments is unique 1
and tbl_po table
only by one

Pieces, Unit_description can


unit_description varchar 255 boxes, none none still be change once none none Admin
kilos it is created

46
Table Name: tbl_brand

Primary Key: brand_id

Foreign Key(s): None

Database Name: dbsad

Data Field Unit of Data Integrity Maintenance


Name Coding Formula Referential Integrity Ownership
Type Size Measure Rules Controls

A number cannot be
brand_id can’t A unit_id in a tbl_unit
duplicated, cannot Previous
change once it is table must match a
brand_id Int 15 none none be used more than value plus Admin
created and is unit_id in the tbl_item
once, increments 1
unique and tbl_po table
only by one

Brand_name can
Brand_name varchar 255 none none none still be change once none none Admin
it is created

47
Table Name: tbl_category

Primary Key: category_id

Foreign Key(s): None

Database Name: dbsad

Data Field Unit of Data Integrity Maintenance Referential


Name Coding Formula Ownership
Type Size Measure Rules Controls Integrity

A number cannot
A category_id in a
be duplicated,
category_id can’t Previous tbl_category table
cannot be used
cateogry_id Int 15 none none change once it is value plus must match a Admin
more than once,
created and is unique 1 cateogry_id in the
increments only by
tbl_item table
one

Category_description
Category_description varchar 255 none none none can still be change none None Admin
once it is created

48
Table Name: tbl_customer

Primary Key: customer_id

Foreign Key(s): gender_id

Database Name: dbsad

Data Field Unit of Data Integrity Maintenance


Name Coding Formula Referential Integrity Ownership
Type Size Measure Rules Controls

A number cannot be A customer_id in a


customer_id can’t
duplicated, cannot Previous tbl_customer table
change once it is
customer_id Int 15 none none be used more than value plus must match a Admin/Cashier
created and is
once, increments 1 customer_id in the
unique
only by one tbl_gender table

Customer_fname
Customer_fname varchar 255 none none none can still be change none None Admin/Cashier
once it is created

Customer_lname
Customer_lname Varchar 255 none none none can still be change none None Admin/Cashier
once it is created

An gender_id in a
Unique ID, numeric gender_id can’t Previous tbl_customer table
Gender_id int 10 none none characters only, change once it is value plus must match an Admin/Cashier
can't be duplicated created 1 gener_id in tbl_gender
table

customer _contact
Customer_contact Int 15 none none none can still be changed none None Admin/Cashier
once it is created

49
Table Name: tbl_supplier Primary Key: supplier_id

Database Name: dbsad Foreign Key(s): none

Data Field Unit of Data Integrity Maintenance


Name Coding Formula Referential Integrity Ownership
Type Size Measure Rules Controls

A number cannot be
supplier_id can’t A supplier_id in a
duplicated, cannot Previous
change once it is tbl_supplier table must
supplier_id Int 15 none none be used more than value plus Admin
created and is match a supplier_id in
once, increments 1
unique the tbl_item table
only by one

Supplier_name can
Supplier_name varchar 255 none none none still be change once none None Admin
it is created

Supplier_address
Supplier_address Varchar 255 none none none can still be change none none Admin
once it is created

Supplier_contact can
Supplier_contact int 11 none none none still be change once None Admin
it is created

Supplier_email can
Supplier_email Varchar 255 none none none still be changed once none None Admin
it is created

Supplier_status can
Supplier_status varchar 255 none none none still be change once none None Admin
it is created

50
Table Name: tbl_supplier_return

Primary Key: supplier_return_id

Foreign Key(s): po_id, User_id

Database Name: dbsad

Data Field Unit of Data Integrity Maintenance


Name Coding Formula Referential Integrity Ownership
Type Size Measure Rules Controls

A number cannot be
supplier_return_id
duplicated, cannot Previous
can’t change once it
supplier_return_id Int 15 none none be used more than value plus None Admin/Cashier
is created and is
once, increments 1
unique
only by one

A supplier_id in a
supplier_id can’t
Unique ID, numeric Previous tbl_supplier_return
change once it is
supplier_id Int 15 none none characters only, value plus table must match a Admin/Cashier
created and is
can't be duplicated 1 supplier_id in
unique
tbl_supplier table

A po_id in a
Unique ID, numeric po_id can’t change Previous tbl_supplier_return
Po_id Int 15 none none characters only, once it is created value plus table must match a Admin/Cashier
can't be duplicated and is unique 1 po_id in the tbl_po
table

Damage_price can’t
Damage_price Decimal 11,2 peso none none change once it is none None Admin/Cashier
created

51
Damage_qty can’t
Damage_qty Int 15 none none none change once it is none None Admin/Cashier
created

A user_id in a
Unique ID, numeric user_id can’t change Previous tbl_supplier_return
User_id Int 15 none none characters only, once it is created value plus table must match a Admin/Cashier
can't be duplicated and is unique 1 user_id in the tbl_user
table

Sum of all
Total_damage can’t
quantity
Total_damage Double 11,2 none None none change once it is None Admin/Cashier
of damage
created
items

Date_recieved can’t Current


Month,
Date_recieved varchar 100 none none change once it is system None Admin/Cashier
day, year
created date

52
Table Name: tbl_item

Primary Key: item_id

Foreign Key(s): supplier_id

brand_id

unit_id

category_id

Database Name: dbsad

Data Field Unit of Data Integrity Maintenance


Name Coding Formula Referential Integrity Ownership
Type Size Measure Rules Controls

A number cannot be
An item_id in a
duplicated, cannot item_id can’t change Previous
tbl_item table must
item_id Int 15 none none be used more than once it is created value plus Admin
match an item_id in
once, increments and is unique 1
tbl_po table
only by one

supplier_id can’t A supplier_id in a


Unique ID, numeric Previous
change once it is tbl_item table must
supplier_id Int 15 none none characters only, can't value plus Admin
created and is match an supplier_id
be duplicated 1
unique in tbl_supplier table

brand_id can’t A brand_id in a


Unique ID, numeric Previous
change once it is tbl_item table must
brand_id Int 15 none none characters only, can't value plus Admin
created and is match a brand_id in
be duplicated 1
unique the tbl_brand table

A unit_id in a tbl_item
Unique ID, numeric unit_id can’t change Previous
table must match a
int 15 none none characters only, can't once it is created value plus Admin
Unit_id unit_id in the tbl_unit
be duplicated and is unique 1
table

53
Item_name can still
Item_name varchar 255 none none None be changed once it is none None Admin
created

Item_qty. can’t
Item_qty Int 15 none none None change once it is none None Admin
created

Item_price can still


Item_price Double 11,2 none None None be changed once it is None None Admin
created

If quantity
is less
Reorder_point can
than to the
Reorder_point int 15 none none None still be changed once None Admin
set reorder
it is created
point
number

Month,
Date_added can’t Current
Date_added varchar 100 Day, none None change once it is system None admin
created date
year

A category_id in a
Unique ID, numeric unit_id can’t change Previous
tbl_item table must
Category_id int 15 none none characters only, can't once it is created value plus admin
match a category_id in
be duplicated and is unique 1
the tbl_category table

54
Table Name: tbl_customer_order Primary Key: c_order_id

Database Name: dbsad Foreign Key(s): c_o_details_id, user_id


Data Field Unit of Data Integrity Maintenance
Name Coding Formula Referential Integrity Ownership
Type Size Measure Rules Controls

A number
An c_order_id in a
cannot be
C_order_id can’t tbl_customer_order table
duplicated, Previous
change once it is must match an c_order_id
C_order_id Int 15 None none cannot be used value Admin/Cashier
created and is in
more than once, plus 1
unique tbl_customer_order_details
increments only
table
by one

A C_o_details_id in a
Unique ID,
C_o_details_id tbl_customer_order table
numeric Previous
can’t change once it must match an
C_o_details_id Int 15 None none characters only, value Admin/Cashier
is created and is C_o_details_id in
can't be plus 1
unique tbl_customer_order_details
duplicated
table

Total of
C_orde_grandtotal
all
C_orde_grandtotal double 11,2 None none None can’t change once it None Admin/cashier
ordered
is created
items

C_orde_date can’t Current


date date daily none None change once it is system none Admin/cashier
C_orde_date created date

Unique ID,
C_o_details_id A user_id in a
numeric Previous
can’t change once it tbl_customer_order table
User_id int 15 None none characters only, value Admin/cashier
is created and is must match an user_id in
can't be plus 1
unique tbl_user table
duplicated

55
Table Name: tbl_logs

Primary Key: log_id

Foreign Key(s): none

Database Name: dbsad


Data Field Unit of Maintenance
Name Coding Data Integrity Rules Formula Referential Integrity Ownership
Type Size Measure Controls

A number cannot be
duplicated, cannot log_id can’t change Previous A log_id in a tbl_logs
log_id Int 15 None none be used more than once it is created value plus table must match a Admin
once, increments and is unique 1 log_id in tbl_user table
only by one

Unique ID, numeric user_id can’t change Previous


user_id Int 15 None none characters only, once it is created value plus none Admin
can't be duplicated and is unique 1

Seconds,
Time_in can’t Current
Time_in Varchar 100 minutes, none None change once it is system None Admin
created time
hours

Seconds,
Time_out can’t Current
Varchar 100 minutes, none None change once it is system none Admin
Time_out created date
hours

Current
date can’t change
Date varchar 100 daily none none system none Admin
once it is created
time

56
Table Name: tbl_recieve_supplier_details Primary Key: recieved_details_id

Database Name: dbsad Foreign Key(s): supplier_id, Po_id

Data
Data Field Unit of
Name Coding Integrity Maintenance Controls Formula Referential Integrity Ownership
Type Size Measure
Rules

recieved_details_id Int 15 A number


cannot be
A Recieved_details_id in a
duplicated,
tbl_recieve_supplier_details
cannot be Recieved_details_id Previous
table must match a
None None used more can’t change once it is value Admin/Cashier
Recieved_details_id in
than once, created and is unique plus 1
tbl_supplier and tbl_po
increments
table
only by
one

recieve_no Int 255 Unique


ID,
numeric Recieve_no can’t change Previous
None None characters once it is created and is value None Admin/Cashier
only, can't unique plus 1
be
duplicated

supplier_id Int 15 Unique


ID, A supplier_id in a
numeric Supplier_id can’t change Previous tbl_recieve_supplier_details
None None characters once it is created and is value table must match a Admin/Cashier
only, can't unique plus 1 supplier_id in tbl_supplier
be table
duplicated

po_id Int 15 Unique


ID,
A po_id in a
numeric Previous
Po_id can’t change once tbl_recieve_supplier_details
None None characters value Admin/Cashier
it is created and is unique table must match a po_id in
only, can't plus 1
the tbl_po table
be
duplicated

57
recieved_supplier_price double 11,2
Recieved_supplier_price
none none None can’t change once it is none none Admin/Cashier
created

received_supplier_qty Int 15
Recieved_supplier_qty
None None None can’t change once it is None None Admin/Cashier
created

recieved_supplier_total double 11,2


Recieved_supplier_total Sum of
None None None can’t change once it is all None Admin/Cashier
created quantity

user_id Int 15 Unique


ID,
numeric user_id can’t change Previous
None None characters once it is created and is value none Admin/Cashier
only, can't unique plus 1
be
duplicated

recieve_date varchar 100 Day,


Current
Recieved_date can’t
month, None none system None Admin/Cashier
change once it is created
date
year

58
Table Name: tbl_customer_order_details Primary Key: c_o_details_id

Database Name: dbsad Foreign Key(s): user_id

Data
Data Field Unit of
Name Coding Integrity Maintenance Controls Formula Referential Integrity Ownership
Type Size Measure
Rules

c_o_details_id Int 15 A number


cannot be
A Recieved_details_id in a
duplicated,
tbl_recieve_supplier_details
cannot be C_o_details_id can’t Previous
table must match a
None None used more change once it is created value Admin/Cashier
Recieved_details_id in
than once, and is unique plus 1
tbl_supplier and tbl_po
increments
table
only by
one

trans_id Int 255 Unique


ID,
numeric Trans_id can’t change Previous
None None characters once it is created and is value None Admin/Cashier
only, can't unique plus 1
be
duplicated

c_o_details_item_id Int 15 Unique


ID,
numeric C_o_details_item_id Previous
None None characters can’t change once it is value none Admin/Cashier
only, can't created and is unique plus 1
be
duplicated

c_o_details_item_name varchar 255


C_o_details_item_name
None None None can’t change once it is None none Admin/Cashier
created

59
c_o_details_item_unit varchar 255
Pieces, C_o_details_item_unit
boxes, none None can’t change once it is None none Admin/Cashier
kilos created

c_o_details_item_brand varchar 255


C_o_details_item_brand
None None None can’t change once it is None None Admin/Cashier
created

c_o_details_item_price decimal 11,2


C_o_details_item_price
None None None can’t change once it is None None Admin/Cashier
created

c_o_details_item_qty Int 15
C_o_details_item_qty
None None None can’t change once it is None none Admin/Cashier
created

c_o_details_total decimal 11,2


C_o_details_item_total Sum of
None None None can’t change once it is all None Admin/Cashier
created quantity

user_id Int 15 Unique


ID,
A user_id in a
numeric user_id can’t change Previous
tbl_customer_order_details
None None characters once it is created and is value Admin/Cashier
table must match an
only, can't unique plus 1
be user_id in tbl_user table
duplicated

user_name varchar 255


user_name can’t change
None None None once it is created and is None None Admin/Cashier
unique

60
date_ordered varchar 100 Day,
Current
Date_ordered can’t
month, None None system none Admin/Cashier
change once it is created
date
year

61
Table Name: tbl_po Primary Key: po_id

Database Name: dbsad Foreign Key(s): item_id, unit_id, Brand_id, Supplier_id

Data
Data Field Unit of
Name Coding Integrity Maintenance Controls Formula Referential Integrity Ownership
Type Size Measure
Rules

po_id Int 15 A number


cannot be
duplicated,
A po_id in a tbl_po table
cannot be po_id can’t change once Previous
must match a po_id in
None None used more it is created and is value Admin/Cashier
tbl_recieved_supplier_details
than once, unique plus 1
table
increments
only by
one

po_no Int 255 Unique


ID,
numeric Po_no can’t change once Previous
None None characters it is created and is value None Admin/Cashier
only, can't unique plus 1
be
duplicated

item_id Int 15 Unique


ID,
numeric item_id can’t change Previous A item_id in a tbl_po table
None None characters once it is created and is value must match a item_id in Admin/Cashier
only, can't unique plus 1 tbl_item table
be
duplicated

po_item_name varchar 255


po_item_name can’t
None None None change once it is created None None Admin/Cashier
and is unique

62
unit_id Int 15 Unique
ID,
Pieces, numeric Unit_id can’t change Previous A unit_id in a tbl_po table
boxes, none characters once it is created and is value must match a unit_id in Admin/Cashier
kilos only, can't unique plus 1 tbl_unit table
be
duplicated

brand_id Int 15 Unique


ID,
numeric Brand_id can’t change Previous A brand_id in a tbl_po table
None None characters once it is created and is value must match a brand_id in Admin/Cashier
only, can't unique plus 1 tbl_brand table
be
duplicated

po_qty Int 15
Po_qty can still be
None None None change once it is created None None Admin/Cashier
and is unique

supplier_id Int 15 Unique


ID,
A supplier_id in a tbl_po
numeric Supplier_id can’t change Previous
table must match a
None None characters once it is created and is value Admin/Cashier
supplier_id in tbl_supplier
only, can't unique plus 1
table
be
duplicated

reorder_point Int 15 Quantity


is less
Reorder_point can still than to
None None None be change once it is the None Admin/Cashier
created. reorder
point
number

63
Table Name: tbl_received_history

Primary Key: history_id

Foreign Key(s): Supplier_id

Database Name: dbsad

Data
Data Field Unit of
Name Coding Integrity Maintenance Controls Formula Referential Integrity Ownership
Type Size Measure
Rules

history_id Int 15 A number


cannot be
duplicated,
A history_id in a
cannot be po_id can’t change Previous
tbl_received_history table
None None used more once it is created and is value Admin/Cashier
must match a history_id in
than once, unique plus 1
tbl_ supplier table
increments
only by
one

receive_no Int 15 Unique


ID,
numeric receive_no can’t Previous
None None characters change once it is value None Admin/Cashier
only, can't created and is unique plus 1
be
duplicated

po_no Int 255 Unique


ID,
numeric Po_no can’t change Previous
None None characters once it is created and is value None Admin/Cashier
only, can't unique plus 1
be
duplicated

64
Item varchar 255
item can’t change once
None None None it is created and is None None Admin/Cashier
unique

request_qty Int 15
Pieces, Request_qty can’t
boxes, none none change once it is None None Admin/Cashier
kilos created and is unique

supplier_price decimal 10,2


Supplier_price can’t
None None None change once it is None None Admin/Cashier
created and is unique

received_qty Int 15
received_qty can’t
None None None change once it is None None Admin/Cashier
created and is unique

damage_qty Int 15
Damage_qty can’t
None None None change once it is None None Admin/Cashier
created and is unique

date_received varchar 255 Month,


Date_received can still Current
Day, None None be change once it is system None Admin/Cashier
created. date
year

user_id Int 15 Unique


ID,
numeric User_id can’t change Previous
None None characters once it is created and is value None Admin/Cashier
only, can't unique plus 1
be
duplicated

65
supplier_id Int 15 Unique
ID,
A supplier_id in a
numeric Supplier_id can’t Previous
tbl_received_history table
None none characters change once it is value Admin/Cashier
must match a supplier_id in
only, can't created and is unique plus 1
tbl_supplier table
be
duplicated

66
Table Name: tbl_recieve_supplier Primary Key: recieved_id

Database Name: dbsad Foreign Key(s): recieved_details_id

Data
Data Field Unit of
Name Coding Integrity Maintenance Controls Formula Referential Integrity Ownership
Type Size Measure
Rules

recieve_id int 15 A number


cannot be
A recieve_id in a
duplicated,
tbl_recieve_supplier table
cannot be recieve_id can’t change Previous
must match a recieve_id in
None None used more once it is created and is value Admin/Cashier
tbl_
than once, unique plus 1
recieved_supplier_details
increments
table
only by
one

user_id int 15 Unique


ID,
numeric User_id can’t change Previous
None None characters once it is created and is value None Admin/Cashier
only, can't unique plus 1
be
duplicated

recieved_details_id int 15 Unique


A recieved_details_id in a
ID,
tbl_recieve_supplier table
numeric Recieved_details_id Previous
must match a
None None characters can’t change once it is value Admin/Cashier
recieved_details_id in
only, can't created and is unique plus 1
tbl_recieved_supplier_details
be
table
duplicated

recieved_grandtotal double 11,2


Recieved_grandtotal
Peso None None can’t change once it is None None Admin/Cashier
created

67
recieved_date date date Month,
Recieved_date can’t Current
Day, none none change once it is system None Admin/Cashier
created date
year

68
Table Name: tbl_stock_out

Primary Key: stock_out_id

Foreign Key(s): none

Database Name: dbsad

Data
Data Field Unit of
Name Coding Integrity Maintenance Controls Formula Referential Integrity Ownership
Type Size Measure
Rules

Stock_out_id Int 15 A number


cannot be
duplicated,
cannot be Stock_out_id can’t Previous
None None used more change once it is value none Admin/Cashier
than once, created and is unique plus 1
increments
only by
one

Item_name varchar 255


Item_name can’t
None None None change once it is none None Admin/Cashier
created

Item_brand varchar 255


Item_brand can’t
None None None change once it is none none Admin/Cashier
created

Item_price decimal 11,2


Item_price can’t
Peso None None change once it is None None Admin/Cashier
created

69
Item_qty Int 15
Item_qty can’t change
None None None None None Admin/Cashier
once it is created

Reason varchar 255


reason can’t change
None None None None none Admin/Cashier
once it is created

User_id Int 15 Unique


ID,
numeric user_id can’t change Previous
None None characters once it is created and is value none Admin/Cashier
only, can't unique plus 1
be
duplicated

User_name varchar 255


User_name can’t
none None none change once it is None none Admin/Cashier
created

70
Table Name: tbl_user

Record Size: 1585

No. of Instances: 2

Table Size: 3170

Field Name Field Size


User_id 15
User_fname 255
User_lname 255
Acc_type_id 10
User_contact 15
Gender_id 15
User_email 255
Username 255
Password 255
User_status 255

Table Name: tbl_account_type

Record Size: 265

No. of Instances: 2

Table Size: 530

Field Name Field Size


Acc_type_id 10
Acc_type 255

Table Name: tbl_gender

Record Size: 265

No. of Instances: 2

Table Size: 530

Field Name Field Size


Gender_id 10
Gender_desc 255

Table Name: tbl_unit

Record Size: 270

No. of Instances: 3

Table Size: 810

Field Name Field Size


unit_id 15
unit_description 255

71
Table Name: tbl_brand

Record Size: 270

No. of Instances: 5

Table Size: 1350

Field Name Field Size


brand_id 15
Brand_name 255

Table Name: tbl_category

Record Size: 270

No. of Instances: 4

Table Size: 1080

Field Name Field Size


category_id 15
Category_description 255

Table Name: tbl_customer

Record Size: 550

No. of Instances: 2

Table Size: 1100

Field Name Field Size


customer_id 15
Customer_fname 255
Customer_lname 255
Gender_id 10
Customer_contact 15

Table Name: tbl_supplier

Record Size: 1046

No. of Instances: 3

Table Size: 3138

Field Name Field Size


Supplier_id 15
Supplier_name 255
Supplier_address 255
Supplier_contact 11
Supplier_email 255
Supplier_status 255

72
Table Name: tbl_supplier_return

Record Size: 197

No. of Instances: 1

Table Size: 197

Field Name Field Size


Supplier_return_id 15
Supplier_id 15
Po_id 15
Damage_price 11
Damage_qty 15
User_id 15
Total_damage 11
Date_recieved 100

Table Name: tbl_item

Record Size: 471

No. of Instances: 20

Table Size: 9420

Field Name Field Size


item_id 15
supplier_id 15
brand_id 15
unit_id 15
item_name 255
item_qty 15
item_price 11,2
reorder_point 15
date_added 100
category_id 15

Table Name: tbl_customer_order

Record Size: 56

No. of Instances: 1

Table Size: 56

Field Name Field Size


c_order_id 15
c_o_details_id 15
c_orde_grandtotal 11,2
c_order_date Date
user_id 15

73
Table Name: tbl_logs

Record Size: 330

No. of Instances: 2

Table Size: 660

Field Name Field Size


log_id 15
user_id 15
time_in 100
time_out 100
Date 100

Table Name: tbl_recieve_supplier_details

Record Size: 452

No. of Instances: 1

Table Size: 452

Field Name Field Size


recieved_details_id 15
recieve_no 255
supplier_id 15
po_id 15
recieved_supplier_price 11,2
received_supplier_qty 15
recieved_supplier_total 11,2
user_id 15
recieve_date 100

Table Name: tbl_customer_order_details

Record Size: 1457

No. of Instances: 1

Table Size: 1457

Field Name Field Size


c_o_details_id 15
trans_id 255
c_o_details_item_id 15
c_o_details_item_name 255
c_o_details_item_unit 255
c_o_details_item_brand 255
c_o_details_item_price 11,2
c_o_details_item_qty 15
c_o_details_total 11,2
user_id 15
user_name 255
date_ordered 100

74
Table Name: tbl_po

Record Size: 615

No. of Instances: 1

Table Size: 615

Field Name Field Size


po_id 15
po_no 255
item_id 15
po_item_name 255
unit_id 15
brand_id 15
po_qty 15
supplier_id 15
reorder_point 15

Table Name: tbl_received_history

Record Size: 880

No. of Instances: 1

Table Size: 880

Field Name Field Size


history_id 15
receive_no 15
po_no 255
Item 255
request_qty 15
supplier_price 10,2
received_qty 15
damage_qty 15
date_received 255
user_id 15
supplier_id 15

Table Name: tbl_recieve_supplier

Record Size: 56

No. of Instances: 1

Table Size: 56

Field Name Field Size


recieve_id 15
user_id 15
recieved_details_id 15
recieved_grandtotal 11,2
recieved_date date

75
Table Name: tbl_stock_out

Record Size: 576

No. of Instances: 4

Table Size: 2304

Field Name Field Size


Stock_out_id 15
Item_name 255
Item_brand 255
Item_price 11,2
Item_qty 15
Reason 255
User_id 15
User_name 255

76
Architecture Design

Printer

Company Owner System Company Staff

Database
Figure 21 – Architecture Diagram
The architecture diagram of the proposed system can be access by the
Company owner and staff.

77
Figure 22 – Menu Tree

78
Prototypes

Figure 23 – Login Form


The login form is where the different types of user like the admin and staff inputs
their username and password before they can access and use the different features
of the system.

Figure 24 – Dashboard Form


The dashboard or the main frame of the system is where you can see all the
buttons that contains different forms of the system’s transactions. It’s the first thing
that will show after logging in to the system. It shows some of the important buttons
that contains different forms of the system’s transactions. The admin type of user can
access and alter every information inside the system while the staff type of user has
limited access to the system and most of it is just for viewing.

79
Figure 25 – Cashier Form

The cashier form is where the customer looks and buys an item. The cashiering
form allows the user to add item, update quantity of the item, remove the item and
cancel the order of the customer.

Figure 26 – Inventory Form

The inventory form is where you can see all the items of the company has. In
this form the admin is the only one who can change all the information such as the
item’s description, price and quantity, while the staff user type can only access the
inventory by viewing it.

80
Figure 27 – Update Inventory

This form is where you manage the inventory. The admin is the only one who
can access this, the admin can update the item’s name and price.

Figure 28 – Inventory (Reorder Items)

This form is where the out of stock items will automatically display after
the item’s quantity reaches to 0 or its reorder point number.

81
Figure 29 – Add new Item to Reorder Items Form

This form is if the user wants to add new item to the reorder items form.

Figure 30 – Add to Stock out

This form is where the user stock out an item. The user will input the quantity of the
item and reason for stocking out the item.

82
Figure 31 – Stock out Form

The stock out form is when a user declares that an item is damaged after the
purchase order delivery. The stock out is also for stocking out an item if a specific item
is no longer available or if a supplier does not supply that item anymore. You can also
add an item and its quantity to the stock out if the company uses that item for a certain
reason.

Figure 32 – Purchase Order (Stock in)

This form contains the purchase order table that contains the list of items
that the company wants to order to their supplier. The second table is the stock
in that will add all the stocks in the inventory after receiving it from the supplier.

83
Figure 33 – Damage Item Form

The damage item form is where the user puts and declare that a certain item
is damaged upon the purchase order delivery.

Figure 34 – User Form

This form contains all the different users that can access the system. There are
two types of user the admin and staff. In this form the admin is the only one who can
view and change all the information that it contains while the staff type of user won’t
be able to access this form.

84
Figure 35 – Supplier Form

This form is where the user adds a company’s supplier information. Both the
admin and user can view and add supplier but the admin is the only one allowed to
change all its information.

Figure 36 – Sales

This form shows every sale per cash invoice. It also shows the total of every
cash invoice, the date of transaction and the user who transacted it.

85
Figure 37 - Logs

The logs form shows the user’s name and the time it logs in and logs out in the
system. It also shows the history and the date of time in and time out of the users. It
also shows here an event or logs whenever a user removes an item or cancels an
order.

Figure 38 – Hollow Blocks Production

This form adds and updates the hollow blocks production every day. This form
automatically records the quantity of added hollow blocks, the date it was added and
the user who added it.

86
Figure 39 – Add new Category

This form shows the categories of the items. The admin is the only one that
can add new category and update it.

Figure 40 – Add new Unit

This form shows the units of the items. The admin is the only one that can add
new unit and update it.

87
Figure 41 – Add new Brand

This form shows the brands of the items. The admin is the only one that can
add new brand and update it.

Figure 42 – Delivery History

This form shows the purchase order delivery history. After stocking in all the
purchase ordered items, it will automatically record to the delivery history form
containing the item name, order quantity, received quantity, date received and the user
who stocked it in.

88
Figure 43 – Backup & Restore

This form is where the admin can backup & restore the database file of the
system.

Figure 44 – Reports Module

The Reports module shows the sales, stockin, hollow blocks, inventory and
supplier return reports tab.

89
Figure 45 – Sales Report

The sales report is where you see all the sold items per cash invoice from daily
transactions. It can also view here other transactions by date and generate daily,
weekly and monthly sales report.

Figure 46 – Inventory Report (Item Available)

The inventory report for Item available is where you can see all the items of
the inventory its brand, unit, price and how much quantity left it has.

90
Figure 47 – Inventory Report (Item Sold)

This inventory report shows how many times the item was sold and total amount
of each item that was sold

Figure 48 – Inventory Report (Stock Out)

This inventory report shows every item that have been added to the stock out form.

91
Figure 49 – Stock in Report (Delivery Report)

The stock in or delivery report shows every item that have been delivered by
the supplier and the date it was received.

92
Chapter 4

THE IMPLEMENTATION

User Acceptance Testing

The actual testing was done with series of Technical Walkthroughs. First with
our adivser, second with our consultant and the last one was with our clients. We had
3 Technical Walkthroughs done with our professor or adviser and 2 Technical
Walkthroughs to our Consultant and the last Walkthrough was to our clients. All
Technical Walkthrough documents contains checklist with the system’s progress of its
functional requiements. It’s the same as the test case or user testing of the system.
Our adviser, consultant and client checks every functions of the system and also
shares their opinion and recommendations about other functionalities and features of
the system that the researchers will try to add to the system.

On October 04, 2019 The researchers have successfully deployed The Point
of Sales and Inventory System for DA28 Enterprises Hardware. And on the same day
was the User Acceptance Testing, The researchers conducted a Client Technical
walkthrough about the system’s functionalities with the company owner. The
researchers have carefully guided and demonstrated with the company owner and its
staff on how to use the system. The researchers accurately explained the flow and
processes of the system and its features implanted in the system. The researchers
also asked for recommendations and what other features and functions to be put in
the system. The company owner speak out his ideas about the system and asked
several questions which the researchers easily answered.

The company owner agreed and prepared the necessary things needed to
implement the proposed system to their business after being satisfied with all the
answers that the researchers provided. After that, the researchers brought out the user
acceptance and deployment certicafe which the company owner willingly signed to
truly approve and accept the system.

93
Deployment Plan

The researchers conducted the system deployment for DA28 Enterprises


Hardware on October 04, 2019. After the deployment, the researchers conducted a
user training for the company’s staff for them to know the features and how to use the
system. The company owner and the company’s staffs cooperated so well and were
so curious about the system. All of them were so eager and excited to learn the
functionalities of the system.

Installation of Hardware and Software

Minimun Requirements:

Hardware

 CPU – Core i3-5100


 RAM – 2GB
 Hard Disk – 500GB

Software

 OS – Windows 7 or 10
 XAMPP 64bit
 Microsoft Visual Studio 2010 or 2015
1. Plug in the computer.
2. Press the power button to turn on the computer.
3. Click the Microsoft Visual Studio 2010 or 2015 and install.
4. Install XAMPP for the database that will store all the data in the system.
5. Don’t forget to install a mysql connector so that the visual studio and database
will connect.
6. Open the microsoft visual studio file of the system.
7. Import the sql file in the localhost. And you’re good to go.

94
User Training

On the 4th of October 2019 the researchers conducted the user training for DA28
Enterprises Hardware staffs. The researchers demontrasted slowly but precisely so
that each of the staff could cope up on how to exactly use the system. The
researchers explained carefully the functionalities of each module of the system.
Several questions were asked by the company’s staffs and the researchers provided
the precise answers for all their questions. One of the staff asked about on how to
back up and restore the data of the system and then the researchers demonstrated
the backup and restore procedure. The user training and demonstration went well
and the owner and staffs were satisfied.

95
User Manual

3
Figure 50 – Login Form 4

1. Enter the correct username on the space provided.


2. Enter the correct password on the space provided.

3. Click the Login button to get inside and access the system.

4. If you wish to cancel logging in, click the cancel button .

96
Figure 51- Dashboard Form

1. Click the Dashboard button and all buttons in the system will
appear

2. Click the Cashier button and the cashier transaction form will
appear.

3. Click the Purchase Order button and the purchase order form will
appear.

4. Click the Inventory button and the Inventory form will appear.

5. Click the Reports button and all the reports will appear.

6. If you wish to logout and exit the system click the logout button .

97
Figure 51.1 – Dashboard Form

7. Click the User button and the user form containing the records of users
will appear.

8. Click the Supplier button and the supplier form containing the records
of suppliers will appear.

9. Click Backup & Restore button and backup and restore form will
appear.

10. Click the Logs button and the logs form will appear.

11. Click the Delivery History button and the Delivery History form will
appear.

12. Click the Sales button and the Sales form will appear.

13. Click the Brand button and the brand form will appear.

14. Click the Unit button and the unit form will appear.

15. Click the Category button and the Category form will appear.

16. Click the Hollow Blocks button and a Hollow blocks form will appear.

98
3

Figure 52 - Cashier

1. Input in the search box if you want to search for a specific


item.
2. Click the Category list if you want to view the items
according to its category.
3. Choose and click a specific item you want inside the data grid.
4. Input the amount of quantity you want on the quantity textbox

5. Click the Add Item button to add item to cart and display it on the
second data grid.

99
Figure 52.1 – Cashier

6. Click the Update qty button if you wish to update the quantity of the
item.
7. If you want to remove an item just click the item you want to remove and click

the Remove Item button .

8. Click the Cancel Order button if you want to cancel the order.

9. Input the amount of payment in the Payment textbox .

10. Click the Pay button to finish the transaction and generate cash
invoice.

100
Figure 52.2 – Cashier

After Clicking the Pay button a Cash Invoice will automatically


generate. The cash invoice contains the item the customer ordered, brand, unit, price,
quantity and subtotal of the item. It also shows there the Total amount, the VAT, the
grand total the customer will pay, the cash rendered and the change. The Cash invoice
also contains the date and time of the transaction and the cashier who processed the
transaction.

101
Figure 53 – Inventory Form (Items Tab)

1. Input in the search box if you want to search for a specific


item.
2. Click the Category list if you want to view the items
according to its category.
3. After clicking Category list and you wish to View all the items in the inventory,

just click the View all button to view all items.

4. Click the Reorder Items Tab if you want to see all the depleted or
out of stock items in the inventory.

5. Click the Stock Out Tab if you want to see the items that have been
added to Stock out.
6. If you want to update a specific item in the inventory just click the item and then

click the Update Item button .

7. The Add Stock Out button is for stocking out an item in the
inventory.

102
1

Figure 53.1 – Inventory Form (Update Item Form)

This is the form that will going to pop up After clicking a specific item and then

clicking the Update Item button in the Inventory form.

1. Choose the type of unit you want to change of that item.


2. Input the New name of the item that you want to change.
3. Enter the New price of the item that you want to change.
4. Enter the New reorder point of that item if you want to change it.
5. Choose the type of category you want to change of that item.

6. Click the Update button if you are


finish updating the details of the item you chose to update.

103
1

Figure 54 – Inventory Form (Add Stock Out Form)

This is the form that will going to show up after clicking an item and then clicking

the Add Stock Out button in the inventory form.

1. Input the quantity of the item you want to stock out in the inventory.
2. Then input the reason for stocking out that item.

3. If you are done, then click the Stock Out button to


completely stock out the item.

104
Figure 54.1 – Inventory Form (Stock Out Tab)

After Clicking the Stock Out button in the Add Stock


Out form. The item that was stock out will automatically display here in the Stock Out

Tab . The quantity of stocked out item will automatically deduct the
quantity in the inventory.

105
3

4
5
1

Figure 55 – Inventory Form (Reorder Items Tab)

This form will appear if you click the Reorder Items Tab in the
Inventory Form. This form shows the items that are depleted or low stocks. This is the
form where you purchase order the depleted items in this form.

1. Click an item you want to add to cart for the purchase order.

2. Choose from the Supplier Name list box the


supplier of the item.
3. Select the brand of the item.
4. Select the type of unit of the item.
5. Enter the quantity of the item you want to Purchase Order to the supplier

6. Click the Add to Cart button to add the item to be Purchase


Order.
7. If you wish to Add New Item to be Purchase Order, just click the Add New

Item button .

106
1

3
4

Figure 55.1 – Inventory Form (Add New Item Form)

This is the Add new item form, this will appear if you click the Add New Item button

in the reorder items tab from the Inventory form.

1. Input the name of the new item you to add.


2. Choose the type of unit of that item.
3. Choose the type of brand of that item.
4. Enter the reorder point of the new item you want to add.
5. Choose the type of category of that item.

6. Click the Add button to completely add the new item to the reorder
items to be Purchase Order
7. Click the Cancel button if you wish to cancel adding a new item.

107
3

2 4

8.

Figure 56 – Purchase Order (Received Order Tab)

This is the continuation of the process of Figure 55 – Reorder Items Tab user
manual. In here you will see the items you added for the Purchase order that came
from the reorder items tab.

1. Click the Supplier Name list to Choose a Supplier to


begin the purchase order.
2. Click the item inside the data grid or table so that the details of the item will
display on the text boxes.
3. Input the supplier price of the item.
4. Input the quantity you want to purchase from the supplier.

5. Before Receiving the items you can click the Damage item button if
some of the items delivered by the supplier has a damage.
6. If you have changes or you want to update the quantity of the items in the
purchase order just click the Update button .
7. But if you wish to cancel the Purchase Order you can click the Cancel Button
to cancel the purchase order
8. If you’re finish adding the damage item or if you’re sure that there’s no damage
items delivered by the supplier, you can click the Receive Item button

108
Figure 56.1 – Purchase Order (Stock in)

After clicking the received item button the item will now display to the
second data grid below.

9. Click update item button if you want to update the item before stocking
in

10. Click the Stock in button to stock in all the items to the inventory.
After clicking the stock in button a message will appear saying item successfully
stock in.
11. You can also cancel receiving the item by clicking the Cancel Received button

109
Figure 56.2 – Purchase Order (Damage Item Tab)

After declaring and clicking the Damage Item button that an item is
damage upon the delivery, it will automatically display here in the Damage Item Tab.

1. You can search here the damaged item by typing the details of the damage

item in the Search text box .


2. If you mistakenly declared or added that an item was damaged upon the

delivery, you can click the Cancel button to remove the damage
item in the damage item tab.
3. You can also update the details of the damage item by clicking the update item

button .

110
1

Figure 57 – Reports (Sales Report Tab)

This is the form that will appear After clicking the Reports button

. The Reports module contains the Sales, Inventory, Hollow Blocks,


Stockin and Supplier Return Reports.

1. To Generate a Sales Report, you need to select a specific range of date by

clicking the Date pickers The first date picker is


From (beginning of date) and the second one is To (end of date).
2. After choosing the range of date that you want to generate a sales report
from. Click the Print button to instantly generate a Sales Report.

111
Figure 57.1 – Sales Report

After clicking the Print button The sales report will automatically
generate. The system can generate a Daily, Weekly & Monthly Sales report. It
depends on the range of date you will choose.

112
Figure 58 – Stockin or the delivery report tab

1. To Generate a Stockin Report, you need to select a specific range of date by

clicking the Date pickers The first date picker is


From (beginning of date) and the second one is To (end of date).
2. After choosing the range of date that you want to generate a stockin report
from. Click the Print button to instantly generate the Stockin Report.

Figure 58.1 – Stockin or Delivery Report

After clicking the Print button The stockin report will automatically
generate.
113
Figure 59 – Inventory Report Tab

The Inventory report has three options of generating an Inventory Report. You
can choose from generating reports for Available Items by clicking the Available
Items Tab or generate a report for Items that have been sold by
clicking the Item Sold tab and lastly generate a report for Stock out items by
clicking the Stock Out tab .

If you wish to generate those 3 reports, just click each of its tab and click the
Print button to of each tabs to print each of their reports.

114
Figure 59.1 – Inventory Report (Item Available)

This is the crystal report of the Available Items in the Inventory. It shows here
the name of the item and its quantity.

Figure 59.2 – Inventory Report (Item Sold)

This is the crystal report for Sold items in the Inventory. It shows here how many
times an item was bought and it also calculates the total amount of those sold items.

115
Figure 59.3 – Inventory Report (Item Damage)

This is the crystal report for damage item. It shows here the items that have
been added to stock out. It shows the item name and the damage quantity of the item.

116
Figure 60 – User Form

1. Type First Name here .

2. Type Last Name here .

3. Click the User Type dropdown box to select user


type.

4. Type Contact Number here .

5. Click the Gender dropdown box to select user


gender.
6. Type Email here .

7. Type Username here .


8. Type Password here .

9. Type again here the password to confirm if it


matches the first password you entered.

10. Select from the User Status radio button to show and
identify the user’s status.

11. Click the Add User button to store it in the database.


12. Input in the Search text box to find a specific user.

13. Click the Update User button if you want to update the user’s
information.
117
Figure 61 – Supplier Form

1. Type the Supplier’s Name here .


2. Type the Supplier’s Address here .
3. Type the Supplier’s Contact Number here .

4. Type the Supplier’s Email here .

5. Select from the User Status radio button to show


and identify the user’s status.

6. Click the Add Supplier button to add Supplier.

7. Click the Update Supplier button to update supplier information.


8. Input in the Search textbox to find a specific supplier.

118
Figure 62 – Backup & Restore Form

1. To perform the backup & restore click first the Select Database combo box

and select the database you want to


back up.
2. If you already have chosen a database to back up, just click the Back up

button to back up the database file of the system.

119
Figure 62.1 – Backup Database

3. After clicking the Back up button . This form will

pop up. Just click the Save button to save completely the

database or click the Cancel button if you wish to cancel the back
up.

After clicking the save button a message will appear that says the database back

up was created successfully .

120
Figure 62.2 – Restore Database

4. If you wish to restore the database, just click the Restore button

. Then this form will show up.

Choose the database file you want to restore and then click the Open button
to completely restore and import the database file. After that a message

will appear saying database restored successfully .

121
Figure 63 – Brand Form

If you want to add a new brand just input the new brand name here

and then click the Add Brand button .

You can also update the brand name by clicking the Update Brand button

122
Figure 64 – Unit Form

If you want to add a new unit just input the new unit description here

and then click the Add Unit button .

You can also update the Unit description by clicking the Update Unit button

123
Figure 65- Category Form
If you want to add a new category just input the new category description here

and then click the Add Category button .

You can also update the Category Description by clicking the Update Category button

124
Chapter 5
THE SOURCE CODE
Public Class frmMain

Private Sub BtnReports_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnReports.Click

frmReports.TopLevel = False
mainpanel.Controls.Add(frmReports)
frmReports.BringToFront()
frmReports.Show()

End Sub

Private Sub btncashier_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btncashier.Click

frmcashier.TopLevel = False
mainpanel.Controls.Add(frmcashier)
frmcashier.BringToFront()
frmcashier.Show()

End Sub

Private Sub btnPO_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnPO.Click

purchaseOrder.TopLevel = False
mainpanel.Controls.Add(purchaseOrder)
purchaseOrder.BringToFront()
purchaseOrder.Show()

End Sub

Private Sub btnsupplier_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs)
frmsupplier.TopLevel = False
mainpanel.Controls.Add(frmsupplier)
frmsupplier.BringToFront()
frmsupplier.Show()
End Sub

Private Sub btndashboard_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btndashboard.Click
frmdashboard.TopLevel = False
mainpanel.Controls.Add(frmdashboard)
frmdashboard.BringToFront()
frmdashboard.Show()
End Sub

Private Sub btninventory_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btninventory.Click
frmInventory.TopLevel = False
mainpanel.Controls.Add(frmInventory)

125
frmInventory.BringToFront()
frmInventory.Show()
End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Timer1.Tick
lblTime.Text = TimeOfDay
End Sub

Private Sub btnLogout_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnLogout.Click
Dim query
query = "insert into tbl_logs values(null,'" & lblID.Text & "','" &
lbltimein.Text & "','" & lblTime.Text & "','" & lblDate.Text & "')"
SQLProcess(query)
Dispose()
frmlogin.Show()

End Sub

Private Sub mainpanel_Paint(ByVal sender As System.Object, ByVal e As


System.Windows.Forms.PaintEventArgs) Handles mainpanel.Paint

End Sub
End Class

Imports MySql.Data.MySqlClient

Module ProductModule

Private dbConn As MySqlConnection


Private sqlCommand As MySqlCommand
Private da As MySqlDataAdapter

Private dt As DataTable

Private strConn = "server=localhost; user=root; database="

Public Sub dbConnection()


Try
dbConn = New MySqlConnection(strConn & "dbsad")
'dbConn.ConnectionString = strConn
dbConn.Open()
' MessageBox.Show("Test connection successful")
Catch ex As Exception
MessageBox.Show("Error 101: Db_Connection " & ex.Message)
Finally
dbConn.Close()
End Try
End Sub

Public Sub dbConnection(ByVal DBname As String)


Try
dbConn = New MySqlConnection(strConn & DBname)

126
'dbConn.ConnectionString = strConn
dbConn.Open()
' MessageBox.Show("Test connection successful")
Catch ex As Exception
MessageBox.Show("Error 101: Db_Connection " & ex.Message)
Finally
dbConn.Close()
End Try
End Sub

Public Sub loadToComboBox(ByVal SQL As String, ByVal cbo As ComboBox)


Try
dbConn.Open()
da = New MySqlDataAdapter(SQL, dbConn)
dt = New DataTable
da.Fill(dt)
cbo.DataSource = dt
cbo.ValueMember = dt.Columns(0).ToString
cbo.DisplayMember = dt.Columns(1).ToString

Catch ex As Exception
' MessageBox.Show("Error 102: Db_displayRecords" & ex.Message)
Finally
dbConn.Close()
End Try
End Sub

Public Sub GetTransID(ByVal SQL As String)


Try
Dim read = ""

dbConn.Open()
da = New MySqlDataAdapter(SQL, dbConn)
dt = New DataTable
da.Fill(dt)

read = dt.Rows(0).Item(0)
frmcashier.txtTrans.Text = read + 1

Catch ex As Exception
frmcashier.txtTrans.Text = 10001
Finally
dbConn.Close()

End Try

End Sub

Public Sub ReceivedID(ByVal SQL As String)


Try
Dim read = ""

dbConn.Open()
da = New MySqlDataAdapter(SQL, dbConn)
dt = New DataTable
da.Fill(dt)

read = dt.Rows(0).Item(0)
purchaseOrder.txtReceivedID.Text = read + 1

127
Catch ex As Exception
purchaseOrder.txtReceivedID.Text = 1
Finally
dbConn.Close()

End Try

End Sub

Public Sub GetReceievedID(ByVal SQL As String)


Try
Dim read = ""
dbConn.Open()
da = New MySqlDataAdapter(SQL, dbConn)
dt = New DataTable
da.Fill(dt)

read = dt.Rows(0).Item(0)
purchaseOrder.txtReceivedID.Text = read + 1

Catch ex As Exception
purchaseOrder.txtReceivedID.Text = 1
Finally
dbConn.Close()

End Try

End Sub

Public Sub GetPOID(ByVal SQL As String)


Try
Dim read = ""

dbConn.Open()
da = New MySqlDataAdapter(SQL, dbConn)
dt = New DataTable
da.Fill(dt)

read = dt.Rows(0).Item(0)
frmInventory.txtPOnumber.Text = read + 1

Catch ex As Exception
frmInventory.txtPOnumber.Text = 7001
Finally
dbConn.Close()

End Try

End Sub
Public Sub GetitemID(ByVal SQL As String)
Try
Dim read = ""
dbConn.Open()
da = New MySqlDataAdapter(SQL, dbConn)
dt = New DataTable
da.Fill(dt)

read = dt.Rows(0).Item(0)

128
frmAddnewOrder.txtID.Text = read + 1

Catch ex As Exception

Finally
dbConn.Close()

End Try

End Sub

Public Function GetQuantity(ByVal SQL As String)


Dim read = 0
Dim result = 0
Try
dbConn.Open()
da = New MySqlDataAdapter(SQL, dbConn)
dt = New DataTable
da.Fill(dt)
read = dt.Rows(0).Item(0)
'result = read - purchaseOrder.txtsetqty.Text

Catch ex As Exception
MessageBox.Show("Error 109: Db_displayRecords" & ex.Message)
Finally
dbConn.Close()
End Try
Return result
End Function

Public Function recordCount(ByVal SQL As String)


Dim row = 0
Try
dbConn.Open()
da = New MySqlDataAdapter(SQL, dbConn)
dt = New DataTable
da.Fill(dt)
row = dt.Rows.Count + 1
Catch ex As Exception
MessageBox.Show("Error 102: Db_displayRecords" & ex.Message)
Finally
dbConn.Close()
End Try
Return row
End Function

Public Function isFound(ByVal SQL As String, ByVal username As String, ByVal


password As String) As Boolean
Dim value = "", pass = ""
Dim found = False

Try
dbConn.Open()
da = New MySqlDataAdapter(SQL, dbConn)
dt = New DataTable
da.Fill(dt)

For Each row As DataRow In dt.Rows


value = row.Item("username")
pass = row.Item("password")

129
If value = username And pass = password Then
found = True
Exit For
End If
Next
Catch ex As Exception
MessageBox.Show("Error 104: isFound" & ex.Message)
Finally
dbConn.Close()
End Try
Return found
End Function

Public Function isFoundz(ByVal SQL As String, ByVal quantity As Integer) As


Boolean
Dim quan = 0

Dim found As Boolean

Try
dbConn.Open()
da = New MySqlDataAdapter(SQL, dbConn)
dt = New DataTable
da.Fill(dt)

For Each row As DataRow In dt.Rows


quan = row.Item("quantity")

If quan = quantity Then


found = True
Exit For
End If
Next
Catch ex As Exception
MessageBox.Show("Error 104: isFound" & ex.Message)
Finally
dbConn.Close()
End Try
Return found
End Function

Public Function GetValue(ByVal SQL As String, ByVal name As String) As String


Dim val As String = ""

Try
dbConn.Open()
da = New MySqlDataAdapter(SQL, dbConn)
dt = New DataTable
da.Fill(dt)

val = dt.Rows(0).Item(0)

Catch ex As Exception
' MessageBox.Show("Error Get Value" & ex.Message)
val = 0
Finally
dbConn.Close()
End Try
Return val
End Function

130
Public Sub display(ByVal SQL As String, ByVal DG As DataGridView)
Try
dbConn.Open()
da = New MySqlDataAdapter(SQL, dbConn)
dt = New DataTable
da.Fill(dt)
DG.DataSource = dt
Catch ex As Exception
MessageBox.Show("Error 102: DB_displayProducts" & ex.Message)
Finally
dbConn.Close()
End Try
End Sub

Public Function display(ByVal SQL As String)


Try
dbConn.Open()
da = New MySqlDataAdapter(SQL, dbConn)
dt = New DataTable
da.Fill(dt)

Catch ex As Exception
MessageBox.Show("Error 102: DB_displayProducts" & ex.Message)
Finally
dbConn.Close()
End Try
Return dt
End Function

Public Sub SQLProcess(ByVal SQL As String)


Try
dbConn.Open()
sqlCommand = New MySqlCommand(SQL, dbConn)
With sqlCommand
'.CommandText = SQL
.CommandType = CommandType.Text
'.Connection = dbConn
.ExecuteNonQuery()
End With
Catch ex As Exception
MessageBox.Show("Error 103: SQL Process : " & ex.Message)
Finally
dbConn.Close()
End Try
End Sub

End Module

Imports MySql.Data.MySqlClient
Imports System.Text
Imports System.Security.Cryptography

Public Class frmuser

Dim query = ""


Dim Status As String
Dim Gender As String
Dim index As Integer

131
Public Function md5toString(ByVal source As String) As String
Dim Bytes() As Byte
Dim sb As New StringBuilder
If String.IsNullOrEmpty(source) Then
Throw New ArgumentNullException

End If
Bytes = Encoding.Default.GetBytes(source)
Bytes = MD5.Create().ComputeHash(Bytes)
For x As Integer = 0 To Bytes.Length - 1
sb.Append(Bytes(x).ToString("x2"))

Next
Return sb.ToString
End Function

Private Sub frmuser_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load
dbConnection()

loadToComboBox("select * from tbl_account_type", cmbUserType)


loadToComboBox("select * from tbl_gender", cmbGender)

DGUser.DataSource = display("select * from user_type_view")

txtUserID.Enabled = False

End Sub

Private Sub DGUser_CellClick(ByVal sender As Object, ByVal e As


System.Windows.Forms.DataGridViewCellEventArgs) Handles DGUser.CellClick

Try
Dim a = e.RowIndex
With DGUser
txtUserID.Text = .Item(0, a).Value
txtFname.Text = .Item(1, a).Value
txtLname.Text = .Item(2, a).Value
cmbUserType.Text = .Item(3, a).Value
txtContact.Text = .Item(4, a).Value
txtEmail.Text = .Item(6, a).Value
txtUser.Text = .Item(7, a).Value
txtPass.Text = .Item(8, a).Value

If .Item(9, a).Value = "Active" Then


RDActive.Checked = True
Else
RDInactive.Checked = True
End If

End With

132
Catch ex As Exception
End Try

End Sub

Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnAdd.Click
Dim hash As frmuser
hash = New frmuser()

hash.md5toString(txtConfirm.Text)

query = "insert into tbl_user values(null,'" & txtFname.Text & "','" &
txtLname.Text & "','" & cmbUserType.SelectedValue & "','" & txtContact.Text &
"','" & cmbGender.SelectedValue & "','" & txtEmail.Text & "','" &
txtUser.Text & "','" & hash.md5toString(txtConfirm.Text) & "','" & Status & "')"

SQLProcess(query)
display("select * from user_type_view", DGUser)

End Sub

Private Sub RDActive_CheckedChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles RDActive.CheckedChanged
Status = "Active"

End Sub

Private Sub RDInactive_CheckedChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles RDInactive.CheckedChanged
Status = "Inactive"

End Sub

Private Sub btnRemove_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnRemove.Click
query = "delete from tbl_user where user_id=" & txtUserID.Text
SQLProcess(query)
display("select * from user_type_view ", DGUser)

txtUserID.Clear()
txtFname.Clear()
txtLname.Clear()
txtContact.Clear()
txtEmail.Clear()
txtUser.Clear()
txtPass.Clear()

End Sub

Private Sub txtSearch_TextChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles txtSearch.TextChanged
Try
query = "Select * from user_type_view where ID like '%" & txtSearch.Text &
"%' or FIRST_NAME like '%" & txtSearch.Text & "%' or LAST_NAME like '%" &
txtSearch.Text & "%'"

133
display(query, DGUser)

Catch ex As Exception

End Try

End Sub

Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnUpdate.Click
Dim hash As frmuser
hash = New frmuser()

hash.md5toString(txtConfirm.Text)

query = "update tbl_user set user_fname = '" & txtFname.Text &


"',user_lname='" & txtLname.Text & "',user_contact='" & txtContact.Text &
"',user_email='" & txtEmail.Text & "',username='" & txtUser.Text & "',password='" &
hash.md5toString(txtConfirm.Text) & "',user_status='" & status &" ' where user_id =" &
txtUserID.Text & ""
SQLProcess(query)
display("select * from user_type_view", DGUser)

End Sub

Private Sub cmbGender_SelectedIndexChanged(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles cmbGender.SelectedIndexChanged

End Sub
End Class

Public Class frmUpdateQtyPO


Dim query = ""
Private Sub frmUpdateQtyPO_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
txtItemName.Enabled = False
End Sub

Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnSave.Click
query = "update tbl_po set po_qty='" & txtQty.Text & "' where po_item_name ='"
& txtItemName.Text & "' "
SQLProcess(query)
purchaseOrder.ReloadPurchaseOrder()
MessageBox.Show("Purchase order successfully Updated..")
Me.Dispose()
End Sub

Private Sub GroupBox1_Enter(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles GroupBox1.Enter

End Sub
End Class

Public Class frmUpdateItems


Dim query
Dim unit
Private Sub frmUpdateItems_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

134
dbConnection()

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click

query = "update tbl_item set item_price= '" & txtPrice.Text & "' where item_id
='" & txtID.Text & "'"
SQLProcess(query)
query = "update tbl_item set item_name= '" & txtName.Text & "' where item_id
='" & txtID.Text & "'"
SQLProcess(query)
query = "update tbl_item set reorder_point= '" & txtReorderPoint.Text & "'
where item_id ='" & txtID.Text & "'"
SQLProcess(query)

'query = "update tbl_item set item_price='" & txtPrice.Text & "' where item_id
='" & txtID.Text & "' "
'SQLProcess(query)

Me.Dispose()
frmInventory.DGItems.DataSource = display("select * from tbl_item")
display("select * from item_inventory_view", frmInventory.DGItems)

frmcashier.DGitems.DataSource = display("select * from tbl_item")


display("select * from item_view", frmcashier.DGitems)

MessageBox.Show("Item Update Succesfully . . ")


End Sub
End Class

Public Class frmUnit

Dim query = ""

Private Sub frmUnit_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load

dbConnection()

DGUnit.DataSource = display("select * from tbl_unit")

txtid.Enabled = False
End Sub

Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnAdd.Click
Try
query = "insert into tbl_unit values(null,'" & txtDesc.Text & "')"

SQLProcess(query)

display("select * from tbl_unit", DGUnit)


txtid.Clear()

txtDesc.Clear()

Catch ex As Exception

End Try

135
End Sub

Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnUpdate.Click
Try

query = "update tbl_unit set unit_description = '" & txtDesc.Text & " '
where unit_id =" & txtid.Text & ""
SQLProcess(query)
btnUpdate.Enabled = True
btnAdd.Enabled = True

display("select * from tbl_unit", DGUnit)


txtid.Clear()

frmcashier.DGitems.DataSource = display("select * from tbl_item")


display("select * from item_view", frmcashier.DGitems)

frmInventory.DGPo.DataSource = display("select ID,NAME,BRAND,UNIT,QUANTITY


from po_item_view where QUANTITY<= REORDER_POINT")
display("select ID,NAME,BRAND,UNIT,QUANTITY from po_item_view where
QUANTITY<= REORDER_POINT", frmInventory.DGPo)

frmInventory.DGItems.DataSource = display("select * from tbl_item")


display("select * from item_inventory_view", frmInventory.DGItems)

txtDesc.Clear()

Catch ex As Exception

End Try
End Sub

Private Sub DGUnit_CellClick(ByVal sender As Object, ByVal e As


System.Windows.Forms.DataGridViewCellEventArgs) Handles DGUnit.CellClick
Try
Dim a = e.RowIndex
With DGUnit

txtid.Text = .Item(0, a).Value


txtDesc.Text = .Item(1, a).Value
End With
btnAdd.Enabled = False
Catch ex As Exception
End Try

End Sub

End Class

Public Class frmsupplier

Dim query = ""


Dim Supplier_status As String

Private Sub frmsupplier_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load
dbConnection()

136
DGSupplier.DataSource = display("select * from supplier_view")

txtID.Enabled = False

End Sub

Private Sub btnaddsupplier_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnaddsupplier.Click

query = "insert into tbl_supplier values(null,'" & txtSupplierName.Text &


"','" & txtAddress.Text & "','" & txtContact.Text & "','" & txtEmail.Text & "','" &
Supplier_status & "')"

SQLProcess(query)
txtID.Clear()
txtSupplierName.Clear()
txtAddress.Clear()
txtContact.Clear()

display("select * from supplier_view", DGSupplier)

End Sub

Private Sub btnRemove_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnRemove.Click
query = "delete from tbl_supplier where supplier_id=" & txtID.Text

SQLProcess(query)
txtID.Clear()
txtSupplierName.Clear()
txtAddress.Clear()
txtContact.Clear()
txtEmail.Clear()

display("select * from supplier_view", DGSupplier)

End Sub

Private Sub DGSupplier_CellClick(ByVal sender As Object, ByVal e As


System.Windows.Forms.DataGridViewCellEventArgs) Handles DGSupplier.CellClick

Try
Dim a = e.RowIndex
With DGSupplier
txtID.Text = .Item(0, a).Value
txtSupplierName.Text = .Item(1, a).Value
txtAddress.Text = .Item(2, a).Value
txtContact.Text = .Item(3, a).Value
txtEmail.Text = .Item(4, a).Value
Supplier_status = .Item(5, a).Value

End With

Catch ex As Exception
End Try

137
End Sub

Private Sub rdActive_CheckedChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles rdActive.CheckedChanged
Supplier_status = "Active"
End Sub

Private Sub rdInactive_CheckedChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles rdInactive.CheckedChanged
Supplier_status = "Inactive"
End Sub

Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnUpdate.Click

query = "update tbl_supplier set supplier_name = '" & txtSupplierName.Text &


"',supplier_address='" & txtAddress.Text & "',supplier_email='" & txtEmail.Text &
"',supplier_contact='" & txtContact.Text & "',supplier_status='" & Supplier_status & "
' where supplier_id =" & txtID.Text & ""
SQLProcess(query)
display("select * from supplier_view", DGSupplier)

End Sub

Private Sub txtSearch_TextChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles txtSearch.TextChanged

Try
query = "Select * from tbl_supplier where supplier_id like '%" &
txtSearch.Text & "%' or supplier_id like '%" & txtSearch.Text & "%' or supplier_name
like '%" & txtSearch.Text & "%' or supplier_address like '%" & txtSearch.Text & "%'"

display(query, DGSupplier)

Catch ex As Exception

End Try

End Sub
End Class

Public Class frmSales

Private Sub frmSales_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load

DGSales.DataSource = display("select Trans_ID AS 'TRANSACTION


ID',SUM(c_o_details_total) AS 'TOTAL',user_id AS 'USER ID',Date_Ordered AS 'DATE' from
tbl_customer_order_details GROUP BY Trans_ID")
display("select Trans_ID AS 'TRANSACTION ID',SUM(c_o_details_total) AS
'TOTAL',user_id AS 'USER ID',Date_Ordered AS 'DATE' from tbl_customer_order_details
GROUP BY Trans_ID", DGSales)

End Sub

Private Sub DGSales_CellClick(ByVal sender As Object, ByVal e As


System.Windows.Forms.DataGridViewCellEventArgs) Handles DGSales.CellClick

138
Dim TransID
Dim query
Dim a = e.RowIndex
With DGSales

TransID = .Item(0, a).Value

End With

query = "select Trans_ID AS 'TRANSACTION ID',c_o_details_item_id AS 'ITEM


ID',c_o_details_item_name AS 'ITEM',c_o_details_item_unit AS 'UNIT',c_o_details_brand
AS 'BRAND', c_o_details_price AS 'PRICE',c_o_details_qty AS 'QTY',c_o_details_total AS
'TOTAL',user_id AS 'USER ID',Date_Ordered AS 'DATE' from tbl_customer_order_details
where Trans_ID = '" & TransID & "'"
display(query, dgViewSales)
End Sub

Private Sub datepickerEnd_ValueChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs)

End Sub

Private Sub datepicker_ValueChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs)

End Sub

Private Sub GroupBox1_Enter(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles GroupBox1.Enter

End Sub
End Class

Public Class frmReports


Dim query = ""
Dim StartDate, EndDAte

Private Sub DGsales_CellContentClick(ByVal sender As System.Object, ByVal e As


System.Windows.Forms.DataGridViewCellEventArgs) Handles DGsales.CellContentClick

End Sub

Private Sub frmReports_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load
dbConnection()
ReloadSalesReports()
GettotalSales()
ReloadDeliveryReport()
ReloadInventoryReport()
ReloadInventoryReportView()

End Sub
Public Sub ReloadSalesReports()
DGSalesView.DataSource = display("select SUM(c_o_details_total) AS
'TOTAL',user_id AS 'USER ID',user_name AS 'USER NAME',Date_Ordered AS 'DATE' from
tbl_customer_order_details Group by Date_Ordered")
DGsales.DataSource = display("select Trans_ID AS 'TRANSACTION
ID',c_o_details_item_id AS 'ITEM ID',c_o_details_item_name AS
'ITEM',c_o_details_item_unit AS 'UNIT',c_o_details_brand AS 'BRAND', c_o_details_price

139
AS 'PRICE',c_o_details_qty AS 'QTY',c_o_details_total AS 'TOTAL',user_id AS 'USER
ID',Date_Ordered AS 'DATE' from tbl_customer_order_details ")

End Sub

Public Sub ReloadDeliveryReport()


dgDeliveryReport.DataSource = display("select po_no as'PO NO',receive_no AS
'R-ID',date_received AS 'R-DATE',user_id AS 'USER ID' from tbl_received_history group
by po_no")

End Sub

Public Sub ReloadInventoryReportView() '----------------------TEEEEEEEESSSSSSTTTT


'DGInventoryReportView.DataSource = display("select ITEM_ID as
'ID',ITEM,UNIT,BRAND,PRICE, sum(QUANTITY),sum(TOTAL),DATE_ORDERED as 'DATE' from
cust_order_view GROUP BY ITEM")

End Sub

Public Sub ReloadInventoryReport()


DGInventoryReport.DataSource = display("select sum(c_o_details_total) as
'TOTAL',user_id as 'USER ID',user_name as 'USER NAME',Date_Ordered as 'DATE ORDERED'
from tbl_customer_order_details group by Date_Ordered")

End Sub

Private Sub DateTimePicker1_ValueChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles datepicker.ValueChanged

Dim SearchDate As String = datepicker.Text


StartDate = datepicker.Text
Try

EndDAte = datepickerend.Text
query = "select sum(c_o_details_total) AS 'TOTAL',user_id AS 'USER
ID',user_name AS 'USER NAME',Date_Ordered AS 'DATE' from tbl_customer_order_details
Where Date_Ordered Between '" & StartDate & "' And '" & EndDAte & "' Group by
Date_Ordered"
display(query, DGSalesView)

GettotalSales()

Catch ex As Exception

End Try
End Sub

Private Sub btnViewAll_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnViewAll.Click
ReloadSalesReports()
GettotalSales()

End Sub

Public Sub GettotalSales()


Dim Result As Double
Try
Dim total
For Each row As DataGridViewRow In DGsales.Rows
total = CDec(row.Cells(7).Value)

140
Result += total
Next
txttotal.Text = Result

Catch ex As Exception

End Try

End Sub

Private Sub TabPage1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles TabPage1.Click

End Sub

Private Sub DGSalesView_CellClick(ByVal sender As Object, ByVal e As


System.Windows.Forms.DataGridViewCellEventArgs) Handles DGSalesView.CellClick
Dim ViewDate = ""
Try
Dim a = e.RowIndex
With DGSalesView

ViewDate = .Item(3, a).Value

End With

Catch ex As Exception
End Try
query = "select Trans_ID AS 'TRANSACTION ID',c_o_details_item_id AS 'ITEM
ID',c_o_details_item_name AS 'ITEM',c_o_details_item_unit AS 'UNIT',c_o_details_brand
AS 'BRAND', c_o_details_price AS 'PRICE',c_o_details_qty AS 'QTY',c_o_details_total AS
'TOTAL',user_id AS 'USER ID',Date_Ordered AS 'DATE' from tbl_customer_order_details
where Date_Ordered = '" & ViewDate & "'"
display(query, DGsales)
GettotalSales()

'Tempory . . . . . . . . . .--------------------------------------------
End Sub

Private Sub dgDeliveryReport_CellClick(ByVal sender As Object, ByVal e As


System.Windows.Forms.DataGridViewCellEventArgs) Handles dgDeliveryReport.CellClick
Dim value = ""
Try
Dim a = e.RowIndex
With dgDeliveryReport

value = .Item(0, a).Value

End With

Catch ex As Exception
End Try

query = "select * from history_view where PO_NO = '" & value & "'"
display(query, dgDeliveryViews)
End Sub

Private Sub datepickerend_ValueChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles datepickerend.ValueChanged

141
EndDAte = datepickerend.Text
query = "select sum(c_o_details_total) AS 'TOTAL',user_id AS 'USER
ID',user_name AS 'USER NAME',Date_Ordered AS 'DATE' from tbl_customer_order_details
Where Date_Ordered Between '" & StartDate & "' And '" & EndDAte & "' Group by
Date_Ordered"
display(query, DGSalesView)
GettotalSales()
End Sub

Private Sub DGSalesView_CellContentClick(ByVal sender As System.Object, ByVal e As


System.Windows.Forms.DataGridViewCellEventArgs) Handles DGSalesView.CellContentClick

End Sub

Private Sub DGInventoryReport_CellClick(ByVal sender As Object, ByVal e As


System.Windows.Forms.DataGridViewCellEventArgs) Handles DGInventoryReport.CellClick

Dim getdate = ""


Dim i = e.RowIndex
With DGInventoryReport

getdate = .Item(3, i).Value

DGInventoryReportView.DataSource = display("select
c_o_details_item_id as 'ID',c_o_details_item_name as
'ITEM',c_o_details_item_unit as 'UNIT',c_o_details_brand as 'BRAND',c_o_details_price
as 'PRICE',sum(c_o_details_qty) as 'QTY',sum(c_o_details_total) as 'TOTAL' from
tbl_customer_order_details where Date_Ordered ='" & getdate & "' Group by
c_o_details_item_name")

End With

End Sub

End Class

Public Class frmLogs

Private Sub frmLogs_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load
Reloadlogs()
End Sub

Public Sub Reloadlogs()

DGlogs.DataSource = display("select log_id AS 'ID',user_id AS 'USER',time_in


AS 'TIME IN',time_out AS 'TIME OUT',date AS 'DATE' from tbl_logs")

End Sub
End Class

Imports MySql.Data.MySqlClient
Imports System.Text
Imports System.Security.Cryptography

Public Class frmlogin

142
Public Function md5toString(ByVal source As String) As String
Dim Bytes() As Byte
Dim sb As New StringBuilder

If String.IsNullOrEmpty(source) Then

End If

Bytes = Encoding.Default.GetBytes(source)
Bytes = MD5.Create().ComputeHash(Bytes)
For x As Integer = 0 To Bytes.Length - 1
sb.Append(Bytes(x).ToString("x2"))

Next
Return sb.ToString
End Function

Public Sub Clear()

txtUser.Text = ""
txtPass.Text = ""
End Sub

Dim sqlCon As MySqlConnection

Public Sub New()

' This call is required by the designer.


InitializeComponent()
sqlCon = New MySqlConnection("server=localhost; user=root; convert zero
datetime=True; database= dbsad")

' Add any initialization after the InitializeComponent() call.

End Sub

Private Sub btnLogin_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnLogin.Click
dbConnection()

Dim hashcode As frmlogin


hashcode = New frmlogin()

Dim str = "select * from tbl_user where username= '" & txtUser.Text & "' and
password= '" & hashcode.md5toString(txtPass.Text) & "'"

Dim comm = New MySqlCommand(str, sqlCon)


Dim adp = New MySqlDataAdapter(comm)
Dim dt = New DataTable
adp.Fill(dt)

143
Dim login As String
Dim login2 As String

If dt.Rows.Count = Nothing Then


MessageBox.Show("Sorry, You are not yet registered.", "",
MessageBoxButtons.OK, MessageBoxIcon.Error)

ElseIf txtPass.Text = "" Then


MessageBox.Show("Invalid password!", "", MessageBoxButtons.OK,
MessageBoxIcon.Exclamation)
Return
ElseIf txtUser.Text = "" Then
MessageBox.Show("Invalid username!", "", MessageBoxButtons.OK,
MessageBoxIcon.Exclamation)
Return

ElseIf (dt.Rows(0)(3) = 1) Then


MessageBox.Show("Welcome Admin")
login = dt.Rows(0)(1)
login2 = dt.Rows(0)(2)

Dim Fullname As String


Fullname = login + " " + login2
Dim HoldTime As String = " " + TimeOfDay
frmMain.lblDate.Text = Date.Today
frmMain.lbltimein.Text = HoldTime
frmMain.lblTime.Text = TimeOfDay
frmMain.lblName.Text = Fullname
frmMain.lblID.Text = dt.Rows(0)(0)

frmMain.Show()
Me.Hide()
Clear()

ElseIf (dt.Rows(0)(3) = 2) Then


MessageBox.Show("Welcome Cashier")
login = dt.Rows(0)(1)
login2 = dt.Rows(0)(2)

Dim Fullname As String


Fullname = login + " " + login2

frmMain.lblDate.Text = Date.Now.ToShortDateString
frmMain.lblTime.Text = TimeString
frmMain.lblName.Text = Fullname

frmMain.Show()
Me.Hide()
frmdashboard.btnUser.Enabled = False
frmdashboard.btnUser.BackColor = Color.LightGray
frmdashboard.pboxUser.BackColor = Color.Transparent

frmdashboard.btnSupplier.Enabled = False
frmdashboard.btnSupplier.BackColor = Color.LightGray

144
frmdashboard.pboxSupplier.BackColor = Color.Transparent

Clear()
frmInventory.btnUpdateItem.Enabled = False
frmInventory.btnUpdateItem.BackColor = Color.LightGray
frmInventory.btnUpdateItem.BackColor = Color.Transparent

frmInventory.btnUpdateItem.Enabled = False
frmcashier.TopLevel = False
frmMain.mainpanel.Controls.Add(frmcashier)
frmcashier.BringToFront()
frmcashier.Show()

'AdminForm.txtEncodedBy.Text = login
'AdminForm.txtEncoded.Text = login
'AdminForm.txtEncoded2.Text = login
'AdminForm.txtEncoded3.Text = login

frmMain.Show()
Me.Hide()
ElseIf (dt.Rows(0)(1) = 2 And dt.Rows(0)(2) = 1) Then

' MessageBox.Show("Welcome Cashier")


'login2 = dt.Rows(0)(3)
'frmEmployee.BuyControl1.txtLoginUser.Text = login2

' frmcashier.Show()
'Me.Hide()

'ElseIf (dt.Rows(0)(10) = 2 And dt.Rows(0)(9) = 1) Then


' MessageBox.Show("Welcome Cashier")
' login2 = dt.Rows(0)(1)
' 'EmployeeForm.txtLogin.Text = login2
' 'hen = dt.Rows(0)(0)

' 'EmployeeForm.txttry.Text = hen

' 'EmployeeForm.Show()
' Me.Hide()
ElseIf (dt.Rows(0)(10) = 2 And dt.Rows(0)(9) = 2) Then
MessageBox.Show("inactive account")
End If

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click
Me.Dispose()
End Sub

Private Sub frmlogin_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load

145
' txtPass.Enabled = False
'txtUser.Enabled = False
'btnLogin.Enabled = False
'Button1.Enabled = False
'Me.Show()
'MessageBox.Show(" Sorry the System has been Expired . .", "",
MessageBoxButtons.OK, MessageBoxIcon.Warning)
'Me.Dispose()
End Sub
End Class

Public Class frmInventory

Dim query = ""


Dim ID, Supplier, Brand, Unit, Item, Qty, Price, ReorderPoint, DateAdd

Private Sub DGItems_CellClick(ByVal sender As Object, ByVal e As


System.Windows.Forms.DataGridViewCellEventArgs) Handles DGItems.CellClick
Try
Dim a = e.RowIndex
With DGItems

ID = .Item(0, a).Value
Supplier = .Item(1, a).Value
Brand = .Item(2, a).Value
Unit = .Item(3, a).Value
Item = .Item(4, a).Value
Qty = .Item(5, a).Value
Price = .Item(6, a).Value
ReorderPoint = .Item(7, a).Value
DateAdd = .Item(8, a).Value

End With

Catch ex As Exception
End Try

End Sub

Private Sub frmInventory_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load

dbConnection()

GetPOID("select max(po_no) from tbl_received_history")


loadToComboBox("select * from tbl_supplier", cmbSupplierN)

DGPo.DataSource = display("select ID,NAME,BRAND,UNIT,QUANTITY from


po_item_view where QUANTITY<= REORDER_POINT")
display("select ID,NAME,BRAND,UNIT,QUANTITY from po_item_view where QUANTITY<=
REORDER_POINT", DGPo)

Dim j = 0

146
ReloadStockOut()
ReloadItems()

frmcashier.DGitems.DataSource = display("select * from tbl_item")


display("select * from item_view", frmcashier.DGitems)

loadToComboBox("select * from tbl_brand", cmbBrand)


loadToComboBox("select * from tbl_unit", cmbUnit)

txtPOnumber.Enabled = False
txtID.Enabled = False
txtName.Enabled = False

End Sub

Private Sub txtSearch_TextChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles txtSearch.TextChanged
Try
query = "Select * from item_inventory_view where ID like '%" &
txtSearch.Text & "%' or ID like '%" & txtSearch.Text & "%' or NAME like '%" &
txtSearch.Text & "%' or BRAND like '%" & txtSearch.Text & "%' or UNIT like '%" &
txtSearch.Text & "%'"

display(query, DGItems)

Catch ex As Exception

End Try

End Sub

Private Sub btnUpdateItem_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnUpdateItem.Click
frmUpdateItems.txtID.Text = ID
frmUpdateItems.txtSupplier.Text = Supplier
frmUpdateItems.txtBrand.Text = Brand
frmUpdateItems.txtName.Text = Item
frmUpdateItems.txtunit.Text = Unit
frmUpdateItems.txtQty.Text = Qty
frmUpdateItems.txtPrice.Text = Price
frmUpdateItems.txtReorderPoint.Text = ReorderPoint
frmUpdateItems.txtDateAdded.Text = DateAdd

frmUpdateItems.txtID.Enabled = False
frmUpdateItems.txtunit.Enabled = False
frmUpdateItems.txtBrand.Enabled = False
frmUpdateItems.txtQty.Enabled = False
frmUpdateItems.txtSupplier.Enabled = False
frmUpdateItems.txtDateAdded.Enabled = False
frmUpdateItems.Show()
End Sub

147
Private Sub DGItems_CellContentClick(ByVal sender As System.Object, ByVal e As
System.Windows.Forms.DataGridViewCellEventArgs) Handles DGItems.CellContentClick

End Sub

Private Sub COLOR()


Try

' For Each row As DataGridViewRow In DGItems.Rows


For x As Integer = 0 To DGItems.Rows.Count - 1

If DGItems.Rows(x).Cells(5).Value = 0 Then
DGItems.Rows(x).DefaultCellStyle.BackColor = Drawing.Color.Red
End If

Next
Catch ex As Exception

End Try

End Sub

Private Sub DGPo_CellClick(ByVal sender As Object, ByVal e As


System.Windows.Forms.DataGridViewCellEventArgs) Handles DGPo.CellClick
Try
Dim x = e.RowIndex
With DGPo

txtID.Text = .Item(0, x).Value


txtName.Text = .Item(1, x).Value
cmbBrand.Text = .Item(2, x).Value
cmbUnit.Text = .Item(3, x).Value

End With
Catch ex As Exception
End Try

End Sub

Private Sub grpReOrder_Enter(ByVal sender As System.Object, ByVal e As


System.EventArgs)
dbConnection()
loadToComboBox("select * from tbl_supplier", cmbSupplierN)

End Sub

Private Sub btnAddtoPO_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnAddtoPO.Click
Dim Supplier = GetValue("select supplier_id from tbl_supplier where
supplier_name = '" & cmbSupplierN.Text & "'", cmbSupplierN.Text)

If Duplicate(txtID.Text) Then
MsgBox("Item is Already Exist . . ")
Else
Dim ReorderPoint = 15

148
query = "insert into tbl_po values(null,'" & txtPOnumber.Text & "','" &
txtID.Text & "','" & txtName.Text & "','" & cmbUnit.SelectedValue & "','" &
cmbBrand.SelectedValue & "','" & txtqty.Text & "','" & cmbSupplierN.SelectedValue &
"','" & ReorderPoint & "')"
MessageBox.Show("Succesfully Add to chart . .")
SQLProcess(query)
ReloadPo()

End If

'MessageBox.Show("Mali ang PO putttaaa")

End Sub

Public Sub ReloadItems()


DGItems.DataSource = display("select * from tbl_item")
display("select * from item_inventory_view", DGItems)

End Sub

Public Sub ReloadReceived()

purchaseOrder.DGRecieved.DataSource = display("select * from


receive_details_view")

End Sub
Public Sub ReloadStockOut()

DGStockOut.DataSource = display("select item_name as 'ITEM',item_brand as


'BRAND',item_price as 'PRICE',item_qty as 'QTY',reason as 'REASON',user_name as 'USER
NAME' from tbl_stock_out")

End Sub
Public Sub ReloadDamage()
purchaseOrder.DGdamage.DataSource = display("select * from supp_return_view")

End Sub

Public Sub ReloadPo()

purchaseOrder.ReloadPurchaseOrder()

End Sub

Public Function Duplicate(ByVal id As String) As Boolean


Duplicate = False

For Each dtarow As DataGridViewRow In purchaseOrder.DGPurchase.Rows


If id = dtarow.Cells(2).Value Then
Duplicate = True
End If
Next
Return Duplicate
End Function

149
Private Sub btnAdditem_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnAdditem.Click
frmAddnewOrder.Show()
End Sub

Private Sub btnAddSupplier_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnAddSupplier.Click
frmsupplier.Show()

End Sub

Private Sub BtnStockOut_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles BtnStockOut.Click

Dim User_name = GetValue("select username from tbl_user where user_id= '" &
frmMain.lblID.Text & "'", frmMain.lblID.Text)

frmAddStockOut.txtUserID.Text = frmMain.lblID.Text
frmAddStockOut.txtUserName.Text = User_name
frmAddStockOut.txtItem.Text = Item
frmAddStockOut.txtBrand.Text = Brand
frmAddStockOut.txtPrice.Text = Price
frmAddStockOut.txtQty.Text = 1

frmAddStockOut.txtUserID.Enabled = False
frmAddStockOut.txtUserName.Enabled = False
frmAddStockOut.txtBrand.Enabled = False
frmAddStockOut.txtPrice.Enabled = False
frmAddStockOut.txtItem.Enabled = False

frmAddStockOut.Show()

End Sub

Private Sub TabPage1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles TabPage1.Click

End Sub
End Class

Public Class frmHollowBlocksProduction

Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles TextBox1.TextChanged

End Sub

Private Sub frmHollowBlocksProduction_Load(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles MyBase.Load

End Sub

Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e


As System.Windows.Forms.DataGridViewCellEventArgs) Handles
DataGridView1.CellContentClick

End Sub
End Class

150
Public Class frmHistory

Private Sub frmHistory_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load

dbConnection()
ReloadHistory()
End Sub

Public Sub ReloadHistory()


'dgDeliveryHistory.DataSource = display("select receive_no AS 'R-ID',po_no
as'PO NO',item AS 'ITEM',request_qty AS 'QTY',supplier_price AS 'PRICE',received_qty
AS 'RECEIVED',damage_qty AS 'DAMAGE',date_received AS 'R-DATE',user_id AS 'USER
ID',supplier_id AS'SUPPLIER' from tbl_received_history order by receive_no")
display("select * from history_view", dgDeliveryHistory)
End Sub

Private Sub GroupBox1_Enter(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles GroupBox1.Enter

End Sub
End Class

Public Class frmDisplayPurchaseOrder

Dim query = ""


Private Sub frmDisplayPurchaseOrder_Activated(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Activated

' DGPO.DataSource = display("select po_id AS 'ID',po_no AS 'PO No.',item_id AS


'ITEM ID',po_item_name AS 'ITEM',unit_id AS 'UNIT',brand_id AS 'BRAND',po_qty AS
'QTY',supplier_id AS 'SUPPLIER',reorder_point AS 'REORDER POINT' from tbl_po")

End Sub

Private Sub frmDisplayPurchaseOrder_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load

End Sub
End Class

Public Class frmdashboard

Private Sub Label10_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs)

End Sub

Private Sub btnSupplier_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnSupplier.Click
frmsupplier.Show()
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnUser.Click
frmuser.Show()

151
End Sub

Private Sub btnHollowBlockProduction_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs)
frmHollowBlocksProduction.Show()
End Sub

' Private Sub btnPO_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnPO.Click
'frmDisplayPurchaseOrder.Show()
' End Sub

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button5.Click
frmLogs.Show()
End Sub

Private Sub btnSales_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnSales.Click
frmSales.Show()
End Sub

Private Sub Button2_Click_1(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnBrand.Click
frmbrand.Show()

End Sub

Private Sub btnUnit_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnUnit.Click
frmUnit.Show()

End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button4.Click
frmBackUPAndRestore.Show()
End Sub

Private Sub btnHistory_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnHistory.Click
frmHistory.Show()
End Sub

Private Sub btnCategory_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnCategory.Click
frmCategory.Show()

End Sub

Private Sub frmdashboard_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load

End Sub
End Class

Public Class frmCustomer

Dim query = ""

152
Private Sub frmCustomer_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
dbConnection()

DGcustomer.DataSource = display("select * from tbl_customer")


display("select * from customer_view", DGcustomer)

txtCustomerID.Enabled = False

loadToComboBox("select * from tbl_gender", cmbGender)

End Sub

Private Sub btnAddCust_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnAddCust.Click

query = "insert into tbl_customer values(null,'" & txtCustomerID.Text &


txtCustFname.Text & "','" & txtCustLname.Text & "','" & cmbGender.SelectedValue &
"','" & txtCustContact.Text & "')"

SQLProcess(query)
display("select * from customer_view", DGcustomer)

loadToComboBox("select * from tbl_customer", frmcashier.cmbCustomer)

End Sub

Private Sub txtSearch_TextChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles txtSearch.TextChanged
Try
query = "Select * from tbl_customer where customer_id like '%" &
txtSearch.Text & "%' or customer_fname like '%" & txtSearch.Text & "%' or
customer_lname like '%" & txtSearch.Text & "%'"

display(query, DGcustomer)

Catch ex As Exception

End Try

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click

End Sub
End Class

Public Class frmCategory

Dim query = ""


Private Sub frmCategory_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

dbConnection()

153
DGCategory.DataSource = display("select * from tbl_category")

txtid.Enabled = False
End Sub

Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnAdd.Click

Try
query = "insert into tbl_category values(null,'" & txtDesc.Text & "')"

SQLProcess(query)

display("select * from tbl_category", DGCategory)

loadToComboBox("select * from tbl_category", frmcashier.cboCategory)

Catch ex As Exception

End Try

End Sub

Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnUpdate.Click
Try

query = "update tbl_category set category_description = '" & txtDesc.Text


& " ' where category_id =" & txtid.Text & ""
SQLProcess(query)

display("select * from tbl_category", DGCategory)

btnUpdate.Enabled = True
btnAdd.Enabled = True

Catch ex As Exception

End Try

End Sub

Private Sub DGCategory_CellClick(ByVal sender As Object, ByVal e As


System.Windows.Forms.DataGridViewCellEventArgs) Handles DGCategory.CellClick
Try
Dim a = e.RowIndex
With DGCategory

txtid.Text = .Item(0, a).Value


txtDesc.Text = .Item(1, a).Value
End With
btnAdd.Enabled = False
Catch ex As Exception
End Try

End Sub

154
End Class

Imports System.Drawing.Printing
Public Class frmCashInvoice

Private Sub frmCashInvoice_Activated(ByVal sender As Object, ByVal e As


System.EventArgs) Handles Me.Activated
'Dim objReader As New System.IO.StreamReader("CashInvoice.txt")
'txtFile.Text = objReader.ReadToEnd
'objReader.Close()
End Sub

Private Sub btnPrint_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnPrint.Click
Try
PrintDocument1.Print()
Catch ex As Exception
MsgBox(ex.Message)

End Try

End Sub

Private Sub btnPreview_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnPreview.Click
PrintPreviewDialog.ShowDialog()
End Sub

Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As


System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage

Dim font As New Font("Courier New", 10, FontStyle.Regular)


e.Graphics.DrawString(txtFile.Text, font, Brushes.Black, 100, 100)
End Sub

Private Sub frmCashInvoice_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load

End Sub
End Class

Public Class frmcashier

Dim query = ""


Dim index As Integer
Dim ItemIndex As Integer
Dim subtotal, total As Decimal
Dim newDataRow As Integer

155
Private Sub frmcashier_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
dbConnection()
subtotal = 0
total = 0
Dim ID As Integer = 0
txtTrans.Enabled = False

GetTransID("select max(Trans_ID) from tbl_customer_order_details")

DGitems.DataSource = display("select * from tbl_item")


display("select * from item_view", DGitems)

loadToComboBox("select * from tbl_category", cboCategory)

cmbCustomer.Items.Add("WALK-IN")
cmbCustomer.SelectedIndex = 0

txtID.Enabled = False
txtprice.Enabled = False
txtname.Enabled = False
txtBrand.Enabled = False
txtunit.Enabled = False
txtqty.Enabled = False
txtTotal.Enabled = False
txtChange.Enabled = False
txtvat.Enabled = False

txtTotal.Text = 0
txtPayment.Text = 0
txtChange.Text = 0.0
txtvat.Text = "12%".ToString

End Sub

Private Sub DGitems_CellClick(ByVal sender As Object, ByVal e As


System.Windows.Forms.DataGridViewCellEventArgs) Handles DGitems.CellClick
Try

Dim i = e.RowIndex
With DGitems

txtID.Text = .Item(0, i).Value


txtname.Text = .Item(1, i).Value
txtBrand.Text = .Item(2, i).Value
txtunit.Text = .Item(3, i).Value
txtprice.Text = .Item(4, i).Value
txtqty.Text = 1

ItemIndex = i

End With

btnAdd.Enabled = True
txtqty.Enabled = True

156
Catch ex As Exception
End Try
End Sub

Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnAdd.Click
Try
subtotal = 0

'-------------------------------------------------------------------------
-------------

Dim ID As Integer = txtID.Text


Dim Name As String = txtname.Text
Dim Brand As String = txtBrand.Text
Dim Unit As String = txtunit.Text
Dim Price As String = txtprice.Text
Dim Qty As Integer = txtqty.Text

If DGitems.Rows(ItemIndex).Cells(5).Value < txtqty.Text Then


MessageBox.Show("Invalid to add more than limit quantity . . ")
ElseIf txtqty.Text = 0 Then
MessageBox.Show("invalid quantity")
ElseIf txtprice.Text = 0 Then
MessageBox.Show("invalid Order the price not Set" + vbCrLf + "please
contact the admin to set" + vbCrLf + "the price . . Thank u")

Else
If Duplicate(Name) Then
MsgBox("Item is Already Exist . . ")
Else
subtotal = txtprice.Text * txtqty.Text
total += subtotal
txtTotal.Text = total
DGOrderitem.Rows.Add(ID, Name, Brand, Unit, Price, Qty, subtotal)

End If

End If

txtID.Clear()
txtname.Clear()
txtBrand.Clear()
txtunit.Clear()
txtprice.Clear()
txtqty.Clear()

Catch ex As Exception

End Try
frmInventory.DGPo.DataSource = display("select ID,NAME,BRAND,UNIT,QUANTITY
from po_item_view where QUANTITY<= REORDER_POINT")
display("select ID,NAME,BRAND,UNIT,QUANTITY from po_item_view where QUANTITY<=
REORDER_POINT", frmInventory.DGPo)

157
End Sub

Public Function Duplicate(ByVal name As String) As Boolean


Duplicate = False

For Each dtarow As DataGridViewRow In DGOrderitem.Rows


If name = dtarow.Cells(1).Value Then
Duplicate = True
End If
Next
Return Duplicate
End Function

Private Sub txtSearch_TextChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles txtSearch.TextChanged

Try
' query = "Select * from item_view where item_id like '%" & txtSearch.Text
& "%' or item_id like '%" & txtSearch.Text & "%' or item_name like '%" &
txtSearch.Text & "%' or brand_name like '%" & txtSearch.Text & "%'"
query = "Select * from item_view where id like '%" & txtSearch.Text & "%'
or id like '%" & txtSearch.Text & "%' or name like '%" & txtSearch.Text & "%' or brand
like '%" & txtSearch.Text & "%'"

display(query, DGitems)

Catch ex As Exception

End Try

End Sub

Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnUpdate.Click
Try
total = 0
Dim newDataRow As DataGridViewRow
newDataRow = DGOrderitem.Rows(index)

Dim id
Dim qty

id = CInt(newDataRow.Cells(0).Value)
qty = CInt(newDataRow.Cells(5).Value)

For Each dtarow As DataGridViewRow In DGitems.Rows


Dim val As String = ""
If id = dtarow.Cells(0).Value Then
If dtarow.Cells(5).Value <= txtqty.Text - 1 Then
val = (dtarow.Cells(5).Value - qty)
MsgBox("Invalid to add more than the limit item qty . . ")
Else
newDataRow.Cells(5).Value = txtqty.Text
End If
End If
Next

158
For Each dtarow As DataGridViewRow In DGOrderitem.Rows
Dim qtyValue = newDataRow.Cells(5).Value
Dim priceValue = newDataRow.Cells(4).Value

subtotal = qtyValue * priceValue


newDataRow.Cells(6).Value = subtotal
Next

For i = 0 To DGOrderitem.RowCount - 1
Dim val = DGOrderitem.Rows(i).Cells(6).Value
total += val
Next
txtTotal.Text = total

Catch ex As Exception

End Try
End Sub

Private Sub DGOrderitem_CellClick(ByVal sender As Object, ByVal e As


System.Windows.Forms.DataGridViewCellEventArgs) Handles DGOrderitem.CellClick
Try
Dim a = e.RowIndex
With DGOrderitem
txtID.Text = .Item(0, a).Value
txtname.Text = .Item(1, a).Value
txtBrand.Text = .Item(2, a).Value
txtunit.Text = .Item(3, a).Value
txtprice.Text = .Item(4, a).Value
txtqty.Text = .Item(5, a).Value

index = a

End With

txtqty.Enabled = True
btnAdd.Enabled = False
Catch ex As Exception
End Try

End Sub

Private Sub btnRemove_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnRemove.Click
Try

Dim dta As DataGridViewRow


dta = DGOrderitem.Rows(index)

Dim subtotal

subtotal = CInt(dta.Cells(6).Value)

Dim grandtotal = txtTotal.Text


Dim result = (grandtotal - subtotal)

159
txtTotal.Text = result
total = result
DGOrderitem.Rows.RemoveAt(index)
Catch ex As Exception
'MsgBox("Please Order Items . . ")
End Try

End Sub

Private Sub BtnAddCustomer_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles BtnAddCustomer.Click
frmCustomer.Show()
End Sub

Private Sub grpCustomer_Enter(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles grpCustomer.Enter
loadToComboBox("select * from tbl_customer", cmbCustomer)

End Sub

Private Sub btnPayment_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnPayment.Click
Dim DisplayError As String = "Invalid Payment. ."
query = "Truncate temp_tbl_sales"
SQLProcess(query)

Try
Dim total As Integer = txtTotal.Text
Dim payment As Integer = txtPayment.Text
Dim result = (payment - total)

If txtTotal.Text = 0 Then
MessageBox.Show("Empty Orders . . ")
End If

If txtPayment.Text = 0 Then

ElseIf txtTotal.Text >= txtPayment.Text + 1 Then


MessageBox.Show("Your cash is not enough to pay . . ")

Else
txtChange.Text = result

' CrystalReport.Show()
====================================================Crystal REPORT

CashInvoice()
' frmCashInvoice.Show()
End If

Catch ex As Exception

160
MessageBox.Show(DisplayError)
End Try

GetTransID("select max(Trans_ID) from tbl_customer_order_details")

subtotal = 0
total = 0

frmInventory.DGPo.DataSource = display("select ID,NAME,BRAND,UNIT,QUANTITY


from po_item_view where QUANTITY<= REORDER_POINT")
display("select ID,NAME,BRAND,UNIT,QUANTITY from po_item_view where QUANTITY<=
REORDER_POINT", frmInventory.DGPo)

frmInventory.DGItems.DataSource = display("select * from tbl_item")


display("select * from item_inventory_view", frmInventory.DGItems)

End Sub

Public Sub CashInvoice()


Dim User As String = frmMain.lblName.Text
Dim OrderDate As String = frmMain.lblDate.Text
Dim Customer As String = cmbCustomer.Text
Dim SetItems As String = ""
Dim print_name = ""
Dim Display_CashInvoice As String =
" --------------------------------------
----------------" + vbCrLf +
" - - - - - - - - - - DA28 ENTERPRISES22
- - - - - - - - " + vbCrLf +
" Indangan,Buhangin,
Davao City " + vbCrLf +
" Cash Invoice # :" +
txtTrans.Text + vbCrLf +
" Cashier Name : " + User
+ " " + vbCrLf +
" Date : " + OrderDate +
"" + vbCrLf +
" Order By:" + Customer +
vbCrLf +
" --------------------------------------
-----------------" + vbCrLf +
" ***************** ORDER ITEM
**************** " + vbCrLf +
" --------------------------------------
-----------------" + vbCrLf

Dim setitem As String = ""


Dim i As Integer = 1

For Each row As DataGridViewRow In DGOrderitem.Rows


Dim Date_Order = frmMain.lblDate.Text
Dim id, name, brand, unit, price, qty, subtotal As String
Dim GrandTotal As Integer = txtPayment.Text
Dim TransactionID As String = txtTrans.Text

id = CInt(row.Cells(0).Value)

161
name = row.Cells(1).Value
brand = row.Cells(2).Value
unit = row.Cells(3).Value
price = CDec(row.Cells(4).Value)
qty = CInt(row.Cells(5).Value)
subtotal = CDec(row.Cells(6).Value)

If id = 0 Then

Else

Dim UserID = frmMain.lblID.Text


Dim userName = GetValue("select username from tbl_user where user_id =
'" & UserID & "'", UserID)
query = "insert into tbl_customer_order_details values(null,'" &
TransactionID & "','" & id & "','" & name & "','" & unit & "','" & brand & "','" &
price & "','" & qty & "','" & subtotal & "','" & frmMain.lblID.Text & "','" & userName
& "','" & Date_Order & "')"
SQLProcess(query)

query = "update tbl_item set item_qty=(item_qty - '" & qty & "') where
item_id ='" & id & "' "
SQLProcess(query)
End If

setitem += vbCrLf + " Item ID :" + id + vbCrLf +


" Item :" + name + vbCrLf +
" Brand :" + brand + vbCrLf +
" Unit :" + unit + vbCrLf +
" Price :" + price + vbCrLf +
" Quantity :" + qty + vbCrLf +
" Sub total :" + subtotal + vbCrLf +
"-------------------------------------------------------"
+ vbCrLf + vbCrLf

query = "insert into temp_tbl_sales values(null,'" & name & "','" & brand
& "','" & unit & "','" & price & "','" & qty & "','" & subtotal & "')"
SQLProcess(query)
CrystalReport.Show()

Next

DGitems.DataSource = display("select * from tbl_item")


display("select * from item_view", DGitems)

DGOrderitem.Rows.Clear()

Dim Setpayment As String = "Grand Total : " + txtTotal.Text + vbCrLf +


"Cash :" + txtPayment.Text + vbCrLf +
"Changes :" + txtChange.Text

162
Dim SetCashInvoice As String = "" + Display_CashInvoice + setitem + Setpayment
frmCashInvoice.txtFile.Text = SetCashInvoice

txtTotal.Clear()
txtChange.Clear()
txtPayment.Clear()

setitem = ""
Setpayment = ""

total = 0
subtotal = 0

End Sub

Private Sub btnCancelOrder_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnCancelOrder.Click
subtotal = 0
total = 0
txtTotal.Text = 0
DGOrderitem.Rows.Clear()

End Sub

Private Sub txtqty_KeyPress(ByVal sender As Object, ByVal e As


System.Windows.Forms.KeyPressEventArgs) Handles txtqty.KeyPress
If (e.KeyChar < Chr(48) Or e.KeyChar > Chr(57)) And e.KeyChar <> Chr(8) Then

e.Handled = True

End If
End Sub

Private Sub txtPayment_KeyPress(ByVal sender As Object, ByVal e As


System.Windows.Forms.KeyPressEventArgs) Handles txtPayment.KeyPress
If (e.KeyChar < Chr(48) Or e.KeyChar > Chr(57)) And e.KeyChar <> Chr(8) Then

e.Handled = True

End If
End Sub

Private Sub txtPayment_TextChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles txtPayment.TextChanged
Try
Dim total As Integer = txtTotal.Text
Dim payment As Integer = txtPayment.Text
Dim result = (payment - total)
txtChange.Text = result
Catch ex As Exception

End Try

End Sub

163
Private Sub DGitems_CellContentClick(ByVal sender As System.Object, ByVal e As
System.Windows.Forms.DataGridViewCellEventArgs) Handles DGitems.CellContentClick

End Sub

Private Sub Panel6_Paint(ByVal sender As System.Object, ByVal e As


System.Windows.Forms.PaintEventArgs) Handles Panel6.Paint

End Sub
End Class

Public Class frmbrand

Dim query = ""


Private Sub frmbrand_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

dbConnection()

DGbrand.DataSource = display("select * from tbl_brand")

txtid.Enabled = False
End Sub

Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnAdd.Click

Try
query = "insert into tbl_brand values(null,'" & txtName.Text & "')"

SQLProcess(query)

display("select * from tbl_brand", DGbrand)

frmcashier.DGitems.DataSource = display("select * from tbl_item")


display("select * from item_view", frmcashier.DGitems)

frmInventory.DGPo.DataSource = display("select ID,NAME,BRAND,UNIT,QUANTITY


from po_item_view where QUANTITY<= REORDER_POINT")
display("select ID,NAME,BRAND,UNIT,QUANTITY from po_item_view where
QUANTITY<= REORDER_POINT", frmInventory.DGPo)

frmInventory.DGItems.DataSource = display("select * from tbl_item")


display("select * from item_inventory_view", frmInventory.DGItems)

Catch ex As Exception

End Try

End Sub

Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnUpdate.Click
Try

164
query = "update tbl_brand set brand_name = '" & txtName.Text & " ' where
brand_id =" & txtid.Text & ""
SQLProcess(query)

display("select * from tbl_brand", DGbrand)

btnUpdate.Enabled = True
btnAdd.Enabled = True

Catch ex As Exception

End Try

End Sub

Private Sub DGbrand_CellClick(ByVal sender As Object, ByVal e As


System.Windows.Forms.DataGridViewCellEventArgs) Handles DGbrand.CellClick
Try
Dim a = e.RowIndex
With DGbrand

txtid.Text = .Item(0, a).Value


txtName.Text = .Item(1, a).Value
End With
btnAdd.Enabled = False
Catch ex As Exception
End Try

End Sub

End Class

Imports MySql.Data.MySqlClient
Imports System.IO
Public Class frmBackUPAndRestore

Dim SqlConnection As MySqlConnection

Dim dt As New DataTable


Dim cmd As String
Dim dtseCt As Integer
Dim da As MySqlDataAdapter

Private Sub btnConnect_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnConnect.Click

Try
dbConnection()
cmd = "SELECT DISTINCT TABLE_SCHEMA FROM information_schema.TABLES"
da = New MySqlDataAdapter(cmd, SqlConnection)
da.Fill(dt)
dtseCt = 0

cmbdatabase.Enabled = True
cmbdatabase.Items.Clear()
cmbdatabase.Items.Add("== Select Database ==")

165
While dtseCt < dt.Rows.Count

cmbdatabase.Items.Add(dt.Rows(dtseCt)(0).ToString())
dtseCt = dtseCt + 1

End While

cmbdatabase.SelectedIndex = 0
btnConnect.Enabled = False
btnBackUp.Enabled = True
btnRestore.Enabled = True

SqlConnection.Close()
dt.Dispose()
da.Dispose()

Catch ex As Exception
MsgBox("Connection Field!")
End Try
End Sub
Public Sub dbConnection()
Try
SqlConnection = New MySqlConnection("Server=" & txtserver.Text & ";user
id=" & txtuserID.Text & ";password=" & txtpassword.Text & "")
If SqlConnection.State = ConnectionState.Closed Then
SqlConnection.Open()
End If
Catch ex As Exception
MsgBox("Connection Field!")
End Try
End Sub

Private Sub btnBackUp_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnBackUp.Click

Dim DbFile As String


Try '
SaveFileDialog1.Filter = "SQL Dump File (*.sql)|*.sql|All files (*.*)|*.*"
SaveFileDialog1.FileName = "Database Backup " +
DateTime.Now.ToString("yyyy-MM-dd HH-mm-ss") + ".sql"
If SaveFileDialog1.ShowDialog = DialogResult.OK Then
dbConnection()
DbFile = SaveFileDialog1.FileName
Dim BackupProccess As New Process
BackupProccess.StartInfo.FileName = "cmd.exe"
BackupProccess.StartInfo.UseShellExecute = False
BackupProccess.StartInfo.WorkingDirectory = "C:\xampp\mysql\bin\"
BackupProccess.StartInfo.RedirectStandardInput = True
BackupProccess.StartInfo.RedirectStandardOutput = True
BackupProccess.Start()

Dim BackupStream As StreamWriter = BackupProccess.StandardInput


Dim myStreamReader As StreamReader = BackupProccess.StandardOutput
BackupStream.WriteLine("mysqldump --user=" & txtuserID.Text & " --
password=" & txtpassword.Text & "-h " & txtserver.Text & " " & cmbdatabase.Text & " >
""" + DbFile + """")

BackupStream.Close()
BackupProccess.WaitForExit()

166
BackupProccess.Close()
SqlConnection.Close()
MsgBox("Backup your MySQL database Created Successfully!",
MsgBoxStyle.Information, "Restore MySql Database")

End If

Catch ex As Exception
MsgBox("Nothing to do!")

End Try
End Sub

Private Sub btnRestore_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnRestore.Click
Dim DbFile As String
Try '
OpenFileDialog1.Filter = "SQL Dump File (*.sql)|*.sql|All files (*.*)|*.*"
If OpenFileDialog1.ShowDialog = DialogResult.OK Then
dbConnection()
DbFile = OpenFileDialog1.FileName
Dim BackupProccess As New Process
BackupProccess.StartInfo.FileName = "cmd.exe"
BackupProccess.StartInfo.UseShellExecute = False
BackupProccess.StartInfo.WorkingDirectory = "C:\xampp\mysql\bin\"
BackupProccess.StartInfo.RedirectStandardInput = True
BackupProccess.StartInfo.RedirectStandardOutput = True
BackupProccess.Start()

Dim BackupStream As StreamWriter = BackupProccess.StandardInput


Dim myStreamReader As StreamReader = BackupProccess.StandardOutput
BackupStream.WriteLine("mysqldump --user=" & txtuserID.Text & " --
password=" & txtpassword.Text & "-h " & txtserver.Text & " " & cmbdatabase.Text & " <
""" + DbFile + """")

BackupStream.Close()
BackupProccess.WaitForExit()
BackupProccess.Close()
SqlConnection.Close()
MsgBox("Restore your MySQL database Successfully!",
MsgBoxStyle.Information, "Backup MySql Database")

End If

Catch ex As Exception
MsgBox("Nothing to do!")

End Try
End Sub

Private Sub frmBackUPAndRestore_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load

End Sub
End Class

Public Class frmAddStockOut


Dim query = ""

167
Private Sub BtnOutStock_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles BtnOutStock.Click
Try
Dim ItemQty = GetValue("select item_qty from tbl_item where item_name = '"
& txtItem.Text & "'", txtItem.Text)

Dim result = ItemQty - CInt(txtQty.Text)


If txtQty.Text <= ItemQty + 1 Then

query = "insert into tbl_stock_out values(null,'" & txtItem.Text &


"','" & txtBrand.Text & "','" & txtPrice.Text & "','" & txtQty.Text & "','" &
txtReason.Text & "','" & txtUserID.Text & "','" & txtUserName.Text & "')"
SQLProcess(query)

query = "update tbl_item set item_qty=(item_qty - '" &


CInt(txtQty.Text) & "') where item_name ='" & txtItem.Text & "' "
SQLProcess(query)

txtItem.Clear()
txtUserID.Clear()
txtUserName.Clear()
txtPrice.Clear()
txtQty.Clear()
txtBrand.Clear()
txtReason.Clear()

frmInventory.ReloadItems()
frmInventory.ReloadStockOut()
MessageBox.Show("Successfully transfer to stock out ")
Me.Dispose()
Else
MessageBox.Show("Invalid to add more than the qty. . .")

End If

Catch ex As Exception

End Try
End Sub

Private Sub frmAddStockOut_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load

End Sub
End Class

Public Class frmAddnewOrder

Dim query = ""

Private Sub frmAddnewOrder_Activated(ByVal sender As Object, ByVal e As


System.EventArgs) Handles Me.Activated
dbConnection()
loadToComboBox("select * from tbl_brand", cmbBrand)
loadToComboBox("select * from tbl_unit", cmbUnit)

GetitemID("select max(item_id) from tbl_item")

168
txtID.Enabled = False
txtqty.Enabled = False
txtqty.Text = 0

End Sub

Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnCancel.Click
Me.Dispose()
End Sub

Private Sub GroupBox1_Enter(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles GroupBox1.Enter

End Sub

Private Sub btnaddsupplier_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnaddsupplier.Click

Dim Price = 0.0


Dim Dateadd As String = frmMain.lblDate.Text
query = "insert into tbl_item values(null,'" &
frmInventory.cmbSupplierN.SelectedValue & "','" & cmbBrand.SelectedValue & "','" &
cmbUnit.SelectedValue & "','" & txtname.Text & "','" & txtqty.Text & "','" & Price &
"','" & txtreorderpoint.Text & "','" & Dateadd & "')"
SQLProcess(query)

frmInventory.DGPo.DataSource = display("select ID,NAME,BRAND,UNIT,QUANTITY


from po_item_view where QUANTITY<= REORDER_POINT")
display("select ID,NAME,BRAND,UNIT,QUANTITY from po_item_view where QUANTITY<=
REORDER_POINT", frmInventory.DGPo)
GetitemID("select max(item_id) from tbl_item")

End Sub

Private Sub frmAddnewOrder_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load

End Sub
End Class

Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Imports System.Data.SqlClient
Imports System.Data

Public Class CrystalReport

Dim total As Decimal = CDec(frmcashier.txtTotal.Text)


Dim Invoice As Integer = CInt(frmcashier.txtTrans.Text)
Dim vat As String = frmcashier.txtvat.Text.ToString
Dim cash As Integer = CInt(frmcashier.txtPayment.Text)
Dim change As Decimal = CDec(frmcashier.txtChange.Text)

Dim Cashier As String = frmMain.lblName.Text.ToString


Dim Customer As String = frmcashier.cmbCustomer.Text.ToString

169
Dim query = ""
Dim rpts As New ReportDocument

Public Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles


MyBase.Load

'
CrystalReportViewer2.ReportSource =
"C:\Users\KenG12\Documents\PracticeSAD\PracticeSAD\SalesInvoice.rpt"

rpts.Load("C:\Users\KenG12\Documents\PracticeSAD\PracticeSAD\SalesInvoice.rpt")
rpts.SetParameterValue("TOTAL", total)
rpts.SetParameterValue("CASH INVOICE", Invoice)
rpts.SetParameterValue("CASHIER", Cashier)
rpts.SetParameterValue("CUSTOMER", Customer)

rpts.SetParameterValue("CASH", cash)
rpts.SetParameterValue("VAT", vat)
rpts.SetParameterValue("CHANGE", change)

CrystalReportViewer2.ReportSource = rpts
End Sub

Private Sub CrystalReportViewer2_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles CrystalReportViewer2.Load

End Sub
End Class

Public Class purchaseOrder


Dim query = ""
Dim supplier_name
Dim total_qty = ""
Dim Supplier, Item, price, qty, total, user, dateReceived
Dim index

Dim val

Dim received_id, po_no, itemName, request_qty, supplier_price, received_qty,


damage_qty, date_received, user_id, supplier_id
Dim DamageItem

Dim PurchaseQty As Integer = 0


Dim ReceivedQty As Integer = 0

Dim POID

Private Sub purchaseOrder_Load(ByVal sender As Object, ByVal e As


System.EventArgs) Handles Me.Load

170
Try
dbConnection()

ReceivedID("select max(receive_no) from tbl_received_history")


loadToComboBox("select * from tbl_supplier", cmbSupplierN)

ReloadPurchaseOrder()
ReloadRecievedItem()
ReloadDamageItem()

txtPONo.Enabled = False
txtTotal.Enabled = False
txttotalReceived.Enabled = False
txtTotalDmge.Enabled = False
txttotalDamage.Enabled = False
txtItem.Enabled = False
txtReceivedID.Enabled = False

GettotalDamage()
GettotalReceived()

Catch ex As Exception

End Try
End Sub

Public Sub GettotalDamage()


Dim Result As Double
Try
Dim total
For Each row As DataGridViewRow In DGdamage.Rows
total = CDec(row.Cells(5).Value)
Result += total
Next
txttotalDamage.Text = Result
txtTotalDmge.Text = Result

Catch ex As Exception

End Try

End Sub
Public Sub GettotalReceived()
Dim Result As Double
Try
Dim total
For Each row As DataGridViewRow In DGRecieved.Rows
total = CDec(row.Cells(4).Value)
Result += total
Next
txttotalReceived.Text = Result

Catch ex As Exception

End Try

171
End Sub

Private Sub btnAdditem_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs)
frmAddnewOrder.Show()
End Sub

Public Function Duplicate(ByVal id As String) As Boolean


Duplicate = False

For Each dtarow As DataGridViewRow In DGPurchase.Rows


If id = dtarow.Cells(2).Value Then
Duplicate = True
End If
Next
Return Duplicate
End Function

Private Sub btnAddSupplier_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs)
frmsupplier.Show()
End Sub

Private Sub btnAddSupplier_Click_1(ByVal sender As System.Object, ByVal e As


System.EventArgs)
frmsupplier.Show()
End Sub

Private Sub txtqty_KeyPress(ByVal sender As Object, ByVal e As


System.Windows.Forms.KeyPressEventArgs)
If (e.KeyChar < Chr(48) Or e.KeyChar > Chr(57)) And e.KeyChar <> Chr(8) Then

e.Handled = True
End If
End Sub

Private Sub txtReorderPoint_KeyPress(ByVal sender As Object, ByVal e As


System.Windows.Forms.KeyPressEventArgs)
If (e.KeyChar < Chr(48) Or e.KeyChar > Chr(57)) And e.KeyChar <> Chr(8) Then

e.Handled = True

End If
End Sub

172
Private Sub txtpaysupplier_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs)
If (e.KeyChar < Chr(48) Or e.KeyChar > Chr(57)) And e.KeyChar <> Chr(8) Then

e.Handled = True
End If
End Sub

Private Sub DGPurchase_CellClick(ByVal sender As Object, ByVal e As


System.Windows.Forms.DataGridViewCellEventArgs) Handles DGPurchase.CellClick
Try
Dim a = e.RowIndex
With DGPurchase

lblPOID.Text = .Item(0, a).Value


txtPONo.Text = .Item(1, a).Value
txtItem.Text = .Item(3, a).Value
txtQuantity.Text = .Item(6, a).Value

btnRecieved.Enabled = True
End With
Catch ex As Exception
End Try

End Sub

Private Sub btnRecieved_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnRecieved.Click
Dim qty As Integer
Dim result = 0

If ReadRecieved(txtItem.Text) Then

Try

For Each dtarow As DataGridViewRow In DGRecieved.Rows


If txtItem.Text = dtarow.Cells(1).Value Then

MessageBox.Show("item already exist you can able to do is to


update received . . .")
End If
Next
Catch ex As Exception
MessageBox.Show("Error Received in Purchase Order ." + ex.Message)
End Try

Else
For Each dtarow As DataGridViewRow In DGPurchase.Rows
If txtItem.Text = dtarow.Cells(3).Value Then
POID = dtarow.Cells(0).Value
qty = dtarow.Cells(6).Value
Supplier = dtarow.Cells(7).Value.ToString

Exit For
End If

173
Next

If txtQuantity.Text <= qty Then

supplier_id = GetValue("select supplier_id from tbl_supplier where


supplier_name = '" & Supplier & "'", Supplier)
Dim received_no = txtReceivedID.Text

query = "insert into tbl_recieve_supplier_details values(null,'" &


received_no & "','" & supplier_id & "','" & POID & "','" & txtSuppPrice.Text & "','" &
txtQuantity.Text & "','" & txtTotal.Text & "','" & frmMain.lblID.Text & "','" &
frmMain.lblDate.Text & "')"
SQLProcess(query)

MessageBox.Show("Item Recieved. . ")


clear()

ReloadPurchaseOrder()
ReloadRecievedItem()
GettotalReceived()

ElseIf qty = 0 Then


Else
MessageBox.Show("Invalid! purchase order quantity is ")
End If
' End If
End If

End Sub

Public Function ReadRecieved(ByVal name As String) As Boolean


ReadRecieved = False

For Each dtarow As DataGridViewRow In DGRecieved.Rows


If name = dtarow.Cells(1).Value Then
ReadRecieved = True
End If
Next
Return ReadRecieved
End Function

Private Sub txtSuppPrice_TextChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles txtSuppPrice.TextChanged

Try
If txtSuppPrice.Text = "" Then
txtTotal.Text = " "
ElseIf txtSuppPrice.Text = 0 Then
txtTotal.Text = " "
Else
Dim result As Integer
result = txtSuppPrice.Text * txtQuantity.Text
txtTotal.Text = result
End If

Catch ex As Exception
txtTotal.Text = "Invalid!"
End Try

174
End Sub

Private Sub btnDamage_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnDamage.Click

If ReadDuplicateDamage(txtItem.Text) Then
MsgBox("Item is Already Exist in Damage. . ")

Else
DamageProcess()

End If

clear()

End Sub

Public Function ReadDuplicateDamage(ByVal name As String) As Boolean

Dim Duplicate = False

For Each dtarow As DataGridViewRow In DGdamage.Rows


If name = dtarow.Cells(1).Value Then
Duplicate = True
End If
Next
Return Duplicate
End Function

Public Sub DamageProcess()


Dim DisplayError As String = ""
Dim Result
supplier_name = 1

For Each dtarow As DataGridViewRow In DGPurchase.Rows


If txtItem.Text = dtarow.Cells(3).Value Then
POID = dtarow.Cells(0).Value
PurchaseQty = dtarow.Cells(6).Value
Exit For
End If
Next

For Each dta As DataGridViewRow In DGRecieved.Rows


If txtItem.Text = dta.Cells(1).Value Then
ReceivedQty = dta.Cells(3).Value
Exit For
End If
Next

Result = PurchaseQty - ReceivedQty


If txtQuantity.Text <= Result Then ' naa dre ang error sa damage nga button
If txtQuantity.Text <= PurchaseQty Then
Try
supplier_id = GetValue("select supplier_id from tbl_supplier where
supplier_name = '" & cmbSupplierN.Text & "'", cmbSupplierN.Text)

175
query = "insert into tbl_supplier_return values(null,'" &
supplier_id & "','" & POID & "','" & txtSuppPrice.Text & "','" & txtQuantity.Text &
"','" & frmMain.lblID.Text & "','" & txtTotal.Text & "','" & frmMain.lblDate.Text &
"')"
SQLProcess(query)
Catch ex As Exception
End Try
GettotalDamage()
ReloadDamageItem()
MessageBox.Show("Item Added to Damage. . .")

Else
MessageBox.Show("Invalid Quantity . . ")
End If

Else
Dim val1 As String = CDbl(PurchaseQty).ToString
Dim val2 As String = ReceivedQty.ToString
Dim val3 As String = (Result + 1).ToString
Try

ErrorDisplay.txtDisplayError.Text = vbCrLf + vbCrLf + vbCrLf + "


Invalid Quantity tungud kay ang" + vbCrLf +
" gi purchase order na qty kay : " + val1 + "" + vbCrLf +
" tapus naka recieved na ug :" + val2 + vbCrLf +
" ang kailangan nga qty damage kay below :" + val3 + vbCrLf +
" Mao ra kana salamat. . ."

Catch ex As Exception
MsgBox(ex.Message)
End Try
ErrorDisplay.Show()

End If
End Sub

Private Sub txtQuantity_TextChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles txtQuantity.TextChanged
Try
If txtSuppPrice.Text = "" Then
txtTotal.Text = " "
ElseIf txtSuppPrice.Text = 0 Then
txtTotal.Text = " "
Else
Dim result As Integer
result = txtSuppPrice.Text * txtQuantity.Text
txtTotal.Text = result
End If

Catch ex As Exception
txtTotal.Text = "Invalid!"
End Try
End Sub

176
Private Sub txtSearchDamage_TextChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles txtSearchDamage.TextChanged
Try

query = "Select * from supp_return_view where ITEM like '%" &


txtSearchDamage.Text & "%' or ITEM like '%" & txtSearchDamage.Text & "%'"

display(query, DGdamage)

Catch ex As Exception

End Try

End Sub

Private Sub BtnStockIn_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles BtnStockIn.Click

For Each dtarow As DataGridViewRow In DGRecieved.Rows

Supplier = dtarow.Cells(0).Value
Item = dtarow.Cells(1).Value
price = dtarow.Cells(2).Value
qty = dtarow.Cells(3).Value
total = dtarow.Cells(4).Value
user = dtarow.Cells(5).Value
dateReceived = dtarow.Cells(6).Value

If qty = 0 Then

Else
LeftPurchaseOrder(Item, qty)
request_qty = GetValue("select po_qty from tbl_po where
po_item_name='" & Item & "'", Item)
po_no = GetValue("select po_no from tbl_po where po_item_name='" &
Item & "'", Item)
damage_qty = GetValue("select QTY from supp_return_view where ITEM='"
& Item & "'", Item)
supplier_id = GetValue("select supplier_id from tbl_supplier where
supplier_name = '" & Supplier & "'", Supplier)

Try

query = "insert into tbl_received_history values(null,'" &


txtReceivedID.Text & "','" & CInt(po_no) & "','" & Item & "','" & CInt(request_qty) &
"','" & CDec(price) & "','" & CInt(qty) & "','" & CInt(damage_qty) & "','" &
dateReceived & "','" & CInt(user) & "','" & CInt(supplier_id) & "')"
SQLProcess(query)

Catch ex As Exception
MsgBox(ex.Message)
End Try

177
GetPOID("select max(po_no) from tbl_received_history")
query = "update tbl_item set item_qty=(item_qty +'" & qty & "') where
item_name ='" & Item & "' "
SQLProcess(query)

End If
Next

query = "Delete from tbl_po where po_qty = '0'"


SQLProcess(query)
ReceivedID("select max(receive_no) from tbl_received_history")
MessageBox.Show("ITEMS SUCCESFULLY STOCK IN . . ")
frmHistory.ReloadHistory()
StockInProcess()
ReloadPurchaseOrder()
ReloadRecievedItem()
GettotalReceived()
End Sub

Public Sub StockInProcess()

frmInventory.DGPo.DataSource = display("select ID,NAME,BRAND,UNIT,QUANTITY


from po_item_view where QUANTITY<= REORDER_POINT")
display("select ID,NAME,BRAND,UNIT,QUANTITY from po_item_view where QUANTITY<=
REORDER_POINT", frmInventory.DGPo)

frmInventory.DGItems.DataSource = display("select * from tbl_item")


display("select * from item_inventory_view", frmInventory.DGItems)

frmcashier.DGitems.DataSource = display("select * from tbl_item")


display("select * from item_view", frmcashier.DGitems)

query = "TRUNCATE tbl_recieve_supplier_details "


SQLProcess(query)
query = "TRUNCATE tbl_supplier_return "
SQLProcess(query)

End Sub

Public Sub LeftPurchaseOrder(ByVal item As String, ByVal qty As String)


Dim Result As Integer = 0
Dim POqty = CInt(GetValue("select po_qty from tbl_po where po_item_name='" &
item & "'", item))
Dim Recieveqty = CInt(qty)
Result = POqty - Recieveqty

query = "update tbl_po set po_qty='" & Result & "'where po_item_name ='" &
item & "' "
SQLProcess(query)

ReloadPurchaseOrder()

178
End Sub

Public Sub ReloadPurchaseOrder()


' DGPurchase.DataSource = display("select po_no as 'PO NO.',item_id as
'ID',po_item_name as 'ITEM',unit_id as 'UNIT',brand_id as 'BRAND',po_qty as
'QTY',supplier_id as 'Supplier' from tbl_po")
display("select * from set_po_view where SUPPLIER_NAME ='" & cmbSupplierN.Text
& "'", DGPurchase)

End Sub

Public Sub ReloadRecievedItem()


DGRecieved.DataSource = display("select * from receive_details_view")
display("select * from receive_details_view", DGRecieved)

End Sub

Public Sub ReloadDamageItem()


DGdamage.DataSource = display("select * from supp_return_view")

End Sub

Private Sub DGRecieved_CellClick(ByVal sender As Object, ByVal e As


System.Windows.Forms.DataGridViewCellEventArgs) Handles DGRecieved.CellClick

Try
Dim a = e.RowIndex
With DGRecieved

txtItem.Text = .Item(1, a).Value


txtSuppPrice.Text = .Item(2, a).Value
txtQuantity.Text = .Item(3, a).Value
txtTotal.Text = .Item(4, a).Value

index = a

For Each dtarow As DataGridViewRow In DGPurchase.Rows

If txtItem.Text = dtarow.Cells(3).Value Then


txtPONo.Text = dtarow.Cells(1).Value
lblPOID.Text = dtarow.Cells(0).Value
Exit For
End If
Next

End With
Catch ex As Exception
End Try
btnRecieved.Enabled = False
End Sub

Private Sub BtnUpdate_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles BtnUpdate.Click

Dim ItemName As String = ""

179
For Each dtarow As DataGridViewRow In DGPurchase.Rows
If txtItem.Text = dtarow.Cells(3).Value Then
ItemName = dtarow.Cells(3).Value
qty = dtarow.Cells(6).Value
Exit For
End If
Next

If qty <= txtQuantity.Text - 1 Then


MessageBox.Show("Invalid to Update more than the quantity request . . .")

ElseIf txtQuantity.Text <= 0 Then


MessageBox.Show("Invalid Quantity. .")

Else
ReceivedUpdate()

ReloadRecievedItem()
ReloadPurchaseOrder()

MessageBox.Show("The Recieved Item has been Updated.")


clear()
End If

End Sub

Public Sub PurchaseUpdate(ByVal result As Integer)

Try
query = "update tbl_po set po_qty= '" & result & "' where po_item_name ='"
& txtItem.Text & "'"
SQLProcess(query)

Catch ex As Exception

End Try

End Sub

Public Sub ReceivedUpdate()


query = "update tbl_recieve_supplier_details set recieved_supplier_qty='" &
txtQuantity.Text & "' where po_id ='" & lblPOID.Text & "'"
SQLProcess(query)
query = "update tbl_recieve_supplier_details set recieved_supplier_price='" &
txtSuppPrice.Text & "' where po_id ='" & lblPOID.Text & "'"
SQLProcess(query)
query = "update tbl_recieve_supplier_details set
recieved_supplier_total='" & txtTotal.Text & "' where po_id ='" & lblPOID.Text
& "'"
SQLProcess(query)

End Sub

Private Sub BtnCancel_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles BtnCancel.Click
query = "delete from tbl_recieve_supplier_details where po_id ='" &
lblPOID.Text & "' "

180
SQLProcess(query)

ReloadRecievedItem()
MessageBox.Show("Item Received has been Canceled . ")
clear()

End Sub

Private Sub cmbSupplierN_SelectionChangeCommitted(ByVal sender As Object, ByVal e


As System.EventArgs) Handles cmbSupplierN.SelectionChangeCommitted
Try

Dim str = "select * from set_po_view where SUPPLIER_NAME ='" &


cmbSupplierN.Text & "'"

display(str, DGPurchase)
Catch ex As Exception

End Try

End Sub

Private Sub btnCancelPO_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnCancelPO.Click
Try
query = "Delete from tbl_po where po_item_name = '" & txtItem.Text & "'"
SQLProcess(query)
MessageBox.Show("Purchase item successfully cancel . . .")
ReloadPurchaseOrder()
clear()
Catch ex As Exception
MessageBox.Show("Invalid cancel! .please select in Purchase Item . . ")
End Try
End Sub
Public Sub clear()
txtPONo.Clear()
txtQuantity.Clear()
txtItem.Clear()
txtSuppPrice.Clear()
txtTotal.Clear()

End Sub

Private Sub btnUpdatepo_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnUpdatepo.Click
UpdateQTY(txtItem.Text, txtQuantity.Text)
clear()
End Sub
Public Sub UpdateQTY(ByVal item, ByVal qty)
frmUpdateQtyPO.txtItemName.Text = item
frmUpdateQtyPO.txtQty.Text = qty
frmUpdateQtyPO.Show()
End Sub

Private Sub btnCancelDamage_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnCancelDamage.Click
Dim POID = GetValue("select po_id from tbl_po where po_item_name = '" &
DamageItem & "'", DamageItem)
query = "delete from tbl_supplier_return where po_id ='" & POID & "' "

181
SQLProcess(query)
ReloadDamageItem()
MessageBox.Show("Succesfully cancel damage item . .")
End Sub

Private Sub DGdamage_CellClick(ByVal sender As Object, ByVal e As


System.Windows.Forms.DataGridViewCellEventArgs) Handles DGdamage.CellClick
Try
Dim a = e.RowIndex
With DGdamage
DamageItem = .Item(1, a).Value
End With
Catch ex As Exception
End Try

End Sub

Private Sub Panel1_Paint(ByVal sender As System.Object, ByVal e As


System.Windows.Forms.PaintEventArgs) Handles Panel1.Paint

End Sub
End Class

182
APPENDICES
Letters for the Company

183
184
Letters for IT Consultant

185
Company Forms (Samples Forms)

186
187
Questionnaire for Survey

1. What’s the history of the company?


2. What’s the current system and what type of system do you have?
3. Who are your major suppliers?
4. Who are your major competitors?
5. Do you have a Walk-in & Regular Client?
6. How many customers does the company caters everyday?
7. Do you manufacture hollow blocks?
8. What’s the process of your sales transaction? For example, a customer buys
an item.
9. Do you have a proper inventory monitoring?
10. What’s the process of your purchase order?
11. Does the company have an item delivery to their customer?
12. What do you do if an item is damage upon the delivery?
13. Does the company have a customer return policy?
14. Do you have discount for you customers?
15. Are you willing to automate your current manual system?
16. What type of payments do you have?
17. What are the problems that the company encountered with the current system
you have?
18. How often does the company produce a sales and inventory report?

188
Functional Testing Rubrics

189
190
Client Progress Report Rubrics

191
Consultant Progress Report Rubrics

192
Milestone 11 – Consultant's Technical Walkthrough
Progress Report Rubrics

Group Name/Last Names: Men in Gray/ Cirunay, Guiraldo, Macapala


Frontend: Microsoft Visual Studio 2010 & 2015
Backend: Localhost/CMD

The technical output is ready for oral and technical presentation and defense.

Signed: Date/Time: Location:

Module Subfunction Score Weight Subtotal


Name
Search Item Availability by 4 1 4
Name, Category, Brand
Add Item to Cart 4 1 4
Add Customer Details 4 1 4
Update Cart Quantity 4 1 4
Sales Remove Item 4 1 4
Cancel Order 4 1 4
Apply Payment 4 2 8
Generate Cash Invoice 4 3 12
View Sales 4 2 8

Search Items in the Inventory 4 1 4


Display the correct total 4 1 4
of remaining stocks
Inventory Stock out items 4 2 8
Update Inventory Item Details 4 1 4
Record depleted or out 4 1 4

193
of stock items
Select supplier for Reorder 4 1 4
items
4 1 4
Add new reorder item
4 1 4
Add reorder items to PO

Choose supplier for PO 4 1 4


Update PO item quantity 4 1 4
Cancel PO 4 1 4
Receive PO Item 4 1 4
Purchase Declare damaged item 4 1 4
Order
Cancel damaged item 4 1 4
Update Received Item 4 1 4
Cancel Received Item 4 1 4
Stock in items 4 2 4

Add user account 4 1 4


User Search user account 4 1 4
Accounts
Update user account 4 1 4

Login Login user types admin/cashier 4 2 8


Cancel login 4 1 4

View Sales Report Daily/ 4 2 8


Reports Weekly/Monthly
View Delivery History by PO ID 4 2 8
View Inventory Report 4 2 4

194
Backup & Backup File 4 2 8
Restore
Restore File 4 2 8

Customer Add new customer 4 1 4


Search customer 4 1 4
Update customer details 4 1 4

Add supplier details 4 1 4


Supplier Search supplier details 4 1 4
Update supplier details 4 1 4

Logs View Time in/Time out Logs 4 2 8

Brand Add new brand 4 1 4


Update brand 4 1 4

Unit Add new unit 4 1 4


Update unit 4 1 4

Add new unit 4 1 4


Category Update unit 4 1 4

195
Total 248

Percentage 1

196
User Acceptance Certification

197
Deployment Certification

198
Curriculum Vitae of proponents

The Programmer
John Edgie Q. Cirunay
Biao Joaquin Calinan, Davao City
cirunayej8@gmail.com
(+63) 9384800087

EDUCATIONAL ATTAINMENT:

Primary Biao Joaquin Elementary School

Secondary Calinan National High School

Tertiary University of Mindanao


Matina, Davao City
SKILLS:

 Microsoft Office Specialist


 Java Programmer
 C# Programmer
 Visual Basic Programmer
 Web Programmer
 PC Troubleshooting and Networking Specialist
 Database Specialist

ACCOMPLISHMENTS:

 MTA Networking Fundamentals

199
The Project Manager
Kenneth John C. Guiraldo
Deca Indangan Phase 3 Lot 2 Blk59 Sampaguita Street Indangan, Davao City
Kennethjohnguiraldo@gmail.com
(+63) 9776425085

EDUCATIONAL ATTAINMENT:

Primary Vicente Hizon Sr. Elementary School

Secondary Holy Cross College of Sasa Inc.

Tertiary University of Mindanao


Matina, Davao City
SKILLS:

 Microsoft Office Specialist


 Visual Basic Programmer
 Web Programmer
 PC Troubleshooting and Networking Specialist
 Database Specialist

ACCOMPLISHMENTS:

 MTA Networking Fundamentals


 MTA Database Administration Fundamentals

200
The System Analyst
Lawrence John G. Macapala
NHA Bangkal Phase 1 Molave Street, Davao City
lawrencej9627@gmail.com
(+63) 9454487301

EDUCATIONAL ATTAINMENT:

Primary S.I.R. Elementary School

Secondary Sta Ana National High School

Tertiary University of Mindanao


Matina, Davao City
SKILLS:

 Microsoft Office Specialist


 Visual Basic Programmer
 Web Programmer
 PC Troubleshooting and Networking Specialist
 Database Specialist

ACCOMPLISHMENTS:

 MTA Networking Fundamentals

201

You might also like