@extends('layouts.supplier') @section('title', 'Batch Konsinyasi') @section('content')
Daftar batch konsinyasi dan histori pengiriman barang Anda
{{ $batch->created_at->format('d M Y H:i') }}
Belum ada batch konsinyasi
Batch akan muncul ketika koperasi meminta stok produk Anda
| Batch | Produk | Diminta | Terjual | Retur | Sisa | Status | Pendapatan |
|---|---|---|---|---|---|---|---|
#{{ $batch->batchCode }}{{ $batch->created_at->format('d M Y H:i') }} |
@foreach($batch->items->take(2) as $item)
{{ $item->product->name ?? '-' }}
@endforeach
@if($batch->items->count() > 2)
+{{ $batch->items->count() - 2 }} lainnya
@endif
|
@php
$totalRequested = $batch->items->sum('initialQty');
$totalDamaged = $batch->items->sum('damagedQty');
$hasDiscrepancy = $totalDamaged > 0;
@endphp
{{ $totalRequested }}
@if($hasDiscrepancy)
-{{ $totalDamaged }} selisih
@endif
|
@php $totalSold = $batch->items->sum('soldQty'); @endphp @if($batch->status === 'REQUESTED') - @else {{ $totalSold }} @endif | @php $totalReturned = $batch->items->sum('returnedQty'); @endphp @if($batch->status === 'REQUESTED') - @elseif($totalReturned > 0) {{ $totalReturned }} @else 0 @endif | @php $totalRemaining = $batch->items->sum('remainingQty'); @endphp @if($batch->status === 'REQUESTED') - @else {{ $totalRemaining }} @endif |
@if($batch->status === 'REQUESTED')
Perlu Dikirim
@elseif($batch->status === 'ACTIVE')
Aktif
@elseif($batch->status === 'PENDING_SETTLEMENT')
Siap Bayar
@elseif($batch->status === 'SETTLED')
Lunas
@if($batch->settledAt)
{{ $batch->settledAt->format('d M Y H:i') }}
@endif
@endif
|
Rp {{ number_format($batch->payableAmount ?? 0, 0, ',', '.') }} |
|
Belum ada batch konsinyasi Batch akan muncul ketika koperasi meminta stok produk Anda |
|||||||
Silakan kirim barang ke Koperasi UMB sesuai jumlah yang diminta. Setelah barang diterima, status akan berubah menjadi "Aktif".