Steps to reproduce:
- Have 3 or more items to reconcile. Example: 200, -350, 150.
- One of the intermediate items should be higher than the current
running balance.
- Select all the items, and click on Action > Reconcile.
Current behavior:
The second item appears with its amount strike-throughed (and putting
the current runnning balance as the amount to reconcile).
Expected behavior:
Only strike-through the amount if the last balance is not matching
the amount.
The solution to this is to only put a maximum amount when checking
the reconciliability of the last line of the counterparts.
TT50888
Sometimes you may need to reconcile journal items where the partner is different. It's not a good practice
but may need to be done in cases such as when an invoice and a payment are posted with two partners that
are in reality the same company, or because you just need to reconcile to clean up.
By default, account_account name is a char field. But if
l10n_multilang is installed, it is translatable, hence
the DB column is now a jsonb.
We must handle both cases in the select query.