Unfortunately, I don't believe there is something that could be done automatically if this function was not on since the begging.
This is due to the fact that the system is not intelligent enough to know which invoice should be settled against which payment? There is no link.