On 29/12/11 15:12 +0200, Giedrius Slavinskas wrote: > In many business taxes (VAT) are already rounded per unit and not per > unit_price*quantity (or the tax sum). If you go to the shopping center, > you will see that the taxes there, are already included in the listing > price, so that means they are rounded per unit.
This is a special cases of sales with taxes included.
> If it would be rounded
> per unit_price*quantity or the tax sum, you can get a strange situations
> when buying for example 2 pens which list price is 1 EURO you must pay
> 2.01 EURO..
I don't understand your example
But any way, the tax computation is not a strictly increasing function.
> Btw, if you read the law of VAT, you will see that this tax adds value
> for single product, material or service and not for invoice.. So
> logically, if you have rounding on the sum of taxes, that means you
> adding value for the invoice.
>
> Normally, VAT is counted like this:
> VAT = round(unit_1_price * VAT_% / 100) * quantity_1 +
> round(unit_2_price * VAT_% / 100) * quantity_2 +
> ..
> VAT = round(VAT)
This is very strange because you can have a unit_price with a precision
lower than the currency one. So if you round such unit_price tax
computation, you will have 0.
> So speaking in words, we need to know what is the added value (in same
> precision as the list price) for a single product. After that, we need
> to sum up all VAT for a single product by its quantity. In case, when
> all quantities are integer we always get an accurate VAT without need of
> rounding tax lines or the tax sum. But if we have decimal quantity, we
> need to round one more time. And think this the situation what the
> Germany laws are speaking about. If we round each tax line, we will get
> an incorrectness:
> round( round(unit_1_price * VAT_% / 100) * quantity_1 ) +
> round( round(unit_1_price * VAT_% / 100) * quantity_2 )
> is not equal to
> round( round(unit_1_price * VAT_% / 100) * quantity_3 )
> where quantity_3 = quantity_1 + quantity_2
> so we must round the sum and not the lines.
Yes but:
round( unit_1_price * VAT_% / 100 * quantity_1 +
unit_1_price * VAT_% / 100 * quantity_2 )
is equal to
round( unit_1_price * VAT_% / 100 * quantity_3 )
And this is what we do in Tryton. The only issue is about the display of
base amount in the tax lines of invoice which should be rounded by lines
to have the same value as the untaxed amount.
--
Cédric Krier
B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
Email/Jabber: [email protected]
Website: http://www.b2ck.com/
pgpYQkmrLxVbv.pgp
Description: PGP signature
