renamed getResourcesGroupedByOrders to getItemsGroupedByOrders