diff --git a/app/routes/ventas.py b/app/routes/ventas.py index ed3d097..288fad8 100644 --- a/app/routes/ventas.py +++ b/app/routes/ventas.py @@ -43,8 +43,9 @@ def _query_rows(cfg, query_text, factura, fecha_inicio, fecha_fin): if not ok2: return None, err - if prefix and rows and "PREFIJO" in rows[0]: - rows = [r for r in rows if str(r.get("PREFIJO") or "").strip().upper() == prefix] + if rows and "PREFIJO" in rows[0]: + filter_prefix = prefix if prefix else "CMXC" + rows = [r for r in rows if str(r.get("PREFIJO") or "").strip().upper() == filter_prefix] return rows, None diff --git a/app/templates/ventas.html b/app/templates/ventas.html index cff4287..e20b1f0 100644 --- a/app/templates/ventas.html +++ b/app/templates/ventas.html @@ -175,7 +175,6 @@ function renderTabla() { let html = `
| IDRECEP. | Factura | Paciente | Contrato | @@ -220,7 +219,6 @@ function filaHtml(item) { return `|
|---|---|---|---|---|
| ${escHtml(id)} | -${escHtml(String(item.factura || '-'))} | ${escHtml(String(item.paciente || '-'))} | ${escHtml(String(item.contrato || '-'))} | ${escHtml(examsStr)} |