This commit is contained in:
Lizandro Guarnizo
2026-04-06 17:06:58 -05:00
parent 619deac7cb
commit e1241a42ed
2 changed files with 32 additions and 0 deletions
+10
View File
@@ -151,6 +151,16 @@ class Domicilio {
$archivos = [['orden_id' => $dom['orden_id'], 'local_file' => $dom['orden_local_file']]];
}
$dom['archivos_ordenes'] = $archivos;
// Servicios extras registrados por el enfermero
$dom['servicios_extra'] = $this->db->fetchAll(
"SELECT id, descripcion, tipo, notas, requiere_pago, valor, created_at
FROM lab_servicios_extra
WHERE domicilio_id = ?
ORDER BY created_at ASC",
[$id]
);
return $dom;
}
+22
View File
@@ -826,6 +826,28 @@ async function verDomicilio(id) {
</div>
</div>`;
})() : ''}
${(dom.servicios_extra && dom.servicios_extra.length) ? `
<div class="row mt-3">
<div class="col-12">
<label class="form-label small text-muted text-uppercase"><i class="fas fa-plus-circle me-1 text-primary"></i>Servicios extras del enfermero</label>
<div class="table-responsive">
<table class="table table-sm table-bordered mb-0 small">
<thead class="table-light">
<tr><th>Tipo</th><th>Descripción</th><th>Notas</th><th>Valor</th></tr>
</thead>
<tbody>
${dom.servicios_extra.map(se => `
<tr>
<td><span class="badge bg-primary bg-opacity-75">${esc(se.tipo||'—')}</span></td>
<td>${esc(se.descripcion||'—')}</td>
<td class="text-muted">${esc(se.notas||'—')}</td>
<td>${se.valor ? '$'+Number(se.valor).toLocaleString('es-CO') : (se.requiere_pago ? '<span class="text-warning">Pendiente</span>' : '—')}</td>
</tr>`).join('')}
</tbody>
</table>
</div>
</div>
</div>` : ''}
${dom.notas_admin ? `
<div class="row mt-2">
<div class="col-12">