From 7569b32281f3d896391a5ad109dd0e9fe12e177f Mon Sep 17 00:00:00 2001 From: "Ying-Chun Liu (PaulLiu)" Date: Thu, 29 Jan 2015 00:57:54 +0800 Subject: [PATCH] Fix: webservices productorservice not updating the price. The product.php.class provides another method updatePrice() to update the price of products or services. We should call updatePrice() when we found the SOAP client changes the price or price_net. Signed-off-by: Ying-Chun Liu (PaulLiu) --- .../webservices/server_productorservice.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/htdocs/webservices/server_productorservice.php b/htdocs/webservices/server_productorservice.php index 6f36b664a3b..911b258536c 100644 --- a/htdocs/webservices/server_productorservice.php +++ b/htdocs/webservices/server_productorservice.php @@ -668,6 +668,25 @@ function updateProductOrService($authentication,$product) { $error++; } + if (! $error) + { + if ($newobject->price_base_type == 'HT') + { + $result=$newobject->updatePrice($newobject->price, $newobject->price_base_type,$fuser); + if ($result <= 0) + { + $error++; + } + } + elseif ($newobject->price_base_type == 'TTC') + { + $result=$newobject->updatePrice($newobject->price_ttc, $newobject->price_base_type); + if ($result <= 0) + { + $error++; + } + } + } if (! $error) {