reversing of reconciled payments makes database inconsistent
Description
If you reverse a payment that is already reconciled in a bank statement line it will become unreconciled and so create an inconsistency between the bank statement lines and the payments marked as reconciled.
I am still not sure if the better way is not to de-reconcile payments when they are reversed (this forces the user to create a new bankstatement to reconcile the reversal document) or to forbid reversing such documents at all (like daniel proposed) and force the user to create a reversal document manually.
There is a specific code line that clears the isReconciled flag: line 2566 of MPayment. I wonder if there is a special reason that someone did this line or if this is a bug.
If you reverse a payment that is already reconciled in a bank statement line it will become unreconciled and so create an inconsistency between the bank statement lines and the payments marked as reconciled.
I explained and discussed this with Daniel Tamm at https://groups.google.com/forum/#!topic/idempiere/ReyOp7N-B4Q
I am still not sure if the better way is not to de-reconcile payments when they are reversed (this forces the user to create a new bankstatement to reconcile the reversal document) or to forbid reversing such documents at all (like daniel proposed) and force the user to create a reversal document manually.
There is a specific code line that clears the isReconciled flag: line 2566 of MPayment. I wonder if there is a special reason that someone did this line or if this is a bug.