<?php
use App\Model\product\ProductImageModel;
?>
<?php if(@$stock_item && count($stock_item) > 0): ?>
    <?php $__currentLoopData = $stock_item; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <?php
        $my_p = getProductById($row->product_id);
        $product_name = $my_p ? $my_p->product_name : "";
        $barcode = $row ? $row->barcode : "";
        $category_name = $my_p ? optional($my_p->get_category)->category_name : "";
        $unit = findUnit($my_p->unit_id)->unit??'';
        $sub_unit = findUnit($my_p->child_unit)->unit??'';
        $img = ProductImageModel::where('product_id',$row->product_id ??'')->first()->images??'';
        $stock_qty = (int)($row->stock_qty/$row->qty_per_unit);
        ?>
        <div class="col-lg-3 col-md-6 po-box" title="<?php echo e($product_name); ?>">
            <div class="btn btn-default" style="width: 100%">
                <a class="listings cursor"
                   data-name="<?php echo e($product_name); ?>"
                   data-code="<?php echo e($barcode); ?>"
                   data-stock="<?php echo e($stock_qty); ?>"
                   data-qty_per_unit="<?php echo e($row->qty_per_unit); ?>"
                   data-id="<?php echo e($row->product_id); ?>">
                    <div class="bg-img" style="
                        background: url(<?php echo e(findImg($img)); ?>);
                        height: 130px;
                        width: 100%;
                        background-position: center;
                        background-size: cover;
                        background-repeat: no-repeat;
                        ">
                    </div>
                    <ul class="item-show-name">
                        <span style="
                        left:10px;
                        top: 10px;

                                background: #337ab7;
                                font-weight: 100;
                                border-radius: 0 0 4px 0;
                                position: absolute;" class="label text-left"><?php echo e($stock_qty); ?> <?php echo e($unit); ?>

                                   ក្នុងស្តុក</span>
                        <li><?php echo e($barcode); ?> (<?php echo e("$row->qty_per_unit $sub_unit"); ?>)</li>
                        <li><?php echo e(str_limit($product_name,20)); ?> </li>
                    </ul>
                </a>
            </div>
        </div>

    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php endif; ?>
<div class="col-sm-12 col-xs-12">
    <div class="pagin">
        <?php if(@$stock_item): ?>
            <?php echo $stock_item->render(); ?>

        <?php endif; ?>
    </div>
</div>

<?php /**PATH /home/nsowos/public_html/shr-brand/resources/views/stock-inventory/transfer/transfer-stock-fabric/result-create.blade.php ENDPATH**/ ?>