<?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="top-destinations-grids margintop0"><!-- /.modify search left start -->
    <div class="top-destinations-bottom padding_margin0">
        <div class="td-grids">
            <div class="summary">
                <div class="left-div-form border_bottom pointer">
                    <h4><a data-parent="#accordion" id="adoon_but" href="#trip" onClick="javascript:toggletripdetails('1', 'btnBack');">Trip Details</a></h4>
                </div>
            </div>
            <div class="clearfix"> </div>
        </div>
    </div>
</div>

<div class="td-grids">
    <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=""><i class="fa fa-inr"></i> </span><span class="base-fare"><?php if(isset($vehicleList[0]['base_fare'])!=''){echo $vehicleList[0]['base_fare'];}?></span>
                                <input type="hidden" name="base_fare" id="base-fare" value="<?php if(isset($vehicleList[0]['base_fare'])!=''){echo $vehicleList[0]['base_fare'];}?>">
                                  <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"><i class="fa fa-inr"></i> </span><span class="per-hour-charge"><?php echo (isset($vehicleList[0]['per_hr_charge']))?$vehicleList[0]['per_hr_charge']:0; ?></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']:0; ?>">
                        </div>

                        <div class="left-div-form distance-fare <?php echo $distancefare;?>" >
                            <div class="title">Per Km Price</div>
                            <div class="price"><span class="WebRupee"><i class="fa fa-inr"></i> </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"><i class="fa fa-inr"></i></span><span class="running-amt"><?php if(isset($vehicleList[0]['running_amt'])!=''){echo $vehicleList[0]['running_amt'];}?> </span> </div>
                            <input type="hidden" name="running_amt" id="running-amt" value="<?php if(isset($vehicleList[0]['running_amt'])!=''){echo $vehicleList[0]['running_amt'];}?>">
                        </div>
                        <div class="left-div-form">
                            <div class="title">Peak Time Price</div>
                            <div class="price"><span class="WebRupee"><i class="fa fa-inr"></i> </span><span class="peak-time-price"><?php if(isset($vehicleList[0]['peak_time_price'])!=''){echo $vehicleList[0]['peak_time_price'];}?></span></div>
                            <input type="hidden" name="peak_time_price" id="peak-time-price" value="<?php if(isset($vehicleList[0]['peak_time_price'])!=''){echo $vehicleList[0]['peak_time_price'];}?>">
                        </div>

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

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

                        <div class="left-div-form">
                            <div class="title">Tax (<span id="st_text" class="tax-percentage"><?php if(isset($vehicleList[0]['tax_percentage'])!=''){echo $vehicleList[0]['tax_percentage'];}?></span>%)</div>
                            <div class="price"><i class="fa fa-inr"></i> <span class="tax-price"><?php if(isset($vehicleList[0]['tax_price'])!=''){echo $vehicleList[0]['tax_price'];}?></span> </div>
                            <input type="hidden" name="tax_percentage" id="tax-percentage" value="<?php if(isset($vehicleList[0]['tax_percentage'])!=''){echo $vehicleList[0]['tax_percentage'];}?>">
                            <input type="hidden" name="tax_price" id="tax-price" value="<?php if(isset($vehicleList[0]['tax_price'])!=''){echo $vehicleList[0]['tax_price'];}?>">
                        </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"><i class="fa fa-inr"></i> <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 if(isset($vehicleList[0]['total_price'])!=''){echo $vehicleList[0]['total_price'];}?></span><span id="usdvalue"></span> </div>
                            <input type="hidden" name="total_price" id="total-price" value="<?php if(isset($vehicleList[0]['total_price'])!=''){echo $vehicleList[0]['total_price'];}?>">
                        </div>
                        <div class="left-div-form coupon-code-div">
                            <div class="radio-inline specs padding-left0 widthpercent100">
                                <div class="radioWrap">
                                    <input type="text" name="coupon_code" placeholder="Coupan Code" class="height34px" id="coupon-code">
                                    <input type="hidden" name="coupon_code_id" id="coupon-code-id">
                                    <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 if(isset($vehicleList[0]['total_price'])!=''){echo $vehicleList[0]['total_price'];}?></span></div>
                            <input type="hidden" name="total_charge" id="total-charge" value="<?php if(isset($vehicleList[0]['total_price'])!=''){echo $vehicleList[0]['total_price'];}?>">
                            <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('outstation', ['action' => 'continue-submit']);?>">
                                <div class="overviueimg31"><a href="#" class="aslogin continue-submit">Continue</a></div>
                                <?php
                                }?>
                            </div>
                             <?php } ?>

                        </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>
