← Back to team overview

openerp-brazil-team team mailing list archive

lp:~mileo/openerp.pt-br-localiz/openerp.pt-br-localiz-fix-saldo into lp:openerp.pt-br-localiz

 

Luis Felipe Miléo - http://www.akretion.com has proposed merging lp:~mileo/openerp.pt-br-localiz/openerp.pt-br-localiz-fix-saldo into lp:openerp.pt-br-localiz.

Requested reviews:
  OpenERP Brazil Core Team (openerp-brazil-core-team)
Related bugs:
  Bug #1102399 in OpenERP Brazilian Portuguese Localization (pt_BR): "Valor da duplicata / saldo da fatura incorreto quando icms normal tem redução"
  https://bugs.launchpad.net/openerp.pt-br-localiz/+bug/1102399

For more details, see:
https://code.launchpad.net/~mileo/openerp.pt-br-localiz/openerp.pt-br-localiz-fix-saldo/+merge/149739
-- 
https://code.launchpad.net/~mileo/openerp.pt-br-localiz/openerp.pt-br-localiz-fix-saldo/+merge/149739
Your team OpenERP Brazil Team is subscribed to branch lp:openerp.pt-br-localiz.
=== modified file 'l10n_br_account/account.py'
--- l10n_br_account/account.py	2012-08-27 02:11:28 +0000
+++ l10n_br_account/account.py	2013-02-21 02:24:24 +0000
@@ -43,10 +43,11 @@
             if tax.get('type') == 'quantity':
                 tax['amount'] = round(product_qty * tax['percent'], precision)
 
+            tax['amount'] = round(tax['amount'] * (1 - tax['base_reduction']), precision)
+
             if tax.get('tax_discount', False):
                 result['tax_discount'] += tax['amount']
 
-            tax['amount'] = round(tax['amount'] * (1 - tax['base_reduction']), precision)
             if tax['percent']:
                 tax['total_base'] = round(total_line * (1 - tax['base_reduction']), precision)
                 tax['total_base_other'] = round(total_line - tax['total_base'], precision)