Commit 7cd9e2f9 by Tobin

t : hotel booking changes

parent ef68778e
......@@ -31,7 +31,7 @@ class HotelServices_model extends CI_Model {
$limit = ($page - 1) * $perPage;
$meta = array('total_pages'=>ceil($count/$perPage),'total'=>$count,
'current_page'=>$page,'per_page'=>$perPage);
$sql = "SELECT THC.hotel_city_id AS id,HC.hotel_city_icon AS image
$sql = "SELECT THC.hotel_city_id AS id,HC.hotel_city_icon AS image,HC.country
FROM translator_hotel_city AS THC
INNER JOIN hotel_cities AS HC ON (HC.hotel_city_id=THC.hotel_city_id)
WHERE HC.status=1 $cond GROUP BY HC.hotel_city_id LIMIT $limit,$perPage";
......
......@@ -68,7 +68,11 @@
case 3: echo 'Pending'; break;
case 4: echo 'Deleted'; break;
case 5: echo 'Payment Failed'; break;
case 6: echo 'Waiting for Aproval'; break;
case 6: if($booking->has_payment == 0){ echo 'Waiting for Aproval'; break; }
else {
if ($booking->trans_status == '1') { echo 'Waiting for Aproval'; break; }
else { echo 'Pending'; break; }
}
}
?>
</th>
......@@ -78,9 +82,17 @@
<i class="fa fa-fw fa-eye"></i>View
</a> <br>
<?php
if(($this->session->userdata('user_type')==1 && $booking->provider_id==1 &&
if(
(
($this->session->userdata('user_type')==1 && $booking->provider_id==1 &&
$booking->book_status=='6') ||
($this->session->userdata('user_type')==2 && $booking->book_status=='6')){
($this->session->userdata('user_type')==2 && $booking->book_status=='6')
) &&
(
($booking->has_payment == 0) ||
($booking->has_payment == 1 && $booking->trans_status == '1')
)
){
$msg = "Are you sure to Aprove this booking ?";
$bookId = encode_param($booking->booking_id);
$param = "{'booking_id':'$bookId','alertMsg':'$msg'}"; ?>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment