Adjust StockItem aggregation functionality to support OutOfStock
SourceItem during the calculation
#65
Labels
OutOfStock
SourceItem during the calculation
#65
Adjust StockItem aggregation functionality to support
OutOfStock
SourceItem during the calculation.Currently, indexation mechanism does not take into account that some of the source items could be out of Stock and just sum up all the quantities together.
We need to fix that logic.
So, if there are 3 Sources assigned to the single Stock.
Source A: Qty - 10 Status: In Stock
Source B: Qty - 20 Status: Out Stock
Source C: Qty - 30 Status: In Stock
Current Indexation result is: 10 + 20 + 30 = 60
Expected Behaviour: 10 + 30 = 40
Changes should be covered with Unit Tests and MUST be covered by integration tests (because we can not check full re-indexation work via api-functional tests)
The text was updated successfully, but these errors were encountered: