Exemplo n.º 1
0
<div style="clear: both;"></div>
<div id="content" class="content">
<h1> Add Room</h1>
<div class="main-content">
<div class="data-form">
<form action="<?php 
    echo $_SERVER['PHP_SELF'];
    ?>
" method="post">
<label>Room Number</label><input type="text" name="room_number" value="<?php 
    echo getRoomId();
    ?>
" disabled>
<label>Name </label><input type="text" name="name"  required>
<label>Room Type </label> <select name="room_type" class="select" ><?php 
    $type = getRoomType();
    foreach ($type as $value) {
        ?>
<option value="<?php 
        echo $value['cat_id'];
        ?>
"><?php 
        echo $value['category'];
        ?>
</option>
 <?php 
    }
    ?>
</select>
<label>Description </label><select name="description" class="select"><?php 
    $type = getRoomSize();
Exemplo n.º 2
0
 /**
  *
  * @param type $post
  * @param type $datalists
  */
 protected function filterResults(&$post, $datalists)
 {
     $numRoomRequest = count(getRoomType($post));
     $post['response'] = array();
     foreach ($datalists as $list) {
         $hotel = $list['SpHotelCode'] . '@' . $list['SpHotelName'];
         $roomcategory = $list['SpRoomCode'] . '@' . $list['SpRoomName'] . '@' . $list['SpMealType'];
         $post['response'][$hotel][$roomcategory][] = $list;
         if (count($post['response'][$hotel][$roomcategory]) < $post['Night']) {
             continue;
         }
         //filter data order by most importance to normal.
         // Stop Sell(RestrictionStatus) >> RestrictionArrival >> RestrictionDeparture >> BookingLimit(Allotment) >> Price.
         $idxchk = 0;
         $numchk = count($post['response'][$hotel][$roomcategory]);
         while ($idxchk < $numchk) {
             $chkItem = $post['response'][$hotel][$roomcategory][$idxchk];
             if ($chkItem['RestrictionStatus'] == 0) {
                 unset($post['response'][$hotel][$roomcategory]);
                 break;
             } else {
                 //Arrival Restriction.
                 $arrival_data = reset($post['response'][$hotel][$roomcategory]);
                 if ($arrival_data['RestrictionArrival'] == 0 and $arrival_data['start'] == $post['FromDt']) {
                     unset($post['response'][$hotel][$roomcategory]);
                     break;
                 }
                 //Departure Restriction.
                 $depart_data = end($post['response'][$hotel][$roomcategory]);
                 if ($depart_data['RestrictionDeparture'] == 0 and $depart_data['end'] == $post['ToDt']) {
                     unset($post['response'][$hotel][$roomcategory]);
                     break;
                 }
             }
             //delete last rate record
             //2015-05-12
             //15560
             if ($chkItem['end'] == $post['ToDt']) {
                 unset($post['response'][$hotel][$roomcategory][$idxchk]);
                 $idxchk++;
                 continue;
             }
             //16467
             if ($chkItem['Base_NumberOfGuests'] == '' or $chkItem['Base_NumberOfGuests'] == 0) {
                 unset($post['response'][$hotel][$roomcategory]);
                 $idxchk++;
                 continue;
             }
             //Booking Limition.
             if ($chkItem['BookingLimit'] < $numRoomRequest) {
                 unset($post['response'][$hotel][$roomcategory]);
                 break;
             }
             //Base_AmountAfterTax.
             if ($chkItem['Base_AmountAfterTax'] <= 0) {
                 unset($post['response'][$hotel][$roomcategory]);
                 break;
             }
             //MinStay
             if ($chkItem['SetMinLOS'] > $this->datediff) {
                 unset($post['response'][$hotel][$roomcategory]);
                 break;
             }
             $idxchk++;
         }
         //clean up when no room category in this hotel.
         $post['response'][$hotel] = array_filter($post['response'][$hotel]);
         if (empty($post['response'][$hotel])) {
             unset($post['response'][$hotel]);
         }
     }
     $this->cleanUpHotel($post);
 }
    $roomno = $ad["roomno"];
    $bednumber = $ad["bednumber"];
    $dayadmitted = date('d', strtotime($ad["dateadmitted"]));
    $undateadmitted = $ad["dateadmitted"];
    $dateadmitted = date('F d, Y', strtotime($ad["dateadmitted"]));
    $timeadmitted = date('h:m a', strtotime($ad["dateadmitted"]));
}
$cif = getClinicalFace($pid, $rid, $aid);
foreach ($cif as $c) {
    $datedischarged = date('F d, Y', strtotime($c["datedischarged"]));
    $timedischarged = $c["timedischarged"];
    $persondischarged = $c["persondischarged"];
    $finaldiagnosis = $c["finaldiagnosis"];
    $noofhosdays = $c["noofhosdays"];
}
$room = getRoomType($roomno, $bednumber);
foreach ($room as $r) {
    $roomtype = $r["roomtype"];
    $priceperday = $r["priceperday"];
}
$accomtot = $priceperday * $noofhosdays;
$accom = number_format((double) $accomtot, 2, '.', '');
$pricing = getPriceList($membership);
foreach ($pricing as $p) {
    $phdrugsandmedicines = $p["drugsandmedicines"];
    $phsupplies = $p["supplies"];
    $phlaboratory = $p["laboratory"];
    $phxray = $p["xray"];
    $phultrasound = $p["ultrasound"];
    $phecg = $p["ecg"];
    $phoxygen = $p["oxygen"];