Skip to content

Commit

Permalink
[FIX] Corrige entrada não balanceada quando retenção
Browse files Browse the repository at this point in the history
  • Loading branch information
danimaribeiro committed Nov 20, 2018
1 parent 978d819 commit 01731b3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions br_account_voucher/models/account_voucher.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,12 @@ def voucher_move_line_create(self, line_total, move_id, company_currency,
line.analytic_tag_ids = [(6, False, line2.analytic_tag_ids.ids)]

return line_total

@api.multi
def first_move_line_get(self, move_id, company_currency, current_currency):
vals = super(AccountVoucher, self).first_move_line_get(
move_id, company_currency, current_currency)
# Correção do valor quando retenção - tax_amount é negativo
if self.tax_amount < 0.0:
vals['credit'] += self.tax_amount
return vals

0 comments on commit 01731b3

Please sign in to comment.