@foreach (['company' => 'Company', 'whs' => 'Store', 'date' => 'Date', 'code' => 'Code', 'barcode' => 'Barcode', 'name' => 'Name'] as $column => $label) @endforeach @foreach (['qty' => 'Qty', 'gross' => 'Gross', 'disc' => 'Disc', 'nett' => 'Total'] as $column => $label) @endforeach @php $subtotal_qty = 0; $subtotal_gross = 0; $subtotal_disc = 0; $subtotal_nett = 0; @endphp @foreach ($data as $item) @php $subtotal_qty += $item['qty']; $subtotal_gross += $item['gross']; $subtotal_disc += $item['disc']; $subtotal_nett += $item['nett']; @endphp @endforeach
{{ $item['company'] }} {{ $item['whs'] }} {{ \Carbon\Carbon::parse($item['date'])->format('d/m/Y') }} {{ $item['code'] }} {{ $item['barcode'] }} {{ $item['name'] }} {{ number_format($item['qty']) }} {{ number_format($item['gross']) }} {{ number_format($item['disc']) }} {{ number_format($item['nett']) }}
SubTotal {{ number_format($subtotal_qty) }} {{ number_format($subtotal_gross) }} {{ number_format($subtotal_disc) }} {{ number_format($subtotal_nett) }}
Total {{ number_format($total_qty) }} {{ number_format($total_gross) }} {{ number_format($total_disc) }} {{ number_format($total_nett) }}
@if ($data)
{{ $data->links('vendor.livewire.bootstrap') }}
@endif