Sort line items