<?php
$session = new \Zend\Session\Container('userlogin');
$user_id = $session->userData['user_id'];
$dataArray  =   current($vehicleList);
$vehicleList[0] = $dataArray[0];
 if($vehicleList[0]['master_package_mode_id']==1){
     $distancefare = '';
     $hourlyfare = 'display-none';
 }
 if($vehicleList[0]['master_package_mode_id']==2){
     $hourlyfare = '';
     $distancefare='display-none';
 }
 if($vehicleList[0]['master_package_mode_id']==3){
       $hourlyfare = '';
       $distancefare = '';
 }
 if($vehicleList[0]['master_package_mode_id']==4){
     $distancefare = '';
     $hourlyfare = 'display-none';
 }
?>

<div class="col-md-2 banner-bottom-grid widthpercent20 pull-right">
    <div class="top-destinations-grids margin0">
        <div class="top-destinations-bottom padding_margin0">
            <div class="td-grids">
                <div class="left-div-form border_bottom">
                    <h4>Payment Detail</h4>
                </div>
                <form id="payment-detail-form">
                    <div class="infopay">
                        <div class="left-div-form">
                            <div class="title">Base Fare</div>
                            <div class="price">
                                <span class=""> </span><span class="base-fare"><?php echo isset($vehicleList[0]['base_fare'])?$vehicleList[0]['base_fare']:0; ?></span>
                                <input type="hidden" name="base_fare" id="base-fare" value="<?php echo isset($vehicleList[0]['base_fare'])?$vehicleList[0]['base_fare']:0; ?>">
                                <input type="hidden" name="master_package_mode_id" id="master_package_mode_id" value="<?php echo $vehicleList[0]['master_package_mode_id']; ?>">
                            </div>
                        </div>
                        <div class="left-div-form distance-fare <?php echo $distancefare;?>" >
                            <div class="title">Distance</div>
                            <div class="price"><span class="min-distance"><?php echo $vehicleList[0]['min_distance']; ?></span> Km</div>
                            <input type="hidden" name="min_distance" id="min-distance" value="<?php echo $vehicleList[0]['min_distance']; ?>">
                        </div>

                        <div class="left-div-form hourly-fare <?php echo $hourlyfare;?>">
                            <div class="title">Hour</div>
                             <div class="price"><span class="min-hour"><?php echo $vehicleList[0]['min_pkg_hrs']; ?></span> Hrs</div>
                             <input type="hidden" name="min_pkg_hr" id="min-hour" value="<?php echo $vehicleList[0]['min_pkg_hrs']; ?>">
                        </div>

                         <div class="left-div-form hourly-fare <?php echo $hourlyfare;?>">
                            <div class="title">Per Hour Price</div>
                            <div class="price"><span class="WebRupee"> </span><span class="per-hour-charge"><?php echo $vehicleList[0]['per_hr_charge']; ?></span></div>
                            <input type="hidden" name="per_hr_charge" id="per-hour-charge" value="<?php echo isset($vehicleList[0]['per_hr_charge'])?$vehicleList[0]['per_hr_charge']:''; ?>">
                        </div>

                        <div class="left-div-form distance-fare <?php echo $distancefare;?>" >
                            <div class="title">Per Km Price</div>
                            <div class="price"><span class="WebRupee"> </span><span class="per-km-price"><?php echo $vehicleList[0]['per_km_price']; ?></span></div>
                            <input type="hidden" name="per_km_price" id="per-km-price" value="<?php echo $vehicleList[0]['per_km_price']; ?>">
                        </div>
                        <div class="clear"></div>
                        <div class="left-div-form">
                            <div class="title red_text" title="Only for booking amount">Running Amount</div>
                            <div class="price red_text" title="Only for booking amount"><span class="WebRupee"></span> <span class="running-amt"> <?php echo isset($vehicleList[0]['running_amt'])?$vehicleList[0]['running_amt']:0; ?></span> </div>
                            <input type="hidden" name="running_amt" id="running-amt" value="<?php echo isset($vehicleList[0]['running_amt'])?$vehicleList[0]['running_amt']:0; ?>">
                        </div>
                        <div class="left-div-form">
                            <div class="title">Peak Time Price</div>
                            <div class="price"><span class="WebRupee"> </span><span class="peak-time-price"><?php echo isset($vehicleList[0]['peak_time_price'])?$vehicleList[0]['peak_time_price']:0; ?></span></div>
                            <input type="hidden" name="peak_time_price" id="peak-time-price" value="<?php echo isset($vehicleList[0]['peak_time_price'])?$vehicleList[0]['peak_time_price']:0; ?>">
                        </div>

                        <div class="left-div-form">
                            <div class="title">Night Charges</div>
                            <div class="price"><span class="WebRupee"> </span><span class="night-charge"><?php echo isset($vehicleList[0]['night_charge'])?$vehicleList[0]['night_charge']:0;?></span></div>
                            <input type="hidden" name="night_charge" id="night-charge" value="<?php echo isset($vehicleList[0]['night_charge'])?$vehicleList[0]['night_charge']:0; ?>">
                        </div>

                        <div class="left-div-form">
                            <div class="title">Extras</div>
                            <div class="price"><span class="WebRupee"> </span><span class="extra-charge"><?php echo isset($vehicleList[0]['extra_charge'])?$vehicleList[0]['extra_charge']:'0'; ?></span></div>
                            <input type="hidden" name="extra_charge" id="extra-charge" value="<?php echo isset($vehicleList[0]['extra_charge'])?$vehicleList[0]['extra_charge']:0; ?>">
                        </div>

                        <div class="left-div-form">
                            <div class="title">Tax (<span id="st_text" class="tax-percentage"><?php echo isset($vehicleList[0]['tax_percentage'])?$vehicleList[0]['tax_percentage']:0; ?></span>%)</div>
                            <div class="price"> <span class="tax-price"><?php echo isset($vehicleList[0]['tax_price'])?$vehicleList[0]['tax_price']:0; ?></span> </div>
                            <input type="hidden" name="tax_percentage" id="tax-percentage" value="<?php echo isset($vehicleList[0]['tax_percentage'])?$vehicleList[0]['tax_percentage']:0; ?>">
                            <input type="hidden" name="tax_price" id="tax-price" value="<?php echo isset($vehicleList[0]['tax_price'])?$vehicleList[0]['tax_price']:0; ?>">
                        </div>

                        <?php if(isset($vehicleList[0]['markup_base']) && $vehicleList[0]['markup_base']==1) { ?>
                        <div class="left-div-form">
                            <div class="title">Other Charge (<span id="st_text" class="markup-value"><?php echo $vehicleList[0]['markup_value']; ?></span> <span class="markup-type"><?php echo $vehicleList[0]['markup_type']; ?></span>)</div>
                            <div class="price"> <span class="markup-price"><?php echo $vehicleList[0]['markup_price']; ?></span> </div>
                            <input type="hidden" name="markup_type" id="markup-type" value="<?php echo $vehicleList[0]['markup_type']; ?>">
                            <input type="hidden" name="markup_value" id="markup-value" value="<?php echo $vehicleList[0]['markup_value']; ?>">
                            <input type="hidden" name="markup_price" id="markup-price" value="<?php echo $vehicleList[0]['markup_price']; ?>">
                            <input type="hidden" name="markup_base" id="markup-base" value="<?php echo $vehicleList[0]['markup_base']; ?>">
                        </div>
                        <?php }?>

                        <div class="clear"></div>
                        <div class="left-div-form">
                            <div class="title">Payable Amount</div>
                            <div class="price"> <i class="fa fa-inr"></i> <span class="total-price"><?php echo isset($vehicleList[0]['total_price'])?$vehicleList[0]['total_price']:0; ?></span><span id="usdvalue"></span> </div>
                            <input type="hidden" name="total_price" id="total-price" value="<?php echo isset($vehicleList[0]['total_price'])?$vehicleList[0]['total_price']:0; ?>">
                        </div>
                        <div class="left-div-form">

                            <div class="radio-inline specs padding-left0 widthpercent100">
                                <div class="radioWrap">
                                    <input type="text" name="coupon_code" placeholder="Coupon Code" class="height34px" id="coupon-code" onClick="">
                                    <input type="hidden" name="coupon_code_id" id="coupon-code-id">
                                    <input type="hidden" name="coupon_discount_type" id="coupon-discount-type">
                                    <input type="hidden" name="coupon_discount_value" id="coupon-discount-value">
                                    <div class="coupon-code-msg"></div>
                                </div>
                                <div class="pull-right">
                                    <div id="apply_coupancode" class="pull-right padding0"><a class="apply-coupon"> Apply</a></div>
                                </div>
                                <div id="coupan_disount"></div>
                                <small id="booklater_conditions_local"></small>
                            </div>
                        </div>
                        <div class="left-div-form coupon-discount-div" style="display: none;">
                            <div class="title"><span class="WebRupee"><b>Coupon Applied</b></span></div>
                            <div class="price"><a class="remove-coupon" style="cursor: pointer;"> Remove</a></div>
                            <div class="title"><span class="WebRupee"><b>Coupon Discount</b></span></div>
                            <div class="price"><span class="WebRupee"><span class="WebRupee"> <i class="fa fa-inr"></i> </span></span><span class="total-discount">0</span></div>
                            <input type="hidden" name="total_discount" id="total-discount" value="0">
                        </div>
                        <div class="left-div-form">
                            <div class="title"><span class="WebRupee"><b>Total Charge</b></span></div>
                            <div class="price"><span class="WebRupee"><span class="WebRupee"> <i class="fa fa-inr"></i> </span></span><span class="total-charge"><?php echo isset($vehicleList[0]['total_price'])?$vehicleList[0]['total_price']:0; ?></span></div>
                            <input type="hidden" name="total_charge" id="total-charge" value="<?php echo isset($vehicleList[0]['total_price'])?$vehicleList[0]['total_price']:0; ?>">
                            <input type="hidden" name="currency_type" id="currency-type" value="1">
                        </div>
                        <div class="left-div-form">
                            
                            <?php if(empty($form->getMessages())){ ?>
                            <div id="accordion_login" class="title widthpercent100">
                                <?php if(empty($user_id)){ ?>
                                <div class="overviueimg31"><a class="guestlogin" id="asguest">As a Guest</a></div>
                                <div class="overviueimg32">or</div>
                                <div class="overviueimg31"><a href="<?php echo $this->url('login'); ?>" data-target="#ajax-modal" data-toggle="modal" data-remote="true" data-keyboard="false" data-backdrop="static" class="aslogin">As login</a></div>
                                <div></div>
                                <?php }else  { ?>
                                <input type="hidden" id="continue-submit" action="<?php echo $this->url('airport-transfer', ['action' => 'continue-submit']);?>">
                                <div class="overviueimg31"><a href="#" class="aslogin continue-submit">Continue</a></div>
                                <?php
                                }?>
                            </div>
                             <?php } ?>
                            <div class="title widthpercent100 disable_none" id="accordion_booking">
                                <div class="overviueimg31"><a href="travel_new.html" class="guestlogin" id="asguest" onClick="javascript:togglemodify1('1', 'btnBack');">Book Now</a></div>
                                <div class="overviueimg32">or</div>
                                <div class="overviueimg31"><a href="outstation_Sightseeing.html" class="aslogin">Continue</a></div>
                                <div></div>
                            </div>
                        </div>
                        <div class="left-div-form">
                            <div class="title widthpercent100">
                                <div></div>
                            </div>
                            <div class="title widthpercent100 margin-top-5" align="center">
                                <div>
                                </div>
                            </div>
                        </div>
                    </div>
                </form>
                <div class="clearfix"> </div>
            </div>
        </div>
    </div>
</div>
