</script>
<?php 
session_start();
include "header.php";
include "class.invoice.dao.php";
include "class.customer.dao.php";
$daoCustomer = new DAOcustomer();
$customer_detail = $daoCustomer->getCustomers($_SESSION['uid']);
?>
<center>
	<h3>Add Invoice</h3>
<form name = "frmInvoice" method="POST" action="save.invoice.php"  onsubmit = "return validateInvoice();">
	<table cellspacing="5" cellpadding="5">
		<?php 
if (isset($_GET["id"])) {
    $dao = new DAOinvoice();
    $vo = $dao->get($_GET["id"]);
    ?>
			<tr>
				<td> Customer Name </td>
				<td><select name = "customer" style="width:198px" value = "<?php 
    echo $vo->customer;
    ?>
">
					<option selected value="<?php 
    echo $vo->customer;
    ?>
"><?php 
    echo $vo->customer;
    ?>
</option>
Beispiel #2
0
<?php

session_start();
include "class.invoice.dao.php";
include_once "header.php";
$dao = new DAOinvoice();
?>
<center><b><u><font face ="Britannic Bold"><h1>Invoice</h1></font></u></b></center><br>
<a href="form.invoice.php" class="btn btn-info">Add Invoice</a><br>
<table class="table table-striped">
	<tr class ="info">
		<td>#</td>
		<td>Customer Name</td>
		<td>Total Amount</td>
		<td>Balance Due</td>
		<td>Invoiced On</td>
		<td>Paid On</td>
		<td><b>Make Payment</b></td>
		<td><b>Edit</b></td>
		<td><b>Delete</b></td>
	</tr>

<?php 
$rec_per_page = 10;
if (isset($_GET['page'])) {
    $page = $_GET['page'];
} else {
    $page = 1;
}
$limit1 = ($page - 1) * $rec_per_page;
$limit2 = $page * $rec_per_page;
Beispiel #3
0
<?php

session_start();
include "class.truck.dao.php";
include "class.driver.dao.php";
include "class.invoice.dao.php";
include_once "header.php";
$dao = new DAOtruck();
$daoDriver = new DAOdriver();
$daoInvoice = new DAOinvoice();
$truckAvailableList = $dao->getVehicleId($_SESSION["uid"], 1);
$truckLoadedList = $dao->getVehicleId($_SESSION["uid"], 0);
$t_available = count($truckAvailableList);
$t_loaded = count($truckLoadedList);
$c_date = date('Y-m-d');
$driver_detail = $daoDriver->getDrivers($_SESSION['uid']);
$invoice_detail = $daoInvoice->getInvoices($_SESSION['uid']);
?>
<center>
		<font color ="red" face ="Britannic Bold"><h2><U>STATUS</U></h2></font>
		<table class="table table-bordered" >
			<tr><td width = '50%'><center><img src="img/truck.png" width = 80 height = 80 ><br><br>
				Trucks available are <?php 
echo $t_available;
?>
<br>
				Trucks loaded are <?php 
echo $t_loaded;
?>
</center></td>
				<td width = '50%'><center><img src="img/transaction.png" width = 80 height = 80 ><br><br>
<?php

session_start();
include "db.php";
include "class.invoice.dao.php";
$dao = new DAOinvoice();
$vo = new invoice($_SESSION["uid"], $_POST["customer"], $_POST["total_amt"], $_POST["balance_due"], $_POST["inv_date"], $_POST["paid_date"]);
if (isset($_POST["inv_num"])) {
    $vo->inv_num = $_POST["inv_num"];
}
$dao->save($vo);
header("Location: invoice.php");
<?php

include "db.php";
include "class.invoice.dao.php";
$dao = new DAOinvoice();
if (isset($_GET["id"])) {
    $vo = $dao->get($_GET["id"]);
    $dao->del($vo);
}
header("Location: invoice.php");