@extends('layouts.app') @section('title', 'Venta ' . $venta->numero_ticket) @section('header', 'Detalle de Venta') @section('content') @php $moneda = $empresaGlobal->moneda ?? 'S/'; @endphp

Ticket {{ $venta->numero_ticket }}

{{ $venta->fecha_venta->format('d/m/Y H:i:s') }}

@if($venta->estado == 'completada') Completada @else Anulada @endif
@foreach($venta->detalles as $d) @endforeach
Producto Cantidad Precio Total

{{ $d->descripcion }}

{{ $d->codigo }}

{{ number_format($d->cantidad, 2) }} {{ $moneda }}{{ number_format($d->precio_unitario, 2) }} {{ $moneda }}{{ number_format($d->total, 2) }}
Subtotal:{{ $moneda }}{{ number_format($venta->subtotal, 2) }}
@if($venta->descuento > 0)
Descuento:-{{ $moneda }}{{ number_format($venta->descuento, 2) }}
@endif
Impuesto:{{ $moneda }}{{ number_format($venta->impuesto, 2) }}
TOTAL:{{ $moneda }}{{ number_format($venta->total, 2) }}

Información

Cliente: {{ $venta->cliente?->nombre_completo ?? 'Genérico' }}

Cajero: {{ $venta->user->name }}

Forma de pago: {{ ucfirst($venta->forma_pago) }}

Recibido: {{ $moneda }}{{ number_format($venta->monto_recibido, 2) }}

Cambio: {{ $moneda }}{{ number_format($venta->cambio, 2) }}

Imprimir Ticket @if($venta->estado == 'completada' && ($empresaGlobal->facturacion_electronica_activa ?? false)) @if($venta->comprobante_electronico_id) @php $cpe = \App\Models\ComprobanteElectronico::find($venta->comprobante_electronico_id); @endphp @if($cpe) Ver {{ $cpe->tipo_documento_nombre }} {{ $cpe->numero_completo }} @endif @else
@csrf

Emitir comprobante electrónico:

@if($venta->cliente && strtoupper($venta->cliente->tipo_documento) === 'RUC') @endif
@endif @endif @if($venta->estado == 'completada')
@csrf
@endif Volver
@endsection