@extends('admin.layout') @section('content')

Daftar Pembelian

@forelse ($pembelians as $index => $pembelian) @empty @endforelse
No Supplier Nama Obat Kode Barcode Stok Tanggal Pembelian Total Pembayaran Aksi
{{ $pembelians->firstItem() + $index }} {{ $pembelian->supplier->nama ?? '-' }} @php $obatList = $pembelian->details->pluck('masterObat.nama')->take(3)->join(', '); if ($pembelian->details->count() > 3) { $obatList .= '...'; } @endphp {{ $obatList ?: '-' }} @php $barcodeList = $pembelian->details->pluck('kode_barcode')->filter()->take(3)->join(', '); if ($pembelian->details->count() > 3) { $barcodeList .= '...'; } @endphp {{ $barcodeList ?: '-' }} @php $stokList = $pembelian->details->pluck('jumlah')->take(3)->join(', '); if ($pembelian->details->count() > 3) { $stokList .= '...'; } @endphp {{ $stokList ?: '-' }} {{ \Carbon\Carbon::parse($pembelian->tanggal_pembelian)->format('d M Y') }} Rp {{ number_format($pembelian->total_pembayaran, 0, ',', '.') }} Detail
@csrf @method('DELETE')
Tidak ada data pembelian.
{{ $pembelians->withQueryString()->links() }}
@endsection