Price rounding

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

Price rounding

Eric DE MAULDE
Hi,

I'm trying to round prices display, I can't get a price without decimal :

<@ofbizCurrency amount priceMap.price?ceiling isoCode=priceMap.currencyUsed rounding=0/>

with "rounding=1", I get 1 deciaml, but with "rounding=0", I get 2 decimals (currency=EUR, locale=fr)

thanks

Eric
Reply | Threaded
Open this post in threaded view
|

Re: Price rounding

BJ Freeman
are you using 9.04 or release 4.0
there was a major effort before 9.04 to move everything to bigdecimal.

Eric DE MAULDE sent the following on 5/8/2009 1:01 AM:

> Hi,
>
> I'm trying to round prices display, I can't get a price without decimal :
>
> <@ofbizCurrency amount priceMap.price?ceiling isoCode=priceMap.currencyUsed rounding=0/>
>
> with "rounding=1", I get 1 deciaml, but with "rounding=0", I get 2 decimals (currency=EUR, locale=fr)
>
> thanks
>
> Eric

--
BJ Freeman
http://www.businessesnetwork.com/automation
http://bjfreeman.elance.com
http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro
Systems Integrator.

Reply | Threaded
Open this post in threaded view
|

Re: Price rounding

Scott Gray-2
That wouldn't effect this, BigDecimals are converted to doubles just  
prior to being formatted.  My guess is that it's something to do the  
with the formatter itself.

Regards
Scott

On 8/05/2009, at 11:42 PM, BJ Freeman wrote:

> are you using 9.04 or release 4.0
> there was a major effort before 9.04 to move everything to bigdecimal.
>
> Eric DE MAULDE sent the following on 5/8/2009 1:01 AM:
>> Hi,
>>
>> I'm trying to round prices display, I can't get a price without  
>> decimal :
>>
>> <@ofbizCurrency amount priceMap.price?ceiling  
>> isoCode=priceMap.currencyUsed rounding=0/>
>>
>> with "rounding=1", I get 1 deciaml, but with "rounding=0", I get 2  
>> decimals (currency=EUR, locale=fr)
>>
>> thanks
>>
>> Eric
>
> --
> BJ Freeman
> http://www.businessesnetwork.com/automation
> http://bjfreeman.elance.com
> http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro
> Systems Integrator.
>


smime.p7s (3K) Download Attachment