From 791bd7e9d90d313337b527ad4effb5d08d969d49 Mon Sep 17 00:00:00 2001 From: phf Date: Tue, 10 Feb 2015 11:45:23 +0100 Subject: [PATCH] [CORE] retrait la page de configuration et des tests sur la variable d'activation du module qui est inutile (#incoterm). --- htdocs/core/modules/modIncoterm.class.php | 4 ++-- htdocs/societe/class/societe.class.php | 24 ----------------------- htdocs/societe/soc.php | 14 ++++++------- 3 files changed, 9 insertions(+), 33 deletions(-) diff --git a/htdocs/core/modules/modIncoterm.class.php b/htdocs/core/modules/modIncoterm.class.php index fbdc6b55d31..1d4f869b853 100644 --- a/htdocs/core/modules/modIncoterm.class.php +++ b/htdocs/core/modules/modIncoterm.class.php @@ -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 diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index d0cfa7e7f4d..dc411af3877 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -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 diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 5c821a2b86d..c9a3e796979 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -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 ''; print ''; @@ -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 ''; print ''; @@ -2011,7 +2011,7 @@ else } // Incoterms - if ($conf->incoterm->enabled && !empty($conf->global->INCOTERM_ACTIVATE)) + if ($conf->incoterm->enabled) { print ''; print '
';