| 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/booking-flight/ |
Upload File : |
<?php
$arrStatusType = Zend_Controller_Action_HelperBroker::getStaticHelper('Flight')->getAllStatusType();
$type = $this->type;
$arrCustomerInvoiceData = $this->arrCustomerInvoiceData;
$arrtravellerList = $this->arrtravellerList;
$FlightFareBreakdown = $this->FlightFareBreakdown;
$withprice = $this->withprice;
$getSupportContact = $this->getSupportContact;
$B2BType = $arrCustomerInvoiceData[0]['B2BType'];
$IsB2BProposal = $arrCustomerInvoiceData[0]['IsB2BProposal'];
$IsNewMigration = $arrCustomerInvoiceData[0]['IsNewMigration'];
$AgencySysId = $arrCustomerInvoiceData[0]['AgencySysId'];
$CompanyName = $arrCustomerInvoiceData[0]['CompanyName'];
$strCompanyAddress = $arrCustomerInvoiceData[0]['CompanyAddress'];
$Pincode = $arrCustomerInvoiceData[0]['Pincode'];
$strCityTitle = $arrCustomerInvoiceData[0]['CityTitle'];
$strCountry = $arrCustomerInvoiceData[0]['Country'];
$PrimaryMobileNo = $arrCustomerInvoiceData[0]['PrimaryMobileNo'];
$PrimaryContactNo = $arrCustomerInvoiceData[0]['PrimaryContactNo'];
$PrimaryEmail = $arrCustomerInvoiceData[0]['PrimaryEmail'];
$companyLogo = $arrCustomerInvoiceData[0]['Logo'];
$TotalTcs = $arrCustomerInvoiceData[0]['TotalTcs'];
if ($IsB2BProposal == 1) {
$strCityTitle = $arrCustomerInvoiceData[0]['agentCityTitle'];
$strCountry = $arrCustomerInvoiceData[0]['agentCountry'];
$strCompanyAddress = $arrCustomerInvoiceData[0]['agentAdddress'];
$Pincode = $arrCustomerInvoiceData[0]['agentPinCode'];
$PrimaryEmail = $arrCustomerInvoiceData[0]['AgentEmailId'];
$CompanyName = $arrCustomerInvoiceData[0]['AgentAgencyName'];
$PrimaryContactNo = trim($getSupportContact['countrycode']) . '-' . trim($arrCustomerInvoiceData[0]['agentmobile']);
}
if ($B2BType == 2) {
$strCityTitle = $arrCustomerInvoiceData[0]['CityTitle'];
$strCountry = $arrCustomerInvoiceData[0]['Country'];
$strCompanyAddress = $arrCustomerInvoiceData[0]['CompanyAddress'];
$Pincode = $arrCustomerInvoiceData[0]['Pincode'];
$PrimaryEmail = $arrCustomerInvoiceData[0]['PrimaryEmail'];
$CompanyName = $arrCustomerInvoiceData[0]['DisplayName'];
$PrimaryContactNo = trim($getSupportContact['countrycode']) . '-' . trim($arrCustomerInvoiceData[0]['PrimaryContactNo']);
}
$GTXMarkup = $arrCustomerInvoiceData[0]['GTXMarkup'];
$Cost = ($arrCustomerInvoiceData[0]['Cost'] + $GTXMarkup);
$AgencyMarkUp = ($arrCustomerInvoiceData[0]['AgencyMarkUp'] + $arrCustomerInvoiceData[0]['AgencyCommission'] + $arrCustomerInvoiceData[0]['MarkUp']);
$AgentServiceTaxAmount = $arrCustomerInvoiceData[0]['AgentServiceTaxAmount'] + $arrCustomerInvoiceData[0]['AgentsCustomServiceTaxAmount'];
$TotalCost = $arrCustomerInvoiceData[0]['TotalCost'];
$CurrencySymbol = $arrCustomerInvoiceData[0]['CurrencySymbol'];
//customer Details
$arrTrevllerDetails = $this->arrTrevllerDetails;
//customer Details
$TBQAirInvenSysId = $arrCustomerInvoiceData[0]['TBQAirInvenSysId'];
$IsInternational = $arrCustomerInvoiceData[0]['IsInternational'];
$strFlightNumber = $arrCustomerInvoiceData[0]['FlightNumber'];
$strSourceAirportCode = $arrCustomerInvoiceData[0]['SourceAirportCode'];
$strDestAirportCode = $arrCustomerInvoiceData[0]['DestAirportCode'];
$strXRefBookingId = $arrCustomerInvoiceData[0]['XRefBookingId'];
$strAirLineTitle = $arrCustomerInvoiceData[0]['AirLineTitle'];
$strAirLineCode = $arrCustomerInvoiceData[0]['AirLineCode'];
$arrBookingId = explode("/", $strXRefBookingId);
$strXRefBookingId = trim($arrBookingId[0]);
$strBookingPNR = trim($arrBookingId[1]);
$strStatusType = $arrCustomerInvoiceData[0]['StatusType'];
$bookingStatus = $arrStatusType[$strStatusType];
$arrBookingDate = (array) $arrCustomerInvoiceData[0]['bookingDate'];
$strBookingDate = Zend_Controller_Action_HelperBroker::getStaticHelper('Flight')->getDateFormatFromDbDates($arrBookingDate['date']);
$arrFromUTCTime = (array) $arrCustomerInvoiceData[0]['FromUTCTime'];
$arrToUTCTime = (array) $arrCustomerInvoiceData[0]['ToUTCTime'];
$XRefBookingId = $arrCustomerInvoiceData[0]['XRefBookingId'];
$sourceDepartueTime = Zend_Controller_Action_HelperBroker::getStaticHelper('Flight')->getDateFormatFromDbDates($arrFromUTCTime['date']);
$destinationArrivalTime = Zend_Controller_Action_HelperBroker::getStaticHelper('Flight')->getDateFormatFromDbDates($arrToUTCTime['date']);
//$arrAPIBookingRes = Zend_Controller_Action_HelperBroker::getStaticHelper('Flight')->json_clean_decode($arrCustomerInvoiceData[0]['APIBookingRes']);
$arrAPIBookingRes = json_decode($arrCustomerInvoiceData[0]['APIBookingRes'], true);
if (is_array($arrAPIBookingRes)) {
$arrAPIBookingRes = $arrAPIBookingRes;
} else {
$arrAPIBookingRes = json_decode($arrAPIBookingRes, true);
}
$arrPassenger = isset($arrAPIBookingRes['response']['Response']['Response']['FlightItinerary']['Passenger']) ? $arrAPIBookingRes['response']['Response']['Response']['FlightItinerary']['Passenger'] : '';
$Segments = isset($arrAPIBookingRes['response']['Response']['Response']['FlightItinerary']['Segments']) ? $arrAPIBookingRes['response']['Response']['Response']['FlightItinerary']['Segments'] : '';
$CancellationCharges = isset($arrAPIBookingRes['response']['Response']['Response']['FlightItinerary']['CancellationCharges']) ? $arrAPIBookingRes['response']['Response']['Response']['FlightItinerary']['CancellationCharges'] : '';
$FareRuleDetails = isset($arrAPIBookingRes['response']['Response']['Response']['FlightItinerary']['FareRules']) ? $arrAPIBookingRes['response']['Response']['Response']['FlightItinerary']['FareRules'] : '';
$strTicketPNR = isset($arrAPIBookingRes['response']['Response']['Response']['PNR']) ? $arrAPIBookingRes['response']['Response']['Response']['PNR'] : '';
// echo "<pre>";
// print_r($strTicketPNR);
// echo "</pre>";
// die;
$this->CurrencyRate = isset($arrAPIBookingRes['value']['FairRules']['CurrencyRate']) ? $arrAPIBookingRes['value']['FairRules']['CurrencyRate'] : 0;
$CancelCharge = isset($arrAPIBookingRes['value']['FairRules']['CancelCharge']) ? $arrAPIBookingRes['value']['FairRules']['CancelCharge'] : 0;
$showintax = isset($arrAPIBookingRes['value']['FairRules']['showintax']) ? $arrAPIBookingRes['value']['FairRules']['showintax'] : 0;
$OtherCharges = ($ExtraMarkup + $ExtraMarkupOnGST);
$TotalExtraCharge = ($ExtraMarkup + $ExtraMarkupOnGST);
if ($showintax == 1) {
$OtherCharges = $OtherCharges;
$ExtraMarkup = 0;
$ExtraMarkupOnGST = 0;
$TotalExtraProfit = $TotalExtraCharge;
$Cost = $Cost + $TotalExtraCharge;
} else {
$ExtraMarkup = $ExtraMarkup;
$ExtraMarkupOnGST = $ExtraMarkupOnGST;
$OtherCharges = 0;
$TotalExtraProfit = $ExtraMarkup;
$Cost = $Cost;
}
$AgencyMarkUp = $AgencyMarkUp + $ExtraMarkup;
$AgentServiceTaxAmount = $AgentServiceTaxAmount + $ExtraMarkupOnGST;
$API_Response = $arrAPIBookingRes['value'];
if ($arrAPIBookingRes1) {
$API_ResponseInb = $arrAPIBookingRes1['value'];
}
if ($IsInternational == 1 && $TripType == 2) {
if (isset($arrAPIBookingRes['value']['InternationalData']['Fare']['FareBreakdown'])) {
$FareBreakdown = $arrAPIBookingRes['value']['InternationalData']['Fare']['FareBreakdown'];
} else {
$FareBreakdown = $arrAPIBookingRes['value']['InternationalData']['FairRules']['FareBreakdown'];
}
} else {
$FareBreakdown = $API_Response['FairRules']['FareBreakdown'];
}
$TotalFare = 0;
$TotalServiceFee = 0;
$TotalGST = 0;
$TotalAmount = 0;
$sl = 0;
$TotalMealFare = 0;
$TotalBaggFare = 0;
$TotalSeatFare = 0;
$TotalDiscount = 0;
$ICSourceSysId = isset($arrAPIBookingRes['value']['ICSourceSysId']) ? $arrAPIBookingRes['value']['ICSourceSysId'] : 0;
if ($FareBreakdown && $IsNewMigration == 0) {
foreach ($FareBreakdown as $k => $value) {
$PassengerCount = $value['PassengerCount'];
$valueInb = isset($API_ResponseInb['FairRules']['FareBreakdown'][$k]) ? $API_ResponseInb['FairRules']['FareBreakdown'][$k] : [];
// echo "<pre>";
// print_r($value);
// echo "</pre>";
$TaxIN = (($value['TaxIN'] + $valueInb['TaxIN']));
$YR = (($value['YR'] + $valueInb['YR']));
$MF = (($value['MF'] + $valueInb['MF']));
$MFT = (($value['MFT'] + $valueInb['MFT']));
$MU = (($value['MU'] + $valueInb['MU']));
$OT = (($value['OT'] + $valueInb['OT']));
$TDS = (($value['TDS'] + $valueInb['TDS']));
$BaseFareCal = (($value['BaseFare'] + $valueInb['BaseFare']));
$YQ = 0; //(($value['YQ'] + $valueInb['YQ']));
$AGST = (($value['AGST'] + $valueInb['AGST']));
$FixedMarkUp = (($value['FixedMarkUp'] + $valueInb['FixedMarkUp']));
$GSTOnMarkUp = (($value['GSTOnMarkUp'] + $valueInb['GSTOnMarkUp']));
$intTotalGST = (($value['intTotalGST'] + $valueInb['intTotalGST']));
$apiMarkup = (($value['apiMarkup'] + $valueInb['apiMarkup']));
$apiTaxOnMarkup = (($value['apiTaxOnMarkup'] + $valueInb['apiTaxOnMarkup']));
$CommEarned = (($value['CommEarned'] + $valueInb['CommEarned']));
$CommissionEarned = (($value['CommissionEarned'] + $valueInb['CommissionEarned']));
$intGTXMarkUp = (($value['intGTXMarkUp'] + $valueInb['intGTXMarkUp']));
$GTXMarkUpGST = (($value['GTXMarkUpGST'] + $valueInb['GTXMarkUpGST']));
$Agencycommission = (($value['Agencycommission'] + $valueInb['Agencycommission']));
$totalCommissions = (($value['totalCommissions'] + $valueInb['totalCommissions']));
$TotalCommiEarning = (($value['TotalCommiEarning'] + $valueInb['TotalCommiEarning']));
$OtherCharges__ = (($value['OtherCharges'] + $valueInb['OtherCharges']));
$ExtraMarkup = isset($value['ExtraMarkup']) ? $value['ExtraMarkup'] + $valueInb['ExtraMarkup'] : 0;
$ExtraMarkupOnGST = isset($value['ExtraMarkupOnGST']) ? $value['ExtraMarkupOnGST'] + $valueInb['ExtraMarkupOnGST'] : 0;
$showintax = isset($value['showintax']) ? $value['showintax'] : 0;
$ServiceFee = ($intGTXMarkUp + $GTXMarkUpGST);
$OTTax = ($MF + $MFT + $OT + $YR + $TotalCommiEarning + $OtherCharges__ + $TDS + $CommEarned - $CommissionEarned);
//$OTTax = ($apiTaxOnMarkup); OtherCharges
$BaseFareCal = ($BaseFareCal);
$OtherCharges = ($ExtraMarkup + $ExtraMarkupOnGST);
$TotalExtraCharge = ($ExtraMarkup + $ExtraMarkupOnGST);
$TotalAmount += (($BaseFareCal + $OTTax + $AGST + $YQ + $GSTOnMarkUp + $FixedMarkUp + $apiMarkup + $apiTaxOnMarkup + $intGTXMarkUp + $GTXMarkUpGST + $TotalExtraCharge));
if ($showintax == 1) {
$OtherCharges = $OtherCharges;
$ExtraMarkup = 0;
$ExtraMarkupOnGST = 0;
$TotalExtraProfit = $TotalExtraCharge;
$BaseFareCal = $BaseFareCal + $TotalExtraCharge;
} else {
$ExtraMarkup = $ExtraMarkup;
$ExtraMarkupOnGST = $ExtraMarkupOnGST;
$OtherCharges = 0;
$TotalExtraProfit = $ExtraMarkup;
$BaseFareCal = $BaseFareCal;
}
$TotalServiceFee += ($FixedMarkUp + $ExtraMarkup + $apiMarkup);
$TotalGST += ($GSTOnMarkUp + $ExtraMarkupOnGST + $apiTaxOnMarkup);
// $TotalGST += ($GSTOnMarkUp + $apiTaxOnMarkup + $ExtraMarkupOnGST);
//echo (($BaseFareCal . '+' . $OTTax . '+' . $AGST . '+' . $YQ . '+' . $intGTXMarkUp . '+' . $GTXMarkUpGST) . '+' . $Agencycommission);
$TotalFare += (($BaseFareCal + $OTTax + $AGST + $YQ + $intGTXMarkUp + $GTXMarkUpGST));
}
} else {
// echo "<pre>";
// print_r($FlightFareBreakdown);
// echo "</pre>";
$Breakdown = count($FlightFareBreakdown);
if ($FlightFareBreakdown) {
foreach ($FlightFareBreakdown as $k => $value) {
$BaseFare = $value['BaseFare'];
$Tax = $value['Tax'];
$YQTax = $value['YQTax'];
$CommissionEarned = 0; //$value['CommissionEarned'];
$Discount = (isset($value['Discount']) ? $value['Discount'] : 0);
$ServiceFee = (isset($value['ServiceFee']) ? $value['ServiceFee'] : 0);
$TdsOnCommission = (($value['TdsOnCommission'] + $value['TdsOnPLB'] + $value['TdsOnIncentive']) / $Breakdown);
if ($ICSourceSysId == 3) {
//$TdsOnCommission = 0;
}
$OtherCharges = $value['OtherCharges'];
$FixedMarkUp = $value['FixedMarkUp'];
$GSTOnMarkUp = $value['GSTOnMarkUp'];
$TotalServiceFee += ($FixedMarkUp);
$TotalGST += ($GSTOnMarkUp);
$TotalFare += (($BaseFare + $Tax + $CommissionEarned + $OtherCharges + $ServiceFee + $TdsOnCommission));
$TotalBaggage += $value['BaggageCharges'];
$TotalMeal += $value['MealCharges'];
$TotalSeatFare += $value['SeatCharges'];
$TotalDiscount += $Discount;
}
}
}
/*$arraymade = array(
$res1,
$res2
);*/
//$ticket = [];
//$ArrPassenger = [];
//if($arraymade){
// foreach ($arraymade as $key => $value) {
// $valuedE = json_decode($value,TRUE);
// $Passenger = $valuedE['Response']['Response']['FlightItinerary']['Passenger'];
// if($Passenger){
// foreach ($Passenger as $k => $val) {
// $ticket[] = $val['Ticket'];
// $ArrPassenger[] = $val;
// //echo "<pre>";print_r($val['Ticket']);echo "</pre>";
// }
// }
//
// }
//}
$UserAgencyLogo = isset($arrCustomerInvoiceData[0]['UserAgencyLogo']) ? $arrCustomerInvoiceData[0]['UserAgencyLogo'] : '';
$couponApply = isset($arrAPIBookingRes['value']['FairRules']['couponApply']) ? $arrAPIBookingRes['value']['FairRules']['couponApply'] : 0;
$couponVal = isset($arrAPIBookingRes['value']['FairRules']['couponVal']) ? $arrAPIBookingRes['value']['FairRules']['couponVal'] : 0;
if ($couponApply) {
$TotalDiscount = $TotalDiscount + $couponVal;
}
// echo "<pre>";
// print_r($FareBreakdown);
// echo "</pre>";
require_once('Barcode417/vendor/autoload.php');
use BigFish\PDF417\PDF417;
use BigFish\PDF417\Renderers\ImageRenderer;
$pdf417 = new PDF417();
?>
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/html">
<head>
<title>E - TICKET</title>
<!-- TODO: Add a favicon -->
<link rel="shortcut icon" href="<?php echo $this->baseUrl('public/assets/images/ico/fab.ico'); ?>">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"> </script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js">
</script>
</head>
<body>
<style>
@media print {
@page {
margin-top: 0;
margin-bottom: 0;
}
body {
padding-top: 72px;
padding-bottom: 72px;
}
}
.alert {
padding: 15px;
margin-bottom: 20px;
border: 1px solid transparent;
border-radius: 2px;
}
.alert-success {
color: #333333;
background-color: #d9edf7;
border-color: #bce8f1;
}
.alert-warning {
color: #333333;
background-color: #ffffff;
border-color: #faebcc;
}
th {
text-align: left;
}
td ul {
padding: 0 0 0 18px;
}
td>table {
width: 100%;
border: 0px solid #d7d7d7;
border-collapse: collapse;
}
input:focus {
border: 1px solid #0069ff !important;
outline: none;
}
td>table>td {
padding: 4px 12px;
}
body {
-webkit-print-color-adjust: exact !important;
color-adjust: exact !important;
}
@media print {
#printTicket {
display: none;
}
}
</style>
<?php if ($type != 'mailToCustomer') { ?>
<table width="800px" align="center">
<tr>
<td align="right">
<a href="#" style="background: #FF4906;font:bold 12px Arial, Helvetica, sans-serif; color:#fff;padding:7px 10px;text-decoration: none;border-radius: 5px;-moz-border-radius: 5px;-o-border-radius: 5px;-webkit-border-radius: 5px;" id="emailTicket" class="SendMail">Send Mail</a>
<a href="#" style="background: #FF4906;font:bold 12px Arial, Helvetica, sans-serif; color:#fff;padding:7px 10px;text-decoration: none;border-radius: 5px;-moz-border-radius: 5px;-o-border-radius: 5px;-webkit-border-radius: 5px;" id="printTicket" withprice="0" class="printMe">Print</a>
<a href="#" style="background: #FF4906;font:bold 12px Arial, Helvetica, sans-serif; color:#fff;padding:7px 10px;text-decoration: none;border-radius: 5px;-moz-border-radius: 5px;-o-border-radius: 5px;-webkit-border-radius: 5px;" id="printTicket" withprice="1" class="printMe">Print Without Price</a>
</td>
</tr>
<tr>
<td height="5"></td>
</tr>
</table>
<?php } ?>
<table width="800px" align="center" border="0" style="border:1px solid #e2e2e2;" cellspacing="0" cellpadding="5">
<tr>
<td style="border-bottom:1px solid #e2e2e2;">
<table width="100%" style="font-family: arial, sans-serif; color: #000; font-size: 9pt;">
<tr>
<td align="left" valign="top" width="25%">
<a href="javascript:void(0);">
<?php if ($B2BType == 2) { ?>
<img class=" print_image-success" style="max-width: 150px; opacity: 0.99;" src="<?php echo $this->baseUrl('public/upload/media/agency/' . $AgencySysId . '/' . $companyLogo); ?>" />
<?php } else { ?>
<?php if ($IsB2BProposal == 1) { ?>
<img class=" print_image-success" style="max-width: 150px; opacity: 0.99;" src="<?php echo $UserAgencyLogo ?>" />
<?php } else { ?>
<img class=" print_image-success" style="max-width: 150px; opacity: 0.99;" src="<?php echo $this->baseUrl('public/upload/media/agency/' . $AgencySysId . '/' . $companyLogo); ?>" />
<?php } ?>
<?php } ?>
<!-- <img style=" height: 70px;" src="<?php echo $this->baseUrl('public/upload/media/agency/' . $AgencySysId . '/' . $companyLogo); ?>" alt="" title="" border="0" /> -->
</a>
</td>
<td align="right" valign="top" width="30%">
<h2>Flight Itinerary</h2>
</td>
<td align="right" valign="top" width="45%">
<table style="font-family: arial, sans-serif; color: #000; font-size: 9pt; line-height: 1em; width: 100%;">
<tr>
<td style="font-size:18px; font-weight:bold; color:#1077c5; padding-bottom:10px;" align="right"><?php echo $CompanyName; ?></td>
</tr>
<tr>
<td align="right" style="line-height: 16px;"><?php echo $strCompanyAddress; ?>
<?php echo $strCityTitle; ?> <?php echo $strCountry; ?><br />
<strong>Pin :</strong> <?php echo $Pincode; ?><br />
<strong>Ph No :</strong> <?php echo $PrimaryContactNo; ?> ,
<?php echo $PrimaryMobileNo; ?><br />
<strong>Email :</strong> <a href="#" style="font-size:12px;color:#ff6600;"><?php echo $PrimaryEmail; ?></a><br />
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#fff">
<tr>
<td bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" style="color: #000; font:bold 15px Arial, Helvetica, sans-serif;padding: 13px 0 5px;">
E - TICKET</td>
</tr>
<!-- <tr>-->
<!-- <td style="color: #000; font:normal 13px Arial, Helvetica, sans-serif;" align="center">PNR : -->
<? //= $XRefBookingId
?>
<!-- <br>Issue Date: -->
<? //= $strBookingDate['strDate']
?>
<!--</td>-->
<!-- </tr>-->
<tr>
<td style="color: #000; font:normal 13px Arial, Helvetica, sans-serif;" align="right"><span style="color: #444;font-size: 12px;display: block;font-weight: 700; line-height:15px;">PNR
: <span style="color: #003399;"><?= $strTicketPNR ?> /
<?= $XRefBookingId ?></span></span>
<!--<br>Issue Date: -->
<?/*= $strBookingDate['strDate'] */ ?>
</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td style="color: #000; font:normal 13px Arial, Helvetica, sans-serif;line-height: 18px;" align="center">
<table width="100%" border="1" cellspacing="0" cellpadding="0" bgcolor="#000">
<tbody>
<tr>
<td width="70%" align="left" valign="top"><span style="font-size: 13px;font-weight: 700; padding:8px 10px; display: block; color: #fff;">Issue
Date: <?= $strBookingDate['strDate'] ?></span></td>
<td width="30%" align="right" valign="top"><span style="font-size: 13px;font-weight: 700; padding:8px 10px; display: block; color: #fff;">Ticket:
<?= $bookingStatus ?></span></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td style="color: #fff; font:bold 12px Arial, Helvetica, sans-serif; padding:5px 0px;background: #000; padding: 8px 12px;">
Passenger Details</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-bottom: solid 1px #d7d7d7; border-right: solid 1px #d7d7d7; border-left: solid 1px #d7d7d7;">
<tr>
<td style="padding:8px 12px;color: #000; font-weight: 600; font:bold 13px Arial, Helvetica, sans-serif; background: #bcbec0; border-bottom: solid 1px #bcbec0; border-top: solid 1px #bcbec0;">
Passengers Name</td>
<td style="padding:8px 12px;color: #000; font-weight: 600; font:bold 13px Arial, Helvetica, sans-serif; background: #bcbec0; border-bottom: solid 1px #bcbec0; border-top: solid 1px #bcbec0;">
Status</td>
<td style="padding:8px 12px;color: #000; font-weight: 600; font:bold 13px Arial, Helvetica, sans-serif; background: #bcbec0; border-bottom: solid 1px #bcbec0; border-top: solid 1px #bcbec0;">
Ticket Number</td>
</tr>
<?php
$TotalBaggage = 0;
$TotalMeal = 0;
$TotalSeatFare = 0;
$SegmentAdditionalInfo = [];
$Meal = [];
if (!empty($arrPassenger)) {
$intPaxCT = 1;
//$ARR_SALUTION = unserialize(ARR_SALUTION);
foreach ($arrPassenger as $ks => $trevllerValue) {
$CustomerTitle = $trevllerValue['Title'];
//$CustomerTitle = $ARR_SALUTION[$CustomerTitle];
$CustomerFirstName = $trevllerValue['FirstName'];
$CustomerLastName = $trevllerValue['LastName'];
$Status = (isset($trevllerValue['Ticket']['Status']) && !empty($trevllerValue['Ticket']['Status']) ? $trevllerValue['Ticket']['Status'] : '');
$TicketNumber = (isset($trevllerValue['Ticket']['TicketNumber']) && !empty($trevllerValue['Ticket']['TicketNumber']) ? $trevllerValue['Ticket']['TicketNumber'] : '');
$TicketId = (isset($trevllerValue['Ticket']['TicketId']) && !empty($trevllerValue['Ticket']['TicketId']) ? $trevllerValue['Ticket']['TicketId'] : '');
$ValidatingAirline = (isset($trevllerValue['Ticket']['ValidatingAirline']) && !empty($trevllerValue['Ticket']['ValidatingAirline']) ? $trevllerValue['Ticket']['ValidatingAirline'] : '');
$SegmentAdditionalInfo[$ks] = (isset($trevllerValue['SegmentAdditionalInfo']) && !empty($trevllerValue['SegmentAdditionalInfo']) ? $trevllerValue['SegmentAdditionalInfo'] : array());
$Mealother = (isset($trevllerValue['SegmentAdditionalInfo'][0]['Meal']) && !empty($trevllerValue['SegmentAdditionalInfo'][0]['Meal']) ? $trevllerValue['SegmentAdditionalInfo'][0]['Meal'] : array());
$BarcodeDetails = (isset($trevllerValue['BarcodeDetails']['Barcode']) && !empty($trevllerValue['BarcodeDetails']['Barcode']) ? $trevllerValue['BarcodeDetails']['Barcode'] : array());
if (!empty($Mealother)) {
$Meal[] = $Mealother;
} else {
$Meal[] = (isset($trevllerValue['Meal']['Description']) && !empty($trevllerValue['Meal']['Description']) ? $trevllerValue['Meal']['Description'] . '(subject to availability)' : array());
}
$TotalBaggage += $trevllerValue['Fare']['TotalBaggageCharges'];
$TotalMeal += $trevllerValue['Fare']['TotalMealCharges'];
$TotalSeatFare += $trevllerValue['Fare']['TotalSeatCharges'];
// echo '<pre>';
// print_r($BarcodeDetails);
// echo '</pre>';
?>
<tr>
<td valign="middle" style="padding:8px 12px; font-weight: 600; font: 12px Arial, Helvetica, sans-serif; border-top:1px solid #d7d7d7;">
<?php echo $intPaxCT; ?>. <?php echo $CustomerTitle; ?>
<?php echo $CustomerFirstName; ?> <?php echo $CustomerLastName; ?>
</td>
<td valign="middle" style="padding:8px 12px ; font-weight: 600; font: 12px Arial, Helvetica, sans-serif; border-top:1px solid #d7d7d7; ">
<?php echo (isset($Status) && $Status != '') ? $Status : '---' ?>
</td>
<td valign="middle" style="padding:8px 12px; font-weight: 600; font: 12px Arial, Helvetica, sans-serif; border-top:1px solid #d7d7d7;">
<?php echo (isset($arrtravellerList[$TicketId]['ChangeRequestStatus']) && $arrtravellerList[$TicketId]['ChangeRequestStatus'] == '1') ? 'Cancelled' : $TicketId . '/' . $ValidatingAirline . $TicketNumber ?>
</td>
</tr>
<?php
if ($BarcodeDetails) {
foreach ($BarcodeDetails as $Barcode) {
if (strlen($Barcode['Content']) == 60) {
$data = $pdf417->encode($Barcode['Content']);
$renderer = new ImageRenderer([
'format' => 'data-url'
]);
$img = $renderer->render($data);
?>
<tr>
<td colspan="3">
<img src="<?= $img->encoded ?>" width="240" height="80" style="margin: 11px;" />
</td>
</tr>
<?php
}
}
}
?>
<?php $intPaxCT++;
}
} ?>
</table>
</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td style="color: #fff; font:bold 12px Arial, Helvetica, sans-serif; padding:5px 0px;background: #000; padding: 8px 12px;">
Flight Details</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-bottom: solid 1px #d7d7d7; border-right: solid 1px #d7d7d7; border-left: solid 1px #d7d7d7;">
<?php
if ($Segments) {
foreach ($Segments as $k => $flight) {
$strAirlineCode = $flight['Airline']['AirlineCode'];
$StopOver = $flight['StopOver'];
$StopPoint = $flight['StopPoint'];
$StopPointArrivalTime = $flight['StopPointArrivalTime'];
$StopPointDepartureTime = $flight['StopPointDepartureTime'];
$filePath = $_SERVER['DOCUMENT_ROOT'] . "/public/upload/AirlineLogo/";
if (file_exists($filePath . $strAirlineCode . ".gif")) {
$strAirlineLogo = $strAirlineCode . ".gif";
$filePath = $this->baseUrl("public/upload/AirlineLogo/") . $strAirlineLogo;
} elseif (file_exists($filePath . $strAirlineCode . ".png")) {
$strAirlineLogo = $strAirlineCode . ".png";
$filePath = $this->baseUrl("public/upload/AirlineLogo/") . $strAirlineLogo;
} elseif (file_exists($filePath . $strAirlineCode . ".jpg")) {
$strAirlineLogo = $strAirlineCode . ".jpg";
$filePath = $this->baseUrl("public/upload/AirlineLogo/") . $strAirlineLogo;
} elseif (file_exists($filePath . $strAirlineCode . ".jpeg")) {
$strAirlineLogo = $strAirlineCode . ".jpeg";
$filePath = $this->baseUrl("public/upload/AirlineLogo/") . $strAirlineLogo;
} else {
$filePath = $this->baseUrl("public/upload/AirlineLogo/noimage.png");
}
$SegmentAdd = isset($SegmentAdditionalInfo[0][$k]) ? $SegmentAdditionalInfo[0][$k] : '';
// echo '<pre>';
// print_r($flight);
// echo '</pre>';
?>
<?php if ($k == 0) { ?>
<tr>
<td colspan="2" style="padding:8px 12px;color: #000; font-weight: 600; font:bold 13px Arial, Helvetica, sans-serif; background: #bcbec0; border-bottom: solid 1px #bcbec0; border-top: solid 1px #bcbec0;">
Flight</td>
<td style="padding:8px 12px;color: #000; font-weight: 600; font:bold 13px Arial, Helvetica, sans-serif; background: #bcbec0; border-bottom: solid 1px #bcbec0; border-top: solid 1px #bcbec0;">
Departure</td>
<?php if ($StopOver) { ?>
<td style="padding:8px 12px;color: #000; font-weight: 600; font:bold 13px Arial, Helvetica, sans-serif; background: #bcbec0; border-bottom: solid 1px #bcbec0; border-top: solid 1px #bcbec0;">
Via</td>
<?php } ?>
<td style="padding:8px 12px;color: #000; font-weight: 600; font:bold 13px Arial, Helvetica, sans-serif; background: #bcbec0; border-bottom: solid 1px #bcbec0; border-top: solid 1px #bcbec0;">
Arrival</td>
<td style="padding:8px 12px;color: #000; font-weight: 600; font:bold 13px Arial, Helvetica, sans-serif; background: #bcbec0; border-bottom: solid 1px #bcbec0; border-top: solid 1px #bcbec0;">
Status</td>
</tr>
<?php } ?>
<tr>
<td width="4%" valign="middle" style=" padding:5px ; font-weight: 600; font: 12px Arial, Helvetica, sans-serif; ">
<img width="20" src="<?php echo $filePath; ?>" title="<?php echo $flight['Airline']['AirlineName']; ?>" />
</td>
<td valign="middle" style=" padding:5px ; font-weight: 600; font: 12px Arial, Helvetica, sans-serif; ">
<?= $flight['Airline']['AirlineName'] ?>
<?= $flight['Airline']['AirlineCode'] ?>
<?= $flight['Airline']['FlightNumber'] ?><br>
<?= $flight['Airline']['FareClass'] ?> Class <br>
Aircraft : <?= $flight['Craft'] ?>
</td>
<td valign="middle" style=" padding:5px ; font-weight: 600; font: 12px Arial, Helvetica, sans-serif; ">
<?= $flight['Origin']['Airport']['AirportCode']; ?>
(<?= $flight['Origin']['Airport']['AirportName']; ?>,
<?= $flight['Origin']['Airport']['CityName']; ?>)<br>
<?php if (!empty($flight['Origin']['Airport']['Terminal'])) {
echo 'Terminal: ' . $flight['Origin']['Airport']['Terminal'] . '<br>';
} ?>
<?= date('H:i D , d-M-Y', strtotime($flight['Origin']['DepTime'])); ?>
</td>
<?php if ($StopOver) { ?>
<td valign="middle" style=" padding:5px ; font-weight: 600; font: 12px Arial, Helvetica, sans-serif; ">
<?= $StopPoint ?><br>
Arr: <?= date('H:i d-M', strtotime($StopPointArrivalTime)); ?><br>
Dep: <?= date('H:i d-M', strtotime($StopPointDepartureTime)); ?>
</td>
<?php } ?>
<td valign="middle" style=" padding:5px ; font-weight: 600; font: 12px Arial, Helvetica, sans-serif; ">
<?= $flight['Destination']['Airport']['AirportCode']; ?>
(<?= $flight['Destination']['Airport']['AirportName']; ?>,
<?= $flight['Destination']['Airport']['CityName']; ?>)<br>
<?php if (!empty($flight['Destination']['Airport']['Terminal'])) {
echo 'Terminal: ' . $flight['Destination']['Airport']['Terminal'] . '<br>';
} ?>
<?= date('H:i D, d-M-Y', strtotime($flight['Destination']['ArrTime'])); ?>
</td>
<td width="23%" valign="middle" style=" padding:5px ; font-weight: 600; font: 12px Arial, Helvetica, sans-serif; ">
<?= $flight['FlightStatus'] ?><br>
<?php if (!empty($flight['AirlinePNR'])) {
echo 'Airline Ref: ' . $flight['AirlinePNR'];
} ?><br>
<?php if (!empty($SegmentAdd['Baggage'])) {
echo 'Baggage(per Adult): ' . $SegmentAdd['Baggage'];
} ?><br>
<?php if (!empty($SegmentAdd['Meal'])) {
echo 'Meal(per Adult): ' . $SegmentAdd['Meal'];
} ?>
<?php if (!empty($SegmentAdd['Seat'])) {
echo 'Seat No.: ' . $SegmentAdd['Seat'];
} ?>
</td>
</tr>
<?php
}
}
?>
</table>
</td>
</tr>
<tr>
<td> </td>
</tr>
<?php if ($withprice == 1) { ?>
<tr class="PaymentDetails">
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-bottom: solid 1px #d7d7d7; border-right: solid 1px #d7d7d7; border-left: solid 1px #d7d7d7;">
<tr>
<td colspan="3" style="color: #fff; font:bold 12px Arial, Helvetica, sans-serif; padding:5px 0px;background: #000; padding: 8px 12px;">
Payment Details</td>
</tr>
<tr>
<td align="left" colspan="3" valign="middle" style="padding:8px 12px; font-weight: 600; font: 12px Arial, Helvetica, sans-serif;">
This is an Electronic ticket. Please carry a physical identification
for Check in.
</td>
</tr>
<tr>
<td valign="middle" style="padding:5px ; font-weight: 600; font: 12px Arial, Helvetica, sans-serif; ">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style=" padding:4px 12px; font-weight: 600; font: 12px Arial, Helvetica, sans-serif;">
Fare :</td>
<td align="right" style="color: #444; padding:4px 12px; font-weight: 500; font-size: 12px;">
<?= $CurrencySymbol ?>
<?= number_format($TotalFare * $this->CurrencyRate, 2) ?>
</td>
</tr>
<tr>
<td style=" padding:4px 12px; font-weight: 600; font: 12px Arial, Helvetica, sans-serif;">
Service Fee :</td>
<td align="right" style="color: #444; padding:4px 12px; font-weight: 500; font-size: 12px;">
<?= $CurrencySymbol ?>
<?= number_format($TotalServiceFee * $this->CurrencyRate, 2) ?>
</td>
</tr>
<tr>
<td style=" padding:4px 12px; font-weight: 600; font: 12px Arial, Helvetica, sans-serif;">
GST :</td>
<td align="right" style="color: #444; padding:4px 12px; font-weight: 500; font-size: 12px">
<?= $CurrencySymbol ?>
<?= number_format($TotalGST * $this->CurrencyRate, 2) ?>
</td>
</tr>
<tr>
<td style=" padding:4px 12px; font-weight: 600; font: 12px Arial, Helvetica, sans-serif;">
Discount :</td>
<td align="right" style="color: #444; padding:4px 12px; font-weight: 500; font-size: 12px">
<?= $CurrencySymbol ?>
<?= number_format($TotalDiscount * $this->CurrencyRate, 2) ?>
</td>
</tr>
<tr>
<td style=" padding:4px 12px; font-weight: 600; font: 12px Arial, Helvetica, sans-serif;">
Meal, Baggage & Seat (Included) :</td>
<td align="right" style="color: #444; padding:4px 12px; font-weight: 500; font-size: 12px">
<?= $CurrencySymbol ?>
<?= number_format(($TotalBaggage + $TotalMeal + $TotalSeatFare) * $this->CurrencyRate, 2) ?>
</td>
</tr>
<?php if ($TotalTcs > 0) { ?>
<tr>
<td style=" padding:4px 12px; font-weight: 600; font: 12px Arial, Helvetica, sans-serif;">
Refund Upgrade :</td>
<td align="right" style="color: #444; padding:4px 12px; font-weight: 500; font-size: 12px">
<?= $CurrencySymbol ?>
<?= number_format(($TotalTcs * $this->CurrencyRate), 2) ?>
</td>
</tr>
<?php } ?>
<tr>
<td style=" padding:4px 12px; font-weight: 600; font:bold 12px Arial, Helvetica, sans-serif;">
Total Amount :</td>
<td align="right" style="color: #444; padding:4px 12px; font-weight: bold; font-size: 12px">
<?= $CurrencySymbol ?>
<?= number_format(ceil($TotalFare + $TotalServiceFee + $TotalBaggage + $TotalMeal + $TotalSeatFare + $TotalGST + $TotalTcs - $TotalDiscount) * $this->CurrencyRate, 2) ?>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<?php } ?>
<tr>
<td> </td>
</tr>
<?php if ($TotalTcs > 0) { ?>
<tr>
<td style=" padding:5px ; font-weight: 600; font: 12px Arial, Helvetica, sans-serif;line-height: 20px; ">
<span style=" font-size: 12px; font-weight: bold;display:table;padding:0 0 0 3px;">
To make changes to your booking or where it is cancelled or changed by the
provider, please contact our Customer Service Team at <a href="mailto:<?php echo trim($PrimaryEmail); ?>"><?php echo trim($PrimaryEmail); ?></a>.
<br>This is a refundable booking. If you are unable to attend your booking
due to unforeseen circumstances and can provide evidence as listed in the <a target="_blank" href="https://www.refundable.me/extended/en/" style="text-decoration:underline;color:red;">Terms & Conditions</a>
here, you may be entitled to a full refund. Your booking reference number is
<?= base64_decode($this->intTPSysId) ?>.<br><a target="_blank" href="https://form.refundable.me/forms/refund?memberId=268&bookingReference=<?= base64_decode($this->intTPSysId) ?>" style="text-decoration:underline;color:red;">Apply for a refund using
the form here</a>.
</span>
</td>
</tr>
<?php } ?>
<?php
if ($FareRuleDetails) {
foreach ($FareRuleDetails as $fareRules) {
?>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-bottom: solid 1px #d7d7d7; border-right: solid 1px #d7d7d7; border-left: solid 1px #d7d7d7;">
<tr>
<td colspan="3" style="color: #fff; padding: 8px 12px; font-weight: 600; font:bold 13px Arial, Helvetica, sans-serif; background: #000; border-bottom: solid 1px #000; border-top: solid 1px #000;border-right: solid 1px #000;">
Fare Rule <?= $fareRules['Origin'] ?> -
<?= $fareRules['Destination'] ?></td>
</tr>
<tr>
<td valign="middle" style=" padding:5px ; font-weight: 600; font: 12px Arial, Helvetica, sans-serif;line-height: 20px; ">
<p style="overflow-y: auto;">Service Fee:- <?= $CancelCharge ?></p>
<p style="height:70px !important; overflow-y: auto;">
<?= trim($fareRules['FareRuleDetail']) ?></p>
</td>
</tr>
</table>
</td>
</tr>
<?php
}
}
?>
<!--<tr>
<td> </td>
</tr>-->
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<input type="hidden" id="intTPSysId" value="<?= $this->intTPSysId ?>" />
<input type="hidden" id="version" value="<?= $this->version ?>" />
<div id="emailBlock" class="width-200 display-none" style="display: none; position: absolute; z-index: 500; left: 20%; top: 5%;">
<div style="float: left; border: 1px solid #D7DFF4; background: #fff; border-radius: 8px; -webkit-border-radius: 8px; -ms-border-radius: 8px; width: 240px; padding-bottom: 1%; box-shadow: 2px 2px 3px #D5DCEF;">
<div style="background: #FFFFFF; border: 3px solid #DEE4F6; border-radius: 10px; cursor: pointer; float: right; font-size: 0; height: 8px; margin: -10px -6px 0 0; padding: 5px; width: 8px;">
<img alt="Close" id="emailClose" src="<?php echo $this->baseUrl('public/images/close.png'); ?>" width="10" />
</div>
<div style="float: left; width: 90%; padding: 5%;">
<span id="emailMsg" style="font-size: 10px; height: 20px; margin-left: 11px;"></span>
<div style="float: left; font-weight: bold; padding-bottom: 15px; width: 100%; margin-left: 10px; font-family: arial;">
<span style="width: 150px; float: left; font-size: 12px; padding-bottom: 10px;">Enter
email address :</span>
<input id="addressBox" name="" type="text" style="width: 180px; padding: 3px;" />
</div>
<div style="float: left; width: 80%; text-align: left; margin-left: 10px;">
<input id="sendEmail" type="button" value="Send mail" style="margin-right: 10px;" />
<input id="emailCancel" type="button" value="Cancel" />
</div>
</div>
</div>
</div>
<script>
$('.printMe').click(function() {
var withprice = $(this).attr('withprice');
if (withprice == 1) {
$('.PaymentDetails').hide();
}
$("#emailmessage").hide();
$("#emailBlock").hide();
$('.SendMail').hide();
$('.printMe').hide();
window.print();
document.body.innerHTML = printContents;
document.body.innerHTML = originalContents;
$('.SendMail').show();
$('.printMe').show();
});
//Show Block of Email
$("#emailTicket").click(function(e) {
e.preventDefault();
$("#emailBlock").show();
$("#addressBox").val("")
$("#addressBox").focus();
$("#emailMsg").html("");
return false;
});
$("#emailCancel").click(function() {
$("#emailBlock").hide();
$("#emailMsg").html("");
});
$("#emailClose").click(function() {
$("#emailBlock").hide();
$("#emailMsg").html("");
});
//Code for sending Email
$("#sendEmail").click(function(e) {
e.preventDefault();
var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
if ($.trim($("#addressBox").val()) == "") {
$("#emailMsg").html("Please enter emailId .");
$("#emailMsg").css('color', 'red');
$("#addressBox").focus();
return;
}
if (!emailReg.test($("#addressBox").val())) {
$("#emailMsg").html("Please enter valid emailId .");
$("#emailMsg").css('color', 'red');
$("#addressBox").focus();
return;
}
$("#emailMsg").html("Please wait, email is sending ...");
$("#emailMsg").css('color', 'blue');
$("#sendEmail").hide();
var intTPSysId = $("#intTPSysId").val();
var version = $("#version").val();
var emailId = $("#addressBox").val();
$.ajax({
type: "POST",
url: "/booking-flight/sendeticket",
data: {
intTPSysId: intTPSysId,
version: version,
emailId: emailId
},
success: function(response) {
var guestArr = JSON.parse(response);
if (guestArr.success) {
alert("Email sent successfully.");
$("#emailBlock").hide();
} else {
$("#emailMsg").css('color', 'red');
$("#emailMsg").html("Email is not sent. Error: ");
$("#emailMsg").css('color', 'red');
}
},
//success: ShowEmailDetails,
error: function(XMLHttpRequest, textStatus, errorThrown) {
$("#emailMsg").html("Email is not sent. Error: ");
$("#emailMsg").css('color', 'red');
//error message
}
});
});
</script>
</body>
</html>