--- /tmp/dsg/dolibarr/htdocs/core/modules/bom/github_19.0.3_mod_bom_advanced.php
+++ /tmp/dsg/dolibarr/htdocs/core/modules/bom/client_mod_bom_advanced.php
@@ -35 +35 @@
-class mod_bom_advanced extends ModeleNumRefBoms
+class mod_bom_advanced extends ModeleNumRefboms
@@ -38,3 +38,3 @@
- * Dolibarr version of the loaded document
- * @var string
- */
+ * Dolibarr version of the loaded document
+ * @var string
+ */
@@ -54,9 +54,8 @@
- /**
- * Returns the description of the numbering model
- *
- * @param Translate $langs Lang object to use for output
- * @return string Descriptive text
- */
- public function info($langs)
- {
- global $langs, $db;
+ /**
+ * Returns the description of the numbering model
+ *
+ * @return string Texte descripif
+ */
+ public function info()
+ {
+ global $conf, $langs, $db;
@@ -83 +82 @@
- $texte .= '
'.$form->textwithpicto('', $tooltip, 1, 1).' | ';
+ $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).' | ';
@@ -85 +84 @@
- $texte .= ' | ';
+ $texte .= ' | ';
@@ -93 +92 @@
- }
+ }
@@ -95,8 +94,8 @@
- /**
- * 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;
@@ -104,5 +103,5 @@
- $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, '');
@@ -112 +111,2 @@
- if (!$numExample) {
+ if (!$numExample)
+ {
@@ -116 +116 @@
- }
+ }
@@ -125,2 +125,2 @@
- public function getNextValue($objprod, $object)
- {
+ public function getNextValue($objprod, $object)
+ {
@@ -132 +132 @@
- $mask = getDolGlobalString('BOM_ADVANCED_MASK');
+ $mask = $conf->global->BOM_ADVANCED_MASK;
@@ -134 +134,2 @@
- if (!$mask) {
+ if (!$mask)
+ {
--- /tmp/dsg/dolibarr/htdocs/core/modules/bom/github_19.0.3_mod_bom_standard.php
+++ /tmp/dsg/dolibarr/htdocs/core/modules/bom/client_mod_bom_standard.php
@@ -28 +28 @@
- * Class to manage the Standard numbering rule for BOM
+ * Class to manage customer order numbering rules standard
@@ -30 +30 @@
-class mod_bom_standard extends ModeleNumRefBoms
+class mod_bom_standard extends ModeleNumRefboms
@@ -54,2 +54 @@
- * @param Translate $langs Lang object to use for output
- * @return string Descriptive text
+ * @return string Text with description
@@ -57 +56 @@
- public function info($langs)
+ public function info()
@@ -60 +59 @@
- return $langs->trans("SimpleNumRefModelDesc", $this->prefix);
+ return $langs->trans("SimpleNumRefModelDesc", $this->prefix);
@@ -79,2 +78 @@
- * @param Object $object Object we need next value for
- * @return boolean false if conflict, true if ok
+ * @return boolean false if conflict, true if ok
@@ -82 +80 @@
- public function canBeActivated($object)
+ public function canBeActivated()
@@ -86,2 +84 @@
- $coyymm = '';
- $max = '';
+ $coyymm = ''; $max = '';
@@ -96 +93,2 @@
- if ($resql) {
+ if ($resql)
+ {
@@ -98,4 +96 @@
- if ($row) {
- $coyymm = substr($row[0], 0, 6);
- $max = $row[0];
- }
+ if ($row) { $coyymm = substr($row[0], 0, 6); $max = $row[0]; }
@@ -103 +98,2 @@
- if ($coyymm && !preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $coyymm)) {
+ if ($coyymm && !preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $coyymm))
+ {
@@ -131 +127,2 @@
- if ($resql) {
+ if ($resql)
+ {
@@ -133,6 +130,5 @@
- if ($obj) {
- $max = intval($obj->max);
- } else {
- $max = 0;
- }
- } else {
+ if ($obj) $max = intval($obj->max);
+ else $max = 0;
+ }
+ else
+ {
@@ -145 +141 @@
- $yymm = dol_print_date($date, "%y%m");
+ $yymm = strftime("%y%m", $date);
@@ -147,5 +143,2 @@
- if ($max >= (pow(10, 4) - 1)) {
- $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is
- } else {
- $num = sprintf("%04s", $max + 1);
- }
+ if ($max >= (pow(10, 4) - 1)) $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is
+ else $num = sprintf("%04s", $max + 1);