if (!$roomtypeid) {
            $roomtypeid = $res['roomtypeid'];
        }
        if (!$ratesid) {
            $ratesid = $res['rates_id'];
        }
        $resid = $res['reservation_id'];
        $numguest = $res['no_adults'] + $res['no_child1_5'] + $res['no_child6_12'] + $res['no_babies'];
    }
}
$rate = array();
if ($ratesid && !$resid) {
    get_ratebyratesid($ratesid, $rate);
}
if ($roomid && !$roomtypeid && !$ratesid && !$resid) {
    get_ratebyratesid(get_RateID_byRoomID($roomid), $rate);
}
if ($roomtypeid && !$ratesid && !$resid) {
    get_ratebyratesid(get_RateID_byRoomTypeID($roomtypeid), $rate);
}
if ($resid) {
    $details = array();
    $total = 0;
    reservation_details_byResID($resid, $details);
    foreach ($details as $resdetail) {
        $rate = array();
        $rate_id = $resdetail['ratesid'];
        get_ratebyratesid($rate_id, $rate);
        $total = $total + $rate['price'];
    }
} else {
示例#2
0
 $expiry = $_POST["expiry"];
 $CVV = $_POST["CVV"];
 $details_id = isset($_POST['res_det_id']) ? intval($_POST['res_det_id']) : 0;
 $voucher_no = get_bookingvoucher($book_id);
 $book_status = get_bookingstatus($book_id);
 if (!empty($book_id)) {
     get_booking($book_id, $bookroom);
 }
 if (!$ratesid && $res_id) {
     $ratesid = get_reservationrate($res_id);
 }
 if (!$ratesid && $roomtypeid) {
     $ratesid = get_RateID_byRoomTypeID($roomtypeid);
 }
 if (!$ratesid && $roomid) {
     $ratesid = get_RateID_byRoomID($roomid);
 }
 if ($action == $_L['REG_register']) {
     $book_status = BOOK_REGISTERED;
 }
 if ($action == $_L['REG_checkinbox'] && $roomid) {
     $checkedin_by = $userid;
     $checkedin_date = date("d/m/Y H:i");
     $book_status = BOOK_CHECKEDIN;
 }
 if ($action == $_L['REG_checkoutbox']) {
     $checkedout_by = $userid;
     $checkedout_date = date("d/m/Y H:i");
     $book_status = BOOK_CHECKEDOUT;
     //					print "Checked out ".$userid." ".$checkedout_date."<br/>";
 }