Skip to content

Conversation

patrickt-oforce
Copy link
Contributor

If a supplier invoice payment amount is major than amount_net_pay_residual the value compute became negative, so to avoid that check if the payment amount is greater than invoice amount_net_pay_residual and if it is, assign the residual amount to amount variable to allow show 0 when the invoice is fully paid

When the supplier invoice is reconciled with a multiple line payment, not filtering by partner get the wrong withholding tax move id, becuase actually the only search parameter is the move that has generated the withholding tax move.
This PR add filter account.move.line of withholding tax move by partner to avoid get the first account.move.line where value of withholding_tax_generated_by_move_id match the payment move even if the line belongs to another partner

value and search of withholding tax move

In case of a payment where the amount is comprehensive of multiple
supplier invoice, the amount_net_pay_residual value become negative
in supplier invoice even if amount net pay is zero;
In case a payment is composed by multiple invoices, the actual logic
get the first account.move.line that has the id of payment move in
the withholdint_tax_generted_by_move_id set with the id of
payment move, this PR allow to filter that lines by partner to be sure
to get the right account.move.line
@patrickt-oforce patrickt-oforce force-pushed the 16.0-FIX-l10n_it_withholding_tax branch from b551a0b to 073ba0f Compare September 18, 2025 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant