<?php Fun::lang() ?>
<div class="production-request print_this_form">
    <style>
        .tb_info td{
            padding-top: 7px;
        }
    </style>
    <div class="container-fluid">
        <h2><?php echo e(__('administrator.packing')); ?></h2>
        <hr>
        <?php
            $user = findUser($master->user_id);
            $packer = \App\Model\setup\PackerModel::find($master->packer_id);
        ?>
        <div class="summary-header">
            <table width="100%">
                <tr>
                    <td>
                        <table class="text-left tb_info">
                            <tr>
                                <td><?php echo e(__('administrator.date')); ?></td>
                                <td> : <?php echo e(date('d-m-Y',strtotime($master['date']))); ?> </td>
                            </tr>
                            <tr>
                                <td><?php echo e(__('administrator.invoice_number')); ?></td>
                                <td> : <?php echo e($master->invoice_number); ?> </td>
                            </tr>
                            <tr>
                                <td><?php echo e(__('administrator.user')); ?></td>
                                <td> : <?php echo e($user?$user->name:''); ?> </td>
                            </tr>
                            <tr>
                                <td><?php echo e(__('administrator.packer')); ?></td>
                                <td> : <?php echo e($packer?$packer->name:''); ?> </td>
                            </tr>

                        </table>
                    </td>
                </tr>
            </table>
        </div>
        <div class="wrapper-table">
            <h3><?php echo e(__('administrator.items')); ?></h3>
            <table class="table table-striped table-hover ">
                <thead>
                <tr>
                    <th>#</th>
                    <th><?php echo e(__('administrator.barcode')); ?></th>
                    <th><?php echo e(__('administrator.items')); ?></th>
                    <th><?php echo e(__('administrator.size')); ?></th>
                    <th><?php echo e(__('administrator.color')); ?></th>
                    <th><?php echo e(__('administrator.packing_qty')); ?></th>
                </tr>
                </thead>
                <tbody>
                <?php
                    $total_done = 0;
                ?>
                <?php $__currentLoopData = $master->detail; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <?php
                        $product_unit = findProductUnitByCode($row->barcode,'product');
                        $product = getProductById($product_unit->product_id);
                        $size = findSize($product_unit->size_code);
                        $color = findColor($product_unit->color_code);
                        $unit = findUnit($product_unit->unit_id);
                        $total_done+=$row->qty;
                    ?>
                    <tr>
                        <td><?php echo e($key+1); ?></td>
                        <td><?php echo e($row->barcode); ?></td>
                        <td><?php echo e($product->product_name??''); ?></td>
                        <td><?php echo e($size->size??''); ?></td>
                        <td><?php echo e($color->name??''); ?></td>
                        <td>
                            <?php echo e($row->qty); ?>

                        </td>
                    </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </tbody>
                <tfoot>
                <tr>
                    <td colspan="5" class="text-right no-border"><?php echo e(__('administrator.total_item')); ?></td>
                    <td><?php echo e($total_done); ?></td>
                </tr>
                </tfoot>
            </table>
        </div>
    </div>
</div>
<?php /**PATH /home/nsowos/public_html/shr-brand/resources/views/administrator/production-packing/show.blade.php ENDPATH**/ ?>