Begrenze Bestandskorrekturen auf ganze Mengen
This commit is contained in:
1 parent
5908f71a39
commit
0401a7ae2a
2 files changed
+5
-2
No files matched your search
@@ -212,6 +212,9 @@ function update_stock_lot_traceability(
|
||||
if ($receiptQty < 0 || $outQty < 0) {
|
||||
throw new InvalidArgumentException('Zugang und Abgang duerfen nicht negativ sein');
|
||||
}
|
||||
if (fmod($adjustmentQty, 1.0) !== 0.0) {
|
||||
throw new InvalidArgumentException('Bestandskorrekturen muessen ganzzahlig sein');
|
||||
}
|
||||
if ($adjustmentQty !== 0.0 && abs($adjustmentQty) < 0.0001) {
|
||||
$adjustmentQty = 0.0;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user