FIX GETPOST of qty with wrong parameters

This commit is contained in:
Laurent Destailleur 2021-01-11 13:00:29 +01:00
parent 7ba73f6c25
commit f3e28c2dd0
8 changed files with 9 additions and 9 deletions

View File

@ -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'));

View File

@ -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);

View File

@ -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

View File

@ -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

View File

@ -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 == '')

View File

@ -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');

View File

@ -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');

View File

@ -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');