Keep lot drawer open after creation

This commit is contained in:
gitea_admin committed 2026-09-08 15:08:27 +02:00
1 parent a9fa9955d2
commit f8f011f96c
3 files changed
+32 -4

No files matched your search

+12
View File
@@ -490,6 +490,18 @@ function is_qualified_open_lot(PDO $pdo, int $lotId): bool
return (bool) $stmt->fetchColumn();
}
function is_open_lot_selected_for_activation(PDO $pdo, int $lotId): bool
{
$stmt = $pdo->prepare(
"SELECT next_active
FROM stock_lot
WHERE id = :lot_id
AND status = 'open'"
);
$stmt->execute([':lot_id' => $lotId]);
return (bool) $stmt->fetchColumn();
}
function sync_open_lot_activation_selection(PDO $pdo, int $productId): void
{
$lockStmt = $pdo->prepare(