@php $summary = $this->selectedDateSummary; $roster = collect($this->visibleSupplierRoster); $detail = $this->selectedSupplierDailyDetail; $selectedSupplier = $this->selectedSupplier; $countPreview = $this->countPreview; $outstanding = $this->outstandingPayable; $isLocked = (bool) ($detail['lockStatus'] ?? false); $isFinalized = (bool) ($summary['isFinalized'] ?? false); $mobileView = $this->mobileView; @endphp

Supplier Daily Ops

Roster Operasional Supplier Per Tanggal

Fokus satu tanggal: pantau semua supplier, input cepat, dan audit status harian dalam satu layar.

@if(!$isFinalized) @elseif($this->canReopenFinalization) @endif

Supplier

{{ $summary['supplierTotal'] }}

Diproses: {{ $summary['processedSuppliers'] }}

Qty Masuk / Terjual

{{ number_format($summary['stockInQty']) }} / {{ number_format($summary['soldQty']) }}

Tidak kirim: {{ $summary['noDeliverySuppliers'] }}

Omzet Supplier Ops

Rp {{ number_format($summary['incomeSupplierOps'], 0, ',', '.') }}

Payout Supplier Ops

Rp {{ number_format($summary['expenseSupplierOps'], 0, ',', '.') }}

Net Harian

Rp {{ number_format($summary['netSupplierOps'], 0, ',', '.') }}

Roster Supplier {{ \Illuminate\Support\Carbon::parse($selectedDate)->translatedFormat('d M Y') }}

Klik supplier untuk buka panel detail input/rekap/payout.

{{ $isFinalized ? 'Tanggal Finalized' : 'Belum Finalized' }}
@forelse($roster as $row) @empty
Belum ada supplier aktif.
@endforelse
@if(!$selectedSupplier)

Pilih supplier dari roster

Panel ini akan menampilkan form stok masuk, rekap, payout, dan riwayat tanggal aktif.

@else

Detail Supplier

{{ $selectedSupplier->businessName }}

Tanggal kerja: {{ \Illuminate\Support\Carbon::parse($selectedDate)->translatedFormat('d F Y') }}

@if($isLocked)

Data supplier tanggal ini sudah lunas (locked). Form menjadi read-only.

@endif @if($tab === 'stock-in')

Input Stok Masuk

@foreach($stockItems as $index => $row)
@if(count($stockItems) > 1) @endif
@endforeach
@else

Rekap & Payout

@if(empty($countItems))
Tidak ada stok aktif untuk direkap.
@else
@foreach($countItems as $index => $row) @php $delta = max(0, (int) $row['beforeQty'] - (int) $row['physicalQty']); @endphp

{{ $row['productName'] }}

Tercatat

{{ $row['beforeQty'] }}

Fisik

Delta

{{ $delta }}

@endforeach
@endif

Omzet

Rp {{ number_format($countPreview['omzet'], 0, ',', '.') }}

Hak Supplier

Rp {{ number_format($countPreview['payable'], 0, ',', '.') }}

Terjual

{{ $countPreview['soldQty'] }}

Outstanding

Rp {{ number_format($outstanding, 0, ',', '.') }}

Keuntungan

Rp {{ number_format($countPreview['margin'], 0, ',', '.') }}

@endif
@endif
@if($selectedSupplier)

Riwayat Tanggal Ini

Batch Stok Masuk

@forelse($detail['todayBatches'] as $batch)

{{ $batch->batchCode }}

{{ $batch->items->count() }} item · Qty {{ $batch->items->sum('receivedQty') }}

@empty

Belum ada batch masuk.

@endforelse

Payout Hari Ini

@forelse($detail['todayPayouts'] as $payout)

{{ $payout->payoutCode }}

Dibayar Rp {{ number_format($payout->paidAmount, 0, ',', '.') }}

@empty

Belum ada payout tanggal ini.

@endforelse
@endif