<?php Fun::lang() ?>

<link rel="stylesheet" type="text/css" href="<?php echo e(asset('assets/css/production.css')); ?>">
<div class="print_this_form " style="overflow-y: scroll">
    <div class=" col-sm-12 col-xs-12 form-group text-center">
        <h3><?php echo e(__('administrator.import_stock')); ?></h3>
    </div>
    <div class=" col-sm-12 col-xs-12 form-group">
        <table class="inv-header" >
            <tr>
                <td><?php echo e(__('administrator.start_date')); ?></td>
                <td width="2%">:</td>
                <td><?php echo e(date('d-m-Y',strtotime($packing->date))); ?></td>
            </tr>
            <tr>
                <td><?php echo e(__('administrator.invoice_number')); ?></td>
                <td>:</td>
                <td><?php echo e($packing->invoice_number); ?></td>
            </tr>
            <tr>
                <td><?php echo e(__('administrator.status')); ?></td>
                <td>:</td>
                <td><?php echo $packing->done===1?'<span class="label label-success label-xs">'.__('administrator.done').'</span>':''; ?></td>
            </tr>
        </table>
    </div>
    <hr>
    <?php $g_total = 0; ?>
    <table class="table" >
        <thead>
        <tr>
            <th><?php echo e(__('administrator.date')); ?></th>
            <th><?php echo e(__('administrator.invoice_number')); ?></th>
            <th><?php echo e(__('administrator.user')); ?></th>
            <th><?php echo e(__('administrator.export_to')); ?></th>
            <th><?php echo e(__('administrator.total_qty')); ?></th>
            <th><?php echo e(__('administrator.view')); ?></th>
        </tr>
        </thead>
        <tbody>
        <?php $__currentLoopData = $packing_done; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $rd): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <?php
                $user = findUser($rd->user_id);
                $export_to = findWarehouse($rd->warehouse_id);
                $date = date('d-m-Y',strtotime($rd->date));
                $qty = \App\Model\production\packing\ProductionPackingDoneDetailModel::where('packing_done_id',$rd->id)->sum('qty');
                $g_total+=$qty;
            ?>
            <tr>
                <td><?php echo e($date); ?></td>
                <td><?php echo e($rd->invoice_number); ?></td>
                <td><?php echo e($user->name??''); ?></td>
                <td><?php echo e($export_to->warehouse_name??''); ?></td>
                <td><?php echo e($qty); ?></td>
                <td><button type="button" class="button_info" onclick="getHtmlFormShow('<?php echo e(route('production-packing-import-show',$rd->id)); ?>','800px')"><span class="fa fa-eye"></span></button></td>
            </tr>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </tbody>
    </table>
    <table class="table">
        <tr>
            <td class="no-border text-right"> <?php echo e(__('administrator.total_return_item')); ?></td>
            <td><?php echo e($g_total); ?> <?php echo e(__('administrator.item')); ?></td>
        </tr>
    </table>
</div>

<?php /**PATH /home/nsowos/public_html/shr-brand/resources/views/administrator/production-packing/import-stock-list.blade.php ENDPATH**/ ?>