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) <paulliu@debian.org>
This commit is contained in:
Ying-Chun Liu (PaulLiu) 2015-01-29 00:57:54 +08:00
parent dfc0ab7bfb
commit 7569b32281

View File

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