The common technique for correcting documents in past is that you have to change the document which you correct and repost (perform undo posting and post operations) on all related documents which were entered after the corrected one. Sometimes there are exceptions from this rule - when a document values are calculated not during posting, but there is a Calculate or Fill button which obtain information which can depend on previous documents. In Salary calculation, for example.
For more detailed information you should to analyze the Register records report and see which registers and which data documents do produce during posting.
But if you somewhy can not change documents in past, you will have to enter correction documents in current time, they will depend on the accounting schema.