JobDocumentComplete event
This event is fired at least once for every document collected in JobDocumentRetrieve. ReadSoft Invoices puts the result from the interpretation/import in Status and the result from the identification in Identification.
Syntax
Public Function JobDocumentComplete(Status As Long, Identification As Long) As Long
Parameters
Status |
0 - The document was recognized. This parameter has no significance in ReadSoft Invoices. (It is left over from FORMS implementation.) |
Identification |
2 - Invoice identified. 10 - Invoice Unidentified. |
Active objects
Interpret Application or Interpret App
Return values
evtOK |
Normal return. |
evtOKAbort |
No effect - treated the same as evtOK. |
evtError |
Causes an error message and job termination |
Suggested usage
Used when Data source extension is selected as the source in the job description. Depending on the Identification value, decide what to do next - for example send another document to Interpret, end the job, or move the image files.
Example
You can use this event to move the image file(s) associated with the invoice after interpretation. The sample VB6 code below shows how to alter the search paths for the image files of the current invoice.
Public Function OnJobDocumentComplete(typeCode As Integer, idNum As Integer) As Long
Dim obInvoice As Invoice
Set obInvoice = m_App.CurrentInvoice
Dim obPage As InvoicePage
Set obPage = obInvoice.Pages(1)
' TODO: Move the file in the file system
obPage.ImageFileName(eiFrontPage) = "\\imgserv1\INVOICES\Processed\Page01.tif"
OnJobDocumentComplete = EHICOM.evtOK
End Function
Remarks
Used by ReadSoft EMAIL and ReadSoft Collector. (