From ef41ebb864d36e56d39d9f45d5ad7bedbc660e12 Mon Sep 17 00:00:00 2001 From: daGrumpf <64209003+daGrumpf-bxp@users.noreply.github.com> Date: Fri, 22 Nov 2024 13:07:23 +0100 Subject: [PATCH] PR#28448 broke qty float on xpedition same correction as #31794 (#32055) --- htdocs/expedition/card.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index d16c964d4cb..6f5c3ed4777 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -357,7 +357,7 @@ if (empty($reshook)) { } } else { //shipment line for product with no batch management and no multiple stock location - if (GETPOSTINT($qty) > 0) { + if (GETPOSTFLOAT($qty) > 0) { $totalqty += price2num(GETPOST($qty, 'alpha'), 'MS'); $subtotalqty = price2num(GETPOST($qty, 'alpha'), 'MS'); } @@ -401,7 +401,7 @@ if (empty($reshook)) { } } } else { - if (GETPOSTINT($qty) > 0 || getDolGlobalString('SHIPMENT_GETS_ALL_ORDER_PRODUCTS')) { + if (GETPOSTFLOAT($qty) > 0 || getDolGlobalString('SHIPMENT_GETS_ALL_ORDER_PRODUCTS')) { $ent = "entl".$i; $idl = "idl".$i; $entrepot_id = is_numeric(GETPOSTINT($ent)) ? GETPOSTINT($ent) : GETPOSTINT('entrepot_id'); @@ -412,7 +412,7 @@ if (empty($reshook)) { $entrepot_id = 0; } - $ret = $object->addline($entrepot_id, GETPOSTINT($idl), price2num(GETPOSTINT($qty), 'MS'), $array_options[$i]); + $ret = $object->addline($entrepot_id, GETPOSTINT($idl), price2num(GETPOSTFLOAT($qty), 'MS'), $array_options[$i]); if ($ret < 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; @@ -671,7 +671,7 @@ if (empty($reshook)) { $batch = "batchl".$detail_batch->fk_expeditiondet."_".$detail_batch->fk_origin_stock; $qty = "qtyl".$detail_batch->fk_expeditiondet.'_'.$detail_batch->id; $batch_id = GETPOSTINT($batch); - $batch_qty = GETPOSTINT($qty); + $batch_qty = GETPOSTFLOAT($qty); if (!empty($batch_id)) { if ($lotStock->fetch($batch_id) > 0 && $line->fetch($detail_batch->fk_expeditiondet) > 0) { // $line is ExpeditionLine if ($lines[$i]->entrepot_id != 0) { @@ -708,7 +708,7 @@ if (empty($reshook)) { $batch = "batchl".$line_id."_0"; $qty = "qtyl".$line_id."_0"; $batch_id = GETPOSTINT($batch); - $batch_qty = GETPOSTINT($qty); + $batch_qty = GETPOSTFLOAT($qty); $lineIdToAddLot = 0; if ($batch_qty > 0 && !empty($batch_id)) { if ($lotStock->fetch($batch_id) > 0) {