Stabilizza picking barcode e patch cumulativa online

This commit is contained in:
2026-07-04 17:03:55 +02:00
parent 5dd7139b19
commit 77da8d9bad
13 changed files with 1153 additions and 97 deletions

View File

@@ -303,6 +303,23 @@ async def sp_xExePackingListPallet_async(db, IDOperatore: int, Documento: str, A
rc = int(rows[0].get("RC") or 0)
except Exception:
rc = 0
if rc == 0 and azione == "P":
resolve_sql = """
UPDATE dbo.py_BarcodePickingListSkip
SET Risolto = 1
WHERE Documento COLLATE Latin1_General_CI_AS =
CAST(:Documento AS varchar(50)) COLLATE Latin1_General_CI_AS
AND Risolto = 0;
"""
_log_sql("resolve_skipped_pallets_on_prenota", resolve_sql, {"Documento": Documento})
if hasattr(db, "exec"):
await db.exec(resolve_sql, {"Documento": Documento}, commit=True)
else:
await db.query_json(
resolve_sql + "\nSELECT 0 AS RC;",
{"Documento": Documento},
commit=True,
)
_MODULE_LOGGER.log(_MODULE_LOG_LEVEL, f"Stored procedure completata documento={Documento} azione={azione} rc={rc}")
return SPResult(rc=rc, message="", id_result=None)
except Exception as exc: