<?php if(isset($this->vehcilePaymentData) && isset($this->paymentData)){
      $vehicle_info  = $this->vehcilePaymentData;
      $booking_info_detail  = $this->paymentData;
     
     // $vehicle_type = $booking_info_detail['vehicle_type'];
      $pickup_city = $booking_info_detail['pickup_city'];
      $pickup_address = $booking_info_detail['pickup_address'];
      $drop_address = isset($booking_info_detail['drop_address'])?$booking_info_detail['drop_address']:'';
      $pickup_date = $booking_info_detail['pickup_date'];
      $pickup_time = $booking_info_detail['pickup_time'];
      $vehicle_type = $vehicle_info['vehicle_type'];
      $cancellation_rule = $vehicle_info['cancellation_fare_rule'];
      $estimated_time = $vehicle_info['duration'];
      $estimated_distance = $vehicle_info['estimated_distance'];
      $local_pkg_name = isset($vehicle_info['local_pkg_name'])?$vehicle_info['local_pkg_name']:'';
      $adults = $booking_info_detail['adults'];
      $childs = $booking_info_detail['childs'];
      $luggage = $booking_info_detail['luggages'];
      $booking_auto_relasedate = $vehicle_info['booking_auto_relasedate'];
      $travel_days             = $vehicle_info['travel_days'];
      $travel_hour             = $vehicle_info['travel_hour'];
      $min_pkg_hrs             = isset($vehicle_info['min_pkg_hrs'])?$vehicle_info['min_pkg_hrs']:'';
      $min_pkg_km              = $vehicle_info['min_pkg_km'];
      $total_price             = $vehicle_info['total_price'];
      $per_km_price            = $vehicle_info['per_km_price'];
      $vehicle_id              = $booking_info_detail['vehicle_id'];
      $data                    = $vehicle_info;
      $creditBalance           = $this->creditBalance;
      $voucherStatus=false;
      if($creditBalance > $total_price){
          $voucherStatus = true;
      }
}?>
<!--<script src='https://www.google.com/recaptcha/api.js'></script>-->
<section id="main_form" class="padding12top">
    <div class="banner-bottom pcenter" >
        <!-- container -->
        <div class="container">
            <div class="row">
                 <?php if(isset($this->balance_error)){?>  <div class="alert alert-danger" role="alert"> <?php echo $this->balance_error; ?></div> <?php }?>
                <div class="banner-bottom-grids">
                   
                    <div class="col-md-9 banner-bottom-grid">
                        <div id="accordion" class="panel-group">
                            
                            <div class="panel panel-default">


                                <div class="row">
                                    <div class="col-sm-12">
                                        <div style="height:auto;width:100%;">                      


                                            <table class="table table-bordered" border="0" cellpadding="0" cellspacing="0" width="100%" align="center">
                                                <tr>
                                                    <td colspan="0">
                                                        <table border="1" align="center" cellpadding="0" cellspacing="0" width="100%">
                                                            <tr>

                                                                <td align="left" class="paddinT5R0L5B5" colspan="2">
                                                                    <table width="100%" cellpadding="0" cellspacing="0">
                                                                        <tr>
                                                                            <td class="invoice-td-class">
                                                                                <div class="col-sm-3 vertical-align-top">
                                                                                    <?php if ($company_logo) { ?>
                                                                                        <img src="<?php echo $company_logo; ?>" height="55px" width="!important 55px"/>

                                                                                    <?php } else { ?>
                                                                                        <img src="/images/logo.png" height="55px" width="!important 55px"/>
                                                                                    <?php } ?>
                                                                                </div>



                                                                                <div class="col-sm-4  pull-right new1" >

