| 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/b2c.hellogtx.com/application/views/scripts/flight/ |
Upload File : |
<?php
$param = $this->param;
$CurrencyRate = $this->CurrencyRate;
$CurrencyTitle = $this->CurrencyTitle;
$FlightBookingData = $this->FlightBookingData;
$intNetPublishedFare = 0;
$AdditionalTxnFeePub = 0;
$TotalBaseFare = 0;
$AdditionalTxnFeePubR = 0;
$TotalTaxsandFees = 0;
if ($FlightBookingData) {
foreach ($FlightBookingData as $Data) {
//echo '<pre>';print_r($Data);echo '</pre>';
$intNetPublishedFare += $Data['FairRules']['intPublishedFare'];
$Currency = $Data['FairRules']['Currency'];
// $CurrencyRate = $Data['FairRules']['CurrencyRate'];
$ICSourceSysId = $Data['ICSourceSysId'];
if($ICSourceSysId == 3 || $ICSourceSysId == 7){
$Data['FairRules'] = $Data['NewPrice'];
}
if ($Data['FairRules']['FareBreakdown']) {
foreach ($Data['FairRules']['FareBreakdown'] as $value) {
$PBaseFare = $value['BaseFare'];
$intTotalGST = $value['intTotalGST'];
$CommEarned = $value['CommEarned'];
$paxPublishedFare = ($PBaseFare);
$PassengerType = $value['PassengerType'];
$PassengerCount = $value['PassengerCount'];
$AdditionalTxnFeePub += $value['AdditionalTxnFeePub'];
$TaxesFees = ($intTotalGST + $CommEarned);
$TotalBaseFare += ($paxPublishedFare);
$TotalTaxsandFees += ($TaxesFees);
}
}
}
}
$sessionFlightSearchParams = new Zend_Session_Namespace('sessionFlightSearchParams');
$interNationalSearch = $sessionFlightSearchParams->params['interNationalSearch'];
$route = $sessionFlightSearchParams->params['route'];
$SelectedMealSessionNew = new Zend_Session_Namespace('SelectedMealSessionNew');
$SelectedBaggSessionNew = new Zend_Session_Namespace('SelectedBaggSessionNew');
$SelectedMealSessionNewInb = new Zend_Session_Namespace('SelectedMealSessionNewInb');
$SelectedBaggSessionNewInb = new Zend_Session_Namespace('SelectedBaggSessionNewInb');
$selectedSeatSession = new Zend_Session_Namespace('selectedSeatSession');
$BagPrice = 0;
$InbBagPrice = 0;
$MealPrice = 0;
$InbMealPrice = 0;
$SeatPrice = 0;
if ($SelectedBaggSessionNew->params) {
foreach ($SelectedBaggSessionNew->params as $val) {
$BagPrice += $val['Price'];
}
}
if ($SelectedMealSessionNew->params) {
foreach ($SelectedMealSessionNew->params as $val) {
$MealPrice += $val['Price'];
}
}
if ($SelectedMealSessionNewInb->params) {
foreach ($SelectedMealSessionNewInb->params as $val) {
$InbMealPrice += $val['Price'];
}
}
if ($SelectedBaggSessionNewInb->params) {
foreach ($SelectedBaggSessionNewInb->params as $val) {
$InbBagPrice += $val['Price'];
}
}
if ($selectedSeatSession->params) {
foreach ($selectedSeatSession->params as $values) {
foreach ($values as $val) {
$SeatPrice += $val['amount'];
}
}
}
$MealFare = ($MealPrice + $InbMealPrice);
$BaggFare = ($BagPrice + $InbBagPrice);
$action = isset($param['action']) ? $param['action'] : '';
//echo '<pre>';print_r($selectedSeatSession->params);echo '</pre>';
?>
<style>
.ToolTips table tr td {
padding: 3px 6px;
;
}
</style>
<div class="ToolTips">
<table style="width: 100%;">
<tr>
<td height="35" class="cancellation_text"><strong>Type</strong></td>
<td height="35" class="cancellation_text"><strong>Base Fare</strong></td>
<td height="35" class="cancellation_text"><strong>Taxes & Fee</strong></td>
<td height="35" class="cancellation_text"><strong>Total</strong></td>
</tr>
<?php
$TotalBaseFare = 0;
$TotalTaxsandFees = 0;
$Total_AGST = 0;
$Total_MF = 0;
$Total_YQ = 0;
$Total_MFT = 0;
$Total_OT = 0;
$Total_MU = 0;
$Total_YR = 0;
$Total_FixedMarkUp = 0;
$Total_GSTOnMarkUp = 0;
if ($FlightBookingData) {
foreach ($FlightBookingData as $Data) {
$intNetPublishedFare += $Data['FairRules']['intPublishedFare'];
$Currency = $Data['FairRules']['Currency'];
$ICSourceSysId = $Data['ICSourceSysId'];
if($ICSourceSysId == 3 || $ICSourceSysId == 7){
$Data['FairRules'] = $Data['NewPrice'];
}
//$CurrencyRate = $Data['FairRules']['CurrencyRate'];
// echo"<pre>";print_r($Data);
//$CurrencyRate = $Data['FairRules']['CurrencyRate'];
if ($Data['FairRules']['FareBreakdown']) {
foreach ($Data['FairRules']['FareBreakdown'] as $key => $value) {
if ($key == 0) {
echo '<tr><td colspan="3">' . $Data['SourceAirportCode'] . ' - ' . $Data['DestAirportCode'] . '</td></tr>';
}
//echo '<pre>';print_r($value);echo '</pre>';
$TDS = $value['TDS'];
$MF = $value['MF']; //Management Fee
$YQ = $value['YQ']; //Fuel Surcharge
$AGST = $value['AGST']; //Airline GST Component
$MFT = $value['MFT']; //Management Fee Tax
$OT = $value['OT']; //Other Charges
$YR = $value['YR']; //Carrier Misc Fee
$MU = $value['MU']; //Markup
$other = $MF + $YQ + $AGST + $MFT + $OT + $YR;
$FixedMarkUp = $value['FixedMarkUp'];
$GSTOnMarkUp = $value['GSTOnMarkUp'];
$intTotalGST = $value['intTotalGST'];
$apiMarkup = $value['apiMarkup'];
$IntCommission = $value['IntCommission'];
$CommissionEarned = $value['CommissionEarned'];
$PBaseFare = $value['BaseFare'];
$paxPublishedFare = ($PBaseFare);
$PassengerType = $value['PassengerType'];
$PassengerCount = $value['PassengerCount'];
$TDSEarn = $value['TDSEarn'];
$Tax = $value['Tax'];
//$TaxesFees = ($MF + $YQ + $AGST + $MFT + $OT + $MU + $YR + $FixedMarkUp + $GSTOnMarkUp);
if ($ICSourceSysId == 3 || $ICSourceSysId == 7) {
$TaxesFees = ($Tax + $TDSEarn + $CommissionEarned + $FixedMarkUp + $GSTOnMarkUp);
}else{
$TaxesFees = ($other + $intTotalGST + $FixedMarkUp + $apiMarkup + $IntCommission - $CommissionEarned);
}
$TotalBaseFare += $paxPublishedFare;
$TotalTaxsandFees += ($TaxesFees);
if ($PassengerType == 1) {
$paxType = 'Adult';
} elseif ($PassengerType == 2) {
$paxType = 'Child';
} elseif ($PassengerType == 3) {
$paxType = 'Infant';
}
?>
<tr>
<td class="cancellation_text2"><?= $paxType ?> x <?= $PassengerCount ?></td>
<td class="cancellation_text2"><?= $Currency ?> <?= number_format(($PBaseFare * $CurrencyRate), 2) ?></td>
<td class="cancellation_text2"><?= $Currency ?> <?= number_format(($TaxesFees * $CurrencyRate), 2) ?></td>
<td class="cancellation_text2"><?= $Currency ?> <?= number_format((($PBaseFare + $TaxesFees) * $CurrencyRate), 2) ?></td>
</tr>
<?php
}
}
}
}
?>
<?php if ($MealFare > 0) { ?>
<tr>
<td height="35" class="cancellation_text2" style="font-size: 13px; font-weight:bold;">Meal</td>
<td height="35" class="cancellation_text2" style="font-size: 13px; font-weight:bold;"></td>
<td height="35" class="cancellation_text2" style="font-size: 13px; font-weight:bold;"></td>
<td height="35" class="cancellation_text2" style="font-size: 13px; font-weight:bold;"><?= $this->CurrencyTitle ?> <?= number_format(($MealFare * $CurrencyRate), 2) ?></td>
</tr>
<?php } ?>
<?php if ($BaggFare > 0) { ?>
<tr>
<td height="35" class="cancellation_text2" style="font-size: 13px; font-weight:bold;">Baggage</td>
<td height="35" class="cancellation_text2" style="font-size: 13px; font-weight:bold;"></td>
<td height="35" class="cancellation_text2" style="font-size: 13px; font-weight:bold;"></td>
<td height="35" class="cancellation_text2" style="font-size: 13px; font-weight:bold;"><?= $this->CurrencyTitle ?> <?= number_format(($BaggFare * $CurrencyRate), 2) ?></td>
</tr>
<?php } ?>
<?php if ($SeatPrice > 0) { ?>
<tr>
<td height="35" class="cancellation_text2" style="font-size: 13px; font-weight:bold;">Seat</td>
<td height="35" class="cancellation_text2" style="font-size: 13px; font-weight:bold;"></td>
<td height="35" class="cancellation_text2" style="font-size: 13px; font-weight:bold;"></td>
<td height="35" class="cancellation_text2" style="font-size: 13px; font-weight:bold;"><?= $this->CurrencyTitle ?> <?= number_format(($SeatPrice * $CurrencyRate), 2) ?></td>
</tr>
<?php } ?>
<tr>
<td height="35" class="cancellation_text" style="font-size: 13px; font-weight:bold;">Total</td>
<td height="35" class="cancellation_text" style="font-size: 13px; font-weight:bold;"><?= $this->CurrencyTitle ?><?= number_format(ceil($TotalBaseFare * $CurrencyRate), 2) ?></td>
<td height="35" class="cancellation_text" style="font-size: 13px; font-weight:bold;"><?= $this->CurrencyTitle ?> <?= number_format(ceil(($TotalTaxsandFees) * $CurrencyRate), 2) ?></td>
<td height="35" class="cancellation_text" style="font-size: 13px; font-weight:bold;"><?= $this->CurrencyTitle ?> <?= number_format(ceil(($TotalBaseFare + $TotalTaxsandFees + $MealFare + $BaggFare + $SeatPrice) * $CurrencyRate), 2) ?></td>
</tr>
</table>
</div>