purchasse order and round in calcul

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

purchasse order and round in calcul

fabrice
Hello,
i have a mistake in my purchasse order i have price like 0.012352 for an article and i see in the result that all the number are not use in the calcul.
Is there anybody who could say me in what part of the code i can find what is used to do the calcul. Besause i need to modify it.
thanks you
Fabrice



Reply | Threaded
Open this post in threaded view
|

Re: purchasse order and round in calcul

Jacques Le Roux
Administrator
You could try to change the currency-amount and currency-precise type of field, look in fieldtype*.xml files

Jacques

From: "joseph kesse" <[hidden email]>
Hello,
i have a mistake in my purchasse order i have price like 0.012352 for an article and i see in the result that all the number are not
use in the calcul.
Is there anybody who could say me in what part of the code i can find what is used to do the calcul. Besause i need to modify it.
thanks you
Fabrice





Reply | Threaded
Open this post in threaded view
|

Re: purchasse order and round in calcul

fabrice
Hello,
I have find the mistake : in the table order item the unit price was configurate with only 3 decimal after the ","
thanks for you're help
Reply | Threaded
Open this post in threaded view
|

Re: purchasse order and round in calcul

fabrice
In reply to this post by Jacques Le Roux
And finally not.............
in fact that is resolve a part of the mistake but i always have a problem.
now the mistake is if i take 10 article i have 0.12 euro for a unit price of 0.01789 : he must be 0,1789
if i put 100 article i have 0,18 euros
but if i put 1000 article i do 17,89 euros............. the good price..........
so i think the mistake was in a round at two number after the "," in the calcul of the price :
so where's the code for calcul the price???
thanks you
Reply | Threaded
Open this post in threaded view
|

Re: purchasse order and round in calcul

Jacques Le Roux
Administrator
Which version are you using?

Jacques

From: "fabrice" <[hidden email]>

> And finally not.............
> in fact that is resolve a part of the mistake but i always have a problem.
> now the mistake is if i take 10 article i have 0.12 euro for a unit price of
> 0.01789 : he must be 0,1789
> if i put 100 article i have 0,18 euros
> but if i put 1000 article i do 17,89 euros............. the good
> price..........
> so i think the mistake was in a round at two number after the "," in the
> calcul of the price :
> so where's the code for calcul the price???
> thanks you
> --
> View this message in context: http://n4.nabble.com/purchasse-order-and-round-in-calcul-tp1836411p1838147.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>

Reply | Threaded
Open this post in threaded view
|

Re: purchasse order and round in calcul

fabrice
I'm using the c-libre 1.6 version.
fabrice


Reply | Threaded
Open this post in threaded view
|

Re: purchasse order and round in calcul

Erwan de FERRIERES
In reply to this post by fabrice
Le 13/04/2010 10:53, fabrice a écrit :

>
> And finally not.............
> in fact that is resolve a part of the mistake but i always have a problem.
> now the mistake is if i take 10 article i have 0.12 euro for a unit price of
> 0.01789 : he must be 0,1789
> if i put 100 article i have 0,18 euros
> but if i put 1000 article i do 17,89 euros............. the good
> price..........
> so i think the mistake was in a round at two number after the "," in the
> calcul of the price :
> so where's the code for calcul the price???
> thanks you

in arithmetic.properties, you can set the rounding.

HTH

--
Erwan de FERRIERES
www.nereide.biz
Reply | Threaded
Open this post in threaded view
|

Re: purchasse order and round in calcul

fabrice
thank you i'm looking for the arithmetic.properties.
fabrice
Reply | Threaded
Open this post in threaded view
|

Re: purchasse order and round in calcul

fabrice
In reply to this post by Erwan de FERRIERES
hello,
very nice :
I modify in  arithmétique.properties (framework\common\config\) the product.price.decimal = 2 by 5
and I modify the report who is in application/order/webapp/ordermgr/report/develloppement/pojr.xml
and put more than 0.00 in the unitprice properties 0.00000
and it was good the PDF have the good unit price.
Thanks you very much.
Fabrice
Reply | Threaded
Open this post in threaded view
|

Re: purchasse order and round in calcul

zhiyongcui
I changed order.decimals  of my arithmetic.properties to 6. but it doesn't do anything.The product price of my ShoppingCart still shows to 2 decimal.But I need it be 5.
How could I do?
Reply | Threaded
Open this post in threaded view
|

Re: purchasse order and round in calcul

James McGill-5
On Sun, Mar 6, 2011 at 5:47 PM, zhiyongcui <[hidden email]> wrote:
> I changed order.decimals  of my arithmetic.properties to 6. but it doesn't do
> anything.The product price of my ShoppingCart still shows to 2 decimal.But I
> need it be 5.
> How could I do?

You may also need to set tax.rounding and tax.decimals, or do what I
did and search for places where
these are used, and also look for every multiplication and division,
and be specific about your rounding rules everywhere.

Also, you may have to ALTER TABLE in your database if you are not
recreating the entity model.

And there are places in FTL that will call a formatter based on your
currency, so even when the value is stored with greater precision,
there are places where it will be displayed with two decimal places.

We have many inventory items with unit costs of much less than one
cent, and I made quite a few changes in ShoppingCart and Order to
accommodate this.  We do not ever use any currency besides USD, and do
not use any of the tax calculations.  I imagine that my changes would
be very broken if we did.

--
James McGill
Phoenix AZ