FIX Change the customer code only if error on duplicate

This commit is contained in:
Laurent Destailleur 2017-01-28 14:54:06 +01:00
parent 4bce208035
commit 1e78c4c418

View File

@ -509,8 +509,8 @@ if (empty($reshook))
}
else
{
if($result == -3) {
if ($db->lasterrno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') // TODO Sometime errors on duplicate on profid and not on code, so
{
$duplicate_code_error = true;
$object->code_fournisseur = null;
$object->code_client = null;