{{-- Diseño moderno (v3): lista de reservas. Misma búsqueda, pestañas y acciones que reservation/index; solo cambia la presentación. --}} @extends('layout.main') @section('content') @include('reservation._alerts') @php $tab = ['1' => 'activas', '2' => 'cerradas', '3' => 'cerradas', '4' => 'pagadas', 'cerradas' => 'cerradas', 'all' => 'todas', 'vencidas' => 'vencidas'][(string) $status] ?? 'activas'; $tabs = ['activas' => ['1', 'Activas'], 'vencidas' => ['vencidas', 'Vencidas'], 'pagadas' => ['4', 'Pagadas'], 'cerradas' => ['cerradas', 'Cerradas'], 'todas' => ['all', 'Todas']]; $pill = function ($r) { if ($r->is_overdue) return 'v3-pill-red'; return [1 => 'v3-pill-gray', 2 => 'v3-pill-green', 3 => 'v3-pill-gray', 4 => 'v3-pill-brand', 5 => 'v3-pill-brand'][$r->status] ?? 'v3-pill-gray'; }; $selectable = $tab == 'pagadas' && $can_edit; @endphp
Ya pagadas. Cuando el paquete sale o el cliente lo retira, abre la reserva y pulsa Confirmar envío o Confirmar retiro; para varias, márcalas y usa el botón de abajo.
@endif @if($reservations->isEmpty())| @endif | Cliente | Entrega | Total | Saldo | Estado |
|---|---|---|---|---|---|
| @endif |
{{ $r->customer->name ?? ($r->client_code ? 'Código ' . $r->client_code : 'Sin cliente') }}
{{ $r->reference_no }}@if($r->client_code && $r->customer) · {{ $r->client_code }}@endif
@if($r->due_date && $r->status == 1) · vence {{ \Carbon\Carbon::parse($r->due_date)->format('d/m') }}@elseif($r->status == 2 && $r->delivered_at) · entregada {{ \Carbon\Carbon::parse($r->delivered_at)->format('d/m') }}@else · {{ $r->created_at->format('d/m') }}@endif
· {{ preg_replace('/\s*-\s*Entre Tu y Yo$/i', '', $r->warehouse->name ?? '') }}
|
@if($r->shipping_method){{ $r->shipping_method }}@if($r->delivery_mode == 'envio' && $r->shipping_cost > 0) ${{ number_format($r->shipping_cost, 2) }} @endif @elsePor definir@endif |
${{ number_format($r->total, 2) }} | @if($r->surplus > 0)Excedente ${{ number_format($r->surplus, 2) }}@else${{ number_format($r->balance, 2) }}@endif | {{ $r->status_label }}
@if($r->status == 4 && $r->exit_issues) Falta: {{ implode('; ', $r->exit_issues) }} @endif
@if($r->merged_into && $r->mergedInto)→ {{ $r->mergedInto->reference_no }} @endif |