← Back to team overview

openerp-india team mailing list archive

[Bug 947834] Re: Compute tax in account module

 

Maybe I wrongly explained
In the previous attached picture I showed the sale of 240 PCE at the price of 0.12 each and a discount of 40%
The subtotal in the list is correct: 17.28 (240*0.12*0.6)
The field "Untaxed" below is correct: 17.28
In the Taxes area the column "BASE" has the value 16.80 that is wrong, but the tax amount is calculated right (17.28 * 0.21) = 3.63
In this case the error is of no consequence
Thanks
Filippo

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/947834

Title:
  Compute tax in account module

Status in OpenERP Addons (modules):
  Incomplete

Bug description:
  In ~openerp/openobject-addons/6.1 : /account/account_invoice.py (revision 6646)
  the rows 1576-1583 (account_invoice_tax, method: compute) return a wrong value.
  In attach an example: the base value in tax frame is different from the untaxed value
  I would suggest this correction:

                  # FIX: The rounding performed after the calculation  
                  # tax['price_unit'] = cur_obj.round(cr, uid, cur, tax['price_unit'])
                  val={}
                  val['invoice_id'] = inv.id
                  val['name'] = tax['name']
                  val['amount'] = tax['amount']
                  val['manual'] = False
                  val['sequence'] = tax['sequence']
                  val['base'] = tax['price_unit'] * line['quantity']
                  # FIX: performing the round operation now
                  val['base'] = cur_obj.round(cr, uid, cur, val['base'])

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/947834/+subscriptions


References