Laundry Management System
Laundry Management System
ABSTRACT
Laundry firms currently use a manual system for the management and maintenance of
critical information. The current system requires numerous paper forms, with data stores spread
throughout the laundry management infrastructure. Often information is incomplete or does not
follow management standards. Records are often lost in transit during computation requiring a
comprehensive auditing process to ensure that no vital information is lost. Multiple copies of the
same information exist in the laundry firm data and may lead to inconsistencies in data in various
data stores. A significant part of the operation of any laundry firm involves the acquisition,
management and timely retrieval of great volumes of information. This information typically
involves; customer personal information and clothing records history, user information, price of
delivery and received date, users scheduling as regards customers details and dealings in service
rendered, also our products package waiting list. All of this information must be managed in an
efficient and cost wise fashion so that the organization resources may be effectively utilized. We
present the design and implementation of a laundry database management system (LBMS) used
in a laundry establishment. Laundry firms are usually faced with difficulties in keeping detailed
records of customers clothing; this little problem as seen to most laundry firms is highly
discouraging as customers are filled with disappointments, arising from issues such as customer
clothes mix-ups and untimely retrieval of clothes. The aim of this application is to determine the
number of clothes collected, in relation to their owners, as this also helps the users fix a date for
the collection of their clothes. Also customer’s information is secured, as a specific id is
allocated per registration to avoid contrasting information.
CHAPTER 1: INTODUCTION
The goal of laundry management system is to automate the management of the laundry
firm making it more efficient and error free. Talking about the project, it has all the essential
features. This project has an administration side from where they can view all the laundry,
manage laundry type, generate report and change password. In this project, all the functions are
performed from the Admin side which means there is no user side. Admin has full control of the
system, they can view all the laundry, claim it, manage the laundry type, generate report and
change password they can add, edit, delete, claim Laundry. While adding Laundry items they
have to provide Customer name, Priority number, and laundry weight and select laundry type.
Likewise while adding Laundry type; they have to provide Laundry type name and Price per
kilo. To claim a laundry, the user has to select the respective laundry and click the Claim button;
the system automatically generates the total amount of the customer. After claiming it, they can
print the report too. Laundry System helps in easy management of Laundry in a Laundry shop as
it is not time-consuming. Another feature is that the user can change the password by entering
New Password and Confirm Password from the Change Password Settings. A simple dashboard
is provided in the admin panel for the easy management of the system. Design of this project is
pretty and responsive so that user won’t find it difficult to understand, use and navigate.
CHAPTER 2 :SYSTEM ANALYSIS
EXISTING SYSTEM:
Laundry firm currently uses a manual system for the management and maintenance of
critical information. The current system requires numerous paper forms, with data stores spread
throughout the Laundry firm management infrastructure. Often information is incomplete, or
does not follow management standards. Forms are often lost in transit between departments
requiring a comprehensive auditing process to ensure that no vital information is lost. This has
leads to inconsistencies in various data due to large volume of contrasting customer details
leading to mix-up of clothes in the laundry firm which thus leads to delay in collecting the
clothes back.
PROPOSED SYSTEM:
The Laundry Management System is designed for any Laundry firm to replace their
existing manual, paper based system. These services are to be provided in an efficient, cost
effective manner, with the goal of reducing the delay and resources currently required for such
tasks as clothes details are bounded by customer name. Since the existing system makes use of
tedious administrative tasks, lots paper work and time, in which full information cannot be gotten
from busy customers.
The goal of the laundry database management system is to provide a computerized process that
is stress free, reliable PHP would be at the front-end and provide the graphical user interface that
relates with the user, while the SQL database will be at the back-end to handle the data storage
process.
CHAPTER 3 : NON FUNCTIONAL REQUIREMENTS
Hardware Requirements:
Software Requirements:
Front End : PHP
Back End : MYSQL
Operating System : Windows OS
System type : 32-bit or 64-bit Operating System
IDE : Dreamweaver
DLL : Depends upon the title
3.1. SOFTWARE DESCRIPTION
PHP
PHP code may be executed with a command line interface (CLI), embedded into HTML
code, or used in combination with various web template systems, web content management
systems, and web frameworks. PHP code is usually processed by a PHP interpreter implemented
as a module in a web server or as a Common Gateway Interface (CGI) executable. The web
server outputs the results of the interpreted and executed PHP code, which may be any type of
data, such as generated HTML code or binary image data. PHP can be used for many
programming tasks outside of the web context, such as standalone graphical applications and
robotic drone control.
PHP Objects
Basic object-oriented programming functionality was added in PHP 3 and improved in PHP 4.
This allowed for PHP to gain further abstraction, making creative tasks easier for programmers
using the language. Object handling was completely rewritten for PHP 5, expanding the feature
set and enhancing performance. In previous versions of PHP, objects were handled like value
types. The drawback of this method was that code had to make heavy use of PHP's "reference"
variables if it wanted to modify an object it was passed rather than creating a copy of it. In the
new approach, objects are referenced by handle, and not by value.
Implementations
The only complete PHP implementation is the original, known simply as PHP. It is the most
widely used and is powered by the Zend Engine. To disambiguate it from other implementations,
it is sometimes unofficially called "Zend PHP". The Zend Engine compiles PHP source code on-
the-fly into an internal format that it can execute, thus it works as an interpreter. It is also the
"reference implementation" of PHP, as PHP has no formal specification, and so the semantics of
Zend PHP define the semantics of PHP. Due to the complex and nuanced semantics of PHP,
defined by how Zend works, it is difficult for competing implementations to offer complete
compatibility.
Licensing
PHP is free software released under the PHP License, which stipulates that: Products derived
from this software may not be called "PHP", nor may "PHP" appear in their name, without prior
written permission from [email protected]. You may indicate that your software works in
conjunction with PHP by saying "Foo for PHP" instead of calling it "PHP Foo" or "phpfoo". This
restriction on use of "PHP" makes the PHP License incompatible with the General Public License
(GPL), while the Zend License is incompatible due to an advertising clause similar to that of the
original BSD license.
Use
A broad overview of the LAMP software bundle, displayed here together with Squid
PHP acts primarily as a filter taking input from a file or stream containing text and/or PHP
instructions and outputting another stream of data. Most commonly the output will be HTML,
although it could be JSON, XML or binary data such as image or audio formats. Since PHP 4, the
PHP parser compiles input to produce bytecode for processing by the Zend Engine, giving
improved performance over its interpreter predecessor.
Security
MySQL is currently the most popular database management system software used for managing
the relational database. It is open-source database software, which is supported by Oracle
Company. It is fast, scalable, and easy to use database management system in comparison with
Microsoft SQL Server and Oracle Database.
WampServer
WampServer is a Windows web development environment. It allows you to create web
applications with Apache2, PHP and a MySQL database. Alongside, PhpMyAdmin allows you
to manage easily your database.
WAMPServer is a reliable web development software program that lets you create web apps
with MYSQL database and PHP Apache2. With an intuitive interface, the application features
numerous functionalities and makes it the preferred choice of developers from around the world.
The software is free to use and doesn’t require a payment or subscription.
Bootstrap 4
Bootstrap is a free and open-source tool collection for creating responsive websites and web
applications. It is the most popular HTML, CSS, and JavaScript framework for developing
responsive, mobile-first websites.
It solves many problems which we had once, one of which is the cross-browser compatibility
issue. Nowadays, the websites are perfect for all the browsers (IE, Firefox, and Chrome) and for
all sizes of screens (Desktop, Tablets, Phablets, and Phones). All thanks to Bootstrap developers
-Mark Otto and Jacob Thornton of Twitter, though it was later declared to be an open-source
project.
Easy to use: Anybody with just basic knowledge of HTML and CSS can start using Bootstrap
Responsive features: Bootstrap's responsive CSS adjusts to phones, tablets, and desktops
Mobile-first approach: In Bootstrap, mobile-first styles are part of the core framework
Browser compatibility: Bootstrap 4 is compatible with all modern browsers (Chrome, Firefox,
Internet Explorer 10+, Edge, Safari, and Opera)
4.5. Flask
Flask is a web framework. This means flask provides you with tools, libraries and technologies
that allow you to build a web application. This web application can be some web pages, a blog, a
wiki or go as big as a web-based calendar application or a commercial website.
Flask is often referred to as a micro framework. It aims to keep the core of an application simple
yet extensible. Flask does not have built-in abstraction layer for database handling, nor does it
have formed a validation support. Instead, Flask supports the extensions to add such
functionality to the application. Although Flask is rather young compared to
most Python frameworks, it holds a great promise and has already gained popularity among
Python web developers. Let’s take a closer look into Flask, so-called “micro” framework for
Python.
Flask was designed to be easy to use and extend. The idea behind Flask is to build a solid
foundation for web applications of different complexity. From then on you are free to plug in any
extensions you think you need. Also, you are free to build your own modules. Flask is great for
all kinds of projects. It's especially good for prototyping.
WSGI-Web Server Gateway Interface (WSGI) has been adopted as a standard for Python web
application development. WSGI is a specification for a universal interface between the web
server and the web applications.
Werkzeug-It is a WSGI toolkit, which implements requests, response objects, and other utility
functions. This enables building a web framework on top of it. The Flask framework uses
Werkzeug as one of its bases.
Jinja2 Jinja2 is a popular templating engine for Python. A web templating system combines a
template with a certain data source to render dynamic web pages.
CHAPTER 4 : DATABASE DESIGN
Table structure for table laundry
Field Type Null Default
laun_id int(11) Yes NULL
customer_name varchar(100) Yes NULL
laun_priority int(11) Yes NULL
laun_weight int(11) Yes NULL
laun_date_receive timestamp Yes CURRENT_TIMESTAMP
d
laun_claimed tinyint(4) Yes 0
laun_type_id int(11) Yes NULL
Unit testing involves the design of test cases that validate the internal program
logic is functioning properly, and that program input produces valid outputs. All decision
branches and internal code flow should be validated. It is the testing of individual unit
before integration. This is a structural testing, that relies on knowledge of its construction
and is invasive. Unit test perform basic tests at component level and test a specific
business process, application, and/or system configuration. Unit tests ensure that each
unique path of a business process performs accurately to the documented specifications
and contains clearly defined inputs and expected results. In the lines of this strategy all,
the individual functions and modules were put to the independently. By following this
strategy all, the errors in coding were identified and corrected.
Unit testing is a procedure used to validate the individual units of source code is
working properly. The goal of unit testing is to isolate each part of the program and show
that the individual parts are correct. A unit test provides a strict, written contract that the
piece of code must satisfy. As a result, it affords server benefits.
Unit testing is typically done by software developers to ensure that the code they
have written meets software requirements and behaves as the developer intended. Each
unit of the system implemented in the source code is checked for correctness. All error-
handling paths are tested. User authentication form and other each individual modules
form are taken as independently. Here login and organization form are taken as smallest
unit
.
TC.ID Test Condition Test Input Expected Result Actual Result Result
VT-1.1 Check whether Empty field It displays the error It displays the error Success
the username is message as please message as please
empty in the login enter username enter username
process
VT-1.2 Check whether Empty field It displays the error It displays the error Success
the password is message as please message as please
empty in the login enter password. enter password .
process
VT-1.3 Check whether Incorrect It displays the error It displays the error Success
the username and username and message as enter message as enter
password is password valid username and valid username and
incorrect password password
VT-1.4 Check whether Incorrect It displays the error It displays the error Success
username and username and message as Please message as Please
password is password register first. register first.
matched
Testing is done for each module. After testing all the modules, the modules are
integrated and testing of the final system is done with the test data, specially designed to show
that the system will operate successfully in all its aspects conditions. Thus the system testing is a
confirmation that all is correct and an opportunity to show the user that the system works.
5.4 DEBUGGING
The program displays a string "We are debugging" to the user. Suppose when we run the
application, for some reason, the string is not displayed. To identify the problem we need to add
a breakpoint. We can add a breakpoint to the code line which displays the string. This breakpoint
will pause the execution of the program. At this point, the programmer can see what is possibly
going wrong.
CHAPTER 6 : SCREEN SHOTS
ADMIN LOGIN
NEW LAUNDRY
VIEW ORDERS
EDIT LAUNDRY
DELETE
CLAIM
SEARCH
REPORT
DATE FILTER
PRINT
CHAPTER 7 :CONCLUSION
Future Work
In the future, the mobile application of laundry management system will be developed
and the following components can be added to this current system in order to improve the
effectiveness and efficiency of the system, which includes:
1. An advanced password system that will be embedded into all login pages to increase the
security of the system.
2. A good internet backup should be automated after everyday services.
3. Internet Transactions should be allowed.
CHAPTER 8 :REFERENCES& BIBLIOGRAPHY
Whitten, Bentley, and Dittman. (2004). “System Analysis and Design Methods (5th ed)”,
New York, NY.
Yang, B., and Burns, N.D. (2003) "Implications of postponement for the supply chain",
International Journal of Production Research, Vol. 41 No.9.
Yung, Judy; Chang, Gordon H.; Lai, Him Mark, eds. (2006), "Declaration of the Chinese
Hand Laundry Alliance”, Canadian Museum of Civilization, Beijing.
</head>
<body class="hold-transition skin-blue sidebar-mini">
<!-- Site wrapper -->
<div class="wrapper">
<header class="main-header">
<!-- Logo -->
<a href="home.php" class="logo">
<!-- mini logo for sidebar mini 50x50 pixels -->
<span class="logo-mini"><b>C</b>P</span>
<!-- logo for regular state and mobile devices -->
<span class="logo-lg"><b>LAU</b>NDRY SYSTEM</span>
</a>
<!-- Header Navbar: style can be found in header.less -->
<nav class="navbar navbar-static-top" role="navigation">
<!-- Sidebar toggle button-->
<a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
</nav>
</header>
<footer class="main-footer">
<div class="pull-right hidden-xs">
</div>
</footer>
<div class="control-sidebar-bg"></div>
</div><!-- ./wrapper -->
Index
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Login Form</title>
<link rel="stylesheet" href="assets/css/style.css">
<!--[if lt IE 9]><script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><!
[endif]-->
<style type="text/css">
body {
/* Background pattern from Toptal Subtle Patterns */
background-image: url("1.jpg");
background-repeat:no-repeat;
background-size: cover;
}
</style>
</head>
<body>
<section class="container">
<center><h1 style="color:#990000; font-size:3em;">LAUNDRY MANAGEMENT
SYSTEM</h1></center>
<div class="login">
<h1>Login - Laundry System</h1>
<form method="post" id="form-login">
<p><input autofocus type="text" id="username" value="" placeholder="Username"
required></p>
<p><input type="password" id="password" value="" placeholder="Password"
required></p>
<p class="remember_me">
<label>
<input type="checkbox" name="remember_me" id="remember_me">
Remember me on this computer
</label>
</p>
<p class="submit"><input type="submit" name="commit" value="Login"></p>
</form>
</div>
<div class="login-help">
<p>Forgot your password? <a href="index.php">Click here to reset it</a>.</p>
</div>
</section>
<script src="assets/js/jquery-3.1.1.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/login.js"></script>
</body>
</html>
Laundry Type
</head>
<body class="hold-transition skin-blue sidebar-mini">
<!-- Site wrapper -->
<div class="wrapper">
<header class="main-header">
<!-- Logo -->
<a href="home.php" class="logo">
<!-- mini logo for sidebar mini 50x50 pixels -->
<span class="logo-mini"><b>L</b>S</span>
<!-- logo for regular state and mobile devices -->
<span class="logo-lg"><b>LAU</b>NDRY SYSTEM</span>
</a>
<!-- Header Navbar: style can be found in header.less -->
<nav class="navbar navbar-static-top" role="navigation">
<!-- Sidebar toggle button-->
<a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
</nav>
</header>
<footer class="main-footer">
<div class="pull-right hidden-xs">
</div>
</footer>
<div class="control-sidebar-bg"></div>
</div><!-- ./wrapper -->
</body>
</html>
Report
</head>
<body class="hold-transition skin-blue sidebar-mini">
<!-- Site wrapper -->
<div class="wrapper">
<header class="main-header">
<!-- Logo -->
<a href="home.php" class="logo">
<!-- mini logo for sidebar mini 50x50 pixels -->
<span class="logo-mini"><b>C</b>P</span>
<!-- logo for regular state and mobile devices -->
<span class="logo-lg"><b>LAU</b>NDRY SYSTEM</span>
</a>
<!-- Header Navbar: style can be found in header.less -->
<nav class="navbar navbar-static-top" role="navigation">
<!-- Sidebar toggle button-->
<a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
</nav>
</header>
<div id="table-sales"></div>
</div><!-- /.box-body -->
<div class="box-footer">
<!-- Footer -->
</div><!-- /.box-footer-->
</div><!-- /.box -->
<footer class="main-footer">
<div class="pull-right hidden-xs">
</div>
</footer>
<div class="control-sidebar-bg"></div>
</div><!-- ./wrapper -->
</body>
</html>
Change Password
<?php
require_once('../class/User.php');
if(isset($_POST['pwd'])){
$pwd =$_POST['pwd'];
$pwd = md5($pwd);
$uid = $_SESSION['user_logged'];
$res = $user->change_pass($pwd, $uid);
$return['valid'] = false;
if($res){
$return['valid'] = true;
$return['msg'] = 'Password Change Successfully!';
}
echo json_encode($return);
}//end isset
$user->Disconnect();
Insert Types
<?php
require_once('../class/Laundry.php');
if(isset($_POST['type']) && isset($_POST['price']) ){
$type = $_POST['type'];
$price = $_POST['price'];
$price = number_format($price, 2);
$type = strtolower($type);
$type = ucwords($type);
}//end isset
$laundry->Disconnect();
All Types
<br />
<?php
require_once('../class/Laundry.php');
$types = $laundry->get_all_laundry();
?>
<div class="table-responsive">
<table id="myTable-type" class="table table-bordered table-hover table-striped">
<thead>
<tr>
<th>Laundry Type Description</th>
<th><center>Price / Kg</center></th>
<th><center>Action</center></th>
</tr>
</thead>
<tbody>
<?php foreach($types as $t): ?>
<tr align="center">
<td align="left"><?= $t['laun_type_desc']; ?></td>
<td><?= '₱ '.number_format($t['laun_type_price'], 2); ?></td>
<td>
<button onclick="editType('<?= $t['laun_type_id']; ?>');" type="button"
class="btn btn-warning btn-xs">Edit
<span class="glyphicon glyphicon-edit" aria-hidden="true"></span>
</button>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
Laundry
<br />
<?php
require_once('../class/Laundry.php');
$laundries = $laundry->all_laundry();
?>
<div class="table-responsive">
<table id="myTable-laundry" class="table table-bordered table-hover table-striped">
<thead>
<tr>
<th></th>
<th>Customer Name</th>
<th><center>Priority #</center></th>
<th><center>Weight</center></th>
<th><center>Type</center></th>
<th><center>Date Received</center></th>
<th><center>Amount</center></th>
<th><center>Action</center></th>
</tr>
</thead>
<tbody>
<?php
foreach($laundries as $l):
$amount = $l['laun_weight'] * $l['laun_type_price'];
?>
<tr align="center">
<td><input type="checkbox" name="imSlepy" value="<?= $l['laun_id']; ?>"></td>
<td align="left"><?= ucwords($l['customer_name']); ?></td>
<td><?= $l['laun_priority']; ?></td>
<td><?= $l['laun_weight']; ?></td>
<td><?= $l['laun_type_desc']; ?></td>
<td><?= $l['laun_date_received']; ?></td>
<td><?= '₱ '.number_format($amount, 2); ?></td>
<td>
<button onclick="editLaundry('<?= $l['laun_id']; ?>')" type="button" class="btn
btn-warning btn-xs">
Edit
<span class="glyphicon glyphicon-edit" aria-hidden="true"></span>
</button>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
Claim Laundry
<?php
require_once('../class/Laundry.php');//para e update ang claim to 1
require_once('../class/Sales.php');
if(isset($_POST['id'])){
$id = $_POST['id'];
$details = $laundry->get_laundry2($id);
//customer name
$customer = $details['customer_name'];
//type desc
$type_desc = $details['laun_type_desc'];
//date received
$laundry_rec = $details['laun_date_received'];
//amount
$amount = $details['laun_weight'] * $details['laun_type_price'];
//save to sales
$saleRes = $sales->new_sales($customer, $type_desc, $laundry_rec, $amount);
//remove
$claimRes = $laundry->claim_laundry($id);
}//end isset
$laundry->Disconnect();
Daily Report
<?php
require_once('../class/Sales.php');
if(isset($_POST['date'])){
$date = $_POST['date'];
$reports = $sales->daily_sales($date);
// echo '<pre>';
// print_r($reports);
// echo '</pre>';
?>
<br />
<div class="table-responsive">
<table id="myTable-report" class="table table-bordered table-hover table-striped">
<thead>
<tr>
<th>Customer Name</th>
<th><center>Type</center></th>
<th><center>Laundry Received</center></th>
<th><center>Date Paid</center></th>
<th><center>Amount</center></th>
</tr>
</thead>
<tbody>
<?php
$total = 0;
foreach($reports as $r):
$total += $r['sale_amount'];
?>
<tr align="center">
<td align="left"><?= $r['sale_customer_name']; ?></td>
<td><?= $r['sale_type_desc']; ?></td>
<td><?= $r['sale_laundry_received']; ?></td>
<td><?= $r['sale_date_paid']; ?></td>
<td><?= '₱ '.number_format($r['sale_amount'], 2); ?></td>
</tr>
<?php endforeach; ?>
</tbody>
<tr>
<td></td>
<td></td>
<td></td>
<td align="right"><strong>TOTAL:</strong></td>
<td align="center"><strong><?= '₱ '.number_format($total,2);
?></strong></td>
</tr>
</table>
</div>
<?php
}//end isset
<?php
require_once('../class/Sales.php');
if(isset($_GET['date'])){
$date = $_GET['date'];
$reports = $sales->daily_sales($date);
// echo '<pre>';
// print_r($reports);
// echo '</pre>';
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
name="viewport">
<!-- Bootstrap 3.3.5 -->
<link rel="stylesheet" href="../assets/css/bootstrap.min.css">
<link rel="stylesheet" href="../assets/css/bootstrap-theme.min.css">
<!-- Font Awesome -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-
awesome.min.css">
<!-- Theme style -->
<link rel="stylesheet" href="dist/css/AdminLTE.min.css">
<!-- AdminLTE Skins. Choose a skin from the css/skins
folder instead of downloading all of them to reduce the load. -->
<link rel="stylesheet" href="dist/css/skins/_all-skins.min.css">
</head>
<body>
<center>
<h1>Daily Sales Report</h1>
<h2>as of</h2>
<h3><?= $date; ?></h3>
</center>
<br />
<div class="table-responsive">
<table id="myTable-report" class="table table-bordered table-hover table-striped">
<thead>
<tr>
<th>Customer Name</th>
<th><center>Type</center></th>
<th><center>Laundry Received</center></th>
<th><center>Date Paid</center></th>
<th><center>Amount</center></th>
</tr>
</thead>
<tbody>
<?php
$total = 0;
foreach($reports as $r):
$total += $r['sale_amount'];
?>
<tr align="center">
<td align="left"><?= $r['sale_customer_name']; ?></td>
<td><?= $r['sale_type_desc']; ?></td>
<td><?= $r['sale_laundry_received']; ?></td>
<td><?= $r['sale_date_paid']; ?></td>
<td><?= '₱ '.number_format($r['sale_amount'], 2); ?></td>
</tr>
<?php endforeach; ?>
</tbody>
<tr>
<td></td>
<td></td>
<td></td>
<td align="right"><strong>TOTAL:</strong></td>
<td align="center"><strong><?= '₱ '.number_format($total,2);
?></strong></td>
</tr>
</table>
</div>
</body>
</html>
<script type="text/javascript">
print();
</script>
<?php
}//end isset