Fix test on terminal for 'cashdesk' module
This commit is contained in:
parent
cef88283b3
commit
71be9f5b3f
@ -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++;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user