get custnum from invnum before trying to use custnum!