Merge pull request #2318 from GPCsolutions/3.5-accountingmask
FIXED Allowed 0 to be used as an account mask
This commit is contained in:
commit
da042c1677
@ -44,8 +44,8 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode
|
||||
function __construct()
|
||||
{
|
||||
global $conf;
|
||||
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';
|
||||
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';
|
||||
$this->prefixcustomeraccountancycode=$conf->global->COMPANY_AQUARIUM_MASK_CUSTOMER;
|
||||
$this->prefixsupplieraccountancycode=$conf->global->COMPANY_AQUARIUM_MASK_SUPPLIER;
|
||||
}
|
||||
|
||||
@ -114,7 +114,11 @@ if ($action == 'setModuleOptions')
|
||||
{
|
||||
$param=GETPOST("param".$i,'alpha');
|
||||
$value=GETPOST("value".$i,'alpha');
|
||||
if ($param) $res = dolibarr_set_const($db,$param,$value,'chaine',0,'',$conf->entity);
|
||||
// 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 (! $res > 0) $error++;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user