Fix: le prix de base en mode multiprix n'tait plus mis jour
This commit is contained in:
parent
021860ebfe
commit
5e1c78ddd0
@ -65,21 +65,30 @@ if ($_POST["action"] == 'update_price' &&
|
||||
{
|
||||
if($_POST["price_".$i])
|
||||
{
|
||||
if ($_POST["multiprices_base_type_".$i] == 'TTC')
|
||||
// le prix 1 est considéré comme le prix de base du produit
|
||||
if ($i == 1)
|
||||
{
|
||||
$price_ttc = price2num($_POST["price_".$i],'MU');
|
||||
$price = price2num($_POST["price_".$i]) / (1 + ($product->tva_tx / 100));
|
||||
$price = price2num($price,'MU');
|
||||
$newprice=price2num($_POST["price_".$i],'MU');
|
||||
$newpricebase=$_POST["multiprices_base_type_".$i];
|
||||
}
|
||||
else
|
||||
{
|
||||
$price = price2num($_POST["price_".$i],'MU');
|
||||
$price_ttc = price2num($_POST["price_".$i]) * (1 + ($product->tva_tx / 100));
|
||||
$price_ttc = price2num($price_ttc,'MU');
|
||||
if ($_POST["multiprices_base_type_".$i] == 'TTC')
|
||||
{
|
||||
$price_ttc = price2num($_POST["price_".$i],'MU');
|
||||
$price = price2num($_POST["price_".$i]) / (1 + ($product->tva_tx / 100));
|
||||
$price = price2num($price,'MU');
|
||||
}
|
||||
else
|
||||
{
|
||||
$price = price2num($_POST["price_".$i],'MU');
|
||||
$price_ttc = price2num($_POST["price_".$i]) * (1 + ($product->tva_tx / 100));
|
||||
$price_ttc = price2num($price_ttc,'MU');
|
||||
}
|
||||
$product->multiprices["$i"] = $price;
|
||||
$product->multiprices_ttc["$i"] = $price_ttc;
|
||||
$product->multiprices_base_type["$i"] = $_POST["multiprices_base_type_".$i];
|
||||
}
|
||||
$product->multiprices["$i"] = $price;
|
||||
$product->multiprices_ttc["$i"] = $price_ttc;
|
||||
$product->multiprices_base_type["$i"] = $_POST["multiprices_base_type_".$i];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user