Update index.php

This commit is contained in:
Laurent Destailleur 2022-08-31 14:55:53 +02:00 committed by GitHub
parent 7db656a9ba
commit 6a1b33b5ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,7 +58,7 @@ $setterminal = GETPOST('setterminal', 'int');
$setcurrency = GETPOST('setcurrency', 'aZ09');
if (empty($_SESSION["takeposterminal"])) {
if (getDolGlobalInt('TAKEPOS_NUM_TERMINALS') == "1") {
if (getDolGlobalInt('TAKEPOS_NUM_TERMINALS') == 1) {
$_SESSION["takeposterminal"] = 1; // Use terminal 1 if there is only 1 terminal
} elseif (!empty($_COOKIE["takeposterminal"])) {
$_SESSION["takeposterminal"] = preg_replace('/[^a-zA-Z0-9_\-]/', '', $_COOKIE["takeposterminal"]); // Restore takeposterminal from previous session