diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 6888c144a7c..5a9d075b4ff 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -57,6 +57,7 @@ class Product extends CommonObject //! Base price ('TTC' for price including tax or 'HT' for net price) var $price_base_type; //! Arrays for multiprices + var $pricelevel; var $multiprices=array(); var $multiprices_ttc=array(); var $multiprices_base_type=array(); diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 2d0a1816982..6b8f6b90ae3 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -88,6 +88,16 @@ if ($action == 'update_price' && ! $_POST["cancel"] && ($user->rights->produit-> $newpsq = empty($newpsq) ? 0 : $newpsq; } + //save level and multiprices for trigger + $object->pricelevel = $level; + if ($level) + { + $object->multiprices[$level]=$newprice; + $object->multiprices_base_type[$level]=$newpricebase; + $object->multiprices_tva_tx[$level]=$newvat; + $object->multiprices_min[$level]=$newprice_min; + } + if ($object->updatePrice($object->id, $newprice, $newpricebase, $user, $newvat, $newprice_min, $level, $newnpr, $newpsq) > 0) { $action = '';