Webservice thirdparty / sale representative

Little patch to add capability to associate (one) sale representative on thirdparty creation.
This commit is contained in:
mika31 2014-07-23 20:23:37 +02:00
parent a2760aeacb
commit f96f8384e6

View File

@ -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