ClassificationFieldInterpretedEx event

This event fires after an invoice is identified but before interpretation has begun. This event only fires for fields specified by the ClassificationProfile and ClassificationField settings in Eiglobal.ini. For more information, refer ClassificationProfile and ClassificationField topic in Eiglobal: Overview > [Interpret] section in ReadSoft Invoices INI Help.

This event is similar to ClassificationFieldInterpreted, but it also allows you to specify Corporate Group ID and Supplier Location. If Corporate Group ID and Supplier Location are empty, the event behaves the same as ClassificationFieldInterpreted.

Syntax

Public Function ClassificationFieldInterpreted( ByRef InvoiceProfileName As String, ByRef SupplierNumber As string, ByRef CorporateGroupID, ByRef SupplierName As String, ByRef SupplierDescription, ByRef SupplierLocation) As Long

InvoiceProfileName

Specifies the invoice profile you want to send the current invoice to. Leave this variable empty if you want to use the current invoice profile.

SupplierNumber

Specifies the supplier, using this supplier number, that you want to assign the current invoice to. The current invoice is also connected to an invoice definition if one exists for this supplier.

CorporateGroupID

Specifies the Corporate Group ID (CGID) that must match with SupplierNumber to find the correct supplier. (Optional)

SupplierName

Specifies the name of a new supplier. This is also the name of the invoice definition. Do not set this variable if Use imported supplier data is selected in the Master data policy dialog.

SupplierDescription

Specifies the new description of the invoice definition. Do not set this variable if Use imported supplier data is selected in the Master data policy dialog.

SupplierLocation

Specifies the Supplier Location that must match with SupplierNumber to find the correct supplier. (Optional)

evtOK

Interpret continues normally.

evtOKAbort

Interpret uses the invoice profile and supplier specified by the event parameters.

The event is fired for each classification field until this value is returned.

evtError

Stops the Interpret job and displays an error message.

You can use the settings in Eiglobal.ini to specify existing fields that you want to use for classification and create an add-on to handle the ClassificationFieldInterpretedEx event to manually change the invoice profile and supplier. If you change the supplier number, CGID, or supplier location, Interpret searches for an existing invoice definition with the new supplier number. If no definition is found, a new one is created.