Electronic Invoice Matching – Semi Automated and Fully Automated

Electronic Invoice Matching shortens the process of reconciling the EAN Purchase Order Goods Receipts to the Supplier Invoices by making use of a GS1 compliant eInvoice message that is automatically retrieved by Merlin via EANCOM background process. The Delivery Note entered during the Goods Receipting is the Invoice Number and the key to finding the relevant eInvoice message. Any Freight charges can also be accounted for if they are in the eInvoice.

There are two levels of automation which can be set in Merlin – Semi Automated and Fully Automated. Semi Automated Electronic Invoicing simplifies the process of reconciliation through the Purchase Order Invoice entry screen by automatically populating the eInvoice message data into the screen’s fields. Fully Automated Electronic Invoicing is a background process which periodically checks for any EAN orders which have been fully receipted and automatically invoice matches the Goods Receipts with the data passed in the eInvoice message based on a predetermined variance tolerance factor. In either case, the data can be sent to a Third Party interface (eg: SAP AP).

The Variance factor is entered by Pharmhos at time of set up and can only be adjusted by someone with authorisation.


Invoice Matching validates the total invoice amount with the Goods Receipts and Purchase Order.

The Invoice amount must balance to within a parameterised variance amount or percentage to be filed.

Adjustment is made at item level for item, quantity, price, discount, and at order level with freight, order discount and withholding amounts.

To access this screen:

6. Purchase Order Processing
5. Purchase Order Invoice Entry

Enter the Purchase Order Number. Enter <Y> in the last column for the GRNs that are to be processed and enter <N> for the other entries. If there is an eInvoice message available then it will ask the user if they would like to use it. Enter <Y>.

File the screen to process the invoice.

The Purchase Order Invoice Entry screen appears to enter the invoice details.

Field 11 – Invoice Number will be automatically populated with the Invoice number specified in the eInvoice message.

Field 12 –Invoice Date will be automatically populated with the date specified in the eInvoice message.

Field 13 – Posting Date will be automatically populated with the current date

Field 14.- Invoice Amount will be automatically populated with the total amount specified in the eInvoice.

If there is a valid discrepancy, the system calculates the variance amount and a message appears “Invoice variance, press <RTN> to enter details”

On pressing <Return>, the Invoice Detail Entry screen opens, which allows the user to enter any freight charges, miscellaneous charges or discounts. The system alerts the user when the invoice is balanced to purchase order. File the screen to update which returns the user to the previous screen.

File the Purchase Order Invoice Entry screen once all details have been completed.


Fully Automated Electronic Invoice Matching can be scheduled to run in Merlin so that EAN Purchase Orders will be immediately invoiced once the order is fully receipted. No client interaction is required unless a variance/exception has been discovered resulting in the order not being invoiced. If an order is not invoiced automatically it will still be available for receipting through the Purchase Order Invoice Entry screen.

The program checks through all the Delivery Notes in the Goods Receipt that match the eInvoice invoice number and does a comparison of figures between the two entities. The Variance Factor is a predetermined amount (eg. 10 cents) or percentage with the default being zero tolerance. The Variance is applied to all Fully Automatic eInvoicing and can be customised for each site per supplier. Any variances which occur during the data integrity checks are reported and audited which can then be reviewed at a later date if desired. If the prices match or the eInvoice price is below the allowed variance then the Goods Receipt will be automatically invoiced using the figures provided in the eInvoice.

If the site requires updating of the Creditors Interface then a General Ledger summary record is written out and filed away for later extraction to Accounts Payable. Any variance amounts will be removed from the first item line for that invoice in the AP extract. The layout of the AP Extract will be in the same layout as if invoicing was performed manually.

1.3 Reviewing of Automatic Invoice

To check that an Automatic Invoice has successfully occurred, the user can view this through the Purchase Order Invoice Details screen.

To access this screen:

6. Purchase Order Processing
8. Purchase Order Enquiries/Reports
4. Purchasing – Invoice Related Reports
3. P/Order Invoice Enquiry

Field 1 – Enter the Main Store
Field 2 – Enter the Purchase Order number
A Red banner will be displayed on the screen which shows that the Invoice was created by a user called “AUTO”
Press <Esc> to exit screen.

1.4 Automatic Invoice Reporting

There are two reports available to assist will monitoring eInvoicing and reconciling any related issues.

1.4.1 Printed Auto Invoice Variance Report

A report called the “AUTO INVOICE ERROR REPORT” is a print out which is produced once a Fully Automatic eInvoicing check has occurred on a Goods Receipt with an eInvoice which was over the allowed variance margin and has resulted in the order not being invoiced. This print out can be suppressed if it is not required.

1.4.2 Excel Auto Invoice Variance Report

The “EAN EInvoice Variance Report” is an Excel exportable report which lists all variances per line regardless of allowed variance. It will even display variances from rounding issues which may still result in a successful auto invoice match . Any marked as Over Variance are Purchase orders which have failed the data integrity checks and have NOT been invoiced.

To run the “EAN EInvoice Variance Report” Posh Report Processing Screen is used. This screen can be accessed by the zoom [REPORT or run from Merlin Report Web Link.

Enter ? in Field 1 and a list of all available reports will appear.

Select ICR.EANINV.VAR.XML EAN EInvoice Variance Report

Field 2: Enter User Id
Field 3: Enter the Start Date
Field 4: Enter the End Date
Field 5 Enter the Main Store Id OR leave blank and all sites will be included in the report
Type <R> in the Option Line to run the report

When it has finished, escape out of the screen and enter the zoom [EXPORT.

Field 1: Leave blank (Nothing needs to be entered in this field)
Field 2: Enter EANINV
Field 3: Enter the path for the report to be exported to
When the cursor is at the option line, type the reference for the report ie: 4.1 (for the line one of Field 4)
The ‘N’ next to the report will change to ‘Y’.
Type <E> for Export in the Option Line and <Y> when the box opens.

The report will now be exported to the folder specified.

Download Documentation here: