Fix batch reference in item handling

Items without a batch are not in a batch.
Fixed the batch element in the JSON for the order test JSON.
Do not resolve items grouped by order until the items have been resolved.