fixed the order items qty calculation, closes #6209