Creating a batch in AR invoice data entry

Hi Forum,

I am having an issue creating a batch, or that's is what i think.

the code below is throwing a message.

InvoiceNo = "" : BatchNo = ""

IF oBatch.nBatchEnabled = 1 Then
retVal = oBatch.nSelectBatch(BatchNo)
msgBox "retVal: " & retVal & " Batch no: " & BatchNo
end if

If retVal = 0 Then
MsgBox(o.sLastErrorMsg & vbCRLF & "Batch")
End If

'r = o.nGetNextInvoiceNo(InvoiceNo)
r = o.nSetKeyValue("InvoiceNo$", InvoiceNum)
r = o.nSetKeyValue("InvoiceType$", "IN")
strInvoiceNum = "" : strInvoiceNum = Right("0000000" & InvoiceNum, 7)
InvoiceKey = "" : InvoiceKey = mid(strInvoiceNum,1,7) & "IN"
msgbox "Record Key: " & InvoiceKey
r = o.nSetKey()

the message is..

I've done this same code a few times...

any advise ?

Regards,

Manuel Roman

Parents Reply Children