diff --git a/htdocs/bom/bom_card.php b/htdocs/bom/bom_card.php index a7563c933d8..47f1d336279 100644 --- a/htdocs/bom/bom_card.php +++ b/htdocs/bom/bom_card.php @@ -134,10 +134,10 @@ if (empty($reshook)) // Set if we used free entry or predefined product $idprod = (int) GETPOST('idprod', 'int'); - $qty = GETPOST('qty', 'int'); - $qty_frozen = GETPOST('qty_frozen', 'int'); + $qty = price2num(GETPOST('qty', 'alpha'), 'MS'); + $qty_frozen = price2num(GETPOST('qty_frozen', 'alpha'), 'MS'); $disable_stock_change = GETPOST('disable_stock_change', 'int'); - $efficiency = GETPOST('efficiency', 'int'); + $efficiency = price2num(GETPOST('efficiency', 'alpha')); if ($qty == '') { setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Qty')), null, 'errors'); @@ -155,8 +155,6 @@ if (empty($reshook)) if (!$error) { - $lastposition = 0; - $bomline = new BOMLine($db); $bomline->fk_bom = $id; $bomline->fk_product = $idprod; @@ -195,10 +193,10 @@ if (empty($reshook)) $error = 0; // Set if we used free entry or predefined product - $qty = price2num(GETPOST('qty', 'alpha')); - $qty_frozen = GETPOST('qty_frozen', 'int'); + $qty = price2num(GETPOST('qty', 'alpha'), 'MS'); + $qty_frozen = price2num(GETPOST('qty_frozen', 'alpha'), 'MS'); $disable_stock_change = GETPOST('disable_stock_change', 'int'); - $efficiency = price2num(GETPOST('efficiency', 'int')); + $efficiency = price2num(GETPOST('efficiency', 'alpha')); if ($qty == '') { setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Qty')), null, 'errors'); diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 12146179db0..997a5848434 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -809,7 +809,7 @@ if (empty($reshook)) $tva_tx = ''; } - $qty = price2num(GETPOST('qty'.$predef), 'MS'); + $qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS'); $remise_percent = GETPOST('remise_percent'.$predef); if (empty($remise_percent)) $remise_percent = 0; @@ -1234,7 +1234,7 @@ if (empty($reshook)) } } - $qty = price2num(GETPOST('qty'), 'MS'); + $qty = price2num(GETPOST('qty', 'alpha'), 'MS'); $result = $object->updateline(GETPOST('lineid', 'int'), $pu_ht, $qty, GETPOST('remise_percent'), $vat_rate, $localtax1_rate, $localtax2_rate, $description, 'HT', $info_bits, $special_code, GETPOST('fk_parent_line'), 0, $fournprice, $buyingprice, $label, $type, $date_start, $date_end, $array_options, $_POST["units"], $pu_ht_devise); diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 2ea5c37bf39..03a85346729 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -644,7 +644,7 @@ if (empty($reshook)) $tva_tx = ''; } - $qty = price2num(GETPOST('qty'.$predef, 'alpha')); + $qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS'); $remise_percent = (GETPOSTISSET('remise_percent'.$predef) ? price2num(GETPOST('remise_percent'.$predef, 'alpha')) : 0); // Extrafields diff --git a/htdocs/compta/facture/card-rec.php b/htdocs/compta/facture/card-rec.php index 097585dbea0..dac009afb23 100644 --- a/htdocs/compta/facture/card-rec.php +++ b/htdocs/compta/facture/card-rec.php @@ -450,7 +450,7 @@ if (empty($reshook)) $tva_tx = ''; } - $qty = price2num(GETPOST('qty'.$predef), 'alpha'); + $qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS'); $remise_percent = GETPOST('remise_percent'.$predef); // Extrafields diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 9ec2e04ee5c..e0f12bd83d1 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -395,7 +395,7 @@ if (empty($reshook)) $tva_tx = ''; } - $qty = price2num(GETPOST('qty'.$predef), 'alpha'); + $qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS'); $remise_percent = ((GETPOST('remise_percent'.$predef) != '') ? GETPOST('remise_percent'.$predef) : 0); if ($qty == '') diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 710657e1c16..de08ca82986 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -371,7 +371,7 @@ if (empty($reshook)) $tva_tx = ''; } - $qty = price2num(GETPOST('qty'.$predef), 'alpha'); + $qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS'); $remise_percent = GETPOST('remise_percent'.$predef); $price_ht_devise = price2num(GETPOST('multicurrency_price_ht'), 'CR'); diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 86955a7a411..8d7647a673c 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -1191,7 +1191,7 @@ if (empty($reshook)) $tva_tx = ''; } - $qty = price2num(GETPOST('qty'.$predef, 'alpha')); + $qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS'); $remise_percent = GETPOST('remise_percent'.$predef); $price_ht_devise = price2num(GETPOST('multicurrency_price_ht'), 'CR'); diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index a571a207bc5..0348fae8482 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -555,7 +555,7 @@ if (empty($reshook)) $tva_tx = ''; } - $qty = price2num(GETPOST('qty'.$predef), 'alpha'); + $qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS'); $remise_percent = GETPOST('remise_percent'.$predef); $price_ht_devise = price2num(GETPOST('multicurrency_price_ht'), 'CR');