Compare commits
2 Commits
fix/linea-
...
developmen
| Author | SHA1 | Date | |
|---|---|---|---|
| fd31777337 | |||
| 6db39444f4 |
@@ -184,7 +184,7 @@ class InterfazFlet:
|
||||
self.page.run_task(_done)
|
||||
|
||||
except Exception as ex:
|
||||
print(f"[UI ERROR] {ex}")
|
||||
log.error(f"[UI ERROR] Fallo en el hilo de sincronizacion: {ex}", exc_info=True)
|
||||
async def _err():
|
||||
self.status_label.value = f"Error: {ex}"
|
||||
self.page.update()
|
||||
|
||||
@@ -9,10 +9,11 @@ class Generador501SCAF:
|
||||
"""
|
||||
|
||||
# Lógica de Destino/Zona (SCAF a veces usa códigos distintos, pero el if parece igual)
|
||||
destino = datos_pedi.get("OPCIONDESTINO", "")
|
||||
# OJO: usar "or ''" y no get(k, ''), porque un NULL de BD llega como None y el default no aplica
|
||||
destino = datos_pedi.get("OPCIONDESTINO") or ""
|
||||
codigo_destino = "9" if "Interior" in destino else "7" if any(x in destino for x in ["Región", "Franja"]) else ""
|
||||
|
||||
clave_transfer = datos_cliente.get("CLAVETRANSFER", "").strip() if datos_cliente else ""
|
||||
clave_transfer = (datos_cliente.get("CLAVETRANSFER") or "").strip() if datos_cliente else ""
|
||||
|
||||
# Construcción del Registro 501 SCAF
|
||||
registro = {
|
||||
|
||||
@@ -9,11 +9,12 @@ class Generador501:
|
||||
"""
|
||||
|
||||
# Lógica de Destino/Zona (Opcional)
|
||||
destino = datos_pedi.get("Destino", "")
|
||||
# OJO: usar "or ''" y no get(k, ''), porque un NULL de BD llega como None y el default no aplica
|
||||
destino = datos_pedi.get("Destino") or ""
|
||||
codigo_destino = "9" if "Interior" in destino else "7" if any(x in destino for x in ["Región", "Franja"]) else ""
|
||||
|
||||
# Clave del Importador/Exportador
|
||||
clave_transfer = datos_cliente.get("CLAVETRANSFER", "").strip() if datos_cliente else ""
|
||||
clave_transfer = (datos_cliente.get("CLAVETRANSFER") or "").strip() if datos_cliente else ""
|
||||
|
||||
# Construcción del Registro 501
|
||||
registro = {
|
||||
|
||||
Reference in New Issue
Block a user