@extends('layouts.supervisor') @section('title', 'Monitoring Purchases - Supervisor') @section('content') @php $totalPurchases = $purchases->total(); $approvedCount = $purchases->filter(fn($p) => $p->status === 'approved')->count(); $pendingCount = $purchases->filter(fn($p) => $p->status === 'pending')->count(); $totalAmount = $purchases->sum('total_amount'); @endphp
Pantau semua pembelian bahan dan sparepart
Total Pembelian
{{ $totalPurchases }}
Disetujui
{{ $approvedCount }}
Menunggu
{{ $pendingCount }}
Total Nilai
Rp {{ number_format($totalAmount, 0, ',', '.') }}
| Tanggal | Kode | Supplier | Tipe | Total | Status |
|---|---|---|---|---|---|
|
{{ $purchase->purchase_date ? $purchase->purchase_date->format('d M Y') : '-' }}
@if($purchase->purchase_date)
{{ $purchase->purchase_date->diffForHumans() }}
@endif
|
{{ $purchase->purchase_code ?? '#' . $purchase->id }} |
{{ Str::limit($purchase->supplier_name ?? '-', 25) }}
|
{{ ucfirst($purchase->purchase_type ?? '-') }} | Rp {{ number_format($purchase->total_amount, 0, ',', '.') }} | {{ ucfirst($purchase->status ?? '-') }} |
Tidak Ada Data PembelianBelum ada pembelian yang tercatat |
|||||