In the case where a release capital request is reconciled with a credit
note(when you want to cancel properly a capital release request from an
accounting point of view). In the confirm_paid function the order of the
invoices are not always the same. Some time you get the credit note
first and some times you get the original invoice first. it leads to
problem in case of the credit note go first. this commit fix the
problem.
when a release capital request is matched with a credit note it's marked
as paid but it should not process it has a normal paid release capital
request. No share should be given to the cooperator and no operation
should be written in the cooperator register