@extends('layouts.admin') @section('title', 'Entregas') @section('content')

Órdenes de entrega

Programación y seguimiento de entregas

@if(($q ?? '') !== '' || ($date ?? '') !== '') Limpiar @endif
@forelse($deliveries as $d) @empty @endforelse
Número Pedido Cliente Programada Repartidor Estado
{{ $d->number }} {{ $d->order->number }} {{ $d->client->business_name }} {{ $d->scheduled_at->format('d/m/Y H:i') }} {{ $d->driverLabel() }} {{ $d->statusLabel() }} Ver @if($d->status->value !== 'DELIVERED') Editar @endif @if(in_array($d->status->value, ['SCHEDULED', 'ASSIGNED', 'IN_TRANSIT'])) Completar
@csrf
@csrf @method('DELETE')
@endif @if($d->status->value === 'DELIVERED' || $d->order?->status?->value === 'DELIVERED') @if($d->evidence_path) Evidencia @endif @if(auth()->user()->hasPermission('billing.emit') && \App\Services\ElectronicBilling\BillingSettings::enabled()) @if($d->order?->electronicInvoice) Ver factura @elseif($d->order?->canEmitInvoice()) Facturar @elseif($reason = $d->order?->invoiceBlockReason()) {{ \Illuminate\Support\Str::limit($reason, 42) }} @endif @endif @endif
@if(($q ?? '') !== '' || ($date ?? '') !== '') No hay entregas con ese criterio. @else No hay entregas programadas. @endif
@if($deliveries->hasPages()) @endif
@endsection @push('scripts') @endpush