@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 }}
| Empresa: | {{ $company->name }} |
| Ruc: | {{ $company->number }} |
| Establecimiento: | @if($establishment) {{ $establishment }} @else Todos @endif |
| Fecha: | @php $dateNow = new \Carbon\Carbon(); @endphp{{ $dateNow->format('d/m/Y h:m') }} |
| Código DIGEMID | Medicamento | Concentración | Unidad | Cantidad | @if(!$controlledReport)F.F. | @endifN. 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 }} | @if(!$controlledReport){{ $row->item->formula ?: '-' }} | @endif{{ $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 }} |