[CORE] retrait la page de configuration et des tests sur la variable d'activation du module qui est inutile (#incoterm).

This commit is contained in:
phf 2015-02-10 11:45:23 +01:00
parent e27ff07e29
commit 791bd7e9d9
3 changed files with 9 additions and 33 deletions

View File

@ -64,7 +64,7 @@ class modIncoterm extends DolibarrModules
$this->module_parts = array();
$this->dirs = array();
$this->config_page_url = array('incoterm.php');
$this->config_page_url = array();
// Dependencies
$this->depends = array(); // List of modules id that must be enabled if this module is enabled
@ -93,7 +93,7 @@ class modIncoterm extends DolibarrModules
'tabfieldvalue'=>array("code,libelle"), // List of fields (list of fields to edit a record)
'tabfieldinsert'=>array("code,libelle"), // List of fields (list of fields for insert)
'tabrowid'=>array("rowid"), // Name of columns with primary key (try to always name it 'rowid')
'tabcond'=>array($conf->global->INCOTERM_ACTIVATE,$conf->incoterm->enabled)
'tabcond'=>array($conf->incoterm->enabled)
);
$this->boxes = array(); // List of boxes

View File

@ -2090,30 +2090,6 @@ class Societe extends CommonObject
return $bac->getRibLabel(true);
}
/**
* Return incoterms informations
*
* @return string Bank number
*/
function display_incoterms()
{
$out = '';
$this->incoterms_libelle = '';
if (!empty($this->fk_incoterms))
{
$sql = 'SELECT code FROM '.MAIN_DB_PREFIX.'c_incoterms WHERE rowid = '.(int) $this->fk_incoterms;
$result = $this->db->query($sql);
if ($result)
{
$res = $this->db->fetch_object($result);
$out .= $res->code;
}
}
$out .= ' - '.$this->location_incoterms;
return $out;
}
/**
* Return Array of RIB

View File

@ -45,7 +45,7 @@ $langs->load("commercial");
$langs->load("bills");
$langs->load("banks");
$langs->load("users");
if ($conf->incoterm->enabled && !empty($conf->global->INCOTERM_ACTIVATE)) $langs->load("incoterm");
if ($conf->incoterm->enabled) $langs->load("incoterm");
if (! empty($conf->notification->enabled)) $langs->load("mails");
$mesg=''; $error=0; $errors=array();
@ -193,7 +193,7 @@ if (empty($reshook))
$object->webservices_key = GETPOST('webservices_key', 'san_alpha');
// Incoterms
if ($conf->incoterm->enabled && !empty($conf->global->INCOTERM_ACTIVATE))
if ($conf->incoterm->enabled)
{
$object->fk_incoterms = GETPOST('incoterm_id', 'int');
$object->location_incoterms = GETPOST('location_incoterms', 'alpha');
@ -522,7 +522,7 @@ if (empty($reshook))
}
// Set incoterm
if ($action == 'set_incoterms' && $conf->incoterm->enabled && !empty($conf->global->INCOTERM_ACTIVATE))
if ($action == 'set_incoterms' && $conf->incoterm->enabled)
{
$object->fetch($socid);
$result = $object->setIncoterms(GETPOST('incoterm_id', 'int'), GETPOST('location_incoterms', 'alpha'));
@ -1089,7 +1089,7 @@ else
}
// Incoterms
if ($conf->incoterm->enabled && !empty($conf->global->INCOTERM_ACTIVATE))
if ($conf->incoterm->enabled)
{
print '<tr>';
print '<td><label for="incoterm_id">'.$langs->trans("IncotermLabel").'</label></td>';
@ -1221,7 +1221,7 @@ else
$object->webservices_key = GETPOST('webservices_key', 'san_alpha');
//Incoterms
if ($conf->incoterm->enabled && !empty($conf->global->INCOTERM_ACTIVATE))
if ($conf->incoterm->enabled)
{
$object->fk_incoterms = GETPOST('incoterm_id', 'int');
$object->location_incoterms = GETPOST('lcoation_incoterms', 'alpha');
@ -1615,7 +1615,7 @@ else
}
// Incoterms
if ($conf->incoterm->enabled && !empty($conf->global->INCOTERM_ACTIVATE))
if ($conf->incoterm->enabled)
{
print '<tr>';
print '<td><label for="incoterm_id">'.$langs->trans("IncotermLabel").'</label></td>';
@ -2011,7 +2011,7 @@ else
}
// Incoterms
if ($conf->incoterm->enabled && !empty($conf->global->INCOTERM_ACTIVATE))
if ($conf->incoterm->enabled)
{
print '<tr><td>';
print '<table width="100%" class="nobordernopadding"><tr><td>';