Fix test on terminal for 'cashdesk' module

This commit is contained in:
Laurent Destailleur 2019-08-18 21:01:17 +02:00
parent cef88283b3
commit 71be9f5b3f

View File

@ -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++;
}
}