Added code to create order header and lines