/** * @param \Magento\Store\Model\Store $store * @return bool */ public function canReturnToStock($store = null) { return $this->stockConfiguration->canSubtractQty($store); }
/** * Check if is possible subtract value from item qty * * @param StockItemInterface $stockItem * @return bool */ protected function canSubtractQty(StockItemInterface $stockItem) { return $stockItem->getManageStock() && $this->stockConfiguration->canSubtractQty(); }
/** * Check if is possible subtract value from item qty * * @param \Magento\CatalogInventory\Api\Data\StockItemInterface $stockItem * @return bool */ protected function _canSubtractQty(\Magento\CatalogInventory\Api\Data\StockItemInterface $stockItem) { $result = $stockItem->getManageStock() && $this->_configStock->canSubtractQty(); return $result; }