| 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/CRM/ |
Upload File : |
<?php
/*
* Catabatic Technology Pvt. Ltd.
* File Name :CustomerTravelPlanPax.php
* File Description :Manage to Travel Plan Pax Operation
* Created By : Er Amit Kumar Dubey
* Created Date: 25-Feb-2017
*/
class Travel_Model_CRM_CustomerTravelPlanPax {
protected $_dbObj;
protected $_crmcustObj;
public function __construct() {
$this->_custtravelPaxObj = new Travel_Model_TblCustomerTravelPlanPax();
$this->_dbObj = Zend_Db_Table::getDefaultAdapter();
}
public function addCustomerTravelPlanPax(array $data) {
$this->_custtravelPaxObj->insert($data);
$lastID = $this->_dbObj->lastInsertId();
return $lastID;
}
public function UpdateCustomerTravelPlanPax(array $data, $where=NULL) {
$this->_custtravelPaxObj->update($data, $where);
}
public function GetTravelPlanRoomPaxInfo($TPSysId,$CustomerSysId){
$pax = array('TPPaxSysId','MemberSysId','');
$select = $this->_dbObj->select();
$select->from(array('tbl' => "TB_Agency_Customer_TravelPlan_Pax") ,$pax);
$select->where('tbl.TPSysId = ?', $TPSysId);
$select->where('tbl.CustomerSysId = ?', $CustomerSysId);
$result = $this->_dbObj->fetchRow($select);
return $result;
}
public function GetTravelPlanRoomPaxMembersInfo($TPSysId,$CustomerSysId){
$paxArray = array('TPPaxSysId','MemberSysId');
$memberArray = array('EmailId','Title','Contacts','FirstName','LastName','Relation','DOB','PassportNo');
$select = $this->_dbObj->select();
$select->from(array('tb1' => "TB_Agency_Customer_TravelPlan_Pax") ,$paxArray);
$select->joinLeft(array('tb2' => "TB_Agency_Customer_Members"), "tb1.MemberSysId = tb2.MemberSysId" , $memberArray);
$select->where('tb1.TPSysId = ?', $TPSysId);
$select->where('tb1.CustomerSysId = ?', $CustomerSysId);
$select->where('tb1.IsActive = ?', 1);
$select->where('tb1.IsMarkForDelete = ?', 0);
$select->where('tb2.EmailId IS NOT NULL'); //added by Amit on 8 august 2017 at 6:21 PM
//$select->where('tbl.AgencySysId = tb6.AgencySysId');
//$select->where('tbl.CustomerSysId = tb6.CustomerSysId');
$select->order("tb1.MemberSysId DESC");
$result = $this->_dbObj->fetchAll($select);
return $result;
}
}