Skip to content
Snippets Groups Projects
Commit 1e78c4c4 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

FIX Change the customer code only if error on duplicate

parent 4bce2080
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment