Purchase Orders
Automated Search
The system will try and automatically find a Purchase Order from ERP to match to the data from the invoice.
Out of the box the system will filter purchase orders based on the header status with the filter status NOT IN (N, P, T), although this filter can now be configured using the validPOStatus extension config
The user will be presented with a warning message if a purchase order (or orders) are found by the OCR, but not matched on the correct status:

If a matching order number was extracted by the OCR but not found at all in ERP then an information message will be displayed:

No PO No Pay
Note, if your supplier has been flagged as requiring a purchase order via the noPurchaseOrder setting, an error will be shown if no PO is on the invoice.

Purchase Order Information
To enable you to see purchase order information in the same screen as the invoice, we have implemented the Purchase Order Details section in the document screen which will load up the order line information for the order found on the invoice.

Order Matching
Wherever possible the system will match an invoice to a valid purchase order and the individual invoice lines to purchase order lines.
You will be able to see where lines have been matched in the Line Items section on the document screen.

Extra Lines
Additional invoice lines that are not matched to any purchase order line are shown with a negative order line number (for example, -1) and no order number, so they are clearly distinguished from lines that are matched to the purchase order.
Please note that these additional invoice lines must be provided with account coding either:
- for ERP7, the account code can be defaulted in by the system parameter EI_SUPP_DEF_ACCOUNT (note you will need to grant access to the system parameters object)
- by the use of defaults in the extension settings
- manually
However, how that data is treated on import to ERP will depend on the underlying system:
- ERP7 - The coding will be overwritten on import by the EI parameters (please refer to Unit4 documentation for more information)
- ERPx - The coding of additional lines will be respected when sent to the system.

Manual Matching
To manually match an invoice line to an order line, simply enter the order line number on the invoice line and the order number will be automatically filled in.
Note once the line number has been set manually, any further changes to data will NOT attempt a re-match on this line.
For example if we change the line above from -1 to 1, the order number is then filled in automatically.

On occasion you may find that the automated line-matcher overwrites input data making adjustments to line details more awkward. For this reason we have allowed for lines being entered in "manual mode". This can be set using the "Line Input Mode" dropdown in the UI. When this is set to "manual" no automated input will be attempted so be sure that the details entered are correct.

Matching Errors / Warnings
Manually overriding with a line which doesn't exist
If you manually add a line which does not exist on the purchase order, the system will display a PO_005 error message which must be corrected before confirming.

Unmatched lines warning
If the system finds a purchase order but is not able to match a line, that line will be flagged with a PO_008 warning message, please note this message can be elevated to an error.
