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

Revert "FIXED Allowed 0 to be used as an account mask"
This commit is contained in:
Laurent Destailleur 2015-03-14 13:43:04 +01:00
commit da72cf387b
2 changed files with 3 additions and 7 deletions

View File

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

View File

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