 <?php $__env->startSection('content'); ?>
    <?php Fun::lang()?>
    <div class="title-page">
        <div class="page-bar">
            <ul class="page-breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i> Dashboard</a></li>
                <li><a href="#">Construction</a></li>
                <li><a href="#">Manage Construction Stock</a></li>
                <li><a href="#">Product Stock List</a></li>
                <li><a href="#">Origin Stock</a></li>
            </ul>
        </div>
    </div>
    <div class="page">
        <div class="top-content">
            <div class="row">
                <div class="col-sm-12 col-xs-12">
                    <div class="title-page">
                        <div class="pull-left">
                            <h3>Origin Product Stock</h3>
                        </div>
                    </div>
                    <div class="pull-right">
                        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('Construction-Origin-Stock-Out-Create')): ?>
                        <a class="button_sm button_success" href="<?php echo e(route('construction.make_stock_out')); ?>" target="_blank"><span class="fa fa-plus"></span> Origin Stock Out</a>
                        <?php endif; ?>
                        
                    </div>
                </div>
            </div>
        </div>
        <div class="box-body table-responsive">

            <table id="datatable_stock" class="table table-striped table-bordered table-hover nowrap">
                <thead>
                <tr>
                    <th>NO</th>
                    <th>Warehouse</th>
                    <th>Zone</th>
                    <th>Product</th>
                    <th>Subcategory</th>
                    <th>Category</th>
                    <th>Qty</th>
                    <th>Unit</th>
                </tr>
                </thead>
                <tbody>

                </tbody>
            </table>

        </div>
    </div>

<?php $__env->stopSection(); ?>
<?php $__env->startSection('js'); ?>
    <script type="text/javascript">
        $(document).ready(function()
        {
            $('#datatable_stock').DataTable({
                ordering: false,
                "serverSide": true,
                "scrollY":"600px",
                "scrollCollapse": true,
                "scrollX": true,
                "lengthMenu": [
                    [20, 25, 50, 100, 500],
                    [20, 25, 50, 100, 500]
                ],
                ajax: "<?php echo e(route('construction.origin_stock_list')); ?>",
                columns: [
                    {data: 'DT_RowIndex'},
                    {data: 'warehouse_name'},
                    {data: 'zone_name'},
                    {data: 'product_name'},
                    {data: 'brand_name'},
                    {data: 'product_category_name'},
                    {data: 'qty'},
                    {data: 'unit_name'}
                ],
                "initComplete": function (settings, json) {
                    $('#main-spinner').hide();
                }
            });

            $.fn.dataTable.ext.errMode = 'throw';
        });
    </script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('adminlte::page', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>