More complete dependencies
This commit is contained in:
parent
1d02f6446f
commit
40e0347bb5
@ -31,11 +31,10 @@ class box_graph_product_distribution extends ModeleBoxes
|
|||||||
var $boxcode="productdistribution";
|
var $boxcode="productdistribution";
|
||||||
var $boximg="object_product";
|
var $boximg="object_product";
|
||||||
var $boxlabel="BoxProductDistribution";
|
var $boxlabel="BoxProductDistribution";
|
||||||
var $depends = array("product|service");
|
var $depends = array("product|service","facture|propal|commande");
|
||||||
|
|
||||||
var $db;
|
var $db;
|
||||||
var $param;
|
var $param;
|
||||||
var $enabled=1;
|
|
||||||
|
|
||||||
var $info_box_head = array();
|
var $info_box_head = array();
|
||||||
var $info_box_contents = array();
|
var $info_box_contents = array();
|
||||||
@ -52,7 +51,6 @@ class box_graph_product_distribution extends ModeleBoxes
|
|||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$this->db=$db;
|
$this->db=$db;
|
||||||
$this->enabled=($conf->facture->enabled || $conf->propal->enabled || $conf->commande->enabled);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -72,7 +72,7 @@ class InfoBox
|
|||||||
$sql.= " FROM ".MAIN_DB_PREFIX."boxes_def as d";
|
$sql.= " FROM ".MAIN_DB_PREFIX."boxes_def as d";
|
||||||
$sql.= " WHERE d.entity IN (0,".(! empty($conf->multicompany->enabled) && ! empty($conf->multicompany->transverse_mode)?"1,":"").$conf->entity.")";
|
$sql.= " WHERE d.entity IN (0,".(! empty($conf->multicompany->enabled) && ! empty($conf->multicompany->transverse_mode)?"1,":"").$conf->entity.")";
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_syslog(get_class()."::listBoxes get default box list for mode=".$mode." userid=".(is_object($user)?$user->id:'')."", LOG_DEBUG);
|
dol_syslog(get_class()."::listBoxes get default box list for mode=".$mode." userid=".(is_object($user)?$user->id:'')."", LOG_DEBUG);
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
@ -145,7 +145,7 @@ class InfoBox
|
|||||||
if (! empty($conf->$tmpmodule->enabled)) $tmpenabled=1;
|
if (! empty($conf->$tmpmodule->enabled)) $tmpenabled=1;
|
||||||
//print $boxname.'-'.$module.'-module enabled='.(empty($conf->$tmpmodule->enabled)?0:1).'<br>';
|
//print $boxname.'-'.$module.'-module enabled='.(empty($conf->$tmpmodule->enabled)?0:1).'<br>';
|
||||||
}
|
}
|
||||||
if (empty($tmpenabled)) // We found at least one module required that disabled
|
if (empty($tmpenabled)) // We found at least one module required that is disabled
|
||||||
{
|
{
|
||||||
$enabled=0;
|
$enabled=0;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user