SCENARIO:

Example: OR1603/080 matched with INV1603/011

1.       Go to Debtor > Receive Payment > search out OR1603/080 and verify that full matched with INV1603/011.

2.       Click New Receive Payment

3.       Select Debtor 3000/D26

4.       INV1603/011 still showing outstanding amount


ROOT CAUSE:

ARMatched table column GLAccountId is null, to fix: 


Please execute below Script:


UPDATE M SET M.GLAccountId = JD.GLAccountId FROM dbo.ARMatched M JOIN dbo.JournalDetails JD ON JD.Id = M.PayForId WHERE M.GLAccountId Is Null
UPDATE M SET M.GLAccountId = D.GLAccountId FROM dbo.ARMatched M JOIN dbo.Invoices INV ON INV.Id = M.PayForId JOIN dbo.Debtors D ON D.Id = INV.DebtorId WHERE M.GLAccountId Is Null
UPDATE M SET M.GLAccountId = D.GLAccountId FROM dbo.ARMatched M JOIN dbo.ARDN DN ON DN.Id = M.PayForId JOIN dbo.Debtors D ON D.Id = DN.DebtorId WHERE M.GLAccountId Is Null



Please refer How to Connect to Database use Microsoft SQL Server Management Studio

AND
Please refer How to install Microsoft SQL Management Studio


Above scenario is specific cases, Kindly Backup before execute.