From f96f8384e682b19d1669c3fd91e39eccd92234bf Mon Sep 17 00:00:00 2001
From: mika31 <mika31@users.noreply.github.com>
Date: Wed, 23 Jul 2014 20:23:37 +0200
Subject: [PATCH] Webservice thirdparty / sale representative
Little patch to add capability to associate (one) sale representative on thirdparty creation.
---
htdocs/webservices/server_thirdparty.php | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/htdocs/webservices/server_thirdparty.php b/htdocs/webservices/server_thirdparty.php
index 632a4c164e5..e5ae9a61e64 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
--
GitLab