Fix: box of customer and propsects were not correctly disabled.

This commit is contained in:
Laurent Destailleur 2014-10-12 15:49:14 +02:00
parent 5c07df812d
commit 30e27014b8
2 changed files with 34 additions and 1 deletions

View File

@ -37,12 +37,28 @@ class box_clients extends ModeleBoxes
var $depends = array("societe");
var $db;
var $param;
var $enabled = 1;
var $info_box_head = array();
var $info_box_contents = array();
/**
* Constructor
*
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
function __construct($db,$param='')
{
global $conf, $user;
$this->db = $db;
// disable box for such cases
if (! empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) $this->enabled=0; // disabled by this option
}
/**
* Load data for box to show them later
*

View File

@ -39,11 +39,28 @@ class box_prospect extends ModeleBoxes
var $depends = array("societe");
var $db;
var $enabled = 1;
var $info_box_head = array();
var $info_box_contents = array();
/**
* Constructor
*
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
function __construct($db,$param='')
{
global $conf, $user;
$this->db = $db;
// disable box for such cases
if (! empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) $this->enabled=0; // disabled by this option
}
/**
* Load data into info_box_contents array to show array later.
*