@if ($sale) @php $currency = $currency ?? country_currency(); $countryCode = $countryCode ?? country_code(); @endphp
Detalle de Venta {{-- #{{ $sale->id }} --}} @if ($sale->client) | {{ $sale->client->name }} {{ $sale->client->lastname }} @endif
Por favor espere
@if ($sale->source != 'Propio') Imagen @endif
@if ($sale->client)
Nombre: {{ $sale->client->name . ($sale->client->lastname ? ' ' . $sale->client->lastname : '') }}
@if ($sale->client->phone)
Teléfono: {{ $sale->client->phone_country_code ? '+' . $sale->client->phone_country_code : '' }}{{ $sale->client->phone }}
@endif @endif @if ($sale->address)
Dirección: {{ $sale->address->address }}
{{ __('dictionary.commune.word', [], $countryCode) }}: {{ $sale->address->state }}
@if ($sale->address->flat)
Departamento / Casa: {{ $sale->address->flat }}
@endif @if ($sale->address->note)
Comentario Dirección: {{ $sale->address->note }}
@endif @endif
{{-- @if ($usaQD) --}}
@if ($sale->source == 'Propio')
Usuario: {{ $sale->user->name }}
@else
Origen Venta: {{ $sale->source }}
@endif @if ($sale->type_sale == 'Despacho')
Proveedor Reparto: {{ $sale->delivery_provider == 'Origen' ? $sale->source : ($sale->delivery_provider != 'Origen' && $sale->delivery_provider != 'Propio' ? 'DeliFast' : 'Propio') }}
@endif
{{-- @endif --}}
Nota: {{ $sale->note }}
@if ($sale->delivery_provider == 'DeliFast') @if ( $sale->status == 'En Despacho' || $sale->status == 'En Producción' || $sale->status == 'Entregado' || $sale->status == 'Pagada') @endif @endif
@if (Auth::user()->profile == 'Super-Admin' || Auth::user()->profile == 'Soporte') @endif @if ( $sale->type_sale != 'Rapida' && $sale->status != 'Anulada' && $sale->status != 'En Despacho' && $sale->status != 'Pagada') @endif @if ($sale->status != 'Anulada' && $sale->status != 'Pagada' && $sale->status != 'En Despacho') @endif
@if ($selectDetail == 'Venta')
@foreach ($sale->saleDetails as $detail) @if ($detail->cancellation_reason == 'Anulación a través de la venta' || $detail->cancellation_reason == null) @endif @endforeach
Cant Nombre Precio Descuento Total
{{ $detail->quantity }} {{ $detail->name }}
@if ($detail->note) * {{ $detail->note }}
@endif @if ($detail->options) @foreach ($detail->optionsDetails as $option)

* {{ $option->name }} - ${{ number_format($option->price, 0, ',', '.') }}

@endforeach @endif
${{ number_format(($detail->price + $detail->discount) * $detail->quantity, 0, ',', '.') }} ${{ $detail->discount != 0 ? number_format($detail->discount * $detail->quantity, 0, ',', '.') : '0' }} ${{ number_format($detail->price * $detail->quantity, 0, ',', '.') }}

@foreach ($sale->payments as $payment)
{{ $payment->name }}
${{ number_format($payment->pivot->amount, 0, ',', '.') }}
@endforeach
Total Pagos:
${{ number_format($sale->amountPaid, 0, ',', '.') }}

SubTotal:
${{ number_format($sale->subtotal, 0, ',', '.') }}
Descuento:
${{ number_format($sale->discount, 0, ',', '.') }}
Despacho:
${{ number_format($sale->price_delivery, 0, ',', '.') }}
Propina:
${{ number_format($sale->tip, 0, ',', '.') }}
Total:
${{ number_format($sale->total, 0, ',', '.') }}
Vuelto:
${{ number_format($sale->change, 0, ',', '.') }}
@endif @if ($selectDetail == 'Despacho')
@if ($getDelivery)
avatar
Nombre Repartidor: {{ ucwords(strtolower($getDelivery['repartidor_nombre'])) }}
Teléfono Repartidor: {{ $getDelivery['repartidor_telefono'] }}
Estado: @if ($getDelivery['timestamp_cancelado'] != '0000-00-00 00:00:00') Lamentablemente tu pedido fue ANULADO. @elseif ($getDelivery['timestamp_entregado'] != '0000-00-00 00:00:00') El pedido ya fue entregado @elseif ($getDelivery['timestamp_llegada_casa'] != '0000-00-00 00:00:00') El repartidor está afuera de la casa del cliente @elseif ($getDelivery['timestamp_inicio_dropoff'] != '0000-00-00 00:00:00') El repartidor va en camino a dejar el pedido @elseif ($getDelivery['timestamp_llegada_local'] != '0000-00-00 00:00:00') El repartidor está afuera del local @elseif ($getDelivery['timestamp_inicio_pickup'] != '0000-00-00 00:00:00') El repartidor va en camino a buscar el pedido @else El sistema está buscando repartidores @endif
El pedido llegará: @if ($getDelivery['dropoff_eta'] != '0000-00-00 00:00:00') {{ \Carbon\Carbon::create($getDelivery['dropoff_eta'])->format('H:i') }} @endif
@if (isset($getDelivery['pincode']) && $getDelivery['pincode'])

Código Pin: {{ str_pad($getDelivery['pincode'], 4, '0', STR_PAD_LEFT) }}

@endif @if (!$sale->shipping_evidence_url)
@endif
@endif @if ( $sale->shipping_evidence_url || (isset($getDelivery['pickup_imagen']) && $getDelivery['pickup_imagen']) || (isset($getDelivery['dropoff_imagen']) && $getDelivery['dropoff_imagen']))
@if ($sale->shipping_evidence_url)
@endif @if (isset($getDelivery['pickup_imagen']) && $getDelivery['pickup_imagen'])

Foto de retiro

Foto de retiro
@endif @if (isset($getDelivery['dropoff_imagen']) && $getDelivery['dropoff_imagen'])

Foto de entrega

Foto de entrega
@endif
@endif
@endif
@if ($type_pos != 'delifast') @if ($sale->status != 'Sin Confirmar' && $sale->status != 'Anulada') @endif @endif @if ( $sale->status != 'Pagada' || Auth::user()->profile == 'Administrador' || Auth::user()->profile == 'Super-Admin' || Auth::user()->profile == 'Soporte') @endif
@endif