diff --git a/htdocs/variants/combinations.php b/htdocs/variants/combinations.php index 0d9de5d857f..c29fc519258 100644 --- a/htdocs/variants/combinations.php +++ b/htdocs/variants/combinations.php @@ -30,10 +30,13 @@ $langs->loadLangs(array("products", "other")); $id = GETPOST('id', 'int'); $valueid = GETPOST('valueid', 'int'); $ref = GETPOST('ref', 'alpha'); -$weight_impact = GETPOST('weight_impact', 'alpha'); -$price_impact = GETPOST('price_impact', 'alpha'); +$weight_impact = price2num(GETPOST('weight_impact', 'alpha'), 2); $price_impact_percent = (bool) GETPOST('price_impact_percent'); - +if ($price_impact_percent) { + $price_impact = price2num(GETPOST('price_impact', 'alpha'), 2); +} else { + $price_impact = price2num(GETPOST('price_impact', 'alpha'), 'MU'); +} $level_price_impact = GETPOST('level_price_impact', 'array'); $level_price_impact_percent = GETPOST('level_price_impact_percent', 'array'); diff --git a/htdocs/variants/list.php b/htdocs/variants/list.php index dcf4fdcdb43..ecb42ba25e2 100644 --- a/htdocs/variants/list.php +++ b/htdocs/variants/list.php @@ -16,8 +16,8 @@ */ require '../main.inc.php'; -require DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; -require DOL_DOCUMENT_ROOT.'/variants/class/ProductAttribute.class.php'; +require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; +require_once DOL_DOCUMENT_ROOT.'/variants/class/ProductAttribute.class.php'; $action = GETPOST('action', 'aZ09'); $object = new ProductAttribute($db);