Updated logic for multiple line items per order.