@php $reportType = request('report', 'prescription-sales'); $controlledReport = in_array($reportType, ['psychotropics', 'narcotics'], true); $reportTitle = [ 'prescription-sales' => 'VENTAS CON RECETA MÉDICA', 'psychotropics' => 'CONTROL DE PSICOTRÓPICOS', 'narcotics' => 'CONTROL DE ESTUPEFACIENTES', 'antibiotics' => 'VENTAS DE ANTIBIÓTICOS CON RECETA', ][$reportType] ?? 'VENTAS CON RECETA MÉDICA'; @endphp {{ $reportTitle }}

{{ $reportTitle }}

@php $dateNow = new \Carbon\Carbon(); @endphp
Empresa: {{ $company->name }}
Ruc: {{ $company->number }}
Establecimiento: @if($establishment) {{ $establishment }} @else Todos @endif
Fecha:{{ $dateNow->format('d/m/Y h:m') }}
@if(!$controlledReport) @endif @foreach ($data as $row) @if(!$controlledReport) @endif @endforeach
Código DIGEMID Medicamento Concentración Unidad CantidadF.F.N. Receta Fecha receta Médico Paciente/cliente Fecha venta Comprobante Usuario
{{ $row->item->cod_digemid }} {{ $row->item->description }} {{ $row->item->concentration ?: '-' }} {{ $row->item->unit_type_id }} {{ $row->quantity }}{{ $row->item->formula ?: '-' }}{{ $row->prescription_number }} {{ $row->prescription_date }} {{ $row->doctor ? $row->doctor->name : ($row->doctor_name ?? '-') }} {{ optional($row->customer)->name ?: (optional($row->customer)->description ?: '-') }} {{ $row->document ? $row->document->created_at->format('d/m/Y') : ($row->sale_note ? $row->sale_note->created_at->format('d/m/Y') : '-') }} {{ $row->document ? $row->document->number_full : ($row->sale_note ? $row->sale_note->number_full : '-') }} {{ $row->user->name }}