Skip to content
Snippets Groups Projects
Commit da72cf38 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Merge pull request #2451 from Dolibarr/revert-2318-3.5-accountingmask

Revert "FIXED Allowed 0 to be used as an account mask"
parents da042c16 4a9a3ab0
No related branches found
No related tags found
No related merge requests found
......@@ -44,8 +44,8 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode
function __construct()
{
global $conf;
if (is_null($conf->global->COMPANY_AQUARIUM_MASK_CUSTOMER)) $conf->global->COMPANY_AQUARIUM_MASK_CUSTOMER='411';
if (is_null($conf->global->COMPANY_AQUARIUM_MASK_SUPPLIER)) $conf->global->COMPANY_AQUARIUM_MASK_SUPPLIER='401';
if (empty($conf->global->COMPANY_AQUARIUM_MASK_CUSTOMER)) $conf->global->COMPANY_AQUARIUM_MASK_CUSTOMER='411';
if (empty($conf->global->COMPANY_AQUARIUM_MASK_SUPPLIER)) $conf->global->COMPANY_AQUARIUM_MASK_SUPPLIER='401';
$this->prefixcustomeraccountancycode=$conf->global->COMPANY_AQUARIUM_MASK_CUSTOMER;
$this->prefixsupplieraccountancycode=$conf->global->COMPANY_AQUARIUM_MASK_SUPPLIER;
}
......
......@@ -114,11 +114,7 @@ if ($action == 'setModuleOptions')
{
$param=GETPOST("param".$i,'alpha');
$value=GETPOST("value".$i,'alpha');
// Use the default values if the field is not set
if ($param == '') {
$param = null;
}
$res = dolibarr_set_const($db,$param,$value,'chaine',0,'',$conf->entity);
if ($param) $res = dolibarr_set_const($db,$param,$value,'chaine',0,'',$conf->entity);
if (! $res > 0) $error++;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment