{{-- Tabla de reservas reutilizada en la lista y en la ficha del cliente. $selectable: casillas para confirmar envío / retiro. Orden: primero lo que importa (cliente, entrega, dinero y estado), después los datos de la reserva: Abrir · Cliente · Entrega · Total · Abono · Saldo · Estado · Reserva · Fechas · Tienda · Responsable. --}} @php $selectable = $selectable ?? false; @endphp
@if($selectable)@endif @foreach($reservations as $r) @php $store = $r->warehouse->name ?? ''; @endphp @if($selectable)@endif @endforeach
ClienteEntregaTotalAbonoSaldoEstadoReservaFechasTiendaResponsable
Abrir {{ $r->customer->name ?? '' }}@if($r->client_code)
{{ $r->client_code }}@endif @if(!$r->customer_id)
Sin datos de facturación@endif
@if($r->shipping_method) {{ $r->shipping_method }} @if($r->delivery_mode == 'envio')· ${{ number_format($r->shipping_cost, 2) }}@endif @if($r->shipping_note)
{{ \Illuminate\Support\Str::limit($r->shipping_note, 40) }}@endif @elsePor definir@endif
${{ number_format($r->total, 2) }} ${{ number_format($r->paid, 2) }} @if($r->surplus > 0)Excedente ${{ number_format($r->surplus, 2) }}@else${{ number_format($r->balance, 2) }}@endif @if(in_array($r->status, [4, 5])) @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
{{ $r->reference_no }} Creada {{ $r->created_at->format('d/m/y') }} @if($r->due_date && $r->status == 1)
Vence {{ \Carbon\Carbon::parse($r->due_date)->format('d/m/y') }}@endif @if($r->status == 2 && $r->delivered_at)
Entregada {{ \Carbon\Carbon::parse($r->delivered_at)->format('d/m/y') }}@endif
{{ preg_replace('/\s*-\s*Entre Tu y Yo$/i', '', $store) }}
{{ $r->user->name ?? '' }}