
<?php $__env->startSection('content'); ?>
    <?php Fun::lang()?>
    <div class="container-fluid">
        <div class="row">
            <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
                <div class="row">
                    <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
                        <h3><?php echo e(__('administrator.product_return')); ?></h3>
                    </div>
                    <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 text-right">
                        <a href="<?php echo e(route('product-return.create')); ?>">
                            <button type="button" class="button_primary"><i class="fa fa-plus"></i> <?php echo e(__('administrator.product_return')); ?></button>
                        </a>
                    </div>
                    <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
                        <form class="form_data">
                            <div class="col-sm-3 col-md-3">
                                <div class="col-sm-3 col-md-3" style="margin-top: 5px">
                                    <?php echo e(__('administrator.date')); ?>

                                </div>
                                <div class="form-group col-sm-9 col-md-9">
                                    <input type="text" class="form-control date_picker" name="date">
                                </div>
                            </div>
                            <div class="col-sm-3 col-md-3">
                                <div class="col-sm-3 col-md-3" style="margin-top: 5px">
                                    <?php echo e(__('administrator.customer')); ?>

                                </div>
                                <div class="form-group col-sm-9 col-md-9">
                                    <?php echo Form::select('customer_id',[],null,['placeholder'=>__('administrator.please_select'),'class'=>'form-control search_customer']);; ?>

                                </div>
                            </div>
                        </form>
                    </div>
                </div>
                <div class="container-fluid" style="background: white; padding:10px">
                    <div class="table-responsive">
                        <table id="customer" class="table">
                            <thead>
                            <tr>
                                <th width="5%">#</th>
                                <th><?php echo e(__('administrator.date')); ?></th>
                                <th><?php echo e(__('administrator.reference_number')); ?></th>
                                <th><?php echo e(__('administrator.customer')); ?></th>
                                <th><?php echo e(__('administrator.phone')); ?></th>
                                <th><?php echo e(__('administrator.grand_total')); ?></th>
                                <th><?php echo e(__('administrator.user')); ?></th>
                                <th><?php echo e(__('administrator.action')); ?></th>
                            </tr>
                            </thead>
                            <tbody>

                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('script'); ?>
    <script>
        let f = $('.form_data');
        $(document).ready(function () {
            f.on('change', 'input,select', function () {
                getTable()
            })
            getTable()
        });

        function getTable() {
            $('#customer').DataTable().destroy();
            $('#customer').DataTable({
                ordering: false,
                processing: false,
                serverSide: true,
                lengthMenu: tbLeng,
                ajax: {
                    url: "<?php echo e(route('product-return.index')); ?>?" + f.serialize(),
                },
                columns:
                    [
                        {data: 'DT_RowIndex', 'searchable': false},
                        {data: 'date'},
                        {data: 'reference_number'},
                        {data: 'customer.name', searchable: false},
                        {data: 'customer.phone', searchable: false},
                        {data: 'grand_total'},
                        {data: 'user.name', searchable: false},
                        {data: 'action'},
                    ],


                "initComplete": function (settings, json) {
                }

            });
        }

    </script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make(branchMenu(), \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/nsowos/public_html/shr-brand/resources/views/pos/product-return/index.blade.php ENDPATH**/ ?>