| 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/buyhotel/ |
Upload File : |
<?php
echo "sdfjsdjkfksdjfklsjdf";
$sessionhotelDirectSearchData = new Zend_Session_Namespace('sessionHotelDirectSearchData');
$strCountryCode = $sessionhotelDirectSearchData->params['countryCode'];
$strActionName = Zend_Controller_Front::getInstance()->getRequest()->getActionName();
$arrHotelRoomsDetails = $_SESSION['blkRoom']['BlockRoomResult']['HotelRoomsDetails'];
//echo "<pre>";print_r($arrHotelRoomsDetails);exit;
if(!empty($arrHotelRoomsDetails)){
$intRoomPrice = 0;
$intTax = 0;
foreach ($arrHotelRoomsDetails as $roomsDetailsVal){
/*
[CurrencyCode] => INR
[RoomPrice] => 7102.67
[Tax] => 0
[ExtraGuestCharge] => 0
[ChildCharge] => 0
[OtherCharges] => 0
[Discount] => 0
[PublishedPrice] => 7102.67
[PublishedPriceRoundedOff] => 7103
[OfferedPrice] => 7102.67
[OfferedPriceRoundedOff] => 7103
[AgentCommission] => 0
[AgentMarkUp] => 0
[ServiceTax] => 0
[TDS] => 0
*
*/
$strCurrencyCode = $roomsDetailsVal['Price']['CurrencyCode'];
//$intRoomPrice = $roomsDetailsVal['Price']['RoomPrice'];
$intRoomPrice = $roomsDetailsVal['Price']['OfferedPrice'];
$intTax += $roomsDetailsVal['Price']['Tax'];
}
}
$intRoomPrice = @$intRoomPrice;
$intTax = @$intTax;
$intRoomCount = $_SESSION['noOfRooms'];
$intNigthsCount = $_SESSION['nights'];
$arrPriceAndMarkUps = Zend_Controller_Action_HelperBroker::getStaticHelper('Hotel')->getApiPriceWithMarkupAndServiceTax($intRoomPrice,"0",$intNigthsCount,$intRoomCount,$strCountryCode);
//echo "<pre>";print_r($arrPriceAndMarkUps);echo "</pre>";
if(!empty($arrPriceAndMarkUps) ){
$intBasePrice = $arrPriceAndMarkUps['intBasePrice'];
$intSTaxOnBasePrice = $arrPriceAndMarkUps['intSTaxOnBasePrice'];
$intPriceWithMarkUpsAndSTax = $arrPriceAndMarkUps['intPriceWithMarkUpsAndSTax'];
$intGTXMarkUp = $arrPriceAndMarkUps['intGTXMarkUp'];
$intSTaxOnGTXMarkUp = $arrPriceAndMarkUps['intSTaxOnGTXMarkUp'];
$intGTXMarkUpWithSTax = $arrPriceAndMarkUps['intGTXMarkUpWithSTax'];
$intAgencyMarkUp = $arrPriceAndMarkUps['intAgencyMarkUp'];
$intSTaxOnAgencyMarkUp = $arrPriceAndMarkUps['intSTaxOnAgencyMarkUp'];
$intAgencyMarkUpWithSTax = $arrPriceAndMarkUps['intAgencyMarkUpWithSTax'];
$intGTXMarkUpType = $arrPriceAndMarkUps['GTXMarkUpType'];
$intAgencyMarkUpType = $arrPriceAndMarkUps['AgencyMarkUpType'];
$intAgencyMarkUpDB = $arrPriceAndMarkUps['AgencyMarkUpDB'];
}else{
$intBasePrice = 0;
$intSTaxOnBasePrice = 0;
$intPriceWithMarkUpsAndSTax = 0;
$intGTXMarkUp = 0;
$intSTaxOnGTXMarkUp = 0;
$intGTXMarkUpWithSTax = 0;
$intAgencyMarkUp = 0;
$intSTaxOnAgencyMarkUp = 0;
$intAgencyMarkUpWithSTax = 0;
$intGTXMarkUpType = 0;
$intAgencyMarkUpType = 0;
}
//echo $intAgencyMarkUpType;
if($intAgencyMarkUpType == 2){
$intAgencyMarkUp = $intAgencyMarkUp*$intRoomCount;
$intAgencyMarkUp = $intAgencyMarkUp - ($intGTXMarkUp*$intAgencyMarkUpDB)/100;
}
//$intAgencyMarkUpWithSTax = round($intAgencyMarkUpWithSTax*$intRoomCount);
$intTotalRoomPriceWithGTXMarkUp = ($intBasePrice*$intRoomCount) + $intGTXMarkUp;
$intRoomFarePerNightPerRoom = ($intTotalRoomPriceWithGTXMarkUp/$intNigthsCount)/$intRoomCount;
$arrServiceTaxOnBasePrice = Zend_Controller_Action_HelperBroker::getStaticHelper('Hotel')->getApiServiceTax($intTotalRoomPriceWithGTXMarkUp,"H",9);
//$intServiceTaxOnBasePrice = !empty($arrServiceTaxOnBasePrice['serviceTaxAmount'])?$arrServiceTaxOnBasePrice['serviceTaxAmount']:0;
$intServiceTaxOnBasePrice = 0;
$arrServiceTaxOnAgencyMarkUp = Zend_Controller_Action_HelperBroker::getStaticHelper('Hotel')->getApiServiceTax($intAgencyMarkUp,"H",9);
$intServiceTaxOnAgencyMarkUp = !empty($arrServiceTaxOnAgencyMarkUp['serviceTaxAmount'])?$arrServiceTaxOnAgencyMarkUp['serviceTaxAmount']:0;
$intCostToCustomer = $intTotalRoomPriceWithGTXMarkUp + $intServiceTaxOnBasePrice + $intAgencyMarkUp + $intServiceTaxOnAgencyMarkUp;
$intCostToAgent = $intCostToCustomer - ($intAgencyMarkUp);
$intChargeFromWallet = $intCostToAgent - $intServiceTaxOnAgencyMarkUp;
if(!empty($intPriceWithMarkUpsAndSTax)){
// $hotelPriceRelatedSession = new Zend_Session_Namespace('hotelPriceRelatedSession');
// $hotelPriceRelatedSession->params['intGrandPayableAmount'] = $intTotalNetPayable;
}else{
// $hotelPriceRelatedSession = new Zend_Session_Namespace('hotelPriceRelatedSession');
// $hotelPriceRelatedSession->params['intGrandPayableAmount'] = $intBasePrice;
}
?>
<div class="col-md-3">
<div class="srchresultRight">
<h1>Sale Summary</h1>
<div class="enquireMaincart">
<div class="cartTypeName"><?php echo $_SESSION['blkRoom']['BlockRoomResult']['HotelRoomsDetails'][0]['RoomTypeName']; ?></div>
<div class="cartptro">
<table class="table no-margin">
<tbody>
<tr>
<td><strong>Room Rate:</strong></td>
<td class="text-right"><span class="fa fa-inr"></span><?php echo number_format($intRoomFarePerNightPerRoom,2); ?></td>
</tr>
<tr>
<td>No. Of Nights</td>
<td class="text-right"> <?php echo $intNigthsCount; ?></td>
</tr>
<tr>
<td>No. Of Rooms</td>
<td class="text-right"> <?php echo $intRoomCount; ?></td>
</tr>
<tr style="background:#fafafa;">
<td><strong>Total Price</strong>
<span class="graytxt small">
(<?php echo $intNigthsCount; ?>N X <?php echo $intRoomCount; ?>R)
</span>
</td>
<td class="text-right"><span class="fa fa-inr"></span><?php echo number_format($intTotalRoomPriceWithGTXMarkUp,2); ?></td>
</tr>
<!-- <tr>
<td>GST On Base (+)</td>
<td class="text-right"><span class="fa fa-inr"></span><?php echo number_format($intServiceTaxOnBasePrice,2); ?></td>
</tr>-->
<tr>
<td>Markups (+)</td>
<td class="text-right"><span class="fa fa-inr"></span><?php echo number_format($intAgencyMarkUp,2); ?></td>
</tr>
<tr>
<td>GST On MarkUp (+)</td>
<td class="text-right"><span class="fa fa-inr"></span><?php echo number_format($intServiceTaxOnAgencyMarkUp,2); ?></td>
</tr>
<tr style="background:#fafafa;">
<td><strong>Cost To Customer</strong></td>
<td class="text-right"><span class="fa fa-inr"></span><?php echo number_format($intCostToCustomer,2); ?></td>
</tr>
<tr>
<td>Fixed Markups (-)</td>
<td class="text-right"><span class="fa fa-inr"></span><?php echo number_format($intAgencyMarkUp,2); ?></td>
</tr>
<tr style="background:#fafafa;">
<td><strong>Cost To Agent</strong></td>
<td class="text-right"><span class="fa fa-inr"></span><?php echo number_format($intCostToAgent,2); ?></td>
</tr>
<tr>
<td>GST On MarkUp (-)</td>
<td class="text-right"><span class="fa fa-inr"></span><?php echo number_format($intServiceTaxOnAgencyMarkUp,2); ?></td>
</tr>
<tr style="background:#fafafa;">
<td><strong>Total Charge From Wallet</strong></td>
<td class="text-right"><span class="fa fa-inr"></span><?php echo number_format($intChargeFromWallet,2); ?></td>
</tr>
</tbody>
</table>
</div>
<div class="clear"> </div>
</div>
</div>
<div class="clear"> </div>
<?php if($strActionName != "hotel-guest-detail" && $strActionName != "booking-confirmation"){ ?>
<div class="col-md-12 panel-body panel-danger srchresultRight " align="center">
<!-- <div class="col-md-12 no-padding">
<img src="assets/images/wallet.png" style="vertical-align:middle; margin-right:3px; margin-top:-6px;">GTX Wallet Balance : <span style="font-weight:bold;">1000 INR</span>
</div>-->
<div> </div>
<div class="col-md-12" style="text-align: left; padding: 0px 0px 0px 0px; top: -22px;">
<strong style="font-size: 12px;">Your Wallet Balance:</strong><?php echo number_format(round($this->walletBalanceAmount,2)); ?>
</div>
<div class="col-md-12 no-padding">
<?php if($this->walletBalanceAmount >= $intChargeFromWallet){ ?>
<a href="javascript:void(0);" class="btn btn-warning pull-left btn-sm" onclick='return payNow("<?php echo number_format($intChargeFromWallet,2); ?>");' id="netbankingReview" href="javascript:void(0);">Pay with Wallet</a>
<?php }else{ ?>
<span style="font-size: 11px; color: red; padding-bottom: 5px;">You do not have sufficient balance to make this booking. Please recharge before proceed</span>
<a href="javascript:void(0);" class="btn btn-primarygray pull-left btn-sm" id="netbankingReview" href="javascript:void(0);">Pay with Wallet</a>
<?php } ?>
<a href="javascript:void(0);" class="btn btn-gray btn-sm pull-right" onClick="return rechargeNow();" style="margin-left:3px;" >Recharge Now</a>
</div>
</div>
<?php } ?>
<div class="clear"> </div>
</div>