Data Bon / Hutang
{{ session('success') }}
@endif
@if(session('error'))
{{ session('error') }}
@endif
@php
$groupedBons = $bons->groupBy(function($item) {
return $item->nama . '|' . $item->no_ktp;
});
@endphp
| Nama | Nomor KTP | Total Bon | Aksi |
|---|---|---|---|
| {{ $first->nama }} | {{ $first->no_ktp }} | Rp {{ number_format($totalJumlah, 0, ',', '.') }} | @if ($totalJumlah == 0) Lunas @else @php $produkData = $group->map(function ($item) { return [ 'id' => $item->id, 'nama_produk' => $item->nama_produk, 'qty' => $item->qty, 'harga_satuan' => $item->jumlah / max($item->qty, 1), 'total' => $item->jumlah ]; }); @endphp @endif |
{{ $bons->links('vendor.pagination.tailwind') }}