FIX GETPOST of qty with wrong parameters
Conflicts: htdocs/bom/bom_card.php
This commit is contained in:
parent
445a751d6b
commit
16253a79ee
@ -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');
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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 == '')
|
||||
|
||||
@ -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');
|
||||
|
||||
|
||||
@ -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');
|
||||
|
||||
|
||||
@ -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');
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user