Fix no error returned when contact already exists
This commit is contained in:
parent
22318bb800
commit
8f378b4480
@ -662,7 +662,7 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
if (! empty($conf->global->SUPPLIER_ORDER_AUTOADD_USER_CONTACT))
|
if (! empty($conf->global->SUPPLIER_ORDER_AUTOADD_USER_CONTACT))
|
||||||
{
|
{
|
||||||
$result=$this->add_contact($user->id, 'SALESREPFOLL', 'internal', 1);
|
$result=$this->add_contact($user->id, 'SALESREPFOLL', 'internal', 1);
|
||||||
if ($result < 0)
|
if ($result < 0 && $result != -2) // -2 means already exists
|
||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user