
<?php $__env->startSection('content'); ?>
    <?php Fun::lang()?>

    <div class="page">
        <div class=container-fluid>
            <div class="top-content">
                <div class="row">
                    <div class="col-sm-12 col-xs-12 form-group">
                        <div class="title-add">
                            <div class="pull-left">
                                <h3><?php echo e(__('administrator.report_production')); ?></h3>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="top-content">
                <div class="row">
                    <div class="col-sm-12 col-xs-12 form-group paddin-0">
                        <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.warehouse')); ?>

                                </div>
                                <div class="form-group col-sm-9 col-md-9">
                                    <?php echo Form::select('warehouse',getWarehouse()->pluck('warehouse_name','id'),null, array('placeholder' => __('administrator.please_select'),'class' => 'form-control')); ?>

                                </div>
                            </div>
                            <div class="col-sm-3">
                                <div class="col-sm-3 col-md-3" style="margin-top: 5px">
                                    <?php echo e(__('administrator.request_by')); ?>

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

                                </div>
                            </div>
                            <div class="col-sm-3">
                                <div class="col-sm-3 col-md-3" style="margin-top: 5px">
                                    <?php echo e(__('administrator.tailor')); ?>

                                </div>
                                <div class="form-group col-sm-9 col-md-9">
                                    <?php echo Form::select('tailor',getTailor()->pluck('name','id'),null, array('placeholder' => __('administrator.please_select'),'class' => 'form-control')); ?>

                                </div>
                            </div>
                            <div class="col-sm-3">
                                <div class="col-sm-3 col-md-3" style="margin-top: 5px">
                                    <?php echo e(__('administrator.status')); ?>

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

                                </div>
                            </div>
                            <div class="col-sm-3">
                                <div class="col-sm-3 col-md-3" style="margin-top: 5px">
                                    <?php echo e(__('administrator.done')); ?>

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

                                </div>
                            </div>
                            <div class="col-sm-3">
                                <div class="col-sm-4 col-md-4" style="margin-top: 5px">
                                    <?php echo e(__('administrator.request_date')); ?>

                                </div>
                                <div class="form-group col-sm-8 col-md-8">
                                    <?php echo Form::text('date', null, array('placeholder' => __('administrator.please_select'),'class' => 'form-control date_picker')); ?>

                                </div>
                            </div>
                            <div class="col-sm-3">
                                <div class="col-sm-4 col-md-4" style="margin-top: 5px">
                                    <?php echo e(__('administrator.approve_date')); ?>

                                </div>
                                <div class="form-group col-sm-8 col-md-8">
                                    <?php echo Form::text('approve_date', null, array('placeholder' => __('administrator.please_select'),'class' => 'form-control date_picker')); ?>

                                </div>
                            </div>
                            <div class="col-sm-3">
                                <div class="col-sm-3 col-md-3" style="margin-top: 5px">
                                    <?php echo e(__('administrator.export_date')); ?>

                                </div>
                                <div class="form-group col-sm-9 col-md-9">
                                    <?php echo Form::text('done_date', null, array('placeholder' => __('administrator.please_select'),'class' => 'form-control date_picker')); ?>

                                </div>
                            </div>
                            <div class=" col-sm-6">
                                <button class=" button_primary pull-right"   type="submit"> <?php echo e(__('administrator.search')); ?></button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="wrapper-table">
                <table id="print_table" width="100%" class="table table-striped table-hover ">
                    <thead>
                    <tr>
                        <th>#</th>
                        <th><?php echo e(__('administrator.cut_piece_warehouse')); ?></th>
                        <th><?php echo e(__('administrator.material_warehouse')); ?></th>
                        <th><?php echo e(__('administrator.invoice_number')); ?></th>
                        <th><?php echo e(__('administrator.request_date')); ?></th>
                        <th><?php echo e(__('administrator.request_by')); ?></th>
                        <th><?php echo e(__('administrator.tailor')); ?></th>
                        <th><?php echo e(__('administrator.approve_date')); ?></th>
                        <th><?php echo e(__('administrator.status')); ?></th>
                        <th><?php echo e(__('administrator.export')); ?></th>
                        <th><?php echo e(__('administrator.export_date')); ?></th>
                        <th><?php echo e(__('administrator.return_item')); ?></th>
                        <th><?php echo e(__('administrator.export_to')); ?></th>
                    </tr>
                    </thead>
                    <tbody class="tbody">
                    </tbody>
                </table>
            </div>
        </div>
    </div>
        <?php $__env->stopSection(); ?>
        <?php $__env->startSection('script'); ?>
            <script type="text/javascript">
                $(document).ready(function () {
                    getTable();
                    $('button[type=submit]').on('click',function () {
                        getTable();
                    });
                });
                function getTable() {
                    $('#print_table').DataTable().destroy();
                    let wh = $(document).find('select[name=warehouse]').val();
                    let request_by = $(document).find('select[name=request_by]').val();
                    let tailor = $(document).find('select[name=tailor]').val();
                    let status = $(document).find('select[name=status]').val();
                    let done_status = $(document).find('select[name=done_status]').val();
                    let date = $(document).find('input[name=date]').val();
                    let approve_date = $(document).find('input[name=approve_date]').val();
                    let done_date = $(document).find('input[name=done_date]').val();
                    console.log(wh);
                    $('#print_table').DataTable({
                        "oLanguage": {
                            "sSearch": "<?php echo e(__('administrator.search')); ?>:",
                            "sLengthMenu": "<?php echo e(__('administrator.display')); ?> _MENU_ <?php echo e(__('administrator.record_per_page')); ?>",
                            "sZeroRecords": "<?php echo e(__('administrator.Nothing_foundsorry')); ?>",
                            "sInfo": "<?php echo e(__('administrator.showing')); ?> _START_ <?php echo e(__('administrator.to')); ?> _END_ <?php echo e(__('administrator.of')); ?> _TOTAL_ <?php echo e(__('administrator.record')); ?>",
                            "sInfoEmpty": "<?php echo e(__('administrator.showing')); ?> 0 <?php echo e(__('administrator.to')); ?> 0 <?php echo e(__('administrator.of')); ?> 0 <?php echo e(__('administrator.record')); ?>",
                            "sInfoFiltered": "(<?php echo e(__('administrator.filter_form')); ?> _MAX_ <?php echo e(__('administrator.total_records')); ?>)",
                            "oPaginate": {
                                "sFirst": "<?php echo e(__('administrator.first')); ?>",
                                "sLast": "<?php echo e(__('administrator.last')); ?>",
                                "sNext": "<?php echo e(__('administrator.next')); ?>",
                                "sPrevious": "<?php echo e(__('administrator.previous')); ?>"
                            },
                        },
                        ordering: true,
                        serverSide: true,
                        lengthMenu: [[20, 30, 50, 100, 200, 500, 1000], [20, 30, 50, 100, 200, 500, 1000]],
                        ajax:{
                            url:"<?php echo e(route('report-production.index')); ?>",
                            data:{
                                warehouse :wh,
                                request_by :request_by,
                                tailor :tailor,
                                status :status,
                                done_status :done_status,
                                date :date,
                                approve_date :approve_date,
                                done_date :done_date,
                            },
                        },
                        columns:
                            [
                                {data: 'DT_RowIndex', 'searchable': false, "orderable": "false"},
                                {data: 'cut_piece_warehouse_id'},
                                {data: 'material_warehouse_id'},
                                {data: 'invoice_number'},
                                {data: 'date'},
                                {data: 'request_by'},
                                {data: 'tailor_id'},
                                {data: 'approve_date'},
                                {data: 'status'},
                                {data: 'done_status'},
                                {data: 'done_date'},
                                {data: 'return_item'},
                                {data: 'to_warehouse'},
                            ],
                        "footerCallback": function (row, data, start, end, display) {

                        },
                    });
                }
            </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/report/admin/report-production.blade.php ENDPATH**/ ?>