New: Update only the multiprices that have been changed
When a multiprice was changed all level prices were updated at once and history of prices is getting very large.
This commit is contained in:
parent
784c13d9d0
commit
54418c168b
@ -351,7 +351,10 @@ if (empty($reshook))
|
||||
break;
|
||||
}
|
||||
|
||||
$res = $object->updatePrice($newprice, $val['price_base_type'], $user, $val['vat_tx'], $newprice_min, $key, $val['npr'], $psq, 0, $val['localtaxes_array'], $val['default_vat_code']);
|
||||
if($object->multiprices[$key]!=$newprice || $object->multiprices_min[$key]!=$newprice_min || $object->multiprices_base_type[$key]!=$val['price_base_type'])
|
||||
$res = $object->updatePrice($newprice, $val['price_base_type'], $user, $val['vat_tx'], $newprice_min, $key, $val['npr'], $psq, 0, $val['localtaxes_array'], $val['default_vat_code']);
|
||||
else $res=0;
|
||||
|
||||
|
||||
if ($res < 0) {
|
||||
$error ++;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user