@extends('layouts.app', ['class' => 'g-sidenav-show bg-gray-100']) @section('content') @include('layouts.navbars.auth.topnav')
{{-- Header & Filter Card --}}
Daftar Penerimaan Barang
@if ($authorize->add == '1') @endif
{{-- Filter Form --}}
@php $totalAll = array_sum($statusCounts ?? []); $statusOptions = [ 'ALL' => 'Semua Status', 'PLANNED' => 'Planned', 'IN_PROGRESS' => 'In Progress', 'RECEIVED' => 'Received', 'CANCELLED' => 'Cancelled', ]; @endphp
{{-- Data Table --}}
@foreach ($batches as $batch) @endforeach
Action Batch ID Tgl Rencana Vendor Tipe Penerimaan Mode Status Progress
{{ $batch->batch_id }}
{{ \Carbon\Carbon::parse($batch->created_at)->format('d/m/Y H:i') }}
{{ $batch->planned_date ? \Carbon\Carbon::parse($batch->planned_date)->format('d/m/Y') : '-' }} {{ $batch->vendor_name ?? '-' }} @if (($batch->material_vendor_count ?? 0) > 1)
{{ \Illuminate\Support\Str::limit($batch->material_vendor_names ?? '', 55) }} @endif
{{ $batch->in_type_name ?? '-' }} @if ($batch->receive_mode == 'GENERATE') GENERATE @else USE VENDOR ID @endif @php $statusColors = [ 'PLANNED' => 'bg-info', 'IN_PROGRESS' => 'bg-warning', 'RECEIVED' => 'bg-success', 'CANCELLED' => 'bg-danger', ]; $statusColor = $statusColors[$batch->status] ?? 'bg-secondary'; @endphp {{ $batch->status }} @if ($batch->total_planned > 0) @php $progressPct = round( ($batch->total_received / $batch->total_planned) * 100, ); @endphp
{{ $batch->total_received }}/{{ $batch->total_planned }} bag
@else - @endif
@endsection @push('js') @endpush