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:
parent
dfc0ab7bfb
commit
7569b32281
@ -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)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user