--- /tmp/dsg/dolibarr/htdocs/core/modules/cheque/github_19.0.3_mod_chequereceipt_mint.php
+++ /tmp/dsg/dolibarr/htdocs/core/modules/cheque/client_mod_chequereceipt_mint.php
@@ -51,2 +51 @@
-	 *	@param	Translate	$langs      Lang object to use for output

-	 *  @return string      			Descriptive text

+	 *  @return     string      Text with description

@@ -54 +53 @@
-	public function info($langs)

+	public function info()

@@ -57 +56 @@
-		return $langs->trans("SimpleNumRefModelDesc", $this->prefix);

+	  	return $langs->trans("SimpleNumRefModelDesc", $this->prefix);

@@ -76,2 +75 @@
-	 *  @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

@@ -79 +77 @@
-	public function canBeActivated($object)

+	public function canBeActivated()

@@ -83,2 +81 @@
-		$payyymm = '';

-		$max = '';

+		$payyymm = ''; $max = '';

@@ -93 +90,2 @@
-		if ($resql) {

+		if ($resql)

+		{

@@ -95,4 +93 @@
-			if ($row) {

-				$payyymm = substr($row[0], 0, 6);

-				$max = $row[0];

-			}

+			if ($row) { $payyymm = substr($row[0], 0, 6); $max = $row[0]; }

@@ -100 +95,2 @@
-		if ($payyymm && !preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $payyymm)) {

+		if ($payyymm && !preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $payyymm))

+		{

@@ -112,3 +108,3 @@
-	 *  @param	Societe			$objsoc     Object thirdparty

-	 *  @param  RemiseCheque	$object		Object we need next value for

-	 *  @return string      				Value if KO, <0 if KO

+	 *  @param	Societe		$objsoc     Object thirdparty

+	 *  @param  Object		$object		Object we need next value for

+	 *  @return string      			Value if KO, <0 if KO

@@ -128 +124,2 @@
-		if ($resql) {

+		if ($resql)

+		{

@@ -130,6 +127,5 @@
-			if ($obj) {

-				$max = intval($obj->max);

-			} else {

-				$max = 0;

-			}

-		} else {

+			if ($obj) $max = intval($obj->max);

+			else $max = 0;

+		}

+		else

+		{

@@ -142 +138 @@
-		$yymm = dol_print_date($date, "%y%m");

+		$yymm = strftime("%y%m", $date);

@@ -144,5 +140,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);

--- /tmp/dsg/dolibarr/htdocs/core/modules/cheque/github_19.0.3_mod_chequereceipt_thyme.php
+++ /tmp/dsg/dolibarr/htdocs/core/modules/cheque/client_mod_chequereceipt_thyme.php
@@ -35,3 +35,3 @@
-	 * Dolibarr version of the loaded document

-	 * @var string

-	 */

+     * Dolibarr version of the loaded document

+     * @var string

+     */

@@ -48,9 +48,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 $conf, $langs, $db;

+    /**

+     *  Returns the description of the numbering model

+     *

+     *  @return     string      Texte descripif

+     */

+	public function info()

+    {

+    	global $conf, $langs, $db;

@@ -77 +76 @@
-		$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskchequereceipts" value="' . getDolGlobalString('CHEQUERECEIPTS_THYME_MASK').'">', $tooltip, 1, 1).'</td>';

+		$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskchequereceipts" value="'.$conf->global->CHEQUERECEIPTS_THYME_MASK.'">', $tooltip, 1, 1).'</td>';

@@ -79 +78 @@
-		$texte .= '<td class="left" rowspan="2">&nbsp;<input type="submit" class="button button-edit reposition smallpaddingimp" name="Button"value="'.$langs->trans("Modify").'"></td>';

+		$texte .= '<td class="left" rowspan="2">&nbsp;<input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"></td>';

@@ -87 +86 @@
-	}

+    }

@@ -89,8 +88,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;

@@ -98,3 +97,3 @@
-		$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, '');

@@ -103 +102,2 @@
-		if (!$numExample) {

+		if (!$numExample)

+		{

@@ -107 +107 @@
-	}

+    }

@@ -112,3 +112,3 @@
-	 *  @param	Societe			$objsoc     Object thirdparty

-	 *  @param  RemiseCheque	$object		Object we need next value for

-	 *  @return string      				Value if KO, <0 if KO

+	 *  @param	Societe		$objsoc     Object thirdparty

+	 *  @param  Object		$object		Object we need next value for

+	 *  @return string      			Value if KO, <0 if KO

@@ -116,2 +116,2 @@
-	public function getNextValue($objsoc, $object)

-	{

+    public function getNextValue($objsoc, $object)

+    {

@@ -125 +125,2 @@
-		if (!$mask) {

+		if (!$mask)

+		{

@@ -130 +131 @@
-		$numFinal = get_next_value($db, $mask, 'bordereau_cheque', 'ref', '', $objsoc, empty($object) ? dol_now() : $object->date_bordereau);

+		$numFinal = get_next_value($db, $mask, 'bordereau_cheque', 'ref', '', $objsoc, $object->date_bordereau);

@@ -136 +137 @@
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps

+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps

@@ -143,6 +144,6 @@
-	 */

-	public function chequereceipt_get_num($objsoc, $objforref)

-	{

-		// phpcs:enable

-		return $this->getNextValue($objsoc, $objforref);

-	}

+     */

+    public function chequereceipt_get_num($objsoc, $objforref)

+    {

+        // phpcs:enable

+        return $this->getNextValue($objsoc, $objforref);

+    }

--- /tmp/dsg/dolibarr/htdocs/core/modules/cheque/github_19.0.3_modules_chequereceipts.php
+++ /tmp/dsg/dolibarr/htdocs/core/modules/cheque/client_modules_chequereceipts.php
@@ -30 +29,0 @@
-require_once DOL_DOCUMENT_ROOT.'/core/class/commonnumrefgenerator.class.php';

@@ -35,3 +34,4 @@
- *  Class parent for cheque Receipts numbering references mother class

- */

-abstract class ModeleNumRefChequeReceipts extends CommonNumRefGenerator

+ *  \class      ModeleNumRefChequeReceipts

+ *  \brief      Cheque Receipts numbering references mother class

+ */

+abstract class ModeleNumRefChequeReceipts

@@ -39 +39,79 @@
-	// No overload code

+	/**

+	 * @var string Error code (or message)

+	 */

+	public $error = '';

+

+	/**

+	 *	Return if a module can be used or not

+	 *

+	 *	@return		boolean     true if module can be used

+	 */

+	public function isEnabled()

+	{

+		return true;

+	}

+

+	/**

+	 *	Return the default description of numbering module

+	 *

+	 *	@return     string      Texte descripif

+	 */

+	public function info()

+	{

+		global $langs;

+		$langs->load("bills");

+		return $langs->trans("NoDescription");

+	}

+

+	/**

+	 *	Return numbering example

+	 *

+	 *	@return     string      Example

+	 */

+	public function getExample()

+	{

+		global $langs;

+		$langs->load("bills");

+		return $langs->trans("NoExample");

+	}

+

+	/**

+	 *  Checks if the numbers already in the database do not

+	 *  cause conflicts that would prevent this numbering working.

+	 *

+	 *	@return     boolean     false if conflict, true if ok

+	 */

+	public function canBeActivated()

+	{

+		return true;

+	}

+

+	/**

+	 *	Returns the next value

+	 *

+	 *	@param	Societe		$objsoc     Object thirdparty

+	 *	@param	Object		$object		Object we need next value for

+	 *	@return	string      Valeur

+	 */

+	public function getNextValue($objsoc, $object)

+	{

+		global $langs;

+		return $langs->trans("NotAvailable");

+	}

+

+	/**

+	 *	Returns the module numbering version

+	 *

+	 *	@return     string      Value

+	 */

+	public function getVersion()

+	{

+		global $langs;

+		$langs->load("admin");

+

+		if ($this->version == 'development') return $langs->trans("VersionDevelopment");

+		if ($this->version == 'experimental') return $langs->trans("VersionExperimental");

+		if ($this->version == 'dolibarr') return DOL_VERSION;

+		if ($this->version) return $this->version;

+		return $langs->trans("NotAvailable");

+	}

@@ -43 +121,2 @@
- *	Class parent for templates of document generation

+ *	\class      ModeleChequeReceipts

+ *	\brief      Classe mere des modeles de

@@ -62,0 +142,2 @@
+		global $conf;

+

@@ -64 +145 @@
-		$list = array();

+		$liste = array();

@@ -67 +148 @@
-		$list = getListOfModels($db, $type, $maxfilenamelength);

+		$liste = getListOfModels($db, $type, $maxfilenamelength);

@@ -69,3 +150,3 @@
-		$list = array('blochet'=>'blochet');

-

-		return $list;

+		$liste = array('blochet'=>'blochet');

+

+		return $liste;

@@ -84 +165 @@
- *	@return int        					Return integer <0 if KO, >0 if OK

+ *	@return int        					<0 if KO, >0 if OK

@@ -95,2 +176,4 @@
-	if (!dol_strlen($modele)) {

-		if (getDolGlobalString('CHEQUERECEIPT_ADDON_PDF')) {

+	if (!dol_strlen($modele))

+	{

+		if (!empty($conf->global->CHEQUERECEIPT_ADDON_PDF))

+		{

@@ -98 +181,3 @@
-		} else {

+		}

+		else

+		{

@@ -107 +192,2 @@
-	if (file_exists($dir.$file)) {

+	if (file_exists($dir.$file))

+	{

@@ -116 +202,2 @@
-		if ($obj->write_file($id, $outputlangs) > 0) {

+		if ($obj->write_file($id, $outputlangs) > 0)

+		{

@@ -119 +206,3 @@
-		} else {

+		}

+		else

+		{

@@ -124 +213,3 @@
-	} else {

+	}

+	else

+	{