diff --git a/htdocs/webservices/server_thirdparty.php b/htdocs/webservices/server_thirdparty.php index 632a4c164e5b2952b9c07c575075ea28e21568c0..e5ae9a61e647915f4aaeb7665ec553c7f631dc2d 100644 --- a/htdocs/webservices/server_thirdparty.php +++ b/htdocs/webservices/server_thirdparty.php @@ -471,6 +471,11 @@ function createThirdParty($authentication,$thirdparty) if (! $error) { $db->commit(); + + // Patch to add capability to associate (one) sale representative + if($thirdparty['commid'] && $thirdparty['commid']>0) + $newobject->add_commercial($fuser, $thirdparty["commid"]); + $objectresp=array('result'=>array('result_code'=>'OK', 'result_label'=>''),'id'=>$newobject->id,'ref'=>$newobject->ref); } else