@extends('admin.layouts.inventory') @section('title', 'Dispatches') @section('content') @php $fmt = fn ($n) => '₹'.number_format((float) ($n ?? 0), 2); @endphp @include('admin.inventory.partials.filter_bar', ['filters' => $filters])
@if ($dispatches->isEmpty())

@if ($filters->isActive()) No dispatches match these filters. @else No dispatches yet. Create one. @endif

@else @foreach ($dispatches as $row) @endforeach
Document Type From To (project) Date Status Gross Tax Total amount Action
{{ $row['document_number'] }} @if ($row['type'] === 'direct') {{ $row['type_label'] }} @else {{ $row['type_label'] }} @endif {{ $row['from'] }} {{ $row['to'] }} {{ $row['date']?->format('Y-m-d') ?? '—' }} {{ $row['status'] }} {{ $fmt($row['gross']) }} {{ $fmt($row['tax']) }} {{ $fmt($row['total']) }} @include('admin.inventory.partials.action_icons', [ 'view' => $row['view_url'], 'download' => $row['pdf_url'], 'downloadTooltip' => 'Download PDF', ])
@include('admin.inventory.partials.pagination', ['paginator' => $dispatches]) @endif
@endsection