REPORTE DE PSICOTRÓPICOS Y ESTUPEFACIENTES

@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') }}
@foreach ($data as $row) @endforeach
Código DIGEMID Medicamento Unidad Cantidad F.F. Médico CMP Diagnóstico CIE10 N. Receta Fecha receta Fecha venta Hora venta Usuario Requiere Receta
{{ $row->item->drug_code }} {{ $row->item->description }} {{ $row->item->unit_type_id }} {{ $row->quantity }} {{ $row->item->concentration }} {{ $row->doctor ? $row->doctor->name : ($row->doctor_name ?? '-') }} {{ $row->doctor ? $row->doctor->cmp : '-' }} {{ $row->diagnosis_text ?? ($row->diagnostic ? $row->diagnostic->diagnoses_description : '-') }} {{ $row->diagnostic ? $row->diagnostic->diagnoses_code : '-' }} {{ $row->prescription_number }} {{ $row->prescription_date }} {{ $row->document ? $row->document->created_at->format('d/m/Y') : $row->sale_note->created_at->format('d/m/Y') }} {{ $row->document ? $row->document->created_at->format('h:m') : $row->sale_note->created_at->format('h:m') }} {{ $row->user->name }} {{ $row->item->requires_prescription ? 'Si' : 'No' }}