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:
co-authored by
Claude Sonnet 4.6
parent
22e42463c7
commit
58dc364502
@@ -279,7 +279,6 @@ def generar_factura_venta(rows: list, default_vendedor: str = "00",
|
|||||||
"tipoUnidad": "M",
|
"tipoUnidad": "M",
|
||||||
"descuento": 0,
|
"descuento": 0,
|
||||||
"descuentoValor": 0,
|
"descuentoValor": 0,
|
||||||
"precioExcento": precio,
|
|
||||||
"centrosCostos": "00",
|
"centrosCostos": "00",
|
||||||
"porcIva": 0,
|
"porcIva": 0,
|
||||||
"valor": precio,
|
"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()
|
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"
|
prefijo_real = str(h.get("PREFIJO") or "").strip() or default_prefijo or "00"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user