<!--                                                <strong>Booking No. :</strong> <br />
                                                    <strong>Booking Date :</strong> 16/06/2016<br />
                                                    <strong>Booking Time :</strong> 06:20:44 PM-->

                                                                                </div>
                                                                            </td>


                                                                        </tr>
                                                                        <tr>
                                                                            <td>
                                                                                <div class="col-sm-12 no-padding center new1" >                                                   <?php if ($booking_auto_relasedate) { ?>
                                                                                        <h5><strong>Last Cancellation Date :</strong> <?php echo (isset($booking_auto_relasedate)) ? date('d-m-Y H:i:s', strtotime($booking_auto_relasedate)) : ''; ?></h5><br />
                                                                                    <?php } ?>
                                                                                </div>
                                                                            </td>


                                                                        </tr>
                                                                    </table>

                                                                    <div class="col-sm6 no-padding ">

                                                                    </div>
                                                                    <div class="col-sm3 pull-right ">

                                                                    </div>

                                                                </td>

                                                            </tr>
                                                            <br/>


                                                            <?php //echo '<pre>';print_r($billListing);//die();?>
                                                            <tr>
                                                                <td colspan="2">
                                                                    <div class="box-body table-responsive min-hieght250px">
                                                                        <table id="example1" class="table table-bordered table-striped">
                                                                            <thead>
                                                                                <tr>
                                                                                    <th>S.No</th>
                                                                                    <th>Travel Date/Time</th>
                                                                                    <th>Particular</th>
                                                                                    <th>Details</th>
                                                                                    <th>Adult</th>
                                                                                    <th>Child</th>
                                                                                    <th>Infant</th>
                                                                                    <th>Luggage</th>

                                                                                </tr>
                                                                            </thead>

                                                                            <tbody>
                                                                                <tr>
                                                                                    <td>01</td>
                                                                                    <td><?php echo $pickup_date; ?> <?php echo $pickup_time; ?></td>
                                                                                    <td><?php echo $pickup_address; ?></td>
                                                                                    <td><?php echo $vehicle_type; ?></td>                                                  
                                                                                    <td center><?php echo $adults; ?></td>
                                                                                    <td center><?php echo $childs; ?></td>
                                                                                    <td center><?php echo $childs; ?></td>
                                                                                    <td center><?php echo $luggage; ?></td> 


                                                                                </tr>
                                                                            </tbody>

                                                                        </table>
                                                                    </div>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td colspan="2">
                                                                    <table class="table table-bordered" width="100%" cellpadding="0" cellspacing="0">

                                                                        <tr>
                                                                            <td class="tdclass1">
                                                                                <div class="col-sm-6 no-padding vertical-align-top">                                                  
                                                                                    <div class="col-sm-4">Pickup Address </div><div class="col-sm-8">:  <?php echo $pickup_address ?></div>
                                                                                    <br><br>
                                                                                    <div class="col-sm-4">Pickup Date</div> <div class="col-sm-8">:  <?php echo $pickup_date; ?></div>
                                                                                    <div class="col-sm-4">Pickup Time</div> <div class="col-sm-8">: &nbsp;<?php echo $pickup_time; ?></div>
                                                                                    <div class="col-sm-4">Package</div> <div class="col-sm-8">: <?php echo $local_pkg_name ?></div>
                                                                                    <div class="col-sm-4">No of Days</div> <div class="col-sm-8">: <?php echo $travel_days ?></div>

                                                                                </div>



                                                                                <div class="col-sm-6 no-padding pull-right new1" >

                                                                                    <div class="col-sm-4">Drop Address </div><div class="col-sm-6">: <?php echo $drop_address; ?></div>
                                                                                    <div class="col-sm-4">Expected Time</div><div class="col-sm-6">: <?php echo $estimated_time ?></div>
                                                                                    <div class="col-sm-4">Expected Distance</div><div class="col-sm-6">&nbsp;<?php echo $estimated_distance ?></div>                                                    <div class="col-sm-4">Extra Km </div> :<div class="col-sm-6"><?php echo $per_km_price ?></div><br />
                                <!--                                                    <strong>Days:</strong> <?php //echo $estimated_time  ?><br />-->

                                                                                </div>
                                                                            </td>


                                                                        </tr>
                                                                    </table>
                                                                </td>
                                                            </tr>
                                                            

                                                        </table>
                                                    </td>
                                                </tr>


                                                </td>
                                                </tr>
                                            </table>


                                        </div>
                                    </div>
                                </div>


                            </div>
                    <br/>        
                            
                            <div class="panel panel-default">
                                <div>
                                    <h4 class="panel-title">
                                        <div class="row margin10px" >
                                            <div class="mapcantiner_inner1 no-padding">
                                                <div class="col-sm-12 pull-left">

                                                    <?php
                                                        $form = $this->form;
                                                        $form->prepare();
                                                        $form->setAttribute('action', $this->url('outstation', ['action' => 'round-trip-traveller-save']));
                                                        $form->setAttribute('method', 'post');
                                                        $form->setAttribute('id', 'traveller-form');
                                                        echo $this->form()->openTag($form);
                                                    ?>
                                                    <div class="destinations-grid-info bgnone padding-left0 ">
                                                        <div class="mapcantiner_inner1 no-padding">
                                                            <div class="margin-bot10px padding-bot10px">
                                                                <div class="col-md-31 overviueimg5 padding-left0" align="left">
                                                                    <h4>TRAVELLER DETAILS</h4>
                                                                </div>
                                                                <div class="col-md-31 overviueimg5 padding-left0" align="left">
                                                                    <label class="booking-check"><?php echo $this->translate('Book for Others'); ?>
                                                                        <?php echo $this->FormElement($form->get('book_vehicle_user')); ?>
                                                                        <span class="checkmark"></span>
                                                                    </label>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>


                                                    <div class="form-group traveler_space">
                                                        <div class="col-sm-6 traveler_space">
                                                            <div class="group">
                                                                <?php echo $this->formElement($form->get('first_name')); ?>
                                                                <?php echo $this->formElementErrors($form->get('first_name'), ['class' => 'error']); ?>
                                                                <span class="highlight"></span>
                                                                <span class="bar"></span>
                                                                <?php echo $this->translate($this->formLabel($form->get('first_name'))); ?>
                                                            </div>
                                                        </div>

                                                        <div class="col-sm-6 traveler_space">
                                                            <div class="group">
                                                                <?php echo $this->formElement($form->get('last_name')); ?>
                                                                <?php echo $this->formElementErrors($form->get('last_name'), ['class' => 'error']); ?>
                                                                <span class="highlight"></span>
                                                                <span class="bar"></span>
                                                                <?php echo $this->translate($this->formLabel($form->get('last_name'))); ?>
                                                            </div>
                                                        </div>
                                                    </div>

                                                    <div class="form-group ">
                                                        <div class="col-sm-6 traveler_space">
                                                            <div class="group">
                                                                <?php echo $this->formElement($form->get('nationality')); ?>
                                                                <?php echo $this->formElementErrors($form->get('nationality'), ['class' => 'error']); ?>
                                                                <span class="highlight"></span>
                                                                <span class="bar"></span>
                                                                <?php echo $this->translate($this->formLabel($form->get('nationality'))); ?>
                                                            </div>
                                                        </div>

                                                        <div class="col-sm-6 traveler_space">
                                                            <div class="group">
                                                                <?php echo $this->formElement($form->get('mobile')); ?>
                                                                <?php echo $this->formElementErrors($form->get('mobile'), ['class' => 'error']); ?>
                                                                <span class="highlight"></span>
                                                                <span class="bar"></span>
                                                                <?php echo $this->translate($this->formLabel($form->get('mobile'))); ?>
                                                            </div>
                                                        </div>
                                                    </div>

                                                    <div class="form-group">
                                                        <div class="col-sm-6 traveler_space">
                                                            <div class="group">
                                                                <?php echo $this->formElement($form->get('alt_mobile_number')); ?>
                                                                <span class="highlight"></span>
                                                                <span class="bar"></span>
                                                                <?php echo $this->translate($this->formLabel($form->get('alt_mobile_number'))); ?>
                                                            </div>
                                                        </div>

                                                        <div class="col-sm-6 traveler_space">
                                                            <div class="group">
                                                                <?php echo $this->formElement($form->get('email')); ?>
                                                                <?php echo $this->formElementErrors($form->get('email'), ['class' => 'error']); ?>
                                                                <span class="highlight"></span>
                                                                <span class="bar"></span>
                                                                <?php echo $this->translate($this->formLabel($form->get('email'))); ?>
                                                            </div>
                                                        </div>
                                                    </div>

                                                    <div class="form-group col-sm-12 no-padding">
                                                        <div class="col-sm-6 traveler_space">
                                                            <div class="group">
                                                                <?php echo $this->formElement($form->get('agent_reference')); ?>
                                                                <span class="highlight"></span>
                                                                <span class="bar"></span>
                                                                <?php echo $this->translate($this->formLabel($form->get('agent_reference'))); ?>
                                                            </div>
                                                        </div>
                                                        <div class="col-sm-6 traveler_space">
                                                            <div class="group">
                                                                <?php echo $this->formElement($form->get('gst_no')); ?>
                                                                <span class="highlight"></span>
                                                                <span class="bar"></span>
                                                                <?php echo $this->translate($this->formLabel($form->get('gst_no'))); ?>
                                                            </div>
                                                        </div>
                                                    </div>

                                                    <div class="form-group col-sm-12 no-padding">
                                                    <!-- <div class="col-sm-6">

                                                    <div class="g-recaptcha" data-sitekey="<?php //echo $captchaKey;?>"></div>
                                                    <div class="error"><?php //echo $this->error; ?></div>

                                                   </div>-->

                                                        <div class="col-sm-6">
                                                            <div class="col-sm-12 no-padding padding_margin0">
                                                                <div class="left-div-form margin-bot10px no-padding">
                                                                    <label class="booking-check"><?php echo $this->translate('Send Email to Traveller'); ?>
                                                                        <?php echo $this->FormElement($form->get('send_email')); ?>
                                                                        <span class="checkmark"></span>
                                                                    </label>
                                                                </div>
                                                            </div>                                                          


                                                        </div>
                                                    </div>
                                                   
                                                </div>
                                            </div>
                                        </div>
                                    </h4>
                                </div>
                            </div>
                    
                    
                     <?php 
                            $cancellation_rule = json_decode($cancellation_rule, true);
                            if (count($cancellation_rule) < 0) { ?>
                        <div class="panel panel-default">
                                <div class="destinations-grid-info bgnone padding-left0 ">
                                    <div class="mapcantiner_inner1 no-padding">

                                        <div class="row">
                                            <div class="col-sm-12">
                                                <h4><strong>Cancellation Rule</strong></h4>
                                                <div style="height:auto;width:100%;">
                                                    <table class="table table-bordered">    
<!--                                                        <tr>
                                                            <th colspan="2" >Cancellation Rule</th>
                                                        </tr>-->
                                                        <?php if(!empty($currencyData)){
                                                             $exchange_rate  = $currencyData['exchange_rate'];   
                                                              $fa_icon   = $currencyData['fa_icon'];   
                                                            }
                                                            ?>     
                                                            <?php foreach ($cancellation_rule as $key => $value) { ?> 
                                                                <tr>
                                                                    <td><?php echo $value['name']; ?></td> 
                                                            <?php if(!empty($value['cancellation_last_date'])){ 
                                                                foreach($value['cancellation_last_date'] as $canceldate){  ?>
                                                                    <td><?php echo $canceldate ?></td> 
                                                            <?php  }}?>
                                                                    <td><i class="<?php echo $fa_icon; ?>"></i> <?php echo round(($value['cancellation_charge'] * $exchange_rate), 2) ; ?>  </td>
                                                               <?php } ?>
                                                            </tr>    
                                                       
                                                    </table>  
                                                </div>    
                                            </div>
                                        </div>
                                         
                                    </div>
                                </div>
                            </div>
                        <?php } ?>
                    <br/>
                        
                    <div class="panel panel-default">
                                <div class="destinations-grid-info bgnone padding-left0 ">
                                    <div class="mapcantiner_inner1 no-padding">

                                        <div class="row">
                                            <div class="col-md-12">
                                                <?php echo $this->FormElement($form->get('remark')); ?>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                        </div>
                     <div class="col-sm-12 no-padding padding_margin0">
                                <div class="left-div-form margin-bot10px no-padding">
                                    <label class="booking-check"><a href="javascript: void(0);" class="terms-color" onclick="termsCondition()"><?php echo $this->translate('Accept the Terms and Conditions'); ?></a>
                                        <?php echo $this->FormElement($form->get('agree_terms')); ?>
                                        <?php echo $this->formElementErrors($form->get('agree_terms'), ['class' => 'error']); ?>
                                        <span class="checkmark"></span>
                                    </label>
                                </div>
                            </div>
    
                        <div class="col-md-12 no-padding sightmargin pull-left" align="left">
                                                <?php echo $this->FormElement($form->get('traveller_submit')); ?>
                                
                                   <div class="col-sm-3  pull-right new1" >
                                    <?php if(($travel_days >1 || $travel_hour>2) && ($this->userCanHoldBooking)){ ?>
                                      <input name="hold_booking" id="hold-booking" class="btn btn-primary btn-lg" value="Hold Booking" type="submit">
                                    <?php if($voucherStatus){ ?>
                                      <input name="voucher" id="hold-booking" class="btn btn-primary btn-lg" value="Voucher" type="submit">
                                    <?php }} ?>

                                    </div>
                            </div>
                    
                    
                        </div>
                        <!--Customise div-->
                    </div>
                    <?php echo $this->partial('outstation/index/round-trip-payment-detail-traveller'); ?>
                    <div class="clearfix"> </div>
                </div>
                 <?php echo $this->form()->closeTag(); ?>
            </div>
        </div>
    </div>
</section>
