| 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/views/scripts/leaddetail/ |
Upload File : |
<?php
//header("Content-Type: text/html; charset=ISO-8859-1");
//header('Content-type: text/html; charset=utf-8');
//echo "<pre>";print_r($this->customerDetail);die;
$plantype = isset($this->leadDetail['PlanType']) ? $this->leadDetail['PlanType'] : '';
$leadID = $this->leadId;
$this->leadDetail['EnqSupplierSysId'] = $this->EnqSupplierSysId;
$this->leadDetail['lead_source'] = $this->leadDetail['LeadSourceSysId'];
$tpintsysID = isset($this->leadDetail['itenaryID']) ? $this->leadDetail['itenaryID'] : '';
$createdDate = isset($this->leadDetail['CreateDate']) ? $this->leadDetail['CreateDate'] : '';
if (isset($this->leadDetail['AdditionalReq']) && ($this->leadDetail['AdditionalReq'] != '')) {
$data = str_split($this->leadDetail['AdditionalReq']);
if ($data[0] == 1) {
$res[] = 'Visa';
}
if ($data[1] == 1) {
$res[] = 'Forex';
}
if ($data[2] == 1) {
$res[] = 'Insurance';
}
}
$packageThemeList = $this->packageThemeList;
$packageFoodPreferenceList = $this->packageFoodPreferenceList;
// echo "<pre>";print_r($this->leadDetail);die;
$packageInclList = $this->packageInclList;
$cityListArray = $this->cityListArray;
$RoomInfoJsonDecode = json_decode($this->leadDetail['RoomInfoJson'], true);
$packageRoomInfoArr = Zend_Controller_Action_HelperBroker::getStaticHelper('Package')->getPackageRoomInfo(@$this->leadDetail['RoomInfoJson']);
//echo $packageRoomInfoArr['roomwisePaxDetails'];die;
$AdultCount = 0;
$ChildCount = 0;
for ($m = 1; $m <= count($RoomInfoJsonDecode); $m++) {
if (isset($RoomInfoJsonDecode[$m]['Adult'])) {
$AdultCount = $RoomInfoJsonDecode[$m]['Adult'];
$ChildCount = $RoomInfoJsonDecode[$m]['Child'];
$InfantCount = isset($RoomInfoJsonDecode[$m]['Infant']) ? $RoomInfoJsonDecode[$m]['Infant'] : '';
}
}
$customhelper = Zend_Controller_Action_HelperBroker::getStaticHelper('Custom');
$AllLeadStatus = $customhelper->GetTravelPlanStatus(1, '');
$AllLeadQualityStatus = array(array('Id' => 1, 'Title' => 'Hot'), array('Id' => 2, 'Title' => 'Warm'), array('Id' => 3, 'Title' => 'Cold'));
$AllLeadQualityStatusName = array(1 => 'Hot', 2 => 'Warm', 3 => 'Cold');
$AllLeadSourceStatus = $this->leadDetail['LeadSourceArray'];
$LeasdsecureCode = Zend_Controller_Action_HelperBroker::getStaticHelper('SecureCode')->secureCode(trim(base64_encode($this->leadDetail['TPSysId'])), 1);
$QuerysecureCode = Zend_Controller_Action_HelperBroker::getStaticHelper('SecureCode')->secureCode(trim(base64_encode($this->leadDetail['CustomerSysId'])), 1);
$lostArray = array(78 => "Lost - Wrong No.", 28 => "Lost - Not Interested", 31 => "Lost - Plan Cancelled", 76 => "Lost - Plan Cancelled", 30 => "Lost - Budget Issue", 63 => "Lost - Language Issue", 32 => "Lost - Booked Elsewhere", 76 => "Lost - Plan Postponed", 127 => "Lost - Duplicate Lead", 77 => "Lost - Destination Changed", 33 => "Lost - Different Trip Booked");
$sessionLogin_user = new Zend_Session_Namespace('sessionLogin_user');
$AgencyUser = new Zend_Session_Namespace('AgencyUser');
$IsFullMaskingEnabled = $AgencyUser->user->IsFullMaskingEnabled;
$customHelper = Zend_Controller_Action_HelperBroker::getStaticHelper('Custom');
?>
<style>
.modalloader {
position: fixed;
z-index: 999;
height: 100%;
width: 100%;
top: 0;
left: 0;
background-color: Black;
filter: alpha(opacity=60);
opacity: 0.6;
-moz-opacity: 0.8;
}
.center {
z-index: 1000;
margin: 300px auto;
padding: 10px;
width: 52px;
background-color: White;
border-radius: 10px;
filter: alpha(opacity=100);
opacity: 1;
-moz-opacity: 1;
}
.todo-radio-btn {
display: inline-flex;
position: relative;
}
.todo-radio-btn .todo-radio-input[type=radio] {
position: absolute;
opacity: 0;
width: 100%;
height: 100%;
cursor: pointer;
}
.todo-radio-btn .todo-radio-label {
margin-bottom: 0;
border: 1px solid #e7e7e7;
padding: 4px 8px;
border-radius: 4px;
}
.todo-radio-btn .todo-radio-input[type=radio]+.todo-radio-label:before {
display: none;
}
.todo-radio-btn .todo-radio-input[type=radio]+.todo-radio-label:after {
display: none;
}
.todo-radio-btn .todo-radio-input[type=radio]+.todo-radio-label {
background: #fff;
border: 1px solid #666;
color: #444;
padding: 4px 12px;
font-size: 14px;
}
.todo-radio-btn .todo-radio-input[type=radio]:checked+.todo-radio-label:before {
display: none;
}
.todo-radio-btn .todo-radio-input[type=radio]:checked+.todo-radio-label:after {
display: none;
}
.todo-radio-btn .todo-radio-input[type=radio]:checked+.todo-radio-label {
background: #0076ca;
border: 1px solid #0076ca;
color: #fff;
padding: 4px 12px;
}
.todo-select {
height: 31px;
border: 1px solid #666 !important;
}
.outcome {
color: #0076CA;
font-weight: 600;
font-size: 16px;
margin-top: auto;
}
.form-group1.qstagehide {
margin-bottom: 10px;
display: none;
width: auto;
}
.todo-radio-btn .todo-radio-input[type=radio]+.todo-radio-label {
background: #fff;
border: 1px solid #666;
color: #444;
padding: 4px 6px;
font-size: 14px;
}
.todo-radio-btn .todo-radio-input[type=radio]:checked+.todo-radio-label {
padding: 4px 6px;
}
/* .nextstepcalldiv {
display: flex;
justify-content: space-between;
} */
</style>
<!--Page main section start-->
<section id="min-wrapper" class="active">
<div id="main-content">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<!--Top header start-->
<h3 class="ls-top-header">Query Detail</h3>
<!--Top header end -->
<!--Top breadcrumb start -->
<ol class="breadcrumb">
<li><a href="#"><i class="fa fa-home"></i></a></li>
<li class="active">CRM</li>
<li class="active"><a href="<?php echo $this->baseUrl('/customer/listcustomer'); ?>">Customers</a></li>
<li class="active"><a href="<?php echo $this->baseUrl('/customer/customer-lead/id/' . base64_encode($this->leadDetail['CustomerSysId'])) . '/code/' . $QuerysecureCode ?>">Queries</a></li>
<li class="active"><?php echo $this->pageName; ?></li>
<?php if ($this->leadDetail['PlanType'] == 1) { ?>
<li class="active"><?php echo ($this->leadDetail['totalDays'] > 0) ? $this->leadDetail['totalDays'] . "D - " : ''; ?>
<?php echo isset($this->leadDetail['Cities']) ? ucfirst($this->leadDetail['Cities']) : ''; ?>
</li>
<?php
}
if ($this->leadDetail['PlanType'] == 2) {
?>
<li class="active"><?php echo isset($this->leadDetail['hotelTotalNights']) ? $this->leadDetail['hotelTotalNights'] : 0; ?>N/<?php echo isset($this->leadDetail['totalDays']) ? $this->leadDetail['totalDays'] : 0; ?>D - <?php echo isset($this->leadDetail['hotelCityTitle']) ? ucfirst($this->leadDetail['hotelCityTitle']) : ''; ?> </li>
<?php } ?>
</ol>
<!--Top breadcrumb start -->
</div>
</div>
<!-- Main Content Element Start-->
<div class="row">
<!--- common data from partial page-->
<div class="modalloader" style="display:none;">
<div class="center">
<img class="loaderimg" id="loaderimg" src="<?php echo $this->baseUrl('/public/tinymce/skins/lightgray/img/loader.gif'); ?>" />
</div>
</div>
<div class="col-md-12 ">
<div class="leadeBorder leadeBorder2 query_listing_bg no-padding paragraph-align parline">
<div class="clear" style="padding-top:15px;"></div>
<div class="col-md-12 border-bottom">
<?php
$datetimeObj = isset($this->customerDetail['ActiveDate']) ? $this->customerDetail['ActiveDate'] : ''; //echo "<pre>";print_r($this->customerDetail);
$CustomersecureCode = Zend_Controller_Action_HelperBroker::getStaticHelper('SecureCode')->secureCode(trim(base64_encode($this->customerDetail['CustomerSysId'])), 1);
?>
<div class="col-md-3 no-padding">Customer Name : <a href="<?php echo $this->baseUrl('/customer/customer-profile-desc/id/' . base64_encode($this->customerDetail['CustomerSysId']) . '/code/' . $CustomersecureCode . '/SearchData/' . $this->customerDetail['AgencyCRMLeadSysId']); ?>"> <?php echo Zend_Controller_Action_HelperBroker::getStaticHelper('General')->getSalutation($this->customerDetail['Salutation']); ?> <?php echo isset($this->customerDetail['FirstName']) ? ucfirst(trim($this->customerDetail['FullName'])) : 'NA'; ?> </a></div>
<div class="col-md-3 no-padding">Contact No : <?php echo isset($this->customerDetail['Contacts']) ? $customHelper->hidePhoneNumberDigit($this->customerDetail['Contacts'], $IsFullMaskingEnabled) : 'NA'; ?></div>
<div class="col-md-3 no-padding">Email ID:<a href="<?php echo $this->baseUrl('/customer/customer-lead/id/' . base64_encode($this->customerDetail['CustomerSysId']) . '/code/' . $CustomersecureCode); ?>"> <?php echo isset($this->customerDetail['EmailId']) ? $customHelper->hideEmailidCharacters(ucfirst($this->customerDetail['EmailId']), $IsFullMaskingEnabled) : 'NA'; ?> </a></div>
<div class="col-md-3 no-padding">Active Since : <span class="blue"><?php
if (!empty($datetimeObj) && ($datetimeObj->format('d/m/Y h:i:s') != '1900-01-01 12:00:00')) {
echo $datetimeObj->format('d-M-y h:i:s');
} else {
echo "NA";
}
?></span></div>
<div class="col-md-3 no-padding">Customer Type : <span class="blue"><?php
if ($this->customerDetail['IsB2BAgent'] == 1) {
echo "B2B (" . trim($this->customerDetail['B2BFullName']) . ")";
} else {
echo "B2C";
}
?></span></div>
<div class="col-md-3 no-padding">
<input type="hidden" name="AgencyCRMLeadSysId" id="AgencyCRMLeadSysId" value="<?php echo (trim($this->customerDetail['AgencyCRMLeadSysId']) > 0) ? base64_encode(trim($this->customerDetail['AgencyCRMLeadSysId'])) : ''; ?>" />
Owner name : <span class="blue">
<input type="text" style="display:none;" name="changeOwnerName" id="changeOwnerName" class="changeOwnerName" value="" />
<a href="javascript:void(0);" class="ownerNameText" onclick="showHide('changeOwnerName', 'ownerNameText')"><?php echo (isset($this->leadDetail['OwnerAgentFirstName']) && !empty($this->leadDetail['OwnerAgentFirstName'])) ? stripslashes($this->leadDetail['OwnerAgentFirstName']) . " " . stripslashes($this->leadDetail['OwnerAgentLastName']) : 'Admin'; ?></a>
<a href="javascript:void(0);" style="display:none;" class="changeOwnerName" onclick="showHide('ownerNameText', 'changeOwnerName');">(x)</a>
</span><span class="ownerSuccess text-success" style="display:none;"></span>
</div>
<div class="col-md-12 no-padding text-left">
<strong>Last Remark :</strong> <span class="remarkTxt"><?php echo $this->customerDetail['Remarks'] ? $this->customerDetail['Remarks'] : ''; ?></span>
</div>
</div>
<?php if (@$this->leadDetail['PlanType'] == 1) { //echo "<pre>";print_r($this->leadDetail);
?>
<script>
$(document).ready(function () {
$(".createleads").trigger('click');
$(".flightshow").trigger('click');
});
</script>
<div class="col-md-12 border-bottom">
<div class="col-md-3 no-padding">Query Title : <span class="blue"><?php echo $this->leadDetail['PlanBookingId'] ? ($this->leadDetail['PlanBookingId'] . '/' . $this->leadDetail['TPSysId']) : ''; ?>-FLIGHT</span></div>
<div class="col-md-3 no-padding">Enquiry ID : <span class="blue"><?php echo $this->leadDetail['PlanBookingId'] ? ($this->leadDetail['PlanBookingId'] . '/' . $this->leadDetail['TPSysId']) : ''; ?> </span></div>
<div class="col-md-3 no-padding">Type : <span class="blue">Flight </span></div>
<div class="col-md-3 no-padding">No of Pax : <span class="blue"><?php echo $AdultCount ? $AdultCount : 0; ?> Adult(s)<?php echo ($ChildCount > 0) ? ' | ' . $ChildCount . ' Child(ren) ' : ''; ?><?php echo ($InfantCount > 0) ? ' | ' . $InfantCount . ' Infant ' : ''; ?></span></div>
<div class="col-md-3 no-padding">Date : <span class="blue">
<?php echo $this->leadDetail['StartDate'] ? $this->leadDetail['StartDate']->format('d-M-y') : ''; ?> </span>
<?php if ($this->leadDetail['ValidTill']->format('d-M-y') != '01/01/1900') { ?> To <span class="blue"><?php echo $this->leadDetail['ValidTill'] ? $this->leadDetail['ValidTill']->format('d-M-y') : ''; ?> </span><?php } ?></div>
<div class="col-md-3 no-padding">Created On : <span class="blue"><?php echo $createdDate->format('d-M-y'); ?></span></div>
<div class="col-md-3 no-padding">Updated On : <span class="blue"><?php echo $this->leadDetail['leadUpdateDate'] ? $this->leadDetail['leadUpdateDate']->format('d-M-y') : ''; ?></span></div>
<div class="col-md-3 no-padding">Status : <span class="blue"><?php echo $customhelper->GetTravelPlanStatusName(1, $this->leadDetail['StatusType']); ?></span></div>
<div class="col-md-3 no-padding">Lead Quality : <span class="blue"><?php echo $this->leadDetail['LeadQuality'] > 0 ? $AllLeadQualityStatusName[$this->leadDetail['LeadQuality']] : 'NA'; ?></span></div>
<div class="col-md-3 no-padding">Source : <?php echo trim($this->leadDetail['LeadSource']) . ' ' . trim($this->leadDetail['LeadCampaign']) . ' ' . trim($this->leadDetail['LeadMedium']); ?>
<!-- <div class="col-md-6 pull-right">
<select id="select-leadsource" class="demo-default select-country" placeholder="Select" onchange="updateLeadSource(<?php //echo $this->leadDetail['TPSysId']; ?>, '<?php //echo base64_encode($this->leadDetail['TPSysId']); ?>', this.value);">
<option value="">Change Source</option>
<?php
/* if (!empty($AllLeadSourceStatus)) {
foreach ($AllLeadSourceStatus as $key => $val) {
//print_r($val);die;
?>
<option value="<?php echo trim($val['LeadSourceSysId']); ?>" <?php
if ($val['LeadSourceSysId'] == $this->leadDetail['LeadSourceSysId']) {
echo "selected='true'";
}
?>><?php echo stripslashes($val['Title']); ?></option>
<?php
}
} */
?>
</select>
<span class="text-success" id="leadsourcesuccess_<?php //echo $this->leadDetail['TPSysId']; ?>"></span>
</div>-->
</div>
<div class="col-md-3 no-padding">Last Remark : <span class="blue leadremarkTxt"><?php echo $this->leadDetail['leadRemark'] ? $this->leadDetail['leadRemark'] : ''; ?></span></div>
</div>
<?php
}
if (@$this->leadDetail['PlanType'] == 2) {
$totalMemberCount = Zend_Controller_Action_HelperBroker::getStaticHelper('ArrayCalculation')->calculateArrayValues($this->leadDetail['memberDetails']);
?>
<script>
$(document).ready(function () {
$(".createleads").trigger('click');
$(".hotelshow").trigger('click');
});
</script>
<div class="col-md-12 border-bottom">
<div class="col-md-3 no-padding">Query Title : <span class="blue"><?php echo $this->leadDetail['PlanBookingId'] ? ($this->leadDetail['PlanBookingId'] . '/' . $this->leadDetail['TPSysId']) : ''; ?><?php echo $this->leadDetail['hotelCityTitle'] ? '-' . strtoupper($this->leadDetail['hotelCityTitle']) : ''; ?>-HOTEL</span></div>
<div class="col-md-3 no-padding">Enquiry ID : <span class="blue"><?php echo $this->leadDetail['PlanBookingId'] ? ($this->leadDetail['PlanBookingId'] . '/' . $this->leadDetail['TPSysId']) : ''; ?></span></div>
<div class="col-md-3 no-padding">Type : <span class="blue">Hotel </span> <?php
if ($this->leadDetail['AdditionalReq'] != '') {
if ((isset($res) && count($res) > 0)) {
echo "[" . implode(',', $res) . "]";
}
}
?></div>
<div class="col-md-3 no-padding">No of Pax : <span class="blue"><?php echo $totalMemberCount['AdultPax'] ? $totalMemberCount['AdultPax'] : 0; ?> Adults | <?php echo $totalMemberCount['ChildPax'] ? $totalMemberCount['ChildPax'] : 0; ?> Child </span></div>
<div class="col-md-3 no-padding">Date : <span class="blue"><?php echo $this->leadDetail['hotelFromDate'] ? $this->leadDetail['hotelFromDate']->format('d-M-y') : ''; ?> </span>To <span class="blue"><?php echo $this->leadDetail['hotelToDate'] ? $this->leadDetail['hotelToDate']->format('d-M-y') : ''; ?> </span></div>
<div class="col-md-3 no-padding">Duration : <span class="blue"><?php echo $this->leadDetail['hotelTotalNights'] ? $this->leadDetail['hotelTotalNights'] : 0; ?> Night(s)</span></div>
<div class="col-md-3 no-padding">Created On : <span class="blue"><?php echo $this->leadDetail['hotelCreateDate'] ? $this->leadDetail['hotelCreateDate']->format('d-M-y') : ''; ?></span></div>
<div class="col-md-3 no-padding">Updated On : <span class="blue"><?php echo $this->leadDetail['hotelUpdateDate'] ? $this->leadDetail['hotelUpdateDate']->format('d-M-y') : ''; ?></span></div>
<div class="col-md-3 no-padding">Status : <span class="blue"><?php echo $customhelper->GetTravelPlanStatusName(1, $this->leadDetail['StatusType']); ?></span></div>
<div class="col-md-3 no-padding">Lead Quality : <span class="blue"><?php echo $this->leadDetail['LeadQuality'] > 0 ? $AllLeadQualityStatusName[$this->leadDetail['LeadQuality']] : 'NA'; ?></span></div>
<div class="col-md-3 no-padding">Source : <?php echo trim($this->leadDetail['LeadSource']) . ' ' . trim($this->leadDetail['LeadCampaign']) . ' ' . trim($this->leadDetail['LeadMedium']); ?>
<!-- <div class="col-md-6 pull-right">
<select id="select-leadsource" class="demo-default select-country" placeholder="Select" onchange="updateLeadSource(<?php //echo $this->leadDetail['TPSysId']; ?>, '<?php //echo base64_encode($this->leadDetail['TPSysId']); ?>', this.value);">
<option value="">Change Source</option>
<?php
/* if (!empty($AllLeadSourceStatus)) {
foreach ($AllLeadSourceStatus as $key => $val) {
//print_r($val);die;
?>
<option value="<?php echo trim($val['LeadSourceSysId']); ?>" <?php
if ($val['LeadSourceSysId'] == $this->leadDetail['LeadSourceSysId']) {
echo "selected='true'";
}
?>><?php echo stripslashes($val['Title']); ?></option>
<?php
}
} */
?>
</select>
<span class="text-success" id="leadsourcesuccess_<?php //echo $this->leadDetail['TPSysId']; ?>"></span>
</div>-->
</div>
<div class="col-md-12 no-padding">
<div class="col-md-3 no-padding">Last Remark : <span class="blue leadremarkTxt"><?php echo $this->leadDetail['leadRemark'] ? $this->leadDetail['leadRemark'] : ''; ?></span></div>
</div>
</div>
<?php
}
if ($this->leadDetail['PlanType'] == 4 || $this->leadDetail['PlanType'] == 5 || $this->leadDetail['PlanType'] == 6 || $this->leadDetail['PlanType'] == 7 || $this->leadDetail['PlanType'] == 8 || $this->leadDetail['PlanType'] == 9 || $this->leadDetail['PlanType'] == 10 || $this->leadDetail['PlanType'] == 11 || $this->leadDetail['PlanType'] == 24) {
?>
<script>
$(document).ready(function () {
$(".createleads").trigger('click');
//$(".packageshow").trigger('click');
});
</script>
<div class="col-md-12 border-bottom">
<div class="col-md-3 no-padding">Query Title : <span class="blue"><?php echo $this->leadDetail['PlanBookingId'] ? ($this->leadDetail['PlanBookingId'] . '/' . $this->leadDetail['TPSysId']) : ''; ?>-<?php echo!empty(trim($this->leadDetail['DestinationPlaces'])) ? strtoupper(trim($this->leadDetail['DestinationPlaces'])) : stripslashes(trim($this->leadDetail['SourcePlaces'])); ?>-<?php echo $customhelper->getPlanTypeName($this->leadDetail['PlanType']); ?></span></div>
<div class="col-md-3 no-padding">Type : <span class="blue"><?php echo $customhelper->getPlanTypeName($this->leadDetail['PlanType']); ?>
<?php
$model = new Travel_Model_TblPackage();
$TPId = trim($this->leadDetail['TPId']);
$secureCode = $model->GenrateSecureCode($TPId, 0);
$packUrl = $this->baseUrl('package/view-flexi-final-package-readymade/id/' . $TPId . '/code/' . $secureCode . '/MpType/' . $this->leadDetail['TourType']);
echo (isset($this->leadDetail['TPId']) && $this->leadDetail['TPId'] != '') ? '(Id: <a target="_blank" href="' . $packUrl . '">' . trim($this->leadDetail['TPId']) . '</a>)' : '';
?>
</span> </div>
<div class="col-md-3 no-padding">Query ID : <span class="blue"><?php echo $this->leadDetail['PlanBookingId'] ? ($this->leadDetail['PlanBookingId'] . '/' . $this->leadDetail['TPSysId']) : ''; ?></span></div>
<div class="col-md-3 no-padding">Destination : <span class="blue"><?php echo!empty(trim($this->leadDetail['DestinationPlaces'])) ? trim($this->leadDetail['DestinationPlaces']) : $this->leadDetail['SourcePlaces']; ?></span></div>
<?php if ($this->leadDetail['PlanType'] == 5 || $this->leadDetail['PlanType'] == 6 || $this->leadDetail['PlanType'] == 8 || $this->leadDetail['PlanType'] == 9) { ?>
<div class="col-md-3 no-padding">No of Pax : <span class="blue">
<?php
if ($this->leadDetail['PlanType'] == 6) {
echo count($RoomInfoJsonDecode) . ' Applicant(s)';
} else if ($this->leadDetail['PlanType'] == 7) {
echo count($RoomInfoJsonDecode) . ' Forex Type';
} else if ($this->leadDetail['PlanType'] == 8) {
echo ($RoomInfoJsonDecode[1]['Adult'] > 0) ? $RoomInfoJsonDecode[1]['Adult'] . ' Adult(s)' : '';
echo ($RoomInfoJsonDecode[1]['Child'] > 0) ? ", " . $RoomInfoJsonDecode[1]['Child'] . ' Child(s)' : '';
} else if ($this->leadDetail['PlanType'] == 4) {
echo!empty($RoomInfoJsonDecode[0]['totalmember']) ? $RoomInfoJsonDecode[0]['totalmember'] . ' Member(s)' : '';
} else {
echo $packageRoomInfoArr['roomwisePaxDetails'];
}
//get inclusion
$inlusionArray = array();
$inclusionMasking = str_split($this->leadDetail['InclMask']);
for ($i = 0; $i < count($this->packageInclList); $i++) {
if (@$inclusionMasking[$i + 1] == 1) {
$inlusionArray[] = stripslashes(trim($this->packageInclList[$i]['Title']));
}
}
//get theme
$ThemeArray = array();
$ThemeMaskArr = str_split(@$this->leadDetail['PackTypeMask']);
for ($i = 0; $i < count($this->packageThemeList); $i++) {
if (@$ThemeMaskArr[$i + 1] == 1) {
$ThemeArray[] = stripslashes(trim($this->packageThemeList[$i]['Title']));
}
}
//get theme
$FoodArray = array();
$FoodMaskArr = str_split(@$this->leadDetail['CuisineMask']);
for ($i = 0; $i < count($this->packageFoodPreferenceList); $i++) {
if (@$FoodMaskArr[$i + 1] == 1) {
$FoodArray[] = stripslashes(trim($this->packageFoodPreferenceList[$i]['Title']));
}
}
//echo "<pre>";print_r($AllLeadStatus);
?>
</span></div>
<?php } ?>
<div class="col-md-3 no-padding">Travel Date : <span class="blue"><?php
if (isset($RoomInfoJsonDecode) && count($RoomInfoJsonDecode) > 0) {
if (isset($RoomInfoJsonDecode[1]) && !empty($RoomInfoJsonDecode[1])) {
$departuredate = isset($RoomInfoJsonDecode[1]['departuredate']) ? DateTime::createFromFormat('d/m/Y', $RoomInfoJsonDecode[1]['departuredate']) : '';
$returndate = isset($RoomInfoJsonDecode[1]['returndate']) ? DateTime::createFromFormat('d/m/Y', $RoomInfoJsonDecode[1]['returndate']) : '';
} else {
$departuredate = isset($RoomInfoJsonDecode[0]['departuredate']) ? DateTime::createFromFormat('d/m/Y', $RoomInfoJsonDecode[0]['departuredate']) : '';
$returndate = isset($RoomInfoJsonDecode[0]['returndate']) ? DateTime::createFromFormat('d/m/Y', $RoomInfoJsonDecode[0]['returndate']) : '';
}
}
echo ($departuredate != '') ? $departuredate->format('d-M-y') : '';
echo ($returndate != '') ? '-' . $returndate->format('d-M-y') : '';
?></span></div>
<?php if ($this->leadDetail['PlanType'] == 5) { ?>
<div class="col-md-3 no-padding">Inclusions/Theme : <span class="blue"><?php
echo implode(',', $inlusionArray);
echo count($ThemeArray) > 0 ? " / " . implode(',', $ThemeArray) : 'NA';
?></span></div>
<?php } ?>
<div class="col-md-3 no-padding">Created On : <span class="blue"><?php echo $createdDate->format('d-M-y'); ?></span></div>
<div class="col-md-3 no-padding">Updated On : <span class="blue"><?php echo $this->leadDetail['leadUpdateDate'] ? $this->leadDetail['leadUpdateDate']->format('d-M-y') : ''; ?></span></div>
<?php if ($this->leadDetail['PlanType'] == 5) { ?>
<div class="col-md-3 no-padding">Additional Req :<span class="blue"><?php
if ($this->leadDetail['AdditionalReq'] != '') {
echo (isset($res) && count($res) > 0) ? implode($res, ',') : '';
} else {
echo "NA";
}
?></span></div>
<?php } ?>
<div class="col-md-3 no-padding">Status : <span class="blue"><?php echo $this->leadDetail['StatusType'] > 0 ? $customhelper->GetTravelPlanStatusName(1, $this->leadDetail['StatusType']) : 'NA'; ?></span></div>
<div class="col-md-3 no-padding">Lead Quality : <span class="blue"><?php echo $this->leadDetail['LeadQuality'] > 0 ? $AllLeadQualityStatusName[$this->leadDetail['LeadQuality']] : 'NA'; ?></span></div>
<div class="col-md-3 no-padding">Source : <?php echo trim($this->leadDetail['LeadSource']) . ' ' . trim($this->leadDetail['LeadCampaign']) . ' ' . trim($this->leadDetail['LeadMedium']); ?>
<!-- <div class="col-md-6 pull-right">
<select id="select-leadsource" class="demo-default select-country" placeholder="Select" onchange="updateLeadSource(<?php //echo $this->leadDetail['TPSysId']; ?>, '<?php //echo base64_encode($this->leadDetail['TPSysId']); ?>', this.value);">
<option value="">Change Source</option>
<?php
/* if (!empty($AllLeadSourceStatus)) {
foreach ($AllLeadSourceStatus as $key => $val) {
//print_r($val);die;
?>
<option value="<?php echo trim($val['LeadSourceSysId']); ?>" <?php
if ($val['LeadSourceSysId'] == $this->leadDetail['LeadSourceSysId']) {
echo "selected='true'";
}
?>><?php echo stripslashes($val['Title']); ?></option>
<?php
}
} */
?>
</select>
<span class="text-success" id="leadsourcesuccess_<?php //echo $this->leadDetail['TPSysId']; ?>"></span>
</div>-->
</div>
<div class="col-md-3 col-lg-3 col-sm-3 col-xs-12 no-padding">Last Remark : <span class="blue leadremarkTxt"><?php echo $this->leadDetail['leadRemark'] ? $this->leadDetail['leadRemark'] : ''; ?></span></div>
</div>
<?php } ?>
<div class="col-md-12" align="right">
<div class="col-md-8 col-lg-8 col-sm-8 col-xs-12 no-padding" style="position:relative; ">
<div class="col-md-2 col-lg-2 col-ms-2 col-xs-8 no-padding">
<a class="btn btn-danger leadedittxt pull-left mt_bottom_mgt_32" href="javascript:void(0);"> + Query Remarks</a>
</div>
<div class="col-md-3 col-lg-3 col-sm-3 col-xs-4 no-padding-left">
<button onclick="window.location.href = '<?php echo $this->baseUrl('/customer/customer-lead/id/' . base64_encode($this->customerDetail['CustomerSysId']) . '/code/' . $CustomersecureCode); ?>'" class="btn btn-danger pull-right mt_bottom_mgt_32" type="button">All Queries</button>
</div>
<!-- for display dropdown to change query status and quality -->
<div class="col-md-5 col-lg-5 col-sm-5 col-xs-12 form-group QueryStatusDropdown no-padding-left <?php echo (isset($this->leadDetail['StatusType']) && !empty($this->leadDetail['StatusType'])) ? 'active' : ''; ?>">
<label value="">Lead Status</label>
<select id="QueryStatus" class="demo-default select-country" placeholder="Select" onchange="updateQueryLeadStage(<?php echo $this->leadDetail['TPSysId']; ?>, '<?php echo base64_encode($this->leadDetail['TPSysId']); ?>', this.value);">
<option value="">Change Status</option>
<?php
if (!empty($AllLeadStatus)) {
foreach ($AllLeadStatus as $key => $val) {
?>
<option value="<?php echo stripslashes($val['TPStatusSysId']); ?>" <?php
if ($val['TPStatusSysId'] == $this->leadDetail['StatusType']) {
echo "selected='true'";
}
?>><?php echo stripslashes($val['TPStatus']); ?></option>
<?php
}
}
?>
</select>
<span class="text-success" id="stagesuccess_<?php echo $this->leadDetail['TPSysId']; ?>"></span>
</div>
<div class="col-md-2 col-lg-2 col-sm-2 col-xs-12 form-group select-countryDropdown no-padding-left <?php echo (isset($this->leadDetail['LeadQuality']) && !empty($this->leadDetail['LeadQuality'])) ? 'active' : ''; ?>">
<label value="">Lead Quality</label>
<select id="select-country" class="demo-default select-country" placeholder="Select" onchange="updateLeadQuality(<?php echo $this->leadDetail['TPSysId']; ?>, '<?php echo base64_encode($this->leadDetail['TPSysId']); ?>', this.value);">
<option value="">Lead Quality</option>
<?php
if (!empty($AllLeadQualityStatus)) {
foreach ($AllLeadQualityStatus as $key => $val) {
//print_r($val);die;
?>
<option value="<?php echo stripslashes($val['Id']); ?>" <?php
if ($val['Id'] == $this->leadDetail['LeadQuality']) {
echo "selected='true'";
}
?>><?php echo stripslashes($val['Title']); ?></option>
<?php
}
}
?>
</select>
<span class="text-success" id="leadqualitysuccess_<?php echo $this->leadDetail['TPSysId']; ?>"></span>
</div>
<!-- end of display status dropdown -->
<div class="editBoxContainer editconatiner_alignment editconatiner_alignment2" id="leadRemarkBox">
<form method="post" action="" name="leadremarksForm" id="leadremarksForm">
<div class="form-group form-group1">
<div style="float:left; color:#449D44; margin-top:-23px;" class="successResponse"></div>
<div class="col-md-9 no-padding text-center">
<input name="leadRemark" type="text" class="form-control whbg" value="" autocomplete="off" id="leadRemark" placeholder="Enter Remarks" required="required" pattern=".*\S+.*" title="Spaces are not allowed" />
</div>
<div class="col-md-3 no-padding text-center">
<input type="hidden" name="selectedleadId" id="selectedleadId" value="<?php echo trim($this->leadDetail['TPSysId']); ?>" />
<button type="submit" class="btn btn-warning btn-sm leadremarksButton"><span class="glyphicon glyphicon-ok"></span></button>
<a href="javascript:void(0);" class="btn btn-primarygray btn-sm leadcanceltxt"><i class="fa fa-times"></i></a>
</div>
</div>
</form>
</div>
</div>
<div class="mobile_scrolling">
<span class="totalproposal<?php echo $this->leadDetail['TPSysId']; ?>" style="display:none"><?php echo!empty($this->proposalCount) ? $this->proposalCount : 0; ?></span>
<a data-target="#myModalSendSMSToDoCustomer" class="tooltipLink fa fa-comment view_text" title='Send Sms' href="<?php echo $this->baseUrl('/leaddetail/view-sms-template-to-customer/cid/' . base64_encode($this->leadDetail['CustomerSysId']) . '/tpid/' . base64_encode($this->leadDetail['TPSysId']) . '/btnType/QUERY'); ?>" data-toggle="modal"></a>
<a class="btn btn-sm btn-danger" style="display:none;" data-toggle="modal" data-target="#myModalAddFollowUp"><i class="fa fa-fw fa-arrows"></i>Follow Up</a>
<a class="btn btn-sm btn-danger addtodoClick" id="addtodo" proposal_id="<?php echo base64_encode(trim($this->leadDetail['TPSysId'])); ?>" MasterTPSysId_id="<?php echo (trim($this->leadDetail['TPSysId'])); ?>"><i class="fa fa-plus"></i>To Do / Follow Up</a>
<a class="btn btn-sm btn-primary tooltipLink createleads" href="javascript:void(0);" data-toggle="tooltip" data-placement="top" title="Modify">Send Proposal/Modify Query</a>
</div>
</div>
<div class="clear"> </div>
</div>
<div class="clear"></div>
</div>
<div class="clear"> </div>
<div class="col-md-12 viewcustomerId" style="display:none;">
<div class="panel panel-dark">
<div class="panel-heading">
<h2 class="panel-title">Search Results & Send Proposal</h2>
</div>
<div class="panel-body whbg">
<div class="col-md-12 no-padding" style="display:none;">
<div class="form-group">
<label>Requirement Type</label>
<div class="col-md-12 no-padding">
<label class="radio inlinebl flightshow searchformdisplay">
<input class="icheck-black" type="radio" name="radioRedCheckbox" id="radioRedCheckboxFlight" value="option1" <?php if ($this->leadDetail['PlanType'] == 1) { ?> checked="checked" <?php } ?>> Flight
</label>
<label class="radio inlinebl hotelshow searchformdisplay">
<input class="icheck-black" type="radio" name="radioRedCheckbox" id="radioRedCheckboxHotel" value="option2" <?php if ($this->leadDetail['PlanType'] == 2) { ?> checked="checked" <?php } ?>> Hotel
</label>
<label class="radio inlinebl packageshow searchformdisplay">
<input class="icheck-black" type="radio" name="radioRedCheckbox" id="radioRedCheckboxPackage" value="option3" <?php if ($this->leadDetail['PlanType'] == 5) { ?> checked="checked" <?php } ?>> Package
</label>
<label class="radio inlinebl visashow searchformdisplay">
<input class="icheck-black" type="radio" name="radioRedCheckbox" id="radioRedCheckbox5" value="option4" <?php if ($this->leadDetail['PlanType'] == 6) { ?> checked="checked" <?php } ?>> Visa
</label>
<label class="radio inlinebl forexshow searchformdisplay">
<input class="icheck-black" type="radio" name="radioRedCheckbox" id="radioRedCheckbox6" value="option5" <?php if ($this->leadDetail['PlanType'] == 7) { ?> checked="checked" <?php } ?>> Forex
</label>
<label class="radio inlinebl insuranceshow searchformdisplay">
<input class="icheck-black" type="radio" name="radioRedCheckbox" id="radioRedCheckbox7" value="option6" <?php if ($this->leadDetail['PlanType'] == 4) { ?> checked="checked" <?php } ?>> Insurance
</label>
<label class="radio inlinebl activityshow searchformdisplay">
<input class="icheck-black" type="radio" name="radioRedCheckbox" id="radioRedCheckbox7" value="option6" <?php if ($this->leadDetail['PlanType'] == 8) { ?> checked="checked" <?php } ?>> Activity
</label>
<label class="radio inlinebl sightseeingshow searchformdisplay">
<input class="icheck-black" type="radio" name="radioRedCheckbox" id="radioRedCheckbox7" value="option6" <?php if ($this->leadDetail['PlanType'] == 9) { ?> checked="checked" <?php } ?>> SigntSeeing
</label>
</div>
</div>
</div>
<div class="col-md-12 no-padding" style="display:none;">
<div class="panel panel-default no-margin">
<div class="panel-body">
<div class=" form-group1 no-margin">
<div class="mobile_scrolling">
<label class="checkbox_popupwidth align_label_align checkbox_margin_0">Additional Requirments : </label>
<label class="checkbox_popup checkbox_popupwidth checkbox_margin__bottom_0">
<input type="checkbox" id="checkRed1" <?php echo (isset($data[0]) && $data[0] == 1) ? "checked" : '' ?>>
Visa
<span class="checkmark"></span>
</label>
<label class="checkbox_popup checkbox_popupwidth checkbox_margin__bottom_0">
<input type="checkbox" id="checkRed2" <?php echo (isset($data[1]) && $data[1] == 1) ? "checked" : '' ?>>
Forex
<span class="checkmark"></span>
</label>
<label class="checkbox_popup checkbox_popupwidth checkbox_margin__bottom_0">
<input type="checkbox" id="checkRed3" <?php echo (isset($data[2]) && $data[2] == 1) ? "checked" : '' ?>>
Insurance
<span class="checkmark"></span>
</label>
<!--<label class="checkbox inlinebl no-margin">
<input class="icheck-red" type="checkbox" id="checkRed1" <?php /* echo (isset($data[0]) && $data[0] == 1) ? "checked" : '' */ ?>> Visa
</label>
<label class="checkbox inlinebl no-margin">
<input class="icheck-red" type="checkbox" id="checkRed2" <?php /* echo (isset($data[1]) && $data[1] == 1) ? "checked" : '' */ ?>> Forex
</label>
<label class="checkbox inlinebl no-margin">
<input class="icheck-red" type="checkbox" id="checkRed3" <?php /* echo (isset($data[2]) && $data[2] == 1) ? "checked" : '' */ ?>> Insurance
</label>-->
</div>
</div>
</div>
</div>
</div>
<div id="editflightsearch">
<?php
if ($this->leadDetail['PlanType'] == 1) {
echo $this->partial('flight/edit-search-form.phtml', array('sourceCity' => $this->sourceCity, 'fromcustomer' => 'YES', 'action' => 'Update', 'customerId' => $this->customerDetail['CustomerSysId'], 'leadID' => $leadID, 'leadDetail' => $this->leadDetail, 'getActiveStaff' => $this->getActiveStaff, 'getleadSource' => $AllLeadSourceStatus, 'agencyOpsUser' => $this->agencyOpsUser, 'countryList' => $this->countryList));
}
?>
</div>
<div id="edithotelsearch">
<?php
if ($this->leadDetail['PlanType'] == 2) {
echo $this->partial('leaddetail/hotelsearch.phtml', array('customerId' => $this->customerDetail['CustomerSysId'], 'leadDetail' => $this->leadDetail, 'getActiveStaff' => $this->getActiveStaff, 'getleadSource' => $AllLeadSourceStatus, 'agencyOpsUser' => $this->agencyOpsUser, 'countryList' => $this->countryList));
}
?>
</div>
<div id="editinsurancesearch">
<?php
if ($this->leadDetail['PlanType'] == 4) {
//echo $this->partial('leaddetail/editpackagesearch-form.phtml', array('customerId' => $this->customerDetail['CustomerSysId'], 'leadDetail' => $this->leadDetail, 'packageThemeList' => $this->packageThemeList, 'packageFoodPreferenceList' => $this->packageFoodPreferenceList, 'packageInclList' => $this->packageInclList, 'cityListArray' => $this->cityListArray, 'leadID' => $leadID, 'tpintsysID' => $tpintsysID,'proposalCount'=>$this->proposalCount));
echo $this->partial('customer/insurance-query-form.phtml', array('IsFromModified' => true, 'cityListArray' => $cityListArray, 'customerId' => $this->customerDetail['CustomerSysId'], 'leadDetail' => $this->leadDetail, 'packageThemeList' => $this->packageThemeList, 'foodPreferenceList' => $this->packageFoodPreferenceList, 'packageInclusionList' => $this->packageInclList, 'leadID' => $leadID, 'tpintsysID' => $tpintsysID, 'proposalCount' => $this->proposalCount, 'getActiveStaff' => $this->getActiveStaff, 'agencyOpsUser' => $this->agencyOpsUser, 'countryList' => $this->countryList));
}
?>
</div>
<div id="editpkgsearch">
<?php
if ($this->leadDetail['PlanType'] == 5 && $this->leadDetail['IsOnlySightseeingPkg'] == 0) {
//echo $this->partial('leaddetail/editpackagesearch-form.phtml', array('customerId' => $this->customerDetail['CustomerSysId'], 'leadDetail' => $this->leadDetail, 'packageThemeList' => $this->packageThemeList, 'packageFoodPreferenceList' => $this->packageFoodPreferenceList, 'packageInclList' => $this->packageInclList, 'cityListArray' => $this->cityListArray, 'leadID' => $leadID, 'tpintsysID' => $tpintsysID,'proposalCount'=>$this->proposalCount));
echo $this->partial('customer/packagesearch-form.phtml', array('IsFromModified' => true, 'cityListArray' => $cityListArray, 'customerId' => $this->customerDetail['CustomerSysId'], 'leadDetail' => $this->leadDetail, 'packageThemeList' => $this->packageThemeList, 'foodPreferenceList' => $this->packageFoodPreferenceList, 'packageInclusionList' => $this->packageInclList, 'leadID' => $leadID, 'tpintsysID' => $tpintsysID, 'proposalCount' => $this->proposalCount, 'getleadSource' => $AllLeadSourceStatus, 'getActiveStaff' => $this->getActiveStaff, 'agencyOpsUser' => $this->agencyOpsUser, 'countryList' => $this->countryList));
}
?>
</div>
<div id="editvisasearch">
<?php
if ($this->leadDetail['PlanType'] == 6) {
//echo $this->partial('leaddetail/editpackagesearch-form.phtml', array('customerId' => $this->customerDetail['CustomerSysId'], 'leadDetail' => $this->leadDetail, 'packageThemeList' => $this->packageThemeList, 'packageFoodPreferenceList' => $this->packageFoodPreferenceList, 'packageInclList' => $this->packageInclList, 'cityListArray' => $this->cityListArray, 'leadID' => $leadID, 'tpintsysID' => $tpintsysID,'proposalCount'=>$this->proposalCount));
echo $this->partial('customer/visa-query-form.phtml', array('IsFromModified' => true, 'customerId' => $this->customerDetail['CustomerSysId'], 'leadDetail' => $this->leadDetail, 'leadID' => $leadID, 'tpintsysID' => $tpintsysID, 'proposalCount' => $this->proposalCount, 'getActiveStaff' => $this->getActiveStaff, 'getleadSource' => $AllLeadSourceStatus, 'agencyOpsUser' => $this->agencyOpsUser, 'countryList' => $this->countryList));
}
?>
</div>
<div id="editforexsearch">
<?php
if ($this->leadDetail['PlanType'] == 7) {
//echo $this->partial('leaddetail/editpackagesearch-form.phtml', array('customerId' => $this->customerDetail['CustomerSysId'], 'leadDetail' => $this->leadDetail, 'packageThemeList' => $this->packageThemeList, 'packageFoodPreferenceList' => $this->packageFoodPreferenceList, 'packageInclList' => $this->packageInclList, 'cityListArray' => $this->cityListArray, 'leadID' => $leadID, 'tpintsysID' => $tpintsysID,'proposalCount'=>$this->proposalCount));
echo $this->partial('customer/forex-query-form.phtml', array('IsFromModified' => true, 'customerId' => $this->customerDetail['CustomerSysId'], 'leadDetail' => $this->leadDetail, 'leadID' => $leadID, 'tpintsysID' => $tpintsysID, 'proposalCount' => $this->proposalCount, 'getActiveStaff' => $this->getActiveStaff, 'agencyOpsUser' => $this->agencyOpsUser, 'countryList' => $this->countryList));
}
?>
</div>
<div id="editactivitysearch">
<?php
if ($this->leadDetail['PlanType'] == 8) {
//echo $this->partial('leaddetail/editpackagesearch-form.phtml', array('customerId' => $this->customerDetail['CustomerSysId'], 'leadDetail' => $this->leadDetail, 'packageThemeList' => $this->packageThemeList, 'packageFoodPreferenceList' => $this->packageFoodPreferenceList, 'packageInclList' => $this->packageInclList, 'cityListArray' => $this->cityListArray, 'leadID' => $leadID, 'tpintsysID' => $tpintsysID,'proposalCount'=>$this->proposalCount));
echo $this->partial('customer/activity-query-form.phtml', array('IsFromModified' => true, 'customerId' => $this->customerDetail['CustomerSysId'], 'leadDetail' => $this->leadDetail, 'leadID' => $leadID, 'tpintsysID' => $tpintsysID, 'proposalCount' => $this->proposalCount, 'getActiveStaff' => $this->getActiveStaff, 'agencyOpsUser' => $this->agencyOpsUser, 'countryList' => $this->countryList));
}
?>
</div>
<div id="editsightseeingsearch">
<?php
if ($this->leadDetail['PlanType'] == 9 || $this->leadDetail['IsOnlySightseeingPkg'] == 1) {
//echo $this->partial('leaddetail/editpackagesearch-form.phtml', array('customerId' => $this->customerDetail['CustomerSysId'], 'leadDetail' => $this->leadDetail, 'packageThemeList' => $this->packageThemeList, 'packageFoodPreferenceList' => $this->packageFoodPreferenceList, 'packageInclList' => $this->packageInclList, 'cityListArray' => $this->cityListArray, 'leadID' => $leadID, 'tpintsysID' => $tpintsysID,'proposalCount'=>$this->proposalCount));
echo $this->partial('customer/sightseeing-query-form.phtml', array('IsFromModified' => true, 'customerId' => $this->customerDetail['CustomerSysId'], 'leadDetail' => $this->leadDetail, 'leadID' => $leadID, 'tpintsysID' => $tpintsysID, 'proposalCount' => $this->proposalCount, 'getActiveStaff' => $this->getActiveStaff, 'getleadSource' => $AllLeadSourceStatus, 'agencyOpsUser' => $this->agencyOpsUser, 'countryList' => $this->countryList));
}
?>
</div>
<div id="editmiscellaneoussearch">
<?php
if ($this->leadDetail['PlanType'] == 10) {
//echo $this->partial('leaddetail/editpackagesearch-form.phtml', array('customerId' => $this->customerDetail['CustomerSysId'], 'leadDetail' => $this->leadDetail, 'packageThemeList' => $this->packageThemeList, 'packageFoodPreferenceList' => $this->packageFoodPreferenceList, 'packageInclList' => $this->packageInclList, 'cityListArray' => $this->cityListArray, 'leadID' => $leadID, 'tpintsysID' => $tpintsysID,'proposalCount'=>$this->proposalCount));
echo $this->partial('customer/miscellaneous-query-form.phtml', array('IsFromModified' => true, 'customerId' => $this->customerDetail['CustomerSysId'], 'leadDetail' => $this->leadDetail, 'leadID' => $leadID, 'tpintsysID' => $tpintsysID, 'proposalCount' => $this->proposalCount, 'getActiveStaff' => $this->getActiveStaff, 'getleadSource' => $AllLeadSourceStatus, 'agencyOpsUser' => $this->agencyOpsUser, 'countryList' => $this->countryList));
}
?>
</div>
<div id="edittransfersearch">
<?php
if ($this->leadDetail['PlanType'] == 11) {
//echo $this->partial('leaddetail/editpackagesearch-form.phtml', array('customerId' => $this->customerDetail['CustomerSysId'], 'leadDetail' => $this->leadDetail, 'packageThemeList' => $this->packageThemeList, 'packageFoodPreferenceList' => $this->packageFoodPreferenceList, 'packageInclList' => $this->packageInclList, 'cityListArray' => $this->cityListArray, 'leadID' => $leadID, 'tpintsysID' => $tpintsysID,'proposalCount'=>$this->proposalCount));
echo $this->partial('customer/transfer-query-form.phtml', array('IsFromModified' => true, 'customerId' => $this->customerDetail['CustomerSysId'], 'leadDetail' => $this->leadDetail, 'leadID' => $leadID, 'tpintsysID' => $tpintsysID, 'proposalCount' => $this->proposalCount, 'getleadSource' => $AllLeadSourceStatus, 'getActiveStaff' => $this->getActiveStaff, 'agencyOpsUser' => $this->agencyOpsUser, 'countryList' => $this->countryList));
}
?>
</div>
<div id="editCompanyFormationsearch">
<?php
if ($this->leadDetail['PlanType'] == 24) {
echo $this->partial('customer/companyFormation-form.phtml', array('IsFromModified' => true, 'cityListArray' => $cityListArray, 'customerId' => $this->customerDetail['CustomerSysId'], 'leadDetail' => $this->leadDetail, 'packageThemeList' => $this->packageThemeList, 'foodPreferenceList' => $this->packageFoodPreferenceList, 'packageInclusionList' => $this->packageInclList, 'leadID' => $leadID, 'tpintsysID' => $tpintsysID, 'proposalCount' => $this->proposalCount, 'getleadSource' => $AllLeadSourceStatus, 'getActiveStaff' => $this->getActiveStaff, 'agencyOpsUser' => $this->agencyOpsUser, 'countryList' => $this->countryList));
}
?>
</div>
</div>
</div>
</div>
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-body no-padding whbg">
<ul class="leadDetail">
<li><a href="<?php echo $this->baseUrl('/leaddetail/lead-detail/id/' . base64_encode($this->leadDetail['TPSysId']) . '/cid/' . base64_encode($this->customerDetail['CustomerSysId']) . '/code/' . $LeasdsecureCode); ?>" <?php if (Zend_Controller_Front::getInstance()->getRequest()->getActionName() == 'lead-detail') { ?>class="activelead" <?php } ?>>Summary</a></li>
<!-- <li><a href="details.html">Details</a></li>-->
<li><a href="<?php echo $this->baseUrl('/leaddetail/proposal/id/' . base64_encode($this->leadDetail['TPSysId']) . '/cid/' . base64_encode($this->customerDetail['CustomerSysId']) . '/code/' . $LeasdsecureCode); ?>" <?php if (Zend_Controller_Front::getInstance()->getRequest()->getActionName() == 'proposal') { ?>class="activelead" <?php } ?>>Proposals <span class="badge badge-red"><?php
if (isset($this->proposalCount) && !empty($this->proposalCount)) {
echo $this->proposalCount;
} else {
echo 0;
}
?></span></a> </li>
<li><a href="<?php echo $this->baseUrl('/leaddetail/lead-contact/id/' . base64_encode($this->leadDetail['TPSysId']) . '/cid/' . base64_encode($this->customerDetail['CustomerSysId']) . '/code/' . $LeasdsecureCode); ?>" <?php if (Zend_Controller_Front::getInstance()->getRequest()->getActionName() == 'lead-contact') { ?>class="activelead" <?php } ?>>Query Contact</a></li>
<li style="display:none;"><a href="<?php echo $this->baseUrl('/leaddetail/confirmation/id/' . base64_encode($this->leadDetail['TPSysId']) . '/cid/' . base64_encode($this->customerDetail['CustomerSysId']) . '/code/' . $LeasdsecureCode); ?>" <?php if (Zend_Controller_Front::getInstance()->getRequest()->getActionName() == 'confirmation') { ?>class="activelead" <?php } ?> onclick="alert('Work in progress...');return false;">Confirmation </a> </li>
<li style="display:none;"><a href="<?php echo $this->baseUrl('/leaddetail/performa-invoice/id/' . base64_encode($this->leadDetail['TPSysId']) . '/cid/' . base64_encode($this->customerDetail['CustomerSysId']) . '/code/' . $LeasdsecureCode); ?>" <?php if (Zend_Controller_Front::getInstance()->getRequest()->getActionName() == 'performa-invoice') { ?>class="activelead" <?php } ?> target="_blank" onclick="alert('Work in progress...');return false;">Performa Invoice </a> </li>
<li style="display:none;"><a href="<?php echo $this->baseUrl('/leaddetail/invoice/id/' . base64_encode($this->leadDetail['TPSysId']) . '/cid/' . base64_encode($this->customerDetail['CustomerSysId']) . '/code/' . $LeasdsecureCode); ?>" <?php if (Zend_Controller_Front::getInstance()->getRequest()->getActionName() == 'invoice') { ?>class="activelead" <?php } ?> target="_blank" onclick="alert('Work in progress...');return false;">Invoice</a></li>
<li style="display:none;"><a href="<?php echo $this->baseUrl('/leaddetail/accounts/id/' . base64_encode($this->leadDetail['TPSysId']) . '/cid/' . base64_encode($this->customerDetail['CustomerSysId']) . '/code/' . $LeasdsecureCode); ?>" <?php if (Zend_Controller_Front::getInstance()->getRequest()->getActionName() == 'accounts') { ?>class="activelead" <?php } ?> onclick="alert('Work in progress...');return false;">Accounts</a></li>
<li style="display:none;"><a href="<?php echo $this->baseUrl('/leaddetail/chat-history/id/' . base64_encode($this->leadDetail['TPSysId']) . '/cid/' . base64_encode($this->customerDetail['CustomerSysId']) . '/code/' . $LeasdsecureCode); ?>" <?php if (Zend_Controller_Front::getInstance()->getRequest()->getActionName() == 'chat-history') { ?>class="activelead" <?php } ?> onclick="alert('Work in progress...');return false;">Chat History</a></li>
<li style="display:none;"><a href="<?php echo $this->baseUrl('/leaddetail/supplier-proposal/id/' . base64_encode($this->leadDetail['TPSysId']) . '/cid/' . base64_encode($this->customerDetail['CustomerSysId']) . '/code/' . $LeasdsecureCode); ?>" <?php if (Zend_Controller_Front::getInstance()->getRequest()->getActionName() == 'supplier-proposal') { ?>class="activelead" <?php } ?> onclick="alert('Work in progress...');return false;">Suppliers</a></li>
<li><a href="<?php echo $this->baseUrl('/leaddetail/lead-remarks/id/' . base64_encode($this->leadDetail['TPSysId']) . '/cid/' . base64_encode($this->customerDetail['CustomerSysId']) . '/code/' . $LeasdsecureCode); ?>" <?php if (Zend_Controller_Front::getInstance()->getRequest()->getActionName() == 'lead-remarks') { ?>class="activelead" <?php } ?>>Remarks</a></li>
<li><a href="<?php echo $this->baseUrl('/leaddetail/lead-todo/id/' . base64_encode($this->leadDetail['TPSysId']) . '/cid/' . base64_encode($this->customerDetail['CustomerSysId']) . '/code/' . $LeasdsecureCode); ?>" <?php if (Zend_Controller_Front::getInstance()->getRequest()->getActionName() == 'lead-todo') { ?>class="activelead" <?php } ?>>To Do / Follow Up</a></li>
</ul>
</div>
</div>
</div>
<!-- this modal used for adding todo created by Er amit kumar dubey on 1 Dec 2016 at 1:11 PM -->
<div class="modal fade in" id="myModalAddToDoCustomer" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false" style="display: none;">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="myModalLabel">Add To Do/Follow Up (<?php echo $this->leadDetail['PlanBookingId'] ? ($this->leadDetail['PlanBookingId'] . '/' . $this->leadDetail['TPSysId']) : ''; ?>)</h4>
</div>
<div class="alert alert-success" id="succmsg" style="display:none;">
<strong>Success!</strong>Customer has been Added.
</div>
<form class="ls_form saveupdateAddToDoCustomer1" role="form" action="javascript://" method="post" autocomplete="off" id="saveupdateAddToDoCustomer1" name="">
<div class="modal-body followup-popup">
<div class="row">
<div class="col-md-8">
<div class="todo-radio-btn">
<input class="RadioDisId titleTabClass todo-radio-input" type="radio" name="todosubject" id="titleTab1" value="Call">
<label for="titleTab1" class="hotelshow leftsidearea todo-radio-label">Call </label>
</div>
<!-- <div class="todo-radio-btn">
<input class="RadioDisId titleTabClass todo-radio-input" type="radio" name="todosubject" id="titleTab2" value="Meeting">
<label for="titleTab2" class="hotelshow leftsidearea todo-radio-label">Meeting </label>
</div>-->
<div class="todo-radio-btn">
<input class="RadioDisId titleTabClass todo-radio-input" type="radio" name="todosubject" id="titleTab3" value="To Do">
<label for="titleTab3" class="hotelshow leftsidearea todo-radio-label">To Do </label>
</div>
<div class="clearfix"></div>
</div>
<div class="col-md-4 col-lg-4 col-sm-4 col-xs-12 no-padding-left">
<div class="reminfin">
remind in <a href="javascript://" onclick="showReminInDiv()" style="" class="reminder_in_html">15 minutes</a>
</div>
<div class="ReminInDiv remindin-div hide-remind-form">
<div class="remind-form" style="">
Remind in<br>
<div class="col-md-6 no-padding-left"><input type="number" class="form-control" name="reminderinvalue" id="reminderinvalue" value="15"></div>
<div class="col-md-6 no-padding">
<select class="form-control" name="reminderintype" id="reminderintype">
<option value="minute" selected>minutes</option>
<option value="hour">hours</option>
<option value="day">days</option>
</select>
</div>
<div class="col-md-12 no-padding">
<a href="javascript://" onclick="hideReminInDiv()" class="btn btn-primarygray pull-right" style="margin-top: 10px;">submit</a>
</div>
<div class="clear"></div>
</div>
</div>
</div>
<div class="clear" style="clear:both; display:None;"></div>
<div class="col-md-12 Call" style="display:none;">
<div class="todo-radio-btn">
<input class="RadioDisId remindercallstatus todo-radio-input" type="radio" name="calltype" id="remindercallstatus0" value="1">
<label for="remindercallstatus0" class="hotelshow leftsidearea todo-radio-label">Out Going </label>
</div>
<div class="todo-radio-btn">
<input class="RadioDisId remindercallstatus todo-radio-input" type="radio" name="calltype" id="remindercallstatus1" value="2">
<label for="remindercallstatus1" class="hotelshow leftsidearea todo-radio-label">Incoming </label>
</div>
</div>
<div class="clear" style="clear:both; display:block;"></div>
<div class="col-md-12 remindercallbackdiv" style="display:none;">
<h4 class="outcome">Out Come</h4>
<div class="todo-radio-btn">
<input class="RadioDisId remindercallback todo-radio-input" type="radio" name="callstatus" id="remindercallback0" value="1">
<label for="remindercallback0" class="hotelshow leftsidearea todo-radio-label">Answered </label>
</div>
<div class="callbackradio" style="display: inline-block">
<div class="todo-radio-btn">
<input class="RadioDisId remindercallback todo-radio-input" type="radio" name="callstatus" id="remindercallback1" value="2">
<label for="remindercallback1" class="hotelshow leftsidearea todo-radio-label">Unanswered </label>
</div>
<div class="todo-radio-btn">
<input class="RadioDisId remindercallback todo-radio-input" type="radio" name="callstatus" id="remindercallback2" value="3">
<label for="remindercallback2" class="hotelshow leftsidearea todo-radio-label">Not Reachable </label>
</div>
</div>
</div>
<div class="clear" style="clear:both; display:block;"></div>
<div class="col-md-12 nextstepcalldiv " style="display:none;">
<div class="todo-radio-btn">
<input class="RadioDisId nextstepcall todo-radio-input" type="radio" name="nextstepcall" id="nextstepcall0" value="1">
<label for="nextstepcall0" class="hotelshow leftsidearea todo-radio-label">Call Back </label>
</div>
<div class="todo-radio-btn nextstepcalldiv2">
<input class="RadioDisId nextstepcall todo-radio-input" type="radio" name="nextstepcall" id="nextstepcall1" value="2">
<label for="nextstepcall1" class="hotelshow leftsidearea todo-radio-label">To Do </label>
</div>
<div class="todo-radio-btn nextstepcalldiv2">
<input class="RadioDisId nextstepcall todo-radio-input" type="radio" name="nextstepcall" id="nextstepcall2" value="3">
<label for="nextstepcall2" class="hotelshow leftsidearea todo-radio-label">Meeting </label>
</div>
<div class="todo-radio-btn nextstepcalldiv2">
<input class="RadioDisId nextstepcall todo-radio-input" type="radio" name="nextstepcall" id="nextstepcall3" value="4">
<label for="nextstepcall3" class="hotelshow leftsidearea todo-radio-label">Confirm</label>
</div>
<div class="todo-radio-btn">
<input class="RadioDisId nextstepcall todo-radio-input" type="radio" name="nextstepcall" id="nextstepcall4" value="5">
<label for="nextstepcall4" class="hotelshow leftsidearea todo-radio-label">Lost</label>
</div>
<div class="form-group1 qstagehide">
<select class="form-control todo-select" name="QueryStage" id="QueryStage">
<option value="">Query Stages</option>
<?php foreach ($lostArray as $key => $stage) { ?>
<option value="<?php echo $key ?>"><?php echo $stage; ?></option>
<?php }
?>,
</select>
</div>
</div>
<div class="clear" style="clear:both; display:block;"></div>
<div class="col-md-12 no-padding-right reminderdaydiv" style="margin-bottom:8px;display:none">
<div class="todo-radio-btn">
<input class="RadioDisId reminderday todo-radio-input" type="radio" name="reminderday" id="reminderday0" value="0" checked>
<label for="reminderday0" class="hotelshow leftsidearea todo-radio-label">Today </label>
</div>
<div class="todo-radio-btn">
<input class="RadioDisId reminderday todo-radio-input" type="radio" name="reminderday" id="reminderday1" value="1">
<label for="reminderday1" class="hotelshow leftsidearea todo-radio-label">Tomorrow </label>
</div>
<div class="todo-radio-btn">
<input class="RadioDisId reminderday todo-radio-input" type="radio" name="reminderday" id="reminderday2" value="2">
<label for="reminderday2" class="hotelshow leftsidearea todo-radio-label">In 2 days </label>
</div>
<div class="todo-radio-btn">
<input class="RadioDisId reminderday todo-radio-input" type="radio" name="reminderday" id="reminderday3" value="3">
<label for="reminderday3" class="hotelshow leftsidearea todo-radio-label">In 3 days </label>
</div>
<div class="todo-radio-btn">
<input class="RadioDisId reminderday todo-radio-input" type="radio" name="reminderday" id="reminderday4" value="4">
<label for="reminderday4" class="hotelshow leftsidearea todo-radio-label">Custom </label>
</div>
</div>
<div class="clear" style="clear:both; display:block;"></div>
<div class="col-md-4 reminderday_customDiv" style="display:none;margin-top: 10px;">
<div class="form-group active">
<label for="reminderday4" class=" hotelshow leftsidearea ">Custom Date </label>
<input class="form-control commonDatepicker" type="text" name="todostartdate" id="todostartdate">
</div>
</div>
<div class="col-md-2 timediv" style="margin-top: 10px;display:none">
<div class="form-group active">
<label for="reminderday4" class=" hotelshow leftsidearea ">Time </label>
<input class="form-control mytimepickeronly" type="text" name="todostartdatetime" id="todostartdatetime" value="<?php echo date('H:i'); ?>">
</div>
</div>
</div>
<div class="row" style="margin-top: 10px;">
<div class="col-md-4 no-padding-right mbright_15query">
<div class="form-group active">
<label>Assigned To<?php echo MANDATORY_SIGN; ?></label>
<input class="form-control whbg" name="assignedto" id="assignedto" value="<?php echo stripslashes($this->customerDetail['agencyUserDetails']['FirstName']) . " " . stripslashes($this->customerDetail['agencyUserDetails']['LastName']) . "(" . stripslashes($this->customerDetail['agencyUserDetails']['EmailId']) . ")"; ?>" type="text">
<input type="hidden" name="assignedtoId" id="assignedtoId" value="<?php echo trim($this->customerDetail['agencyUserDetails']['intLoggedinUserId']); ?>">
</div>
</div>
<div class="col-md-2 no-padding-right mbright_15query mb_mt_btm_30">
<div class="form-group1">
<select class="form-control" name="isB2B">
<option value="0">B2C</option>
<option value="1">B2B</option>
</select>
</div>
</div>
<div class="col-md-6">
<div class="form-group active">
<label>Select Customer<?php echo MANDATORY_SIGN; ?></label>
<input readonly class="form-control ui-autocomplete-input" autocomplete="off" name="contact" id="contact" value="<?php echo $this->customerDetail['FullName'] . '(' . $this->customerDetail['EmailId'] . ')'; ?>">
<input type="hidden" name="custsysID" id="custsysID" value="<?php echo $this->customerDetail['CustomerSysId']; ?>">
</div>
</div>
<div class="clear" style="clear:both; display:block;"></div>
<div class="col-md-8">
<div class="form-group cityDiv">
<label>Details</label>
<textarea class="form-control whbg" name="details" id="details" maxlength="150" type="text" rows="2" cols="10"> </textarea>
</div>
</div>
<div class="col-md-2">
<div class="cityDiv">
<label class="checkbox_popup align_margin_8"><input type="checkbox" name="markasdone" value="1" id="markasdone" />
Completed
<span class="checkmark"></span>
</label>
</div>
</div>
<input id="nextsteptype" type="hidden" value="" />
<input id="Totalproposal" name="Totalproposal" type="hidden" value="" />
<input id="redirectLink" name="redirectLink" type="hidden" value="" />
<input id="_proposal_id_hidden" type="hidden" value="" />
<input id="_to_pop_type_id_hidden" type="hidden" value="addtodo" />
<input id="_to_loopid_hidden" type="hidden" value="" />
<input id="_to_leadtypeid_hidden" type="hidden" value="" />
<input id="_to_MasterTPSysId_hidden" type="hidden" value="" />
<input id="_to_CustomerSysId_hidden" type="hidden" value="" />
<input id="_to_ProposalStatusId_hidden" type="hidden" value="" />
<input id="_to_proposalIDTitle_hidden" type="hidden" value="" />
<input id="_to_CustomerSysId_hidden" type="hidden" value="" />
<input id="_to_ownerName_hidden" type="hidden" value="" />
<input id="_to_AgentSysId_hidden" type="hidden" value="" />
<input id="selectedLeadType" type="hidden" value="Query" />
<input id="_to_MasterTPSysId_hidden_1" type="hidden" value="" />
<input id="_proposal_id_hidden_1" type="hidden" value="" />
<input id="_page_name" name="page_name" type="hidden" value="lead_detail" />
<div class="clear"></div>
</div>
</div>
<div class="modal-footer ft-pd-15">
<a href="javascript:void(0);"><button type="button" class="btn btn-primary pull-right submittodo SubmitToDoItinerary" id="SubmitToDoItinerary" btnleadtype="1">Submit</button></a>
<button type="button" class="btn btn-primarygray pull-left mt_left_mgt0" data-dismiss="modal">Cancel</button>
<span class="successMsg"></span>
</div>
</form>
</div>
</div>
</div>
<!-- for followUp created by Er Amit Kumar Dubey on 27 april 2017 on 1:29 PM -->
<?php //echo $this->partial('leaddetail/partial-add-followup.phtml',array('leadDetail'=>$this->leadDetail,'customerDetail'=>$this->customerDetail));
?>
<!-- for updatefollowUp created by Er Amit Kumar Dubey on 27 april 2017 on 4:24 PM -->
<?php //echo $this->render('leaddetail/partial-update-followup.phtml',array('leadDetail'=>$this->leadDetail,'customerDetail'=>$this->customerDetail));
?>
<!-- popup modal for Edit customer to do -->
<div class="modal fade in" id="myModalupdateToDoCustomer" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false" style="display: none;">
<div class="modal-dialog">
<div class="modal-content">
<div class="center">
<img class="loaderimg" id="loaderimg" src="<?php echo $this->baseUrl('/public/tinymce/skins/lightgray/img/loader.gif'); ?>" />
</div>
</div>
</div>
</div>
<!-- end of popup modal for edit customer todo -->
<div class="modal fade in" id="myModalupdateFollowUpCustomer" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false" style="display: none;">
<div class="modal-dialog">
<div class="modal-content">
<div class="center">
<img class="loaderimg" id="loaderimg" src="<?php echo $this->baseUrl('/public/tinymce/skins/lightgray/img/loader.gif'); ?>" />
</div>
</div>
</div>
</div>
<div class="modal fade" id="Follow-up-history" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="myModalLabel">FollowUp History</h4>
</div>
<div class="col-md-12 no-padding">
<div class="panel">
<div class="panel-body">
<div class="col-md-12 table-responsive no-padding overflowflight" id="history_response">
<img src="<?php echo $this->baseUrl('public/assets/images/loader.gif'); ?>" />
</div>
<div class="clearfix"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade in" id="myModalSendSMSToDoCustomer" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false" style="display: none;">
<div class="modal-dialog">
<div class="modal-content">
<div class="center">
<img class="loaderimg" id="loaderimg" src="<?php echo $this->baseUrl('/public/tinymce/skins/lightgray/img/loader.gif'); ?>" />
</div>
</div>
</div>
</div>
<script src="<?php echo $this->baseUrl('public/assets/js/bootstrap3-typeahead.js'); ?>"></script>
<script>
$('.titleTabClass').on('click', function () {
$('.remindercallstatus').prop("checked", false);
$('.remindercallback').prop("checked", false);
$('.nextstepcall').prop("checked", false);
$('.reminderdaydiv').hide();
$('.reminderday_customDiv').hide();
$('.Call').hide();
$('.nextstepcalldiv').hide();
$('.timediv').hide();
$('.qstagehide').hide();
$('#titleTab1').prop("checked", false);
if ($(this).attr('id') == 'titleTab1') {
$('.Call').show();
$('#remindercallstatus0').prop('checked', true);
$('.remindercallbackdiv').show();
$('#remindercallback0').prop('checked', true);
$('.nextstepcalldiv').show();
$('#nextstepcall0').click();
$('#reminderday0').click();
} else {
$('.Call').hide();
$('#remindercallstatus0').prop('checked', false);
$('.remindercallbackdiv').hide();
$('#remindercallback0').prop('checked', false);
$('.nextstepcalldiv').hide();
}
if ($(this).attr('id') != 'titleTab1') {
$('.remindercallbackdiv').hide();
$('.nextstepcalldiv').show();
$('.Call').hide();
$('#titleTab1').prop("checked", false);
if ($(this).attr('id') == 'titleTab2') {
$('#titleTab2').prop("checked", true);
$('#titleTab3').prop("checked", false);
$('.nextstepcalldiv').show();
} else if ($(this).attr('id') == 'titleTab3') {
$('#titleTab2').prop("checked", false);
$('#titleTab3').prop("checked", true);
// $('.nextstepcalldiv').show();
$('.nextstepcalldiv').hide();
$('.reminderdaydiv').show();
$('#reminderday0').click();
}
} else {
$('#titleTab1').prop("checked", true);
$('#titleTab2').prop("checked", false);
$('#titleTab3').prop("checked", false);
}
});
$('.reminderday').on('click', function () {
$('#todostartdate').val('');
$('.timediv').show();
if ($(this).attr('id') == 'reminderday4') {
$('.reminderday_customDiv').show();
} else {
$('.reminderday_customDiv').hide();
}
});
$('.remindercallstatus').on('click', function () {
$('.remindercallback').prop("checked", false);
$('.nextstepcall').prop("checked", false);
$('.reminderday').prop("checked", false);
$('.nextstepcalldiv').show();
$('.qstagehide').hide();
$('.reminderdaydiv').hide();
$('.reminderday_customDiv').hide();
$('.timediv').hide();
$('#remindercallback0').prop('checked', true);
$('#nextstepcall0').click();
$('#reminderday0').click();
if ($(this).attr('id') == 'remindercallstatus0') {
$('.remindercallbackdiv').show();
$('.callbackradio').show();
} else if ($(this).attr('id') == 'remindercallstatus1') {
$('.remindercallbackdiv').show();
$('.callbackradio').hide();
$('#remindercallstatus1').prop('checked', true);
}
});
$('.nextstepcall').on('click', function () {
$('.reminderday').prop("checked", false);
$('.reminderdaydiv').hide();
$('.timediv').hide();
$('.leadformdiv').hide();
$('.nextstepcalldiv').show();
$('.reminderday_customDiv').hide();
$('.qstagehide').hide();
$('#reminderday0').click();
if ($(this).attr('id') == 'nextstepcall4') {
$('.qstagehide').css('display', 'inline-flex');
$('.timediv').hide();
} else if ($(this).attr('id') == 'nextstepcall3') {
$('.reminderdaydiv').hide();
$('.timediv').hide();
} else {
$('.reminderdaydiv').show();
}
});
$('.remindercallback').on('click', function () {
$('.qstagehide').hide();
$('.nextstepcall').prop("checked", false);
$('.reminderday').prop("checked", false);
$('.reminderdaydiv').hide();
$('.timediv').hide();
$('.nextstepcalldiv').show();
$('#nextstepcall0').click();
$('#reminderday0').click();
if ($(this).attr('id') == 'remindercallback0') {
$('.nextstepcalldiv2').show();
} else {
$('.nextstepcalldiv2').hide();
}
});
$('#myModalAddToDoCustomer').on('hidden.bs.modal', function () {
location.reload();
});
</script>
<script>
$('#myModalupdateToDoCustomer').on('hidden.bs.modal', function () {
$(this).removeData('bs.modal');
});
$("#changeOwnerName").typeahead({
//items: 'all',
source: function (query, process) {
return $.ajax({
url: '/customer/get-agency-user-list',
type: 'post',
//async: true,
data: {
query: query
},
dataType: 'json',
success: function (result) {
var resultList = result.map(function (item) {
var aItem = {
UserSysId: item.UserSysId,
EmailId: item.EmailId,
FullName: item.FullName
};
return JSON.stringify(aItem);
});
return process(resultList);
}
});
},
sorter: function (items) {
var beginswith = [],
caseSensitive = [],
caseInsensitive = [],
item;
while (aItem = items.shift()) {
var item = JSON.parse(aItem);
if (!item.EmailId.toLowerCase().indexOf(this.query.toLowerCase()))
beginswith.push(JSON.stringify(item));
else if (~item.EmailId.indexOf(this.query))
caseSensitive.push(JSON.stringify(item));
else
caseInsensitive.push(JSON.stringify(item));
}
return beginswith.concat(caseSensitive, caseInsensitive)
},
highlighter: function (obj) {
var item = JSON.parse(obj);
var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&');
return item.EmailId.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
return '<strong>' + match + '</strong>'
})
},
updater: function (item) {
var item = JSON.parse(item);
//$('#assignedtoId').val(item.UserSysId);
//return item.EmailId;
jQuery.ajax({
url: '/customer/update-customer-owner',
type: 'POST',
dataType: 'json',
data: {
UserSysId: item.UserSysId,
ACLid: $("#AgencyCRMLeadSysId").val()
},
success: function (result) {
//alert(result);
if (result.status == 'success') {
$(".ownerSuccess").html("(" + result.msg + ")").show();
$(".ownerNameText").html(item.FullName);
showHide('ownerNameText', 'changeOwnerName');
return false;
} else {
alert('Some thing went wrong.Please try after some time');
showHide('ownerNameText', 'changeOwnerName');
}
}
});
},
minLength: 2
// displayField: 'label',
});
// function SubmitToDo(lid){
// var todosubject = $.trim($("#subject").val());
// var todostartdate = $.trim($("#todostartdate").val());
// var todoenddate = $.trim($("#todoenddate").val());
// var contact = $.trim($("#contact").val());
// var custsysID = $.trim($("#custsysID").val());
// var relatedto = $.trim($("#relatedto").val());
// var assignedto = $.trim($("#assignedtoId").val());
// var details = $.trim($("#details").val());
// var todoreminder=$.trim($("#todoreminder").val());
// var checked=1;
// if($("#markasdone").prop('checked')==true){
// var checked=1;
// }else{
// var checked=0;
// }
//
// var followupchecked=0;
// if($(".followup").prop('checked')==true){
// var followupchecked=1;
// }else{
// var followupchecked=0;
// }
//
// if(todosubject == ''){
// alert('please enter subject');
// $("#subject").focus();
// return false;
// }
// if(todostartdate == ''){
// alert('please enter start date');
// $("#todostartdate").focus();
// return false;
// }
// if(todoenddate == ''){
// alert('please enter end date');
// $("#todoenddate").focus();
// return false;
// }
// /* if(contact == ''){
// alert('please enter contact');
// $("#contact").focus();
// return false;
// } */
// if(details == ''){
// alert('please enter some detail');
// $("#details").focus();
// return false;
// }
// jQuery.ajax({
// url: '/leaddetail/savetododata',
// type: 'POST',
// dataType:'json',
//
// data: {todosubject: todosubject, todostartdate: todostartdate, todoenddate:todoenddate, contact:contact, custsysID:custsysID, relatedto:relatedto, assignedto:assignedto, details:details,checked:checked,followupchecked:followupchecked,lid:lid,todoreminder:todoreminder},
// beforeSend: function(){
// $(".submittodo").attr('disabled',true);
// $(".submittodo").html('Please wait...');
// },
// success: function(result){
//
// if(result.status=='success'){
// // $(".submittodo").removeAttr('disabled');
// setTimeout(function(){ location.reload(); },1000);
// }else{
// $(".submittodo").html('Some Error');
// }
// }
// });
// }
function UpdateTODO(TODOid, customerId) {
var updatetodosubject = $.trim($(".updatetodosubject").val());
var updatetodostart = $.trim($(".updatetodostart").val());
var updatetodoend = $.trim($(".updatetodoend").val());
var custsysID = $.trim($("#custsysID_update").val());
var todoId = $.trim($("#todoeditId").val());
var details = $.trim($("#details_update").val());
var todoreminder = $.trim($("#todoreminderupdate").val());
var type = $.trim($("#type").val());
var followupchecked = 0;
if ($("#update_reminderday4").prop('checked') == true) {
if (updatetodostart == '') {
alert('please enter custom date.');
$("#todostartdate").focus();
return false;
}
}
if (custsysID == '') {
alert('please enter customer.');
$("#custsysID").focus();
return false;
}
var data = $('.mSubmitToDoUpdateForm').serialize();
$.ajax({
url: '/customer/update-todo',
data: data,
type: 'POST',
async: false,
dataType: 'json',
beforeSend: function (data) {
$(".updatetodo").attr('disabled', true);
$(".updatetodo").html('Please wait...');
//$(".modalloader").show();
},
success: function (response) {
if (response.status == 'success') {
$(".updatetodo").html('Updated');
if (type == 1) {
if (response.type == 'lead') {
window.location.href = '/crm/lead/';
} else {
alert(response.msg);
location.reload();
}
} else if (type == 2) {
if (response.statge == '50') {
window.location.href = response.link;
} else {
alert(response.msg);
location.reload();
}
} else if (type == 3) {
if (response.nextsteptype == 4 || response.nextsteptype == 5) {
window.location.href = response.redirectLink;
} else {
alert(response.msg);
location.reload();
}
}
} else {
alert(response.msg);
$(".updatetodo").attr('disabled', false);
$(".updatetodo").html('Submit');
}
},
error: function () {
alert("fail : Please try after some time");
$(".updatetodo").html('Some error...');
}
});
}
</script>
<script type="application/x-javascript">
$(".createleads").click(function() {
$(".viewcustomerId").toggle();
});
$("#onWay").click(function() {
$("#onWay-tab").show();
$("#onWay-tab1").hide();
$("#onWay-tab2").hide();
});
$("#roundTrip").click(function() {
$("#onWay-tab").hide();
$("#onWay-tab1").show();
$("#onWay-tab2").hide();
});
$("#multiCity").click(function() {
$("#onWay-tab").hide();
$("#onWay-tab1").hide();
$("#onWay-tab2").show();
});
$(".flightshow").click(function() {
$("#modsrchdetail").show();
$("#modhoteldetail").hide();
$("#modhotelflightdetail").hide();
$("#modpackagedetail").hide();
});
$(".hotelshow").click(function() {
$("#modsrchdetail").hide();
$("#modhoteldetail").show();
$("#modhotelflightdetail").hide();
$("#modpackagedetail").hide();
});
$(".hotelflightshow").click(function() {
$("#modsrchdetail").hide();
$("#modhoteldetail").hide();
$("#modhotelflightdetail").show();
$("#modpackagedetail").hide();
});
$(".packageshow").click(function() {
$("#modsrchdetail").hide();
$("#modhoteldetail").hide();
$("#modhotelflightdetail").hide();
$("#modpackagedetail").show();
});
$(".travelerbox").click(function() {
$(".roomBoxMain").toggle();
});
$(".btwob").click(function() {
$("#b2br").show();
});
$(".tacid").click(function() {
$("#b2br1").show();
$("#b2br2").show();
});
$(".individual").click(function() {
$(".individualTab").show();
$(".bulkTab").hide();
});
$(".bulk").click(function() {
$(".individualTab").hide();
$(".bulkTab").show();
});
$(".standard").click(function() {
$(".standardtab").show();
$(".costomizetab").hide();
$("#marktype").hide();
});
$(".customize").click(function() {
$(".standardtab").hide();
$(".costomizetab").show();
$("#marktype").show();
});
$(".standardnet").click(function() {
$(".standardtabnet").show();
$(".costomizetabnet").hide();
$("#marktypenet").hide();
});
$(".customizenet").click(function() {
$(".standardtabnet").hide();
$(".costomizetabnet").show();
$("#marktypenet").show();
});
$(".pfare").click(function() {
$("#publishedfare").show();
$("#netratefare").hide();
});
$(".nrate").click(function() {
$("#publishedfare").hide();
$("#netratefare").show();
});
$(".standardnew").click(function() {
$(".standardtabnew").show();
$(".costomizetabnew").hide();
});
$(".customizenew").click(function() {
$(".standardtabnew").hide();
$(".costomizetabnew").show();
});
$(".viewtxt").click(function() {
$(this).parent().children(".viewBoxContainer").show();
});
$(".closetxt").click(function() {
$(".viewBoxContainer").hide();
});
$('.reminderday').on('click', function() {
$('#todostartdate').val('');
if ($(this).attr('id') == 'reminderday4') {
$('.reminderday_customDiv').show();
} else {
$('.reminderday_customDiv').hide();
}
})
$('.remindercallstatus').on('click', function() {
if ($(this).attr('id') == 'remindercallstatus0') {
$('.remindercallbackdiv').show();
$('.callbackradio').show();
} else if ($(this).attr('id') == 'remindercallstatus1') {
$('.remindercallbackdiv').show();
$('.callbackradio').hide();
$('#remindercallstatus1').addAttr('checked', 'checked');
} else {
$('.remindercallbackdiv').show();
}
})
$('.titleTabClass').on('click', function() {
var tbval = $(this).val();
if (tbval == 'none') {
$('.reminderday').attr('disabled', true);
} else {
$('.reminderday').attr('disabled', false);
}
})
$("select").change(function() {
$(this).find("option:selected").each(function() {
if ($(this).attr("value") == "addnew") {
$("#myModa1Modify").modal();
}
});
}).change();
$(window).load(function() {
$('.editbtn').click(function() {
var $div = $(this).parent().parent().children().children('span'),
isEditable = $div.is('.editable');
$(this).parent().parent().children().children('span').prop('contenteditable', !isEditable).toggleClass('editable')
})
});
function showReminInDiv() {
$('.ReminInDiv').toggleClass('hide-remind-form');
}
function hideReminInDiv() {
$('.ReminInDiv').toggleClass('hide-remind-form');
var reminderintype = $('#reminderintype').val();
var reminderinvalue = $('#reminderinvalue').val();
reminderintype = reminderinvalue > 1 ? reminderintype + 's' : reminderintype;
$('.reminder_in_html').html(reminderinvalue + ' ' + reminderintype);
}
</script>
<style>
.typeahead {
max-height: 200px;
overflow-y: auto;
overflow-x: hidden;
width: 100%;
}
</style>
<script type="text/javascript" src="<?php echo $this->baseUrl('public/assets/js/jquery.validate.min.js'); ?>"></script>
<script type="text/javascript" src="<?php echo $this->baseUrl('public/assets/js/customer.js'); ?>"></script>
<script type="text/javascript" src="<?php echo $this->baseUrl('public/js/customer/customer.js'); ?>"></script>
<script type="text/javascript" src="<?php echo $this->baseUrl('public/assets/js/selectCityTypeahead.js'); ?>"></script>
<script>
$('.queryType').on('click', function (event) {
var val = $(this).val();
$('.queryTypePaxDiv').hide();
$('.queryTypePaxDiv' + val).show();
if (val == '1') {
$('.adulttwinshringdiv').html('ADULTS (+12 YRS)');
$('.childwithbeddiv').html('CHILDREN (2 - 11YRS)');
$('#adultTripleSharing,#adultSingleSharing,#childWithOutBed,#infant1').val(0);
} else {
$('.adulttwinshringdiv').html('ADULTS <span class="minsize">(Twin sharing)</span>');
$('.childwithbeddiv').html('CHILD <span class="minsize">(WITH BED (2 - 11YRS))</span>');
$('#adultTwinSharing').val(2);
$('#adultTripleSharing,#adultSingleSharing,#childWithOutBed,#infant1').val(0);
}
})
</script>
<!-- <script>
$(document).ready(function() {
$('.queryType').each(function(e){
if ($('input[name="queryType"]:checked')) {
$('.queryType').click();
}
});
});
</script>-->