mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 17:18:13 +01:00
FIX: Allow decimal qty reception (#34328)
* Use fmod instead of % with line->packaging, to avoid fatal error if packaging decimal Ensure packaging is numeric, positive, then use fmod instead of %, to prevent error with decimal packaging values (resulting in division by zero), for ajusting quantity * Update edit rules * Update edit rules * After saving, it's better * ``` No code changes made ``` * Just modify reception/card.php
This commit is contained in:
@@ -700,7 +700,7 @@ if (empty($reshook)) {
|
||||
|
||||
$line->id = $line_id;
|
||||
$line->fk_entrepot = GETPOSTINT($stockLocation);
|
||||
$line->qty = GETPOSTINT($qty);
|
||||
$line->qty = GETPOSTFLOAT($qty, 'MS');
|
||||
$line->comment = GETPOST($comment, 'alpha');
|
||||
|
||||
if (isModEnabled('productbatch')) {
|
||||
@@ -725,7 +725,7 @@ if (empty($reshook)) {
|
||||
} else { // Product no predefined
|
||||
$qty = "qtyl".$line_id;
|
||||
$line->id = $line_id;
|
||||
$line->qty = GETPOSTINT($qty);
|
||||
$line->qty = GETPOSTFLOAT($qty, 'MS');
|
||||
$line->fk_entrepot = 0;
|
||||
if ($line->update($user) < 0) {
|
||||
setEventMessages($line->error, $line->errors, 'errors');
|
||||
|
||||
Reference in New Issue
Block a user