Release storico UDC e picking list

This commit is contained in:
2026-06-03 11:41:25 +02:00
parent 4dabba8ce7
commit 742f6a9fe9
28 changed files with 2021 additions and 42 deletions

View File

@@ -255,7 +255,7 @@ async def _execute(db, sql: str, params: Dict[str, Any]) -> int:
@_log_call()
async def sp_xExePackingListPallet_async(db, IDOperatore: int, Documento: str, Azione: str = "P") -> SPResult:
"""Execute the original reservation stored procedure used by the C# client."""
"""Execute the Python-specific picking-list reservation stored procedure."""
try:
azione = str(Azione or "P").strip().upper()
if azione not in ("P", "S"):
@@ -268,7 +268,7 @@ async def sp_xExePackingListPallet_async(db, IDOperatore: int, Documento: str, A
SET NOCOUNT ON;
DECLARE @RC int = 0;
EXEC dbo.sp_xExePackingListPallet
EXEC dbo.py_sp_xExePackingListPallet
@IDOperatore = :IDOperatore,
@Documento = :Documento,
@Azione = :Azione,
@@ -276,7 +276,7 @@ async def sp_xExePackingListPallet_async(db, IDOperatore: int, Documento: str, A
SELECT CAST(@RC AS int) AS RC;
"""
_log_sql("sp_xExePackingListPallet", sql, {"IDOperatore": IDOperatore, "Documento": Documento, "Azione": azione})
_log_sql("py_sp_xExePackingListPallet", sql, {"IDOperatore": IDOperatore, "Documento": Documento, "Azione": azione})
if not hasattr(db, "query_json"):
raise RuntimeError("Il client DB non espone query_json necessario per eseguire la stored procedure.")
res = await db.query_json(
@@ -288,7 +288,7 @@ async def sp_xExePackingListPallet_async(db, IDOperatore: int, Documento: str, A
rows = []
if isinstance(res, dict):
rows = res.get("rows", []) or []
_log_dataset("sp_xExePackingListPallet", rows)
_log_dataset("py_sp_xExePackingListPallet", rows)
rc = 0
if rows and isinstance(rows[0], dict):
try: