| 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/tripstring.com/application/views/scripts/flight/ |
Upload File : |
<?php
$CurrencyRate = $this->CurrencyRate;
$CurrencyTitle = $this->CurrencyTitle;
$Data = $FlightBookingData = $this->Data;
$DataInbound = $this->DataInbound;
$BaggageInb = $DataInbound['Segments'][0];
$arrFlightClass = Zend_Controller_Action_HelperBroker::getStaticHelper('Flight')->getFlightClasses();
$intOtherCharges = $Data['FairRules']['OtherCharges'];
$intOtherChargesInb = isset($DataInbound['FairRules']['OtherCharges']) ? $DataInbound['FairRules']['OtherCharges'] : 0;
$intBaseFare = $Data['FairRules']['BaseFare'];
$intTax = $Data['FairRules']['Tax'];
$intAdditionalTxnFeePub = $Data['FairRules']['AdditionalTxnFeePub'];
$intServiceFee = $Data['FairRules']['ServiceFee'];
$intServiceFeeInb = isset($DataInbound['FairRules']['ServiceFee']) ? $DataInbound['FairRules']['ServiceFee'] : 0;
$intPublishedFare = $Data['FairRules']['PublishedFare'];
$intPublishedFareInb = isset($DataInbound['FairRules']['PublishedFare']) ? $DataInbound['FairRules']['PublishedFare'] : 0;
$intFarePerHeadPublish = $intBaseFare + $intTax + $intOtherCharges;
$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'];
if ($Data['FairRules']['FareBreakdown']) {
foreach ($Data['FairRules']['FareBreakdown'] as $value) {
$PBaseFare = $value['BaseFare'];
$MF = $value['MF'];
$YQ = $value['YQ'];
$AGST = $value['AGST'];
$MFT = $value['MFT'];
$OT = $value['OT'];
$MU = $value['MU'];
$YR = $value['YR'];
$FixedMarkUp = $value['FixedMarkUp'];
$GSTOnMarkUp = $value['GSTOnMarkUp'];
$paxPublishedFare = ($PBaseFare);
$PassengerType = $value['PassengerType'];
$PassengerCount = $value['PassengerCount'];
$AdditionalTxnFeePub += $value['AdditionalTxnFeePub'];
$TotalBaseFare += $paxPublishedFare;
$TotalTaxsandFees += ($MF + $YQ + $AGST + $MFT + $OT + $MU + $YR + $FixedMarkUp + $GSTOnMarkUp);
}
}
}
}
// if ($Data['FairRules']['FareBreakdown']) {
// foreach ($Data['FairRules']['FareBreakdown'] as $value) {
// $PBaseFare = $value['BaseFare'];
// $PTax = $value['Tax'];
// $paxPublishedFare = ($PBaseFare + $PTax);
// $PassengerType = $value['PassengerType'];
// $PassengerCount = $value['PassengerCount'];
// $AdditionalTxnFeePub += $value['AdditionalTxnFeePub'];
// $TotalBaseFare += $paxPublishedFare;
// }
// }
// if ($DataInbound['FairRules']['FareBreakdown']) {
// foreach ($DataInbound['FairRules']['FareBreakdown'] as $value2) {
// $PBaseFare = $value2['BaseFare'];
// $PTax = $value2['Tax'];
// $paxPublishedFare = ($PBaseFare + $PTax);
// $PassengerType = $value2['PassengerType'];
// $PassengerCount = $value2['PassengerCount'];
// $AdditionalTxnFeePubR += $value2['AdditionalTxnFeePub'];
// $TotalBaseFareR += $paxPublishedFare;
// }
// }
$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);
//print_r($TotalBaseFareR+$AdditionalTxnFeePubR);die('sssssssssss');
?>
<div>
<ul>
<li> Base Fare <img id="BaseFarePOPBreackUp" src="<?= $baseUrl ?>public/images/grey_info.svg" style="float:none;" /><span class="price_fair"><?= $CurrencyTitle ?> <?= number_format(($TotalBaseFare * $CurrencyRate), 2) ?></span></li>
<li> Taxes and fees <img id="FeeSurchargeBreakUp" src="<?= $baseUrl ?>public/images/grey_info.svg" style="float:none;" /><span class="price_fair"><?= $CurrencyTitle ?> <?= number_format(($TotalTaxsandFees * $CurrencyRate), 2) ?></span></li>
<?php if ($MealFare > 0) { ?>
<li> Meal Charges <span class="price_fair"><?= $CurrencyTitle ?> <?= number_format(($MealFare * $CurrencyRate), 2) ?></span></li>
<?php } ?>
<?php if ($BaggFare > 0) { ?>
<li> Baggage Charges <span class="price_fair"><?= $CurrencyTitle ?> <?= number_format(($BaggFare * $CurrencyRate), 2) ?></span></li>
<?php } ?>
<?php if ($SeatPrice > 0) { ?>
<li> Seat Charges <span class="price_fair"><?= $CurrencyTitle ?> <?= number_format(($SeatPrice * $CurrencyRate), 2) ?></span></li>
<?php } ?>
<li> <span class="you_pay">You Pay <span class="price_fair_total"><?= $CurrencyTitle ?> <?= number_format((($TotalBaseFare + $TotalTaxsandFees + $MealFare + $BaggFare + $SeatPrice) * $CurrencyRate), 2) ?></span>
<span class="conversation_box"> </span>
</li>
</ul>
</div>
<style>
.ToolTips table tr td {
padding: 3px 6px;
;
}
</style>
<div id="BaseFareBreackUp" class="ToolTips" style="display: none;">
<table style="width: 100%;">
<tr>
<td height="35" class="cancellation_text"><strong>Type</strong></td>
<td height="35" class="cancellation_text"><strong>Fare</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'];
$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>';
$PBaseFare = $value['BaseFare'];
$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
$MU = $value['MU']; //Markup
$YR = $value['YR']; //Carrier Misc Fee
$FixedMarkUp = $value['FixedMarkUp'];
$GSTOnMarkUp = $value['GSTOnMarkUp'];
$paxPublishedFare = ($PBaseFare);
$PassengerType = $value['PassengerType'];
$PassengerCount = $value['PassengerCount'];
$BaseFare = ($value['BaseFare'] / $PassengerCount);
$TaxesFees = ($MF + $YQ + $AGST + $MFT + $OT + $MU + $YR + $FixedMarkUp + $GSTOnMarkUp);
$Total_AGST += $AGST;
$Total_MF += $MF;
$Total_YQ += $YQ;
$Total_MFT += $MFT;
$Total_OT += $OT;
$Total_MU += $MU;
$Total_YR += $YR;
$Total_FixedMarkUp += $FixedMarkUp;
$Total_GSTOnMarkUp += $GSTOnMarkUp;
$AdditionalTxnFeePub += $value['AdditionalTxnFeePub'];
$TotalBaseFare += $paxPublishedFare;
$TotalTaxsandFees += ($MF + $YQ + $AGST + $MFT + $OT + $MU + $YR + $FixedMarkUp + $GSTOnMarkUp);
if ($PassengerType == 1) {
$paxType = 'Adult';
} elseif ($PassengerType == 2) {
$paxType = 'Child';
} elseif ($PassengerType == 3) {
$paxType = 'Infant';
}
?>
<tr>
<td class="cancellation_text2"><?= $paxType ?></td>
<td class="cancellation_text2"><?= $Currency ?> <?= number_format(($BaseFare * $CurrencyRate), 2) ?> x <?= $PassengerCount ?></td>
<td class="cancellation_text2"><?= $Currency ?> <?= number_format((($PBaseFare) * $CurrencyRate), 2) ?></td>
</tr>
<?php
}
}
}
}
?>
<tr>
<td height="35" class="cancellation_text" style="font-size: 13px; font-weight:bold;">Total Amount</td>
<td height="35" class="cancellation_text" style="font-size: 13px; font-weight:bold;"><?= $CurrencyTitle ?> <?= number_format(($TotalBaseFare * $CurrencyRate), 2) ?></td>
<td height="35" class="cancellation_text" style="font-size: 13px; font-weight:bold;"><?= $CurrencyTitle ?> <?= number_format((($TotalBaseFare) * $CurrencyRate), 2) ?></td>
</tr>
</table>
</div>
<div id="FeeSurcharge" class="ToolTips" style="display: none;">
<table style="width: 100%;">
<tr>
<td height="35" class="cancellation_text"><strong>Type</strong></td>
<td height="35" class="cancellation_text"><strong>Fare</strong></td>
</tr>
<tr>
<td class="cancellation_text2">Airline GST</td>
<td class="cancellation_text2"><?= $CurrencyTitle ?> <?= number_format(($Total_AGST * $CurrencyRate), 2) ?></td>
</tr>
<tr>
<td class="cancellation_text">Management Fee</td>
<td class="cancellation_text"><?= $CurrencyTitle ?> <?= number_format(($Total_MF * $CurrencyRate), 2) ?></td>
</tr>
<tr>
<td class="cancellation_text">Fuel Surcharge</td>
<td class="cancellation_text"><?= $CurrencyTitle ?> <?= number_format(($YQ * $CurrencyRate), 2) ?></td>
</tr>
<tr>
<td class="cancellation_text">Other Taxes</td>
<td class="cancellation_text"><?= $CurrencyTitle ?> <?= number_format((($Total_MFT + $Total_OT + $Total_MU + $Total_YR) * $CurrencyRate), 2) ?></td>
</tr>
<tr>
<td class="cancellation_text">Service Fee</td>
<td class="cancellation_text"><?= $CurrencyTitle ?> <?= number_format(($Total_FixedMarkUp * $CurrencyRate), 2) ?></td>
</tr>
<tr>
<td class="cancellation_text">GST</td>
<td class="cancellation_text"><?= $CurrencyTitle ?> <?= number_format(($Total_GSTOnMarkUp * $CurrencyRate), 2) ?></td>
</tr>
<tr>
<td class="cancellation_text" style="font-size: 13px; font-weight:bold;">Total</td>
<td class="cancellation_text" style="font-size: 13px; font-weight:bold;"><?= $CurrencyTitle ?> <?= number_format(($TotalTaxsandFees * $CurrencyRate), 2) ?></td>
</tr>
</table>
</div>
<div id="FareBreakUpMobileDiv" class="ToolTips" style="display: none;">
<table style="width: 100%;">
<tr>
<td height="35" class="cancellation_text"><strong>Type</strong></td>
<td height="35" class="cancellation_text"><strong>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'];
$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>';
}
$PBaseFare = $value['BaseFare'];
$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
$MU = $value['MU']; //Markup
$YR = $value['YR']; //Carrier Misc Fee
$FixedMarkUp = $value['FixedMarkUp'];
$GSTOnMarkUp = $value['GSTOnMarkUp'];
$paxPublishedFare = ($PBaseFare);
$PassengerType = $value['PassengerType'];
$PassengerCount = $value['PassengerCount'];
$TaxesFees = ($MF + $YQ + $AGST + $MFT + $OT + $MU + $YR + $FixedMarkUp + $GSTOnMarkUp);
$Total_AGST += $AGST;
$Total_MF += $MF;
$Total_YQ += $YQ;
$Total_MFT += $MFT;
$Total_OT += $OT;
$Total_MU += $MU;
$Total_YR += $YR;
$Total_FixedMarkUp += $FixedMarkUp;
$Total_GSTOnMarkUp += $GSTOnMarkUp;
$AdditionalTxnFeePub += $value['AdditionalTxnFeePub'];
$TotalBaseFare += $paxPublishedFare;
$TotalTaxsandFees += ($MF + $YQ + $AGST + $MFT + $OT + $MU + $YR + $FixedMarkUp + $GSTOnMarkUp);
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 + $PBaseFare) * $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 } ?>
<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(($TotalBaseFare * $CurrencyRate), 2) ?></td>
<td height="35" class="cancellation_text" style="font-size: 13px; font-weight:bold;"><?= $this->CurrencyTitle ?> <?= number_format((($TotalTaxsandFees) * $CurrencyRate), 2) ?></td>
<td height="35" class="cancellation_text" style="font-size: 13px; font-weight:bold;"><?= $this->CurrencyTitle ?> <?= number_format((($TotalBaseFare + $TotalTaxsandFees) * $CurrencyRate), 2) ?></td>
</tr>
</table>
</div>