I don't usually recommend updating on the database level, Although, in such a situation it would be an option to consider. In this essence, I might suggest the following;
- Make sure to woke on a test environment in order to ensure that the steps below will work properly.
- On the Module side, Receivables transactions are recorded both in Transaction and Distribution Table. (RM20101 | RM Open File and RM10101| RM Distribution Work)
- You need to update the distribution index (DSTINDX Field) for the distribution type (DISTTYPE Field) RECV
UPDATE dbo.RM10101
SET DSTINDX = #CorrectAccountIndex
WHERE DISTTYPE = 3 AND DOCNUMBR = '#DocumentNumber' - On the General Ledger, a reversing entry should be made to void and correct the old journal entries.
Please ensure to apply all of the above on a test environemnt and test the result. If you are safe dealing with SQL statement on a huge number of records, then voiding these transations with a Macro would be your best option.