fixed errors in ordering and sales order