(Optimum) Error Sequence contain more than one matching element


When you double click on the Receive payment, Credit note, it will prompt this error message.

This error message probably would happen into your database due to multiple matching with same transaction which is wrong.



Here is the solution for how to fix.




1. Connect to Database use Microsoft SQL Server Management Studio

2. Start a New Query

3. Copy and Paste the following SQL Script into the New Query.

This script is to find out which transactions is having duplicated matching, you will find that for example: OR matched with same transaction for twice or more.




select id, Payforcode,PayForAmountLocal, ARCode from ARMatched where ARCode in (select ARCode from ARMatched group by ARCode, Payforcode having count(payforcode)>1) order by ARCode, Payforcode



select id, Payforcode,PayForAmountLocal, ApCode from ApMatched where ApCode in (select ApCode from ApMatched group by ApCode, Payforcode having count(payforcode)>1) order by ApCode, Payforcode


   4. After you find out the transaction, for example as below, the Invoice “EAI007898” is duplicated with two matching.


5. Next we have to enter a new row, For Customer’s transaction, we go to ARMatched, if for supplier side, we go for APMatched.

Script for AR : Select* from ARMatched where payforcode = ‘<invoice number>’


6. When we found it, we are going to delete both of the matching due to we do not know which one is correct. Thus, you must remember the matching so that later able to match it back.


Just remove the Select* and replace by Delete and the click execute.

delete from ARMatched where payforcode ='EAI007898'


Then both of the matching will be gone, and now the OR that matched with this invoice will be able to enter now.



If you find this is very complicated, you may seek for help with our QNE Support.

Thank you.