@if(isset($settings['company_logo']))
@endif
{{ $settings['company_name'] ?? 'MI RESTAURANTE' }}
{{ $settings['company_address'] ?? 'Dirección del Local' }}
Tel: {{ $settings['company_phone'] ?? '---' }}
{{ now()->format('d/m/Y H:i') }}
TICKET: #{{ str_pad($order->id, 6, '0', STR_PAD_LEFT) }}
@if($order->client_name && $order->client_name != 'Público')
Cli: {{ Str::limit($order->client_name, 20) }}
@endif
MESA: {{ $order->table->name ?? 'BARRA' }}
@foreach($order->details as $detail) @endforeach
C. DESCRIPCION TOTAL
{{ $detail->quantity }} {{ $detail->product->name }} @if($detail->note)
({{ $detail->note }}) @endif
{{ number_format($detail->quantity * $detail->price, 2) }}
@php $total_consumido = 0; $total_abonos = 0; // Calculamos automáticamente los positivos y los negativos foreach($order->details as $detail) { $line_total = $detail->quantity * $detail->price; if($line_total > 0) { $total_consumido += $line_total; } else { $total_abonos += abs($line_total); // Guardamos el valor en positivo para mostrarlo bonito } } @endphp
TOTAL CONSUMIDO: {{ $settings['currency_symbol'] ?? 'S/' }} {{ number_format($total_consumido, 2) }}
@if($total_abonos > 0)
ABONOS PREVIOS: - {{ $settings['currency_symbol'] ?? 'S/' }} {{ number_format($total_abonos, 2) }}
@endif @if($order->discount > 0)
Descuento: -{{ number_format($order->discount, 2) }}
@endif @if($order->tip > 0)
Propina: {{ number_format($order->tip, 2) }}
@endif
SALDO A PAGAR: {{ $settings['currency_symbol'] ?? 'S/' }} {{ number_format($order->total, 2) }}
F. PAGO: {{ strtoupper($order->payment_method) }}
RECIBIDO: {{ number_format($order->received_amount, 2) }} VUELTO: {{ number_format($order->change_amount, 2) }}