File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ public function __construct(
47
47
* @param array $stockData
48
48
* @return array
49
49
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
50
+ * @throws Exception
50
51
*/
51
52
public function filter (array $ stockData )
52
53
{
@@ -65,6 +66,10 @@ public function filter(array $stockData)
65
66
$ stockData ['min_qty ' ] = 0 ;
66
67
}
67
68
$ this ->allowMultipleBoxesForShippingCheck ($ stockData );
69
+
70
+ if (!isset ($ stockData ['is_decimal_divided ' ]) || $ stockData ['is_qty_decimal ' ] == 0 ) {
71
+ $ stockData ['is_decimal_divided ' ] = 0 ;
72
+ }
68
73
return $ stockData ;
69
74
}
70
75
@@ -81,8 +86,6 @@ public function allowMultipleBoxesForShippingCheck(array $stockData): array
81
86
&& $ stockData ['is_qty_decimal ' ] == 0 && $ stockData ['is_decimal_divided ' ] == 1 ) {
82
87
// phpcs:ignore Magento2.Exceptions.DirectThrow
83
88
throw new Exception (__ ('Please select Advanced Inventory -> Qty Uses Decimals as YES. ' ));
84
- } else if (!isset ($ stockData ['is_decimal_divided ' ]) || $ stockData ['is_qty_decimal ' ] == 0 ) {
85
- $ stockData ['is_decimal_divided ' ] = 0 ;
86
89
}
87
90
return $ stockData ;
88
91
}
You can’t perform that action at this time.
0 commit comments