mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-22 09:21:30 +01:00
Fix: Numbering errors
This commit is contained in:
@@ -121,7 +121,7 @@ class mod_facture_terre extends ModeleNumRefFactures
|
||||
|
||||
// D'abord on r<>cup<75>re la valeur max (r<>ponse imm<6D>diate car champ ind<6E>x<EFBFBD>)
|
||||
$posindice=8;
|
||||
$sql = "SELECT MAX(facnumber+SUBSTRING(facnumber,".$posindice.")) as ref";
|
||||
$sql = "SELECT MAX(0+SUBSTRING(facnumber,".$posindice.")) as max";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."facture";
|
||||
$sql.= " WHERE facnumber like '".$prefix."%'";
|
||||
|
||||
@@ -129,7 +129,7 @@ class mod_facture_terre extends ModeleNumRefFactures
|
||||
if ($resql)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
if ($obj) $max = $obj->ref;
|
||||
if ($obj) $max = $obj->max;
|
||||
else $max=0;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user