Revert "FIXED Allowed 0 to be used as an account mask"
This commit is contained in:
parent
da042c1677
commit
4a9a3ab04b
@ -44,8 +44,8 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode
|
|||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
if (is_null($conf->global->COMPANY_AQUARIUM_MASK_CUSTOMER)) $conf->global->COMPANY_AQUARIUM_MASK_CUSTOMER='411';
|
if (empty($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_SUPPLIER)) $conf->global->COMPANY_AQUARIUM_MASK_SUPPLIER='401';
|
||||||
$this->prefixcustomeraccountancycode=$conf->global->COMPANY_AQUARIUM_MASK_CUSTOMER;
|
$this->prefixcustomeraccountancycode=$conf->global->COMPANY_AQUARIUM_MASK_CUSTOMER;
|
||||||
$this->prefixsupplieraccountancycode=$conf->global->COMPANY_AQUARIUM_MASK_SUPPLIER;
|
$this->prefixsupplieraccountancycode=$conf->global->COMPANY_AQUARIUM_MASK_SUPPLIER;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -114,11 +114,7 @@ if ($action == 'setModuleOptions')
|
|||||||
{
|
{
|
||||||
$param=GETPOST("param".$i,'alpha');
|
$param=GETPOST("param".$i,'alpha');
|
||||||
$value=GETPOST("value".$i,'alpha');
|
$value=GETPOST("value".$i,'alpha');
|
||||||
// Use the default values if the field is not set
|
if ($param) $res = dolibarr_set_const($db,$param,$value,'chaine',0,'',$conf->entity);
|
||||||
if ($param == '') {
|
|
||||||
$param = null;
|
|
||||||
}
|
|
||||||
$res = dolibarr_set_const($db,$param,$value,'chaine',0,'',$conf->entity);
|
|
||||||
if (! $res > 0) $error++;
|
if (! $res > 0) $error++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user