<?php $__env->startSection('title','Product Stock'); ?>
<?php $__env->startSection('content'); ?><div class="page-head"><div><h1><?php echo e($product->name_en); ?></h1><p><?php echo e($product->product_code); ?> · Stock by warehouse</p></div><a class="btn btn-light border" href="<?php echo e(route('stock-ledger.index',['product_id'=>$product->id])); ?>">Full ledger</a></div><div class="card-erp"><div class="table-responsive"><table class="table table-dense"><thead><tr><th>Warehouse</th><th>Type</th><th class="text-end">Quantity</th><th class="text-end">Average cost</th><th class="text-end">Value</th></tr></thead><tbody><?php $__currentLoopData = $stocks; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $s): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><tr><td><?php echo e($s->warehouse?->code); ?> · <?php echo e($s->warehouse?->name_en); ?></td><td><?php echo e(ucfirst($s->warehouse?->type)); ?></td><td class="text-end fw-bold"><?php echo e(number_format((float)$s->qty,4)); ?></td><td class="text-end"><?php echo e(number_format((float)$s->avg_cost,4)); ?></td><td class="text-end"><?php echo e(number_format((float)$s->qty*(float)$s->avg_cost,2)); ?></td></tr><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?></tbody></table></div></div><?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\xampp\htdocs\saudi\resources\views\inventory\stock_ledger\by_warehouse.blade.php ENDPATH**/ ?>