@if($configuraciones && $configuraciones->logo) @else @endif
{{ $configuraciones ? $configuraciones->nombre_clinica : 'CLÍNICA DEVMEDIC' }}
Dirección: {{ $configuraciones ? $configuraciones->direccion : 'Matriz Principal' }}
Teléfono: {{ $configuraciones ? $configuraciones->telefono : 'S/N' }}
VENTAS DE FARMACIA
Período: {{ \Carbon\Carbon::parse($fechaDesde)->format('d/m/Y') }} al {{ \Carbon\Carbon::parse($fechaHasta)->format('d/m/Y') }}
Generado el: {{ $fechaReporte }}
@php $totalMonto = $ventas->sum('total'); $totalSubtotal = $ventas->sum('subtotal'); $totalDescuentos = $ventas->sum('descuento'); $cantidadVentas = $ventas->count(); @endphp
Comprobantes Emitidos: {{ $cantidadVentas }} Subtotal: ${{ number_format($totalSubtotal, 2) }} Descuentos Otorgados: -${{ number_format($totalDescuentos, 2) }} Recaudación Neta Total: ${{ number_format($totalMonto, 2) }}
@if($ventas->isEmpty())

No se registraron ventas en el período seleccionado.

@else @foreach($ventas as $idx => $v) @endforeach
# Comprobante Fecha Paciente / Cliente Documento Método Pago Dispensado Por Subtotal Descuento Total ($)
{{ $idx + 1 }} {{ $v->nro_comprobante }} {{ $v->created_at->format('d/m/Y') }} {{ $v->cliente_nombre }} {{ $v->cliente_documento ?: 'Consumidor Final' }} {{ $v->metodo_pago }} {{ $v->user ? $v->user->name : 'N/A' }} ${{ number_format($v->subtotal, 2) }} -${{ number_format($v->descuento, 2) }} ${{ number_format($v->total, 2) }}
TOTALES DEL PERÍODO: ${{ number_format($totalSubtotal, 2) }} -${{ number_format($totalDescuentos, 2) }} ${{ number_format($totalMonto, 2) }}
@endif