| Server IP : 103.234.187.230 / Your IP : 216.73.216.216 Web Server : Apache System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64 User : apache ( 48) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/b2bzend/application/models/ |
Upload File : |
<?php
class Travel_Model_TblAccomoRooms {
private $db = NULL;
public $intId = NULL;
public $strCondition = NULL;
public $orderByField = 'AminityId';
public $orderBy = 'ASC' ;
public function __construct(){
$request = Zend_Controller_Front::getInstance()->getRequest();
$this->baseUrl = $request->getScheme() . '://' . $request->getHttpHost();
$this->db = Zend_Db_Table::getDefaultAdapter();
}
public function __destruct() {
$this->db->closeConnection();
}
public function getAccomoRoomDetail($accomSysId) {
$sql = "SELECT AR.AminitiesMask,IA.InvnItemSysId,IA.Title RoomTitle,IA.DOccupCost,IA.CostCurrency,
RT.Title ,MA.DOccupMarkUp,MA.MarkUpType,IA.CostCurrency,
CASE WHEN MIN(IAC.DOccupPrice) IS NULL THEN MIN(IA.DOccupCost)
ELSE MIN(IAC.DOccupPrice) END
[DOccupCost] FROM TB_MP_Inventory_Accom IA LEFT JOIN TB_Master_RoomType RT ON
RT.RoomType=IA.EconomyType
LEFT JOIN TB_IC_Accomdation_Room AR ON IA.XRefAccoSysId=AR.AccomSysId
LEFT Outer Join TB_MP_Inventory_Accom_Alloc IAC
on IA.InvnItemSysId = IAC.InvnItemSysId
left outer join TB_MP_StdMarkup_Accom MA on
IAC.AgencySysId=MA.AgencySysId
AND IAC.MPType=MA.MPType
WHERE IA.XRefAccoSysId='".$accomSysId."' AND
IA.EconomyType=AR.RoomType GROUP BY AR.AminitiesMask,IA.Title,IA.DOccupCost,IA.CostCurrency,RT.Title,IA.InvnItemSysId,MA.DOccupMarkUp,MA.MarkUpType,IA.CostCurrency" ;
// if(!empty($this->strCondition)) {
// $sql .= $this->strCondition;
// }
//
// $sql .= " ORDER BY " . $this->orderByField . " " . $this->orderBy ;
//
return $this->db->query($sql)->fetchAll();
}
public function getAccomoMap($accomSysId) {
$sql = " SELECT Title,Address,GeoLat,GeoLong FROM TB_IC_Accomdation WHERE AccomSysId='".$accomSysId."' " ;
return $this->db->query($sql)->fetchAll();
}
}