Merge pull request #3164 from nabinhait/v4.x.x

advance paid should not be copied and patch to fix affected records