<table id="noti_table"> <thead> <tr></tr> </thead> <tbody style="border-bottom:0px" id="bill_body"> <?php for ($i = 0; $i < sizeof($mPendingExpenseList); $i++) { $mExpense = new Expense($mPendingExpenseList[$i]); $vehicleId = $mExpense->getVehicle(); $mVehicle = new Vehicle($vehicleId); $driverId = $mExpense->getDriver(); $mDriver = new Driver($driverId); $reason = $mExpense->getReason(); $amount = $mExpense->getAmount(); echo "<tr onMouseOver='this.bgColor='#EEEEEE''>\n\t\t\t\t\t\t\t\t\t\t\t<td style='width:30%'><b><a href='../vehicle/detail.php?id=" . $mVehicle->getId() . "'>" . $mVehicle->getVehicleNumber() . "</a></b></td>\n\t\t\t\t\t\t\t\t\t\t\t<td style='width:30%'><b><a href='../driver/detail.php?id=" . $mDriver->getId() . "'>" . $mDriver->getName() . "</a></b></td>\n\t\t\t\t\t\t\t\t\t\t\t<td>" . $reason . "</td>\n\t\t\t\t\t\t\t\t\t\t\t<td><b>Rs." . $amount . "</b></td>\n\t\t\t\t\t\t\t\t\t\t\t<td><a class='js-open-modal' href='#' data-modal-id='bill_popup' onClick='fetchBillDetails(" . $mExpense->getId() . ")'><img src='../../res/more_detail.png' width=20 height=20 style='cursor:hand;'/></a></td>\n\t\t\t\t\t\t\t\t\t\t</tr>"; } ?> </tbody> </table> </div> </div> <!-- End .content-box-content --> </div> <!-- End .content-box --> <!----------------- REMINDER TAB ------------------------------------------------------------------------------------- <div class="content-box column-right" style="width:49%;height:50%"> <div class="content-box-header"> <h3 style="cursor: s-resize;">Reminders</h3> <a href="#" style="color:#57a000; float:right;padding:15px 10px 0 0 !important"><b>Add Reminder</b></a> </div>
case "billdetail": if (!isset($_GET['id'])) { break; } $id = $_GET['id']; $mExpense = new Expense($id); $vehicleId = $mExpense->getVehicle(); $mVehicle = new Vehicle($vehicleId); $vehicleDetail['id'] = $mVehicle->getId(); $vehicleDetail['number'] = $mVehicle->getVehicleNumber(); $vehicleDetail['type'] = $mVehicle->getType(); $driverId = $mExpense->getDriver(); $mDriver = new Driver($driverId); $driverDetail['id'] = $mDriver->getId(); $driverDetail['name'] = $mDriver->getName(); $detail['id'] = $mExpense->getId(); $detail['vehicle'] = $vehicleDetail; $detail['driver'] = $driverDetail; $detail['reason'] = $mExpense->getReason(); $detail['amount'] = $mExpense->getAmount(); $detail['filename'] = $mExpense->getFilename(); $detail['date_added'] = $mExpense->getDateAdded(); $detail['location'] = $mExpense->getLocation(); echo json_encode($detail); break; case "billapproval": if (!(isset($_GET['id']) && isset($_GET['approval']))) { break; } $id = $_GET['id']; $approval = $_GET['approval'];