From f3e28c2dd01a0bfbed8ba079fb8e7ec48f9fd7b4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 11 Jan 2021 13:00:29 +0100 Subject: [PATCH] FIX GETPOST of qty with wrong parameters --- htdocs/bom/bom_card.php | 2 +- htdocs/comm/propal/card.php | 4 ++-- htdocs/commande/card.php | 2 +- htdocs/compta/facture/card-rec.php | 2 +- htdocs/contrat/card.php | 2 +- htdocs/fourn/commande/card.php | 2 +- htdocs/fourn/facture/card.php | 2 +- htdocs/supplier_proposal/card.php | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/htdocs/bom/bom_card.php b/htdocs/bom/bom_card.php index 38e8b601cf6..6d91808f4b3 100644 --- a/htdocs/bom/bom_card.php +++ b/htdocs/bom/bom_card.php @@ -195,7 +195,7 @@ if (empty($reshook)) $error = 0; // Set if we used free entry or predefined product - $qty = price2num(GETPOST('qty', 'int')); + $qty = price2num(GETPOST('qty', 'alpha'), 'MS'); $qty_frozen = GETPOST('qty_frozen', 'int'); $disable_stock_change = GETPOST('disable_stock_change', 'int'); $efficiency = price2num(GETPOST('efficiency', 'int')); diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 71da2e69336..9a0861527e5 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; @@ -1239,7 +1239,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 1fc7a0bf48b..804fa40e4ca 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 25505325c98..0a950bec8c9 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 4ee7c2d631c..290f1722c38 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 ae8959441f0..10a5a261984 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 359f5cde3e1..5c6c7a62c8b 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');