Fix: use numbering model corresponding to the entity of the object
This commit is contained in:
parent
80adac12c0
commit
05c666c18b
@ -3347,12 +3347,19 @@ class Propal extends CommonObject
|
|||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
$langs->load("propal");
|
$langs->load("propal");
|
||||||
|
|
||||||
if (! empty($conf->global->PROPALE_ADDON))
|
$constant = 'PROPALE_ADDON_'.$this->entity;
|
||||||
|
|
||||||
|
if (! empty($conf->global->$constant)) {
|
||||||
|
$classname = $conf->global->$constant; // for multicompany proposal sharing
|
||||||
|
} else {
|
||||||
|
$classname = $conf->global->PROPALE_ADDON;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! empty($classname))
|
||||||
{
|
{
|
||||||
$mybool=false;
|
$mybool=false;
|
||||||
|
|
||||||
$file = $conf->global->PROPALE_ADDON.".php";
|
$file = $classname.".php";
|
||||||
$classname = $conf->global->PROPALE_ADDON;
|
|
||||||
|
|
||||||
// Include file with class
|
// Include file with class
|
||||||
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
|
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
|
||||||
|
|||||||
@ -115,8 +115,14 @@ class mod_propale_saphir extends ModeleNumRefPropales
|
|||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT .'/core/lib/functions2.lib.php';
|
require_once DOL_DOCUMENT_ROOT .'/core/lib/functions2.lib.php';
|
||||||
|
|
||||||
|
$constant = 'PROPALE_SAPHIR_MASK_'.$propal->entity;
|
||||||
|
|
||||||
// On defini critere recherche compteur
|
// On defini critere recherche compteur
|
||||||
|
if (! empty($conf->global->$constant)) {
|
||||||
|
$mask = $conf->global->$constant; // for multicompany proposal sharing
|
||||||
|
} else {
|
||||||
$mask = $conf->global->PROPALE_SAPHIR_MASK;
|
$mask = $conf->global->PROPALE_SAPHIR_MASK;
|
||||||
|
}
|
||||||
|
|
||||||
if (! $mask)
|
if (! $mask)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user