Pick a warehouse, then tick the transfers and purchases that brought stock in and the sales that took it out. You get one column per document and a balance per product.
| Sl | Product | @foreach ($register['ins'] as $c)
{{ $c['top'] }}
{{ $c['bottom'] }}
|
@endforeach
Total Pieces | @foreach ($register['outs'] as $c)
{{ $c['top'] }}
{{ $c['bottom'] }}
|
@endforeach
Total Sold | Balance Stock |
|---|---|---|---|---|---|---|
| {{ $n + 1 }} | {{ $row['product'] }} | @foreach ($row['in'] as $i => $q) @php $colTotalsIn[$i] += $q; @endphp{{ $q ?: '-' }} | @endforeach{{ $in ?: '-' }} | @foreach ($row['out'] as $i => $q) @php $colTotalsOut[$i] += $q; @endphp{{ $q ?: '-' }} | @endforeach{{ $out ?: '-' }} | $balance < 0, 'text-gray-800 dark:text-gray-100' => $balance >= 0, ])>{{ $balance ?: '-' }} |
| Total · {{ count($register['rows']) }} {{ \Illuminate\Support\Str::plural('product', count($register['rows'])) }} | @foreach ($colTotalsIn as $t){{ $t ?: '-' }} | @endforeach{{ $grandIn ?: '-' }} | @foreach ($colTotalsOut as $t){{ $t ?: '-' }} | @endforeach{{ $grandOut ?: '-' }} | {{ ($grandIn - $grandOut) ?: '-' }} |