Fix PRELEVEMENT_ADDDAYS check
If we used a positive value in PRELEVEMENT_ADDDAYS it couldn't submit the changes to database
This commit is contained in:
parent
04c233c229
commit
10ac74162e
@ -92,11 +92,10 @@ if ($action == "set")
|
||||
if (! $res > 0) $error++;
|
||||
}
|
||||
|
||||
if (GETPOST("PRELEVEMENT_ADDDAYS") || GETPOST("PRELEVEMENT_ADDDAYS")=="")
|
||||
{
|
||||
$res = dolibarr_set_const($db, "PRELEVEMENT_ADDDAYS", GETPOST("PRELEVEMENT_ADDDAYS"), 'chaine', 0, '', $conf->entity);
|
||||
if (! $res > 0) $error++;
|
||||
} elseif (! $error)
|
||||
$res = dolibarr_set_const($db, "PRELEVEMENT_ADDDAYS", GETPOST("PRELEVEMENT_ADDDAYS"), 'chaine', 0, '', $conf->entity);
|
||||
if (! $res > 0) $error++;
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$db->commit();
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user