This is an actual problem I faced at an actual customer of mine a few months aback and posted today on the Google's Dynamics GP board. It seems that more often than one could assert, a customer's payment records get assigned to the wrong national account (or parent account). This can cause problems down the road when incorrect statements or aging reports are submitted to the corporate customer.
In light of this issue, I developed a two fold solution:
1) The following query identifies the credit documents posted and applied by the parent customer on behalf of the child account.
2) You will then need to use Dynamics GP's Professional Services Tools Library (PSTL) to unapply the invoices associated to the child record, which in turn will unapply the credit documents posted under the national account. Make sure you print all reports generated by Professional Tools as you will need them to reapply the credit documents.
Well, hope this helps in solving a major headache faced by many AR departments around the globe.
Until next post!
Mariano Gomez, MVP