Fix : issue for automatic customer and supplier increment code

This commit is contained in:
Philippe Grand 2010-09-22 15:56:41 +00:00
parent 37ae299941
commit 3d5134c29e

View File

@ -109,7 +109,7 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode
$posindice=8;
$sql = "SELECT MAX(SUBSTRING(".$field.",".$posindice.")) as max";
$sql.= " FROM ".MAIN_DB_PREFIX."societe";
$sql.= " WHERE ".$field." LIKE '".$prefix."%'";
$sql.= " WHERE ".$field." LIKE '".$prefix."____-%'";
$resql=$db->query($sql);
if ($resql)