Exemplo n.º 1
0
    echo "<h3>Other Requests</h3>";
    $collection = $collection->getCollection();
}
if (isset($_GET['requests'])) {
    $request = new Quotation($_GET['requests']);
    if (isset($_GET['approve'])) {
        $request->approve();
        header('location:index.php?requests');
    } elseif (isset($_GET['cancel'])) {
        $request->cancel();
        header('location:index.php?requests');
    } elseif (isset($_GET['reconsider'])) {
        $request->reconsider();
        header('location:index.php?requests');
    } elseif (isset($_GET['request_approval'])) {
        $request->requestApproval();
        header('location:index.php?requests');
    }
}
?>


<table>
    <tr><td>Request Id</td><td>Date Applied</td><td>Expected Discount</td><td>User id and name</td><td>Status</td><td>Action</td></tr>
<?php 
foreach ($collection as $quotation) {
    ?>
    <tr><td>#<?php 
    echo $quotation->quote_id;
    ?>
</td>