--- /tmp/dsg/dolibarr/htdocs/core/modules/bom/github_mod_bom_advanced.php +++ /tmp/dsg/dolibarr/htdocs/core/modules/bom/client_mod_bom_advanced.php @@ -35,9 +35,9 @@ class mod_bom_advanced extends ModeleNumRefboms { /** - * Dolibarr version of the loaded document - * @var string - */ + * Dolibarr version of the loaded document + * @var string + */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' /** @@ -51,14 +51,14 @@ public $name = 'advanced'; - /** - * Returns the description of the numbering model - * - * @return string Texte descripif - */ - public function info() - { - global $conf, $langs, $db; + /** + * Returns the description of the numbering model + * + * @return string Texte descripif + */ + public function info() + { + global $conf, $langs, $db; $langs->load("bills"); @@ -89,22 +89,22 @@ $texte .= ''; return $texte; - } + } - /** - * Return an example of numbering - * - * @return string Example - */ - public function getExample() - { - global $conf, $langs, $mysoc; + /** + * Return an example of numbering + * + * @return string Example + */ + public function getExample() + { + global $conf, $langs, $mysoc; - $old_code_client = $mysoc->code_client; - $old_code_type = $mysoc->typent_code; - $mysoc->code_client = 'CCCCCCCCCC'; - $mysoc->typent_code = 'TTTTTTTTTT'; - $numExample = $this->getNextValue($mysoc, ''); + $old_code_client = $mysoc->code_client; + $old_code_type = $mysoc->typent_code; + $mysoc->code_client = 'CCCCCCCCCC'; + $mysoc->typent_code = 'TTTTTTTTTT'; + $numExample = $this->getNextValue($mysoc, ''); $mysoc->code_client = $old_code_client; $mysoc->typent_code = $old_code_type; @@ -113,7 +113,7 @@ $numExample = $langs->trans('NotConfigured'); } return $numExample; - } + } /** * Return next free value @@ -122,8 +122,8 @@ * @param Object $object Object we need next value for * @return string Value if KO, <0 if KO */ - public function getNextValue($objprod, $object) - { + public function getNextValue($objprod, $object) + { global $db, $conf; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; --- /tmp/dsg/dolibarr/htdocs/core/modules/bom/github_mod_bom_standard.php +++ /tmp/dsg/dolibarr/htdocs/core/modules/bom/client_mod_bom_standard.php @@ -129,7 +129,9 @@ $obj = $db->fetch_object($resql); if ($obj) $max = intval($obj->max); else $max = 0; - } else { + } + else + { dol_syslog("mod_bom_standard::getNextValue", LOG_DEBUG); return -1; }