<!-- Main content -->
<section class="content">
    <div class="row">
        <div class="col-sm-12">
            <div class="tabbable">
                <div class="tab-content no-border padding-24">
                    <div class="tab-pane fade in active" id="faq-tab-1">
                        <div class="space-8"></div>
                        <div class="panel-group accordion-style1 accordion-style2" id="faq-list-1">
                            <div class="panel panel-default">
                                <div class="panel-headingnew">Booking History</div>
                                <div class="left_panel col-sm-12 padding_margin0 pull-left bg-white" id="add_detail">
                                    <ul class="nav nav-tabs nav-tabs1 tab_ul col-sm-2 paddig-right0 margin-top15px">
                                        <?php echo $this->partial('menu.phtml'); ?>
                                    </ul>
                                    <div class="tab-content tab_editprofile col-sm-10 padding-left0 marginbott10px margintop10px">
                                        <div id="home" class="tab-pane fade in tab_editprofile tab_editprofile1 active">
                                            <div class="change_password tab_editprofile">
                                                <div class="tab-content" id="myTabContent">
                                                    <div id="home" class="tab-pane fade active in">
                                                        <div class="col-sm-col-sm-offset-1 margin-10auto0 paddingRL10px">
                                                            <?php
                                                            $form = $this->form;
                                                            $form->prepare();
                                                            $form->setAttribute('action', $this->url('usermanagement', ['action' => 'booking-history']));
                                                            echo $this->form()->openTag($form);
                                                            echo $this->formHidden($form->get('user_id'));
                                                            ?>
                                                            <div class="row">
                                                                <div class="col-sm-12">
                                                                    <div class="form-group clearfix margintopbottom20">
                                                                        <label class="col-sm-3 control-label labelalign col-sm-3-new" id="Categorie Name"><?php echo $this->translate($this->formLabel($form->get('from_date'))); ?></label>
                                                                        <div class="col-sm-3 col-sm-4-new">
                                                                            <?php echo $this->FormElement($form->get('from_date')); ?>
                                                                        </div>
                                                                        <label class="col-sm-3 control-label labelalign col-sm-3-new" id="point_airport"><?php echo $this->translate($this->formLabel($form->get('to_date'))); ?></label>
                                                                        <div class="col-sm-3 col-sm-4-new">
                                                                            <?php echo $this->FormElement($form->get('to_date')); ?>
                                                                        </div>
                                                                    </div>
                                                                </div>

                                                                <div class="form-group clearfix margintopbottom20">
                                                                    <label class="col-sm-3 control-label labelalign col-sm-3-new" id="">  </label>
                                                                    <div class="col-sm-4 col-sm-4-new">

                                                                    </div>

                                                                    <label class="col-sm-3 control-label labelalign col-sm-3-new" id="update_profiel"></label>
                                                                    <div class="col-sm-3 col-sm-4-new " align="right">
                                                                        <?php echo $this->FormElement($form->get('search')); ?>
                                                                    </div>
                                                                </div>
                                                            </div>

                                                            <?php echo $this->form()->closeTag(); ?>


                                                            <div class="row">

                                                                <div class="col-sm-12">
                                                                    <div class="panel panel-default">
                                                                        <div class="panel-headingnew"> Booking History Details </div>
                                                                        <div id="faq-1-3" class="panel-collapse collapse in" aria-expanded="false" >

                                                                            <div class="box">

                                                                                <!-- /.box-header -->
                                                                                <div class="box-body">
                                                                                    <table id="myTable" class="table table-bordered table-striped">
                                                                                        <thead>
                                                                                            <tr>
                                                                                                <th><?php echo $this->translate('Id'); ?></th>
                                                                                                <th><?php echo $this->translate('Pickup Time'); ?></th>
                                                                                                <th><?php echo $this->translate('Vehicle'); ?></th>
                                                                                                <th><?php echo $this->translate('Booking Type'); ?></th>
                                                                                                <th><?php echo $this->translate('Partner'); ?></th>
                                                                                                <th><?php echo $this->translate('Client'); ?></th>
                                                                                                <th><?php echo $this->translate('Departure'); ?></th>
                                                                                                <th><?php echo $this->translate('Drop Area'); ?></th>
                                                                                                <th><?php echo $this->translate('Status'); ?></th>
                                                                                                <th><?php echo $this->translate('C Share'); ?></th>
                                                                                                <th><?php echo $this->translate('D Share'); ?></th>
                                                                                                <th><?php echo $this->translate('P Share'); ?></th>
                                                                                            </tr>
                                                                                        </thead>
                                                                                        <tbody>
                                                                                            <?php
                                                                                            if ($bookingHistory) {
                                                                                                $i = 1;
                                                                                                foreach ($bookingHistory as $listing) {
                                                                                                    ?>
                                                                                                    <tr>
                                                                                                        <td><?php echo $listing['ref']; ?></td>
                                                                                                        <td><?php echo date('Y-m-d', strtotime($listing['ordertime'])); ?></td>
                                                                                                        <td><?php echo $listing['vehicle']; ?></td>
                                                                                                        <td><?php echo $listing['booking_type']; ?></td>
                                                                                                        <td><?php echo $listing['partner']; ?></td>
                                                                                                        <td><?php echo $listing['client_detail']; ?></td>
                                                                                                        <td><?php echo $listing['departure_address']; ?></td>
                                                                                                        <td><?php echo $listing['drop_area']; ?></td>
                                                                                                        <td><?php echo $listing['status']; ?></td>
                                                                                                        <td><?php echo $listing['c_share']; ?></td>
                                                                                                        <td><?php echo $listing['d_share']; ?></td>
                                                                                                        <td><?php echo $listing['p_share']; ?></td>
                                                                                                    </tr>
                                                                                                    <?php
                                                                                                    $i++;
                                                                                                }
                                                                                            } else {
                                                                                                ?>
                                                                                                <tr><th colspan="14" style="text-align: center;">No Record Found</th></tr>
                                                                                            <?php } ?>
                                                                                        </tbody>

                                                                                    </table>
                                                                                    <div class="col-sm-12 no-padding">
                                                                                        <a href="#" class="btn btn-default marginright export_status_history" style="margin-left: 10px;"><i class="fa fa-download marginright"></i>Download CSV</a>
                                                                                        <a href="#" class="btn btn-default marginright print_status_history" style="margin-left: 10px;"><i class="fa fa-download marginright"></i>Print</a>
                                                                                    </div>
                                                                                </div>
                                                                                <!-- /.box-body -->

                                                                            </div>

                                                                        </div>
                                                                    </div>


                                                                </div>


                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <br>
                    <!-- /.widget-box -->
                </div>
                <!-- /.col -->
                </section>