public function aroundRegisterProductsSale(
        \Magento\CatalogInventory\Model\StockManagement $subject,
        \Closure $proceed,
        array $items,
        $websiteId
    ) {
        /* This code is moved from original 'registerProductsSale' method. */
        /* replace websiteId by stockId */
        $stockId = $this->manStock->getCurrentStockId();
        $lockedItems = $this->resourceStock->lockProductsStock(array_keys($items), $stockId);
        $fullSaveItems = $registeredItems = [];
        foreach ($lockedItems as $lockedItemRecord) {
            $productId = $lockedItemRecord['product_id'];
            $orderedQty = $items[$productId];
            /** @var \Magento\CatalogInventory\Api\Data\StockItemInterface $stockItem */
            $stockItem = $this->providerStockRegistry->getStockItem($productId, $stockId);
            $stockItemId = $stockItem->getItemId();
            $canSubtractQty = $stockItemId && $this->_canSubtractQty($stockItem);
            if (!$canSubtractQty || !$this->configStock->isQty($lockedItemRecord['type_id'])) {
                continue;
            }
            if (
                !$stockItem->hasAdminArea() &&
                !$this->stockState->checkQty($productId, $orderedQty)
            ) {
                $msg = 'Not all of your products are available in the requested quantity. ';
                $msg .= 'Product #%1, stock item #%2, stock #%3.';
                throw new AMageExcept(__($msg, $productId, $stockItemId, $stockId));
            }
            if ($this->_canSubtractQty($stockItem)) {
                $stockItem->setQty($stockItem->getQty() - $orderedQty);
            }
            $registeredItems[$productId] = $orderedQty;
            if (!$this->stockState->verifyStock($productId)
                || $this->stockState->verifyNotification($productId)
            ) {
                $fullSaveItems[] = $stockItem;
            }
        }
        $this->resourceStock->correctItemsQty($registeredItems, $stockId, '-');
        return $fullSaveItems;
    }