--- /tmp/dsg/dolibarr/htdocs/core/modules/supplier_order/github_mod_commande_fournisseur_muguet.php +++ /tmp/dsg/dolibarr/htdocs/core/modules/supplier_order/client_mod_commande_fournisseur_muguet.php @@ -116,7 +116,9 @@ if (!$coyymm || preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $coyymm)) { return true; - } else { + } + else + { $langs->load("errors"); $this->error = $langs->trans('ErrorNumRefModel', $max); return false; --- /tmp/dsg/dolibarr/htdocs/core/modules/supplier_order/github_mod_commande_fournisseur_orchidee.php +++ /tmp/dsg/dolibarr/htdocs/core/modules/supplier_order/client_mod_commande_fournisseur_orchidee.php @@ -33,15 +33,15 @@ class mod_commande_fournisseur_orchidee extends ModeleNumRefSuppliersOrders { /** - * Dolibarr version of the loaded document - * @var string - */ + * Dolibarr version of the loaded document + * @var string + */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' /** - * @var string Error code (or message) - */ - public $error = ''; + * @var string Error code (or message) + */ + public $error = ''; /** * @var string Nom du modele @@ -56,17 +56,17 @@ public $name = 'Orchidee'; - /** - * Returns the description of the numbering model - * - * @return string Texte descripif - */ - public function info() - { - global $db, $conf, $langs; + /** + * Returns the description of the numbering model + * + * @return string Texte descripif + */ + public function info() + { + global $db, $conf, $langs; // Load translation files required by the page - $langs->loadLangs(array("bills", "admin")); + $langs->loadLangs(array("bills", "admin")); $form = new Form($db); @@ -95,20 +95,20 @@ $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; - $mysoc->code_client = 'CCCCCCCCCC'; - $numExample = $this->getNextValue($mysoc, ''); + $old_code_client = $mysoc->code_client; + $mysoc->code_client = 'CCCCCCCCCC'; + $numExample = $this->getNextValue($mysoc, ''); $mysoc->code_client = $old_code_client; if (!$numExample) @@ -116,17 +116,17 @@ $numExample = $langs->trans('NotConfigured'); } return $numExample; - } + } /** * Return next value * * @param Societe $objsoc Object third party * @param Object $object Object - * @return string Value if OK, 0 if KO - */ - public function getNextValue($objsoc = 0, $object = '') - { + * @return string Value if OK, 0 if KO + */ + public function getNextValue($objsoc = 0, $object = '') + { global $db, $conf; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; @@ -146,17 +146,17 @@ } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Renvoie la reference de commande suivante non utilisee - * + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Renvoie la reference de commande suivante non utilisee + * * @param Societe $objsoc Object third party * @param Object $object Object - * @return string Texte descripif - */ - public function commande_get_num($objsoc = 0, $object = '') - { - // phpcs:enable - return $this->getNextValue($objsoc, $object); - } + * @return string Texte descripif + */ + public function commande_get_num($objsoc = 0, $object = '') + { + // phpcs:enable + return $this->getNextValue($objsoc, $object); + } } --- /tmp/dsg/dolibarr/htdocs/core/modules/supplier_order/github_modules_commandefournisseur.php +++ /tmp/dsg/dolibarr/htdocs/core/modules/supplier_order/client_modules_commandefournisseur.php @@ -43,13 +43,13 @@ public $error = ''; - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Return list of active generation models * - * @param DoliDB $db Database handler - * @param integer $maxfilenamelength Max length of value to show - * @return array List of templates + * @param DoliDB $db Database handler + * @param integer $maxfilenamelength Max length of value to show + * @return array List of templates */ public static function liste_modeles($db, $maxfilenamelength = 0) { @@ -82,7 +82,7 @@ * * @return boolean true if model can be used */ - public function isEnabled() + public function isEnabled() { return true; } @@ -91,7 +91,7 @@ * * @return string Description Text */ - public function info() + public function info() { global $langs; $langs->load("orders"); @@ -102,7 +102,7 @@ * * @return string Example */ - public function getExample() + public function getExample() { global $langs; $langs->load("orders"); @@ -113,7 +113,7 @@ * * @return boolean false if conflict, true if ok */ - public function canBeActivated() + public function canBeActivated() { return true; } @@ -122,7 +122,7 @@ * * @return string Valeur */ - public function getNextValue() + public function getNextValue() { global $langs; return $langs->trans("NotAvailable"); @@ -132,7 +132,7 @@ * * @return string Value */ - public function getVersion() + public function getVersion() { global $langs; $langs->load("admin");