[MAGEMEP-143] Improving checking of in stock and quantity
[MAGEMEP-143] Preventing flat table to be used