You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[FIX] l10n_ar_tax: fix counterpart amount on own-check payments with withholdings
When paying a vendor with multiple own checks and withholding taxes,
the counterpart (payable) line was being computed incorrectly:
- The withholding reversal was applied only to liquidity_lines[0],
which in the own-checks case holds the first check amount rather
than a residual line, corrupting individual check balances.
- As a result the move did not balance and Odoo added an automatic
balancing line instead of cancelling the full supplier debt.
Fix: detect the outbound own-checks multi-liquidity case and:
1. Apply the withholding reversal to the last (residual) liquidity
line, leaving all other check lines untouched.
2. Recompute the counterpart balance directly from the sum of all
liquidity + write-off + withholding lines, so the payable account
always cancels the gross amount (net + withholdings).
closes#1373
Signed-off-by: Felipe Garcia Suez <feg@adhoc.com.ar>
0 commit comments