I've never heard of of nAddInvoice. Also to add an invoice actually requires multiple steps - something similar to below. I'm guessing this is a method/function created directly by Darrel, Lauren, or Sara Beth for the purpose of instantly running the several lines of BOI code needed to create an invoice. You'll have to find where they defined the nAddInvoice function.
nSelectBatch(BatchNo)
nGetNextInvoiceNo(InvoiceNo)
nSetKey(InvoiceNo)
nSetValue(DivNo)
etcetera
nWrite()