Product has only one stock item with the website_id 2

The website we placed order in is website_id 3
The stock managment in the file httpdocs/vendor/magento/module-catalog-inventory/Model/StockManagement.php::registerProductsSale
The line:
$websiteId = $this->stockConfiguration->getDefaultScopeId();
Gets the current website id.

Hi @basselalaraaj ,
See my response for similar question.
@maghamed @naydav
i dont want to use multi stock.
i want to use single stock, with multiple websites.
But there is a bug when u have multiple websites and u are using single stock.
So it is not similar to the question you responsed to.
Hi, @basselalaraaj. We need more information about your configurations, exact Magento version you use and steps to reproduce this issue. On 2.2.0 and 2.1.7 I didn't observed this behavior.
@basselalaraaj we are closing this issue due to inactivity. If you'd like to update it, please reopen the issue.
This is coming from Magento core where their last change is left unfinished in 2016
MAGETWO-48153 reverted MAGETWO-46688 changes and left just websiteId's commented out so forcing you to use websiteId = 0.