fix: ventas page only shows CMXC records, remove duplicate column
- _query_rows now always filters by PREFIJO='CMXC' (unless user specifies another prefix in the factura field) - Removed redundant first column IDRECEP from ventas table (factura_key and factura were identical) - Renamed header to just Factura Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
8ed8f0999f
commit
c0e66989ca
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user