echo $data[0]['Child_A']; ?> " required /> <label>Status :</label><select name="status"><option value="active" <?php if ($data[0]['status'] == 'Active') { echo 'selected'; } ?> >Active</option><option value="Cancelled"<?php if ($data[0]['status'] == 'Cancelled') { echo 'selected'; } ?> >Cancelled</option></select> <?php $customer = getCust($data[0]['cust_id']); ?> <input type="hidden" name="cust_id" value="<?php echo $data[0]['cust_id']; ?> " > <label>First Name :</label><input name="fname" type="text" value="<?php echo $customer[0]['fname']; ?> " required /> <label>Last Name :</label> <input name="lname" type="text" value="<?php echo $customer[0]['lname']; ?> " required /> <label>Email Address :</label><input type="email" name="email" value="<?php echo $customer[0]['email_address'];
require_once 'lib.php'; require_once 'library/pdf/fpdf.php'; if (isset($_GET['id'])) { $cust = $_GET['id']; } $html = "<div class='voucher'>\n<div class='logo-img'><img src='images/logo-voucher.png' width='144' /></div>\n<div class='top-invoice'>\n<h4>Guest Details</h4>\n<div class='top-item'><label>Guest Name:</label><label> "; $name = getCustName($cust); $html .= $name[0]['cust_name'] . "</label></div>\n<div class='top-item'><label>Arrival Date:</label><label> "; $qry = "select * from reservation where cust_id='{$cust}'"; $result = getData($qry); $date = date_create($result[0]['arrival_date']); $html .= date_format($date, "l, d F Y") . "</label></div>\n<div class='top-item'><label>Room No:</label><label>1,5</label></div>\n<div class='top-item'><label>Departure Date:</label><label> "; $date = date_create($result[0]['departure_date']); $html .= date_format($date, "l, d F Y") . "</label></div>\n<div class='top-item'><label>Mobile No:</label><label> "; $phone = getCust($cust); $html .= $phone[0]['phone_no'] . "</label></div>\n\n<div class='top-item'><label>Email: </label><label> "; $html .= $phone[0]['email_address'] . "</label></div>\n</div>\n<div class='invoice-table'>\n<table cellspacing='0' border='0'>\n<tr><td>Item Description</td><td>Charges</td><td>Credit</td><td>Balance</td></tr>"; $qry = "select * from invoice where cust_id={$cust}"; $data = getData($qry); foreach ($data as $val) { $sect = getSectionName($val['section_id']); $id = $val['section_id']; $html .= "<tr><td>" . $sect[0]['section_name'] . "</td><td>"; $qy = "select sum(amount) as amount from invoice where cust_id={$cust} and section_id={$id}"; $charge = getData($qy); $ch = $charge[0]['amount']; $html .= number_format($charge[0]['amount'], 2, '.', ',') . "</td><td>"; $qy = "select sum(amount) as amount from payment where cust_id={$cust} and section_id={$id}"; $credit = getData($qy); $cr = $credit[0]['amount'];