diff --git a/htdocs/compta/cashcontrol/cashcontrol_card.php b/htdocs/compta/cashcontrol/cashcontrol_card.php index 4f67f02d7f5..fed2182e236 100644 --- a/htdocs/compta/cashcontrol/cashcontrol_card.php +++ b/htdocs/compta/cashcontrol/cashcontrol_card.php @@ -235,8 +235,15 @@ if ($action=="create" || $action=="start") $posmodule = GETPOST('posmodule', 'alpha'); $terminalid = GETPOST('posnumber', 'alpha'); $terminaltouse = $terminalid; + if ($terminaltouse == '1' && $posmodule=='cashdesk') $terminaltouse = ''; + if ($posmodule=='cashdesk' && $terminaltouse != '' && $terminaltouse != '1') { + $terminaltouse = ''; + setEventMessages($langs->trans("OnlyTerminal1IsAvailableForCashDeskModule"), null, 'errors'); + $error++; + } + // Calculate $initialbalanceforterminal for terminal 0 foreach($arrayofpaymentmode as $key => $val) { @@ -271,7 +278,7 @@ if ($action=="create" || $action=="start") } else { - setEventMessages($langs->trans("SetupOfTerminalNotComplete", $terminalid), null, 'errors'); + setEventMessages($langs->trans("SetupOfTerminalNotComplete", $terminaltouse), null, 'errors'); $error++; } }