added as_csv to order item
fixed grouping on closed order, added some more calcs