diff --git a/htdocs/admin/chequereceipts.php b/htdocs/admin/chequereceipts.php
index 819f322b853288d12441f861ef596054d7daa594..f319692f27ddfc8ca045d793653318bd178ac96f 100644
--- a/htdocs/admin/chequereceipts.php
+++ b/htdocs/admin/chequereceipts.php
@@ -183,7 +183,6 @@ foreach ($dirmodels as $reldir)
 							print '</td>'."\n";
 
 							print '<td align="center">';
-							//print "> ".$conf->global->PAYMENT_ADDON." - ".$file;
 							if ($conf->global->CHEQUERECEIPTS_ADDON == $file || $conf->global->CHEQUERECEIPTS_ADDON.'.php' == $file)
 							{
 								print img_picto($langs->trans("Activated"),'switch_on');
diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php
index c3366ea74978fa631263c63b74b5bf7fd989ac39..6d9132f8519955b86b0459bdc4a35042edf653a0 100644
--- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php
+++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php
@@ -345,7 +345,8 @@ class RemiseCheque extends CommonObject
 
 		$this->db->begin();
 
-		$numref=$this->getNextNumber();
+		//$numref=$this->getNextNumber();
+		$numref = $this->getNextNumRef();
 
 		if ($this->errno == 0 && $numref)
 		{
diff --git a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php
index 0abf3c897672f5e48667f06a2ad52c4bc0b85445..042f71e628d430ba85abfa398dc29caa8600b950 100644
--- a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php
+++ b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php
@@ -225,7 +225,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
 		$pdf->MultiCell(22,2,$outputlangs->transnoentities("Ref"),0,'L');
         $pdf->SetXY(32,15);
 		$pdf->SetFont('','', $default_font_size);
-        $pdf->MultiCell(60, 2, $outputlangs->convToOutputCharset($this->number.($this->ref_ext?" - ".$this->ref_ext:'')), 0, 'L');
+        $pdf->MultiCell(60, 2, $outputlangs->convToOutputCharset($this->ref.($this->ref_ext?" - ".$this->ref_ext:'')), 0, 'L');
 
 		$pdf->SetFont('','', $default_font_size);
         $pdf->SetXY(10,20);
diff --git a/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php b/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php
index ef0552c7e77c95f7da13988813a4c7100a1a1435..6df8f8a71252142c91e7b05eff306bac409ba1ab 100644
--- a/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php
+++ b/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php
@@ -52,7 +52,7 @@ class mod_chequereceipt_thyme extends ModeleNumRefChequeReceipts
 		$texte.= '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
 		$texte.= '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
 		$texte.= '<input type="hidden" name="action" value="updateMask">';
-		$texte.= '<input type="hidden" name="maskconstpayment" value="PAYMENT_THYME_MASK">';
+		$texte.= '<input type="hidden" name="maskconstchequereceipts" value="CHEQUERECEIPTS_THYME_MASK">';
 		$texte.= '<table class="nobordernopadding" width="100%">';
 
 		$tooltip=$langs->trans("GenericMaskCodes",$langs->transnoentities("Order"),$langs->transnoentities("Order"));
@@ -63,7 +63,7 @@ class mod_chequereceipt_thyme extends ModeleNumRefChequeReceipts
 
 		// Parametrage du prefix
 		$texte.= '<tr><td>'.$langs->trans("Mask").':</td>';
-		$texte.= '<td align="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskpayment" value="'.$conf->global->PAYMENT_THYME_MASK.'">',$tooltip,1,1).'</td>';
+		$texte.= '<td align="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskchequereceipts" value="'.$conf->global->CHEQUERECEIPTS_THYME_MASK.'">',$tooltip,1,1).'</td>';
 
 		$texte.= '<td align="left" rowspan="2">&nbsp; <input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"></td>';
 
@@ -110,7 +110,7 @@ class mod_chequereceipt_thyme extends ModeleNumRefChequeReceipts
 		require_once DOL_DOCUMENT_ROOT .'/core/lib/functions2.lib.php';
 
 		// We get cursor rule
-		$mask=$conf->global->PAYMENT_THYME_MASK;
+		$mask=$conf->global->CHEQUERECEIPTS_THYME_MASK;
 
 		if (! $mask)
 		{