Skip to content

Commit

Permalink
Merge pull request #610 from Trust-Code/11.0-other_taxes
Browse files Browse the repository at this point in the history
incluso a regra para impostos 'outros'
  • Loading branch information
Mackilem committed Oct 17, 2018
2 parents b51980d + de696fc commit 564f958
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions br_account/models/account_tax.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,15 @@ def _compute_retention(self, price_base):
taxes.append(vals)
return taxes

def _compute_others(self, price_base):
others = self.filtered(lambda x: x.domain == 'outros')
if not others:
return []
vals = self._tax_vals(others)
vals['amount'] = others._compute_amount(price_base, 1.0)
vals['base'] = price_base
return [vals]

def sum_taxes(self, price_base):
ipi = self._compute_ipi(price_base)
icms = self._compute_icms(
Expand All @@ -356,6 +365,7 @@ def sum_taxes(self, price_base):
taxes += self._compute_issqn(price_base)
taxes += self._compute_ii(price_base)
taxes += self._compute_retention(price_base)
taxes += self._compute_others(price_base)
return taxes

@api.multi
Expand Down

0 comments on commit 564f958

Please sign in to comment.