qty must be float (not int) (#31792)

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
Charlène Benke
2024-11-13 13:22:10 +01:00
committed by GitHub
parent 9b510f7662
commit 301d83edbf

View File

@@ -197,7 +197,7 @@ if (empty($reshook)) {
// Line to produce
$moline->fk_mo = $object->id;
$moline->qty = GETPOSTINT('qtytoadd');
$moline->qty = GETPOSTFLOAT('qtytoadd');
$moline->fk_product = GETPOSTINT('productidtoadd');
if (GETPOST('addconsumelinebutton')) {
$moline->role = 'toconsume';
@@ -493,7 +493,7 @@ if (empty($reshook)) {
$value = GETPOST('options_'.$key, 'alphanohtml');
$moline->array_options["options_".$key] = $value;
}
$moline->qty = GETPOSTINT('qty_lineProduce');
$moline->qty = GETPOSTFLOAT('qty_lineProduce');
$res = $moline->update($user);
if ($res < 0) {
setEventMessages($moline->error, $moline->errors, 'errors');