Skip to content

Commit

Permalink
[FIX] withholdings with negative advance amount
Browse files Browse the repository at this point in the history
  • Loading branch information
jjscarafia committed Jan 21, 2019
1 parent dc33bde commit 8583a5c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion account_withholding_automatic/models/account_tax.py
Expand Up @@ -286,7 +286,8 @@ def get_withholding_vals(self, payment_group):
# a partial payment. To get the right untaxed amount we need to know
# which invoice is going to be paid, we only allow partial payment
# on last invoice
if payment_group.unreconciled_amount < 0.0:
if payment_group.unreconciled_amount < 0.0 and \
payment_group.to_pay_move_line_ids:
withholdable_advanced_amount = 0.0

sign = payment_group.partner_type == 'supplier' and -1.0 or 1.0
Expand Down

0 comments on commit 8583a5c

Please sign in to comment.