include_once dirname(__FILE__) . "/../login_check.inc.php";
include_once dirname(__FILE__) . "/../queryfunctions.php";
include_once dirname(__FILE__) . "/../functions.php";
include_once dirname(__FILE__) . "/../dailyfunc.php";
include_once dirname(__FILE__) . "/../lang/lang_en.php";
$lang = get_language();
load_language($lang);
$logofile = Get_LogoFile();
access("billing");
$bill = array();
$book = array();
$guest = array();
$inv = $_GET['inv'];
get_bill($inv, $bill);
if ($bill['book_id']) {
    get_booking($bill['book_id'], $book);
} else {
    if ($bill['reservation_id']) {
        get_reservation($bill['reservation_id'], $book);
    }
}
if ($book['guestid']) {
    get_guest($book['guestid'], $guest);
}
// Default page size A4 - 210mm x 297mm
//  Header is set to 60mm
//  Footer is set to 27mm
//  body of invoice is set to 210mm
//  Rough rules of thumb
//  font 12px has 59 lines
//  font 13px has 52 lines
Exemple #2
0
        $id = $book['bill_id'];
        get_bill($id, $bill);
        $rid = $bill['reservation_id'];
    }
}
// if the reservation id is found, load the reservation
if ($rid) {
    get_reservation($rid, $res);
    // if the bill is not loaded, load the invoice id from the reservation
    // load the bill, then attempt to load the booking detail that goes
    // with it.
    if (!$id && sizeof($bill) == 0) {
        $id = $res['bill_id'];
        get_bill($id, $bill);
        $bid = $bill['book_id'];
        get_booking($bid, $book);
    }
}
$guestid = $bill['guestid'];
if (!$guestid && $book['guestid']) {
    $guestid = $book['guestid'];
}
if (!$guestid && $res['guestid']) {
    $guestid = $res['guestid'];
}
if ($book['checkindate']) {
    $checkin = $book['checkindate'];
}
if ($book['checkoutdate']) {
    $checkout = $book['checkoutdate'];
}
            $doctype = $_L['ADP_passport'];
        } elseif ($documents[$i]['doctype'] == DOC_DL) {
            $doctype = $_L['ADP_driverlicense'];
        } elseif ($documents[$i]['doctype'] == DOC_MILITARY) {
            $doctype = $_L['ADP_military'];
        } elseif ($documents[$i]['doctype'] == DOC_NID) {
            $doctype = $_L['ADP_nid'];
        } elseif ($documents[$i]['doctype'] == DOC_VISA) {
            $doctype = $_L['ADP_visa'];
        }
    }
    $docid = $documents[$i]['docnumber'];
    $nationality = $documents[$i]['nationality'];
}
//Get the booking details
get_booking($bid, $res);
echo "<tr >";
echo "<td align=right>";
echo "<table width=100%><tr><td width='33%'></td><td width='33%' align=center><h1>" . $hotel . "</h1></td>";
echo "<td align=right rowspan=2><img src='" . $logofile . "' title='" . $logofile . "' width='70' height='60mm' border='0' /></td></tr>";
echo "</table>";
echo "</tr>";
?>


	<tr><td align=center>CUSTOM FORM<br/></td></tr>
	<tr><td align=center><h3><?php 
echo $_L['FRM_guestinfotitle'];
?>
</h3></td></tr>
	<tr><td>
Exemple #4
0
$finaldate = optional_param('finalDate', 1, PARAM_INT);
$days = optional_param('days', null, PARAM_TEXT);
$frequency = optional_param('frequency', 0, PARAM_INT);
$inicio = optional_param('inicio', null, PARAM_TEXT);
$termino = optional_param('termino', null, PARAM_TEXT);
$nombresala = optional_param('nombresala', null, PARAM_TEXT);
$nombremodulo = optional_param('nombremodulo', null, PARAM_TEXT);
$resources = optional_param('resources', "prueba", PARAM_TEXT);
// Callback para from webpage
$callback = optional_param('callback', null, PARAM_RAW_TRIMMED);
// Headers
header('Content-Type: text/javascript');
header('Cache-Control: no-cache');
header('Pragma: no-cache');
if ($action == "getbooking") {
    $output = get_booking($type, $campusid, $initialDate, $multiply, $size, $finaldate, $days, $frequency);
    $disponible = array();
    $modulos = array();
    $salas = array();
    $ocupado = array();
    $agregadosModulos = array();
    $agregadosSalas = array();
    $output2 = $output;
    $contador = 0;
    foreach ($output as $disponibilidad) {
        if (!in_array($disponibilidad->moduloid, $agregados)) {
            $agregados[] = $disponibilidad->moduloid;
            $modulos[] = array("id" => $disponibilidad->moduloid, "name" => $disponibilidad->modulonombre, "horaInicio" => $disponibilidad->moduloinicio, "horaFin" => $disponibilidad->modulofin);
        }
        if ($contador > 0) {
            if ($anterior != $disponibilidad->salaid) {
Exemple #5
0
                        update_room_status($bookroom['roomid'], LOCKED);
                    }
                }
            }
            break;
        case 'List':
            break;
        case 'Find':
            break;
    }
}
if (!$book_id && $_POST['book_id']) {
    $book_id = $_POST['book_id'];
}
if ($book_id) {
    get_booking($book_id, $bookings);
} else {
    if (!$book_id && $res_id) {
        get_booking_byresid($res_id, $details_id, $bookings);
        if ($room_id) {
            update_room_status($room_id, BOOKED);
        }
    } else {
        if (!$book_id && $guestid) {
            get_booking_byguest($guestid, $bookings);
        }
    }
}
if ($bookings['guestid']) {
    $readonly = "readonly";
} else {
Exemple #6
0
        <div class="row">
          <div class="col s12">
            <!-- Tabel Stok-->
            <table id="tabel-booking" class="tabel centered">
              <thead>
                <tr>
                    <th data-field="id-booking">ID Booking</th>
                    <th data-field="id-pengguna">ID Pengguna</th>
                    <th data-field="id-atk">ID ATK</th>
                    <th data-field="tanggal-booking">Tanggal Booking</th>
                    <th data-field="jumlah-atk">Jumlah</th>
                </tr>
              </thead>
              <tbody>
                <?php 
foreach (get_booking() as $data) {
    ?>
                <tr class="data-row">
                  <td><?php 
    echo $data['bid'];
    ?>
</td>
				  <td><?php 
    echo $data['b_uid'];
    ?>
</td>
				  <td><?php 
    echo $data['b_aid'];
    ?>
</td>
                  <td><?php 
Exemple #7
0
/**
 * Get the booking detail by the guest id, first check any open reservation that is due today
 * if found, use this reservation, if not found then create a new booking filling in the guest
 * detail, but the booking will not be created like with a reservation.
 * @ingroup BOOKING_MANAGEMENT
 * @param $guestid [in] Guest ID
 * @param $booking [in/out] result array
 *
 * @return number of elements in booking
 * @todo complete this function.
 */
function get_booking_byguest($guestid, &$booking)
{
    global $conn;
    if (!$conn) {
        $conn = connect_Hotel_db(HOST, USER, PASS, DB, PORT);
    }
    if (!$conn) {
        return 0;
    }
    $todaystart = date("d/m/Y") . " 00:00";
    $todayend = date("d/m/Y") . " 23:59";
    $rightnow = date("d/m/Y H:i");
    $booking = array();
    $sql = "select book_id from booking where guestid=" . $guestid;
    $sql .= " and checkindate >= " . date_to_dbformat("DD/MM/YYYY HH:MI", 1, $todaystart);
    $sql .= " and checkoutdate <= " . date_to_dbformat("DD/MM/YYYY HH:MI", 1, $todayend);
    $stmt = $conn->prepare($sql);
    $results = $stmt->execute();
    if ($results && ($row = $stmt->fetch())) {
        return get_booking($row['book_id'], $booking);
    }
    $guest = array();
    if (findguestbyid($guestid, $guest)) {
        $booking['book_id'] = 0;
        $booking['guestid'] = $guestid;
        $booking['reservation_id'] = 0;
        $booking['bill_id'] = 0;
        $booking['no_adults'] = 1;
        $booking['no_child1_5'] = 0;
        $booking['no_child6_12'] = 0;
        $booking['no_babies'] = 0;
        $booking['checkindate'] = $rightnow;
        $booking['checkoutdate'] = '';
        $booking['checkedin_by'] = 0;
        $booking['checkedout_by'] = 0;
        $booking['checkedout_date'] = 0;
        $booking['checkedin_date'] = '';
        $booking['cctype'] = '';
        $booking['CCnum'] = '';
        $booking['expiry'] = '';
        $booking['CVV'] = '';
        $booking['pp_no'] = $guest['pp_no'];
        $booking['idno'] = $guest['idno'];
        $booking['address'] = $guest['address'];
        $booking['town'] = $guest['town'];
        $booking['postal_code'] = $guest['postal_code'];
        $booking['phone'] = $guest['phone'];
        $booking['email'] = $guest['email'];
        $booking['mobilephone'] = $guest['mobilephone'];
        $booking['eBridgeID'] = $guest['eBridgeID'];
        $booking['IM'] = $guest['IM'];
        $booking['nationality'] = $guest['nationality'];
        $booking['countrycode'] = $guest['countrycode'];
        $booking['nation'] = Get_Country($guest['nationality']);
        $booking['country'] = Get_Country($guest['countrycode']);
        $booking['instructions'] = '';
        $booking['guestname'] = trim(trim($guest['firstname']) . " " . trim($guest['middlename']) . " " . trim($guest['lastname']));
    }
    return sizeof($booking);
}
            $checkout = $res['checkoutdate'];
        }
        if (!$roomid) {
            $roomid = $res['roomid'];
        }
        if (!$roomtypeid) {
            $roomtypeid = $res['roomtypeid'];
        }
        if (!$ratesid) {
            $ratesid = $res['ratesid'];
        }
    }
    $input = "/hotelmis/webtoPDF.php?TMPL=reservation_summary.php&PR=1&rid=" . $resid;
}
if ($bid) {
    if (get_booking($bid, $res)) {
        $vch = $res['voucher_no'];
        if (!$guestid) {
            $guestid = $res['guestid'];
        }
        if (!$checkin) {
            $checkin = $res['checkindate'];
        }
        if (!$checkout) {
            $checkout = $res['checkoutdate'];
        }
        if (!$roomid) {
            $roomid = $res['roomid'];
        }
        if (!$roomtypeid) {
            $roomtypeid = $res['roomtypeid'];