File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change 5
5
*/
6
6
namespace Magento \Catalog \Controller \Adminhtml \Product \Initialization ;
7
7
8
+ use Exception ;
8
9
use Magento \CatalogInventory \Api \StockConfigurationInterface ;
9
10
use Magento \Framework \App \Config \ScopeConfigInterface ;
10
11
@@ -68,6 +69,9 @@ public function filter(array $stockData)
68
69
if ((isset ($ stockData ['is_decimal_divided ' ]) && isset ($ stockData ['is_qty_decimal ' ])) && $ stockData ['is_qty_decimal ' ] == 0 && $ stockData ['is_decimal_divided ' ] == 1 ){
69
70
throw new Exception (__ ('Please select Advanced Inventory -> Qty Uses Decimals as YES. ' ));
70
71
}
72
+ else if (!isset ($ stockData ['is_decimal_divided ' ]) || $ stockData ['is_qty_decimal ' ] == 0 ) {
73
+ $ stockData ['is_decimal_divided ' ] = 0 ;
74
+ }
71
75
72
76
return $ stockData ;
73
77
}
You can’t perform that action at this time.
0 commit comments