@extends('layouts.app') @section('title', 'Dashboard - Dazry Laundry App') @section('page_title', 'Dashboard') @section('content')
Filter berdasarkan:
Total Stok Bahan Baku

{{ number_format($total_stok_bahan_baku) }} kg

Total Stok Produk Jadi

{{ number_format($total_stok_produk_jadi) }} pcs

Penjualan Periode Ini

Rp {{ number_format($penjualan_periode_ini / 1000000, 1) }} Jt

Piutang Belum Terbayar

Rp {{ number_format($piutang_belum_lunas / 1000000, 2) }} Jt

Grafik Tren Penjualan

Distribusi Stok

Stok Bahan Baku Terbaru

Lihat Semua
@foreach($stok_bahan_baku_terbaru as $bahan) @endforeach
Nama Bahan Jumlah Stok Status
{{-- Asumsi Anda memiliki ikon yang sesuai --}}
{{ $bahan->nama }}
{{ $bahan->deskripsi }}
{{ number_format($bahan->stok_saat_ini) }} kg
{{ $bahan->stok_saat_ini > 100 ? 'Aman' : ($bahan->stok_saat_ini > 50 ? 'Hampir Habis' : 'Kritis') }}

Penjualan Terbaru ({{ str_replace('_', ' ', ucwords($filter)) }})

Lihat Semua
@foreach($penjualan_terbaru as $penjualan) @endforeach
Produk Jumlah Status
@if ($penjualan instanceof \App\Models\PenjualanPiutang)
{{ $penjualan->details->first()->produkJadi->nama ?? 'N/A' }}
#{{ $penjualan->id }} (Piutang)
@elseif ($penjualan instanceof \App\Models\PenjualanKonsinyasi)
{{ $penjualan->details->first()->produkJadi->nama ?? 'N/A' }}
#{{ $penjualan->id }} (Konsinyasi)
@else
Produk Tidak Dikenal
@endif
@if ($penjualan instanceof \App\Models\PenjualanPiutang)
{{ $penjualan->details->first()->jumlah ?? 'N/A' }} pcs
Rp {{ number_format($penjualan->total_harga) }}
@elseif ($penjualan instanceof \App\Models\PenjualanKonsinyasi)
{{ $penjualan->details->first()->kuantitas_terjual ?? 'N/A' }} pcs
Rp {{ number_format($penjualan->total_terjual) }}
@else
N/A
@endif
@if ($penjualan instanceof \App\Models\PenjualanPiutang) {{ $penjualan->status_pembayaran }} @elseif ($penjualan instanceof \App\Models\PenjualanKonsinyasi) {{ $penjualan->status }} @endif
@endsection