On Dec 29 2011, 6:29 pm, Cédric Krier <[email protected]> wrote:
>
> All this misunderstanding comes from the point that you are looking at
> tax included price which can not work and will not work in the ERP.
> If you have such needs, you must define a way to retro-compute the taxes
> for each line you are saling.
>

I must agree, it is a bit different way of computing prices. It would
be not suitable for other business except retailers.

But the current tax computation is still inaccurate. I've made a fix
in the third patchset here:
http://codereview.tryton.org/210007

In the patch taxes are calculated like this:
tax_group_amount = round( round(line_total)*tax_group_rate +
round(line_total)*tax_group_rate + ... )

it is identical (no accuracy lost) to: tax_group_amount =
round( round(tax_group_base) * tax_group_rate )

It fixes inaccuracies in such a invoice:
Line1: unitprice=0.1260, quantity=1, subtotal=0.13
Line2: unitprice=0.1260, quantity=1, subtotal=0.13
Line3: unitprice=0.1260, quantity=1, subtotal=0.13
Line4: unitprice=0.1260, quantity=1, subtotal=0.13
Line5: unitprice=0.1260, quantity=1, subtotal=0.13
With patch:
vat_21_base=0.65, VAT_21%=0.14 (correct because 0.65 * 0.21 = 0.14)

Without patch:
vat_21_base=0.65, VAT_21%=0.13 (wrong)


--
Giedrius Slavinskas
UAB Inovera
+370.672.41216 | [email protected] | www.inovera.lt

-- 
[email protected] mailing list

Reply via email to