fix: ventas JSON - remove precioExcento, include NIT verification digit in codTercero

- Remove precioExcento field from detallePedido (not required by TNS)
- codTercero now uses full NIT without dash (e.g. 900123456-7 -> 9001234567)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-07-28 18:27:58 -05:00
co-authored by Claude Sonnet 4.6
parent 22e42463c7
commit 58dc364502
+1 -2
View File
@@ -279,7 +279,6 @@ def generar_factura_venta(rows: list, default_vendedor: str = "00",
"tipoUnidad": "M",
"descuento": 0,
"descuentoValor": 0,
"precioExcento": precio,
"centrosCostos": "00",
"porcIva": 0,
"valor": precio,
@@ -293,7 +292,7 @@ def generar_factura_venta(rows: list, default_vendedor: str = "00",
})
nit_raw = str(h.get("NIT_EMPRESA") or "").strip()
cod_tercero = nit_raw.split("-")[0].strip() if nit_raw else str(h.get("COD_PACIENTE") or "").strip()
cod_tercero = nit_raw.replace("-", "").strip() if nit_raw else str(h.get("COD_PACIENTE") or "").strip()
prefijo_real = str(h.get("PREFIJO") or "").strip() or default_prefijo or "00"