fix: ventas JSON uses FECHAFACT (billing date) instead of FECHA_RECEPCION
- generar_factura_venta: fecha = FECHAFACT with fallback to FECHA_RECEPCION - _SQL_VENTAS_BY_FACTURA: add JOIN FACTURA_DIAN to fetch FECHAFACT for send-one Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
f4f135ba29
commit
64682de147
@@ -265,7 +265,7 @@ def generar_factura_venta(rows: list, default_vendedor: str = "00",
|
||||
h = rows[0]
|
||||
|
||||
num_fac = (numero_override if numero_override else str(h.get("NUM_FACTURA") or "")).zfill(5)
|
||||
fecha = _fmt_fecha(h.get("FECHA_RECEPCION"))
|
||||
fecha = _fmt_fecha(h.get("FECHAFACT") or h.get("FECHA_RECEPCION"))
|
||||
|
||||
detalle_pedido = []
|
||||
for row in rows:
|
||||
|
||||
Reference in New Issue
Block a user