Fix error in sequence in which the postings are removed to avoid foreign key error whilst removing allocated payments