Merge pull request #21135 from andreubisquerra/develop

TakePOS compatible without the banks module
This commit is contained in:
Laurent Destailleur 2022-06-07 09:29:22 +02:00 committed by GitHub
commit abd84a1b00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 2 deletions

View File

@ -1136,7 +1136,7 @@ if (isset($_SESSION["takeposterminal"]) && $_SESSION["takeposterminal"]) {
}
}
if (empty($paiementsModes)) {
if (empty($paiementsModes) && !empty($conf->banque->enabled)) {
$langs->load('errors');
setEventMessages($langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("TakePOS")), null, 'errors');
setEventMessages($langs->trans("ProblemIsInSetupOfTerminal", $_SESSION["takeposterminal"]), null, 'errors');

View File

@ -204,7 +204,7 @@ if (empty($reshook)) {
}
}
if ($bankaccount <= 0 && $pay != "delayed") {
if ($bankaccount <= 0 && $pay != "delayed" && !empty($conf->banque->enabled)) {
$errormsg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("BankAccount"));
$error++;
}

View File

@ -111,6 +111,9 @@ if ($resql) {
$arrayOfValidBankAccount[$conf->global->$accountname] = $conf->global->$accountname;
$arrayOfValidPaymentModes[] = $obj;
}
if (empty($conf->banque->enabled)) {
if ($paycode == 'CASH' || $paycode == 'CB') $arrayOfValidPaymentModes[] = $obj;
}
}
}
?>