Generate order number only if it does not exist