--- /tmp/dsg/dolibarr/htdocs/core/modules/mrp/github_mod_mo_advanced.php
+++ /tmp/dsg/dolibarr/htdocs/core/modules/mrp/client_mod_mo_advanced.php
@@ -4,7 +4,6 @@
  * Copyright (C) 2005-2009  Regis Houssin               <regis.houssin@inodbox.com>

  * Copyright (C) 2008       Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>

  * Copyright (C) 2019       Frédéric France             <frederic.france@netlogic.fr>

- * Copyright (C) 2020       Josep Lluís Amador          <joseplluis@lliuretic.cat>

  *

  * This program is free software; you can redistribute it and/or modify

  * it under the terms of the GNU General Public License as published by

@@ -36,9 +35,9 @@
 class mod_mo_advanced extends ModeleNumRefMos

 {

 	/**

-	 * Dolibarr version of the loaded document

-	 * @var string

-	 */

+     * Dolibarr version of the loaded document

+     * @var string

+     */

 	public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'

 

 	/**

@@ -52,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");

 

@@ -69,7 +68,7 @@
 		$texte .= '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';

 		$texte .= '<input type="hidden" name="token" value="'.newToken().'">';

 		$texte .= '<input type="hidden" name="action" value="updateMask">';

-		$texte .= '<input type="hidden" name="maskconstMo" value="MRP_MO_ADVANCED_MASK">';

+		$texte .= '<input type="hidden" name="maskconstBom" value="MRP_MO_ADVANCED_MASK">';

 		$texte .= '<table class="nobordernopadding" width="100%">';

 

 		$tooltip = $langs->trans("GenericMaskCodes", $langs->transnoentities("Mo"), $langs->transnoentities("Mo"));

@@ -90,22 +89,22 @@
 		$texte .= '</form>';

 

 		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;

 

@@ -114,7 +113,7 @@
 			$numExample = $langs->trans('NotConfigured');

 		}

 		return $numExample;

-	}

+    }

 

 	/**

 	 * 	Return next free value

@@ -123,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/mrp/github_mod_mo_standard.php
+++ /tmp/dsg/dolibarr/htdocs/core/modules/mrp/client_mod_mo_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_mo_standard::getNextValue", LOG_DEBUG);

 			return -1;

 		}