Fixes:
- Initial balance for Activity Statement: Consider moves reconciled with moves that have different partner (use open amounts)
- Reconciled moves for Detailed Activity Statement: Consider moves reconciled with moves that have different partner (they should appear).
- Ending amounts should be correct in all cases.
- Other minor fixes.
Improvements:
- Refactor of Activity Statement: include columns of "Applied Amount" and "Open Amount", and removed "Balance" column.
- Removed option "Show Balance column" for Detailed Activity Statement.
Detected cases where account_partial_reconcile has null currency_id, thus giving falsy amount_currency, and thus making some reconciled invoices appearing in the outstanding. Used _amount_residual of account move lines as reference to fix it.
partner_statement 13.0.1.2.1
In certain scenarios involving mutliple payments for multiple
invoices, where the reconciliation happens together and the debit
move is the smaller item the aging duplicates its value, making
the balance greater than it should be.
This fix works by preventing moves where different lines are both partial
reconciled being grouped together by adding the lines id
to the group by clause of _show_buckets_sql_q1