| 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/supplier/ |
Upload File : |
<?php
$SupplierEnquiryListArr = $this->paginator;
?>
<style>
.tables table tr th{
font-size: 12px !important;
}
.tables table tr td{
font-size: 13px !important;
}
</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">Suppliers</h3>
<!--Top header end -->
<!--Top breadcrumb start -->
<ol class="breadcrumb">
<li><a href="#"><i class="fa fa-home"></i></a></li>
<li class="">CRM</li>
<li class="active">Suppliers Package Enquiry</li>
</ol>
<!--Top breadcrumb start -->
</div>
</div>
<!-- Main Content Element Start-->
<div class="row">
<div class="col-md-12">
<div class="panel panel-primary">
<div class="panel-heading minus">
<h3 class="panel-title" onclick="$('.minus').trigger('click')"><i class="fa fa-filter"></i> Filter By</h3>
<ul class="panel-control">
<li><a class="minus <?php if(count($this->searchData) == 0): ?>active <?php endif; ?>" href="javascript:void(0)"><i class="fa <?php if(!empty($this->searchData) ): ?>fa-angle-up large <?php else: ?> fa-angle-down large<?php endif; ?>"></i></a></li>
</ul>
</div>
<div class="panel-body" style="display:<?php if(!empty($this->searchData) ): ?>block <?php else: echo "none"; endif; ?>;">
<form role="form" class="ls_form" name="supplierFilter" action="/supplier/supplierpackageenquiry" method="POST" autocomplete="false">
<div class="col-md-3">
<div class="form-group">
<label>Customer Name</label>
<input type="text" name="CustomerName" value="<?php echo $this->searchData['CustomerName']; ?>" class="form-control whbg">
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label>Customer Email Id</label>
<input type="text" name="EmailID" value="<?php echo $this->searchData['EmailID']; ?>" class="form-control whbg">
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label>Supplier Agency</label>
<input type="text" name="SupplierAgency" onkeyup="get_supplier_autosuggest();" value="<?php echo $this->searchData['SupplierAgency']; ?>" class="form-control whbg">
<input type="hidden" name="hidden_Supplier_id" id="hidden_Supplier_id" value="<?php echo $this->searchData['hidden_Supplier_id']; ?>"/>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label>Destination </label>
<input type="text" name="Destination" onkeyup="get_city_autosuggest();" value="<?php echo $this->searchData['Destination']; ?>" class="form-control whbg">
<input type="hidden" name="hidden_city_id" id="hidden_city_id" value="<?php echo $this->searchData['hidden_city_id']; ?>"/>
</div>
</div>
<!--<div class="col-md-3">
<div class="form-group">
<label>Period/Query Date</label>
<input type="text" name="contactName" value="<?php echo $this->searchData['contactName']; ?>" class="form-control whbg">
</div>
</div>-->
<div class="col-md-12" align="right">
<div class="form-group form-group1">
<a href="<?php echo $this->baseUrl('supplier/supplierpackageenquiry'); ?>" class="btn btn-primarygray" type="cancel">Reset</a>
<button class="btn btn-primary"><i class="fa fa-search"></i> Filter</button>
</div>
</div>
</form>
</div>
</div>
</div>
<div class="col-md-12">
<div class="successMessage">
<?php
if ($this->msg == 1) {
echo "Supplier added/updated successfully";
}
if (!empty($this->messages)) {
echo ($this->messages[0]);
}
?>
</div></div>
<div class="col-md-12">
<div class="leadeBorder">
<div class="panel-body">
<!--<div class="form-group form-group1 text-right"><a href="<?php ////echo $this->baseUrl('supplier/add-agency-supplier'); ?>" class="btn btn-warning btn-sm"><i class="fa fa-fw fa-arrows"></i> Add Suppliers</a></div>-->
<div class="table-responsive ls-table tables" >
<table class="table table-bordered table-striped table-bottomless" id="ls-editable-table">
<thead>
<tr class="alert alert-success">
<td colspan="7" bgcolor="#abd4e8" align="center">Customer Query</td>
<td colspan="6" bgcolor="#e8f0f5" align="center">Supplier Query</td>
</tr>
<tr class="alert alert-success">
<th>Query Date/ Age</th>
<th>Name/Mobile</th>
<th>Type</th>
<th>Description</th>
<th>Travel Date</th>
<th>Destination</th>
<th>Query Status</th>
<th>Query Date/ Age</th>
<th>Supplier Agency</th>
<th>Name</th>
<th>Proposal Shared</th>
<th>Enquiry Status</th>
<th style="width:10%;">Action</th>
</tr>
</thead>
<tbody>
<?php
$customHelper = Zend_Controller_Action_HelperBroker::getStaticHelper('Custom');
$travelPlanStatusName=$customHelper->GetTravelPlanStatusArray(1,'');
$SuppEnquiryStatusName=$customHelper->GetTravelPlanStatusArray(5,''); //5 for supplier enquiry status
//echo "<pre>";print_r($SuppEnquiryStatusName);
//Status_Type
if (!empty($SupplierEnquiryListArr) ) {
foreach ($SupplierEnquiryListArr as $supplierList) {
$fromDate=$supplierList['CreateDate']->format('Y-m-d');
//echo $leadlist['ActiveDate']->format('Y-m-d')
$fromDateTime=time()-strtotime($supplierList['CreateDate']->format('Y-m-d H:i:s'));
$toDate=date('Y-m-d',time());
if($fromDateTime/3600 < 24 ){
$fromDateTime=abs($fromDateTime/60);
$differenceIndays=Zend_Controller_Action_HelperBroker::getStaticHelper('DateFormat')->convertToHoursMins($fromDateTime);
}else{
$differenceIndays=Zend_Controller_Action_HelperBroker::getStaticHelper('DateFormat')->calculateNoOfDays($fromDate, $toDate);
$differenceIndays=$differenceIndays." Days";
}
$fromDate2=$supplierList['leadCreateDate']?$supplierList['leadCreateDate']->format('Y-m-d'):'';
//echo $leadlist['ActiveDate']->format('Y-m-d')
$fromDateTime2=$supplierList['leadCreateDate']?time()-strtotime($supplierList['leadCreateDate']->format('Y-m-d H:i:s')):'';
$toDate2=date('Y-m-d',time());
if($fromDateTime2/3600 < 24 ){
$fromDateTime2=abs($fromDateTime2/60);
$differenceIndays2=Zend_Controller_Action_HelperBroker::getStaticHelper('DateFormat')->convertToHoursMins($fromDateTime2);
}else{
$differenceIndays2=Zend_Controller_Action_HelperBroker::getStaticHelper('DateFormat')->calculateNoOfDays($fromDate2, $toDate2);
$differenceIndays2=$differenceIndays2." Days";
}
if($supplierList['StatusType']){
$StatusType = (isset($supplierList['StatusType']) && !empty($supplierList['StatusType']) && isset($travelPlanStatusName[$supplierList['StatusType']]['TPStatus']))?$travelPlanStatusName[$supplierList['StatusType']]['TPStatus']:'NA';
}else{
$StatusType = (isset($supplierList['StatusType']) && !empty($supplierList['StatusType']) && isset($travelPlanStatusName[$supplierList['StatusType']]['TPStatus']))?$travelPlanStatusName[1]['TPStatus']:'NA';
}
//$packageRoomInfoArr = Zend_Controller_Action_HelperBroker::getStaticHelper('Package')->getPackageRoomInfo($supplierList['RoomMemInfoJson']);
?>
<tr id="row_<?=$supplierList['EnSupPackId']?>">
<td> <?php echo!empty($supplierList['leadCreateDate']) ? $supplierList['leadCreateDate']->format('d-M-y') : 'NA'; echo $differenceIndays2?"<br/> ".$differenceIndays2:''; ?> <br>QId: <?php echo trim($supplierList['TPSysId']) ? ucfirst(trim($supplierList['TPSysId'])) : 'NA' ?></td>
<td>C:<?php echo trim($supplierList['SendersName']) ? ucfirst(trim($supplierList['SendersName'])) : 'NA' ?> <br>E:<?php echo $supplierList['SendersEmailId']?><br>M:<?php echo $supplierList['SendersMobile']?></td>
<td><?php if($supplierList['IsB2BAgent'] == '1'){echo 'B2B';}else{echo 'B2C';} ?></td>
<td><?php echo $customHelper->getPlanTypeName($supplierList['PlanType']); ?></td>
<td><?php echo date('d/m/Y',strtotime($supplierList['CheckInDate'])); ?></td>
<td><?php echo trim($supplierList['CityName']) ? ucfirst(trim($supplierList['CityName'])) : 'NA' ?></td>
<td><?php echo $StatusType;?> </td>
<td><?php echo!empty($supplierList['CreateDate']) ? $supplierList['CreateDate']->format('d-M-y') : 'NA'; echo $differenceIndays?"<br/> ".$differenceIndays:''; ?> </td>
<td><a href="javascript:void(0);" data-toggle="modal" data-target="#myModactpopup" title="View Supplier Details" onclick="GetSupplierInfo('<?php echo $supplierList['SupplierSysId']; ?>');"><?php echo $supplierList['SupplierName']; ?></a> </td>
<td>S:<?php echo trim($supplierList['ContactName']) ? ucfirst(trim($supplierList['ContactName'])) : 'NA' ?> <br>E:<?php echo $supplierList['ContactEmailId']?><br>M:<?php echo trim($supplierList['ContactMobile']) ? ucfirst(trim($supplierList['ContactMobile'])) : 'NA' ?></td>
<td><?php if($supplierList['ProposalStatus']==1){echo 'Yes';}else{echo 'No';} ?></td>
<td><?php echo $supplierList['Status_Type']?$SuppEnquiryStatusName[$supplierList['Status_Type']]['TPStatus']:'NA'; ?></td>
<td>
<div class="btn-group" id="package_<?php echo $supplierList['EnSupPackId']; ?>">
<button type="button" class="btn btn-danger btn-sm dropdown-toggle" data-toggle="dropdown">
Select <span class="caret"></span>
</button>
<ul class="dropdown-menu pull-right" role="menu">
<li><a href="javascrupt:void(0);" data-toggle="modal" data-target="#previewenquirysupplier" onclick="previewenquirysupplier(<?=$supplierList['EnSupPackId']?>)">View Mail</a></li>
<li><a href="<?php echo $this->baseUrl('packagesearch/resendenquirysupplierpackage/id/'); ?><?php echo base64_encode($supplierList['EnSupPackId']); ?>" target="_blank">Resend query</a></li>
<li><a href="<?php echo $this->baseUrl('leaddetail/lead-detail/id/'); ?><?php echo base64_encode($supplierList['TPSysId']); ?>/cid/<?php echo base64_encode($supplierList['SendersId']); ?>/sid/<?php echo base64_encode($supplierList['EnSupPackId']); ?>" target="_blank">Send Proposal</a></li>
<li><a href="javascrupt:void(0);" onclick="discard(<?php echo ($supplierList['EnSupPackId']); ?>)" id="<?php echo ($supplierList['EnSupPackId']); ?>">Discard Query</a></li>
</ul>
</div>
</td>
</tr>
<?php
}
} else {
?>
<tr><td colspan="11">No. records found</td></tr>
<?php } ?>
</tbody>
</table>
</div>
<!--Table Wrapper Finish-->
<div class="panel-box clearfix">
<?php if (!empty($this->paginator) ) { ?>
<?php echo $this->paginationControl($this->paginator, 'Sliding', 'pagination.phtml'); ?>
<?php } ?>
</div>
</div>
</div>
</div>
</div>
<!-- Main Content Element End-->
</div>
</div>
<div class="modal fade" id="previewenquirysupplier" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
</div>
<div class="modal fade" id="myModactpopup" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
</div>
<?php echo $this->render('copyrightfooter.phtml'); ?>
</section>
<!--Page main section end -->
<?php echo $this->render("newfooter.phtml"); ?>
<!--Page main section end -->
<link rel="stylesheet" href="<?php echo $this->baseUrl('public/assets/css/jquery-ui.css'); ?>">
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<script type="text/javascript">
setTimeout(function () {
$('.successMessage').delay(3000).fadeOut('slow');
}, 3000);
function previewenquirysupplier(id) {
$.ajax({
url: '/supplier/previewenquirysupplier/',
data: {id:id},
type: 'POST',
dataType: 'html',
error: function () {
},
beforeSend: function () {
var image = "<div class= 'col-md-12' style='text-align: center; top: 150px;'><img id='imgId' src='<?php echo $this->baseUrl('public/images/load3.gif'); ?>'></div>";
$("#previewenquirysupplier").html(image);
},
success: function (response) {
$("#previewenquirysupplier").show();
$("#previewenquirysupplier").html(response);
//alert(response);
}
});
}
function discard(id) {
var conf = confirm('Are you sure, you want to discard query?');
if(conf === true){
$.ajax({
url: '/supplier/discardquery/',
data: {id:id},
type: 'POST',
dataType: 'json',
error: function () {
alert('Oops something wrong request!');
},
success: function (response) {
if(response.success){
$('#row_'+id).css('display', 'none');
alert(response.message);
}else{
alert(response.message);
}
}
});
}
}
function get_supplier_autosuggest() {
$("input[name=SupplierAgency]").autocomplete({
source: '/supplier/suggest-suppliersupplierpackenq',
minLength: 2,
focus: function (event, ui) {
event.preventDefault();
//alert(ui.item.value);
$("#tags").val(ui.item.label);
},
select: function (event, ui) {
event.preventDefault();
$("input[name=SupplierAgency]").val(ui.item.label);
$("#hidden_Supplier_id").val(ui.item.value);
//set city blank
//$("input[name=city]").val('');
//$("#hidden_selected_city_id").val('');
}
});
}
function get_city_autosuggest() {
$("input[name=Destination]").autocomplete({
source: '/supplier/suggestcitysupplierpackenq',
minLength: 2,
focus: function (event, ui) {
event.preventDefault();
//alert(ui.item.value);
$("#tags").val(ui.item.label);
},
select: function (event, ui) {
event.preventDefault();
$("input[name=Destination]").val(ui.item.label);
$("#hidden_city_id").val(ui.item.value);
//set city blank
//$("input[name=city]").val('');
//$("#hidden_selected_city_id").val('');
}
});
}
function get_location_autosuggest() {
$("input[name=location]").autocomplete({
source: '/supplier/autosuggestlocation',
minLength: 2,
focus: function (event, ui) {
event.preventDefault();
//alert(ui.item.value);
$("#tags").val(ui.item.label);
},
select: function (event, ui) {
event.preventDefault();
$("input[name=location]").val(ui.item.label);
$("#hidden_location_id").val(ui.item.value);
//set city blank
//$("input[name=city]").val('');
//$("#hidden_selected_city_id").val('');
}
});
}
</script>
<script type="text/javascript">
function GetSupplierInfo(suppliersysID) {
$.ajax({
url: '/package/supplierinfo/',
data: {suppliersysID: suppliersysID},
type: 'POST',
dataType: 'html',
error: function () {
},
beforeSend: function () {
var image = "<div class= 'col-md-12' style='text-align: center; top: 150px;'><img id='imgId' src='<?php echo $this->baseUrl('public/images/load3.gif'); ?>'></div>";
$("#myModactpopup").html(image);
},
success: function (response) {
$("#myModactpopup").show();
$("#myModactpopup").html(response);
//alert(response);
}
});
}
function closepopup() {
$("#myModactpopup").hide();
}
</script>