You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by carlj <ma...@carl-johansson.com> on 2007/02/16 17:28:10 UTC

Re: [2] Cannot apply decimals

Indeed it should be, and perhaps it is. However I cannot be doing this the
right way. I looked in my general.properties and change this:

# -- the default currency to use for prices, etc
currency.uom.id.default=SWE

# -- the default decimal format for currency
currency.decimal.format=##0,00

Perhaps I am very wrong?


cjhowe wrote:
> 
> Just to give you a quick answer that you can try until someone can
> confirm it.  
> 
> This may be a locale problem.  If your default locale is the US, the
> decimal format should be 1259.61 instead of 1259,61.  I believe the
> comma is supported if you change your default locale.
> 
> This is changed in ofbizhome/framework/common/config/general.properties
> 
> --- carlj <ma...@carl-johansson.com> wrote:
> 
>> 
>> When I try to apply say 1259,61 I can only apply 1259 and the 0,61
>> remains.
>> Is there a know fix? I didn't find anything on the forum.
>> 
>> Carl
>> -- 
>> View this message in context:
>> http://www.nabble.com/Cannot-apply-decimals-tf3238944.html#a9002619
>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>> 
>> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Cannot-apply-decimals-tf3238944.html#a9007604
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: [2] Cannot apply decimals

Posted by carlj <ma...@carl-johansson.com>.
Honestly I don't know the services, but I am trying to apply a payment to an
invoice


Si Chen-2 wrote:
> 
> carlj wrote:
>> Indeed it should be, and perhaps it is. However I cannot be doing this
>> the
>> right way. I looked in my general.properties and change this:
>>
>> # -- the default currency to use for prices, etc
>> currency.uom.id.default=SWE
>>
>> # -- the default decimal format for currency
>> currency.decimal.format=##0,00
>>
>> Perhaps I am very wrong?
>>
>>
>> cjhowe wrote:
>>   
>>> Just to give you a quick answer that you can try until someone can
>>> confirm it.  
>>>
>>> This may be a locale problem.  If your default locale is the US, the
>>> decimal format should be 1259.61 instead of 1259,61.  I believe the
>>> comma is supported if you change your default locale.
>>>
>>> This is changed in ofbizhome/framework/common/config/general.properties
>>>
>>> --- carlj <ma...@carl-johansson.com> wrote:
>>>
>>>     
>>>> When I try to apply say 1259,61 I can only apply 1259 and the 0,61
>>>> remains.
>>>> Is there a know fix? I didn't find anything on the forum.
>>>>
>>>> Carl
>>>> -- 
>>>> View this message in context:
>>>> http://www.nabble.com/Cannot-apply-decimals-tf3238944.html#a9002619
>>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>>       
>>>
>>>     
>>
>>   
> What methods are you calling to apply the decimals?
> 
> Minilang has some problems with internationalized decimals.  I thought 
> this had been fixed but perhaps not completely.
> 
> Si
> 
> 

-- 
View this message in context: http://www.nabble.com/Cannot-apply-decimals-tf3238944.html#a9011821
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: [2] Cannot apply decimals

Posted by carlj <ma...@carl-johansson.com>.
Yes, it sounds like that would solve the problem.
Thank you for your input, it is appreciated!


Florin Jurcovici wrote:
> 
> Hello.
> 
> This may have something to do with problems we encountered in other  
> browser-based apps. I'm not that familiar with ofbiz's internals to judge  
> this.
> 
> If your workstation's/browser's locale settings are different than the  
> ones on the server, you're in trouble. I dunno if you do any preprocessing  
> on the number in JS in the browser, if you don't, there is still hope -  
> you just have to use the server locales when you enter data in the browser  
> - which is a problem if for instance you use some fancy date picker for  
> filling out date values.
> 
> The problem is, if for instance you enter a number or date using German  
> locales in a browser ("," as decimal separator, month names spelled  
> differently), you can then validate them if the workstation's locale are  
> also German. But if you now send the German-formatted values to an English  
> server, they are sent as strings, not as numbers or dates, so the format  
> should be the one you use on the server (i.e. "." as decimal separator, EN  
> month names). But you cannot enter them this way, if you use JS to  
> pre-check them in the browser, or you break the JS code.
> 
> What we did: we use an Ajax-like mechanism, which never plainly submits a  
> form, but instead sends its data only to the server. But in doing so it  
> always packs dates and numbers in a language/locale-independent format,  
> and the code on the server first decodes the values. For instance, 12.36  
> would get sent as 1236E-2, -3.14 as -314E-2, 12 Jun 2007, 14:35:22  
> GMT+2:00 would get sent as 20070612T143522+20, 14:35:22 GMT+2:00 would be  
> only T143522+20, 12 Jun 2007 alone would be only 20070612, so decoding is  
> easy. And this way values can be sent both to and from the browser.
> 
> br,
> 
> -- 
> Florin Jurcovici
> ------------------
> Why do psychics have to ask you for your name?
> 
> On Fri, 16 Feb 2007 18:58:53 +0200, Si Chen  
> <si...@opensourcestrategies.com> wrote:
> 
>> carlj wrote:
>>> Indeed it should be, and perhaps it is. However I cannot be doing this  
>>> the
>>> right way. I looked in my general.properties and change this:
>>>
>>> # -- the default currency to use for prices, etc
>>> currency.uom.id.default=SWE
>>>
>>> # -- the default decimal format for currency
>>> currency.decimal.format=##0,00
>>>
>>> Perhaps I am very wrong?
>>>
>>>
>>> cjhowe wrote:
>>>
>>>> Just to give you a quick answer that you can try until someone can
>>>> confirm it.
>>>>
>>>> This may be a locale problem.  If your default locale is the US, the
>>>> decimal format should be 1259.61 instead of 1259,61.  I believe the
>>>> comma is supported if you change your default locale.
>>>>
>>>> This is changed in ofbizhome/framework/common/config/general.properties
>>>>
>>>> --- carlj <ma...@carl-johansson.com> wrote:
>>>>
>>>>
>>>>> When I try to apply say 1259,61 I can only apply 1259 and the 0,61
>>>>> remains.
>>>>> Is there a know fix? I didn't find anything on the forum.
>>>>>
>>>>> Carl
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/Cannot-apply-decimals-tf3238944.html#a9002619
>>>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>> What methods are you calling to apply the decimals?
>>
>> Minilang has some problems with internationalized decimals.  I thought
>> this had been fixed but perhaps not completely.
>>
>> Si
> 
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Cannot-apply-decimals-tf3238944.html#a9022430
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: [2] Cannot apply decimals

Posted by Florin Jurcovici <fl...@mail.dnttm.ro>.
Hello.

This may have something to do with problems we encountered in other  
browser-based apps. I'm not that familiar with ofbiz's internals to judge  
this.

If your workstation's/browser's locale settings are different than the  
ones on the server, you're in trouble. I dunno if you do any preprocessing  
on the number in JS in the browser, if you don't, there is still hope -  
you just have to use the server locales when you enter data in the browser  
- which is a problem if for instance you use some fancy date picker for  
filling out date values.

The problem is, if for instance you enter a number or date using German  
locales in a browser ("," as decimal separator, month names spelled  
differently), you can then validate them if the workstation's locale are  
also German. But if you now send the German-formatted values to an English  
server, they are sent as strings, not as numbers or dates, so the format  
should be the one you use on the server (i.e. "." as decimal separator, EN  
month names). But you cannot enter them this way, if you use JS to  
pre-check them in the browser, or you break the JS code.

What we did: we use an Ajax-like mechanism, which never plainly submits a  
form, but instead sends its data only to the server. But in doing so it  
always packs dates and numbers in a language/locale-independent format,  
and the code on the server first decodes the values. For instance, 12.36  
would get sent as 1236E-2, -3.14 as -314E-2, 12 Jun 2007, 14:35:22  
GMT+2:00 would get sent as 20070612T143522+20, 14:35:22 GMT+2:00 would be  
only T143522+20, 12 Jun 2007 alone would be only 20070612, so decoding is  
easy. And this way values can be sent both to and from the browser.

br,

-- 
Florin Jurcovici
------------------
Why do psychics have to ask you for your name?

On Fri, 16 Feb 2007 18:58:53 +0200, Si Chen  
<si...@opensourcestrategies.com> wrote:

> carlj wrote:
>> Indeed it should be, and perhaps it is. However I cannot be doing this  
>> the
>> right way. I looked in my general.properties and change this:
>>
>> # -- the default currency to use for prices, etc
>> currency.uom.id.default=SWE
>>
>> # -- the default decimal format for currency
>> currency.decimal.format=##0,00
>>
>> Perhaps I am very wrong?
>>
>>
>> cjhowe wrote:
>>
>>> Just to give you a quick answer that you can try until someone can
>>> confirm it.
>>>
>>> This may be a locale problem.  If your default locale is the US, the
>>> decimal format should be 1259.61 instead of 1259,61.  I believe the
>>> comma is supported if you change your default locale.
>>>
>>> This is changed in ofbizhome/framework/common/config/general.properties
>>>
>>> --- carlj <ma...@carl-johansson.com> wrote:
>>>
>>>
>>>> When I try to apply say 1259,61 I can only apply 1259 and the 0,61
>>>> remains.
>>>> Is there a know fix? I didn't find anything on the forum.
>>>>
>>>> Carl
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Cannot-apply-decimals-tf3238944.html#a9002619
>>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
> What methods are you calling to apply the decimals?
>
> Minilang has some problems with internationalized decimals.  I thought
> this had been fixed but perhaps not completely.
>
> Si




Re: [2] Cannot apply decimals

Posted by Si Chen <si...@opensourcestrategies.com>.
carlj wrote:
> Indeed it should be, and perhaps it is. However I cannot be doing this the
> right way. I looked in my general.properties and change this:
>
> # -- the default currency to use for prices, etc
> currency.uom.id.default=SWE
>
> # -- the default decimal format for currency
> currency.decimal.format=##0,00
>
> Perhaps I am very wrong?
>
>
> cjhowe wrote:
>   
>> Just to give you a quick answer that you can try until someone can
>> confirm it.  
>>
>> This may be a locale problem.  If your default locale is the US, the
>> decimal format should be 1259.61 instead of 1259,61.  I believe the
>> comma is supported if you change your default locale.
>>
>> This is changed in ofbizhome/framework/common/config/general.properties
>>
>> --- carlj <ma...@carl-johansson.com> wrote:
>>
>>     
>>> When I try to apply say 1259,61 I can only apply 1259 and the 0,61
>>> remains.
>>> Is there a know fix? I didn't find anything on the forum.
>>>
>>> Carl
>>> -- 
>>> View this message in context:
>>> http://www.nabble.com/Cannot-apply-decimals-tf3238944.html#a9002619
>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>
>>>
>>>       
>>
>>     
>
>   
What methods are you calling to apply the decimals?

Minilang has some problems with internationalized decimals.  I thought 
this had been fixed but perhaps not completely.

Si

Re: [2] Cannot apply decimals

Posted by carlj <ma...@carl-johansson.com>.
Interesting note: I can apply decimals to accounts but not invoies. Hrm


Jacopo Cappellato wrote:
> 
> In which language are you working?
> Did you try to insert the value with the format 1259.61 ?
> 
> Jacopo
> 
> carlj wrote:
>> 
>> 
>> I know, but it is that way by default. How can I change it?
>> Most greatful
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Cannot-apply-decimals-tf3238944.html#a9022181
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: [2] Cannot apply decimals

Posted by carlj <ma...@carl-johansson.com>.
Yes I have. I've also tried it in both Firefox and IE6


Jacopo Cappellato wrote:
> 
> In which language are you working?
> Did you try to insert the value with the format 1259.61 ?
> 
> Jacopo
> 
> carlj wrote:
>> 
>> 
>> I know, but it is that way by default. How can I change it?
>> Most greatful
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Cannot-apply-decimals-tf3238944.html#a9021925
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: [2] Cannot apply decimals

Posted by Jacopo Cappellato <ti...@sastau.it>.
In which language are you working?
Did you try to insert the value with the format 1259.61 ?

Jacopo

carlj wrote:
> 
> 
> I know, but it is that way by default. How can I change it?
> Most greatful



Re: [2] Cannot apply decimals

Posted by carlj <ma...@carl-johansson.com>.

Si Chen-2 wrote:
> 
> carlj wrote:
>> USD
>>
>>
>> jacques.le.roux wrote:
>>   
>>> What is the currency of the store ?
>>>
>>> Jacques
>>>
>>> ----- Original Message ----- 
>>> From: "carlj" <ma...@carl-johansson.com>
>>> To: <us...@ofbiz.apache.org>
>>> Sent: Friday, February 16, 2007 5:28 PM
>>> Subject: Re: [2] Cannot apply decimals
>>>
>>>
>>>     
>>>> Indeed it should be, and perhaps it is. However I cannot be doing this
>>>> the
>>>> right way. I looked in my general.properties and change this:
>>>>
>>>> # -- the default currency to use for prices, etc
>>>> currency.uom.id.default=SWE
>>>>
>>>> # -- the default decimal format for currency
>>>> currency.decimal.format=##0,00
>>>>
>>>> Perhaps I am very wrong?
>>>>
>>>>
>>>> cjhowe wrote:
>>>>       
>>>>> Just to give you a quick answer that you can try until someone can
>>>>> confirm it.  
>>>>>
>>>>> This may be a locale problem.  If your default locale is the US, the
>>>>> decimal format should be 1259.61 instead of 1259,61.  I believe the
>>>>> comma is supported if you change your default locale.
>>>>>
>>>>> This is changed in
>>>>> ofbizhome/framework/common/config/general.properties
>>>>>
>>>>> --- carlj <ma...@carl-johansson.com> wrote:
>>>>>
>>>>>         
>>>>>> When I try to apply say 1259,61 I can only apply 1259 and the 0,61
>>>>>> remains.
>>>>>> Is there a know fix? I didn't find anything on the forum.
>>>>>>
>>>>>> Carl
>>>>>> -- 
>>>>>> View this message in context:
>>>>>> http://www.nabble.com/Cannot-apply-decimals-tf3238944.html#a9002619
>>>>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>>>>
>>>>>>
>>>>>>           
>>>>>
>>>>>         
>>>> -- 
>>>> View this message in context:
>>>> http://www.nabble.com/Cannot-apply-decimals-tf3238944.html#a9007604
>>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>>       
>>>     
>>
>>   
> Wait -- you have USD and you're using "1259,61"?
> 
> 
> 

I know, but it is that way by default. How can I change it?
Most greatful
-- 
View this message in context: http://www.nabble.com/Cannot-apply-decimals-tf3238944.html#a9021199
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: [2] Cannot apply decimals

Posted by Si Chen <si...@opensourcestrategies.com>.
carlj wrote:
> USD
>
>
> jacques.le.roux wrote:
>   
>> What is the currency of the store ?
>>
>> Jacques
>>
>> ----- Original Message ----- 
>> From: "carlj" <ma...@carl-johansson.com>
>> To: <us...@ofbiz.apache.org>
>> Sent: Friday, February 16, 2007 5:28 PM
>> Subject: Re: [2] Cannot apply decimals
>>
>>
>>     
>>> Indeed it should be, and perhaps it is. However I cannot be doing this
>>> the
>>> right way. I looked in my general.properties and change this:
>>>
>>> # -- the default currency to use for prices, etc
>>> currency.uom.id.default=SWE
>>>
>>> # -- the default decimal format for currency
>>> currency.decimal.format=##0,00
>>>
>>> Perhaps I am very wrong?
>>>
>>>
>>> cjhowe wrote:
>>>       
>>>> Just to give you a quick answer that you can try until someone can
>>>> confirm it.  
>>>>
>>>> This may be a locale problem.  If your default locale is the US, the
>>>> decimal format should be 1259.61 instead of 1259,61.  I believe the
>>>> comma is supported if you change your default locale.
>>>>
>>>> This is changed in ofbizhome/framework/common/config/general.properties
>>>>
>>>> --- carlj <ma...@carl-johansson.com> wrote:
>>>>
>>>>         
>>>>> When I try to apply say 1259,61 I can only apply 1259 and the 0,61
>>>>> remains.
>>>>> Is there a know fix? I didn't find anything on the forum.
>>>>>
>>>>> Carl
>>>>> -- 
>>>>> View this message in context:
>>>>> http://www.nabble.com/Cannot-apply-decimals-tf3238944.html#a9002619
>>>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>>           
>>>>
>>>>         
>>> -- 
>>> View this message in context:
>>> http://www.nabble.com/Cannot-apply-decimals-tf3238944.html#a9007604
>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>       
>>     
>
>   
Wait -- you have USD and you're using "1259,61"?


Re: [2] Cannot apply decimals

Posted by carlj <ma...@carl-johansson.com>.
USD


jacques.le.roux wrote:
> 
> What is the currency of the store ?
> 
> Jacques
> 
> ----- Original Message ----- 
> From: "carlj" <ma...@carl-johansson.com>
> To: <us...@ofbiz.apache.org>
> Sent: Friday, February 16, 2007 5:28 PM
> Subject: Re: [2] Cannot apply decimals
> 
> 
>> 
>> Indeed it should be, and perhaps it is. However I cannot be doing this
>> the
>> right way. I looked in my general.properties and change this:
>> 
>> # -- the default currency to use for prices, etc
>> currency.uom.id.default=SWE
>> 
>> # -- the default decimal format for currency
>> currency.decimal.format=##0,00
>> 
>> Perhaps I am very wrong?
>> 
>> 
>> cjhowe wrote:
>> > 
>> > Just to give you a quick answer that you can try until someone can
>> > confirm it.  
>> > 
>> > This may be a locale problem.  If your default locale is the US, the
>> > decimal format should be 1259.61 instead of 1259,61.  I believe the
>> > comma is supported if you change your default locale.
>> > 
>> > This is changed in ofbizhome/framework/common/config/general.properties
>> > 
>> > --- carlj <ma...@carl-johansson.com> wrote:
>> > 
>> >> 
>> >> When I try to apply say 1259,61 I can only apply 1259 and the 0,61
>> >> remains.
>> >> Is there a know fix? I didn't find anything on the forum.
>> >> 
>> >> Carl
>> >> -- 
>> >> View this message in context:
>> >> http://www.nabble.com/Cannot-apply-decimals-tf3238944.html#a9002619
>> >> Sent from the OFBiz - User mailing list archive at Nabble.com.
>> >> 
>> >> 
>> > 
>> > 
>> > 
>> 
>> -- 
>> View this message in context:
>> http://www.nabble.com/Cannot-apply-decimals-tf3238944.html#a9007604
>> Sent from the OFBiz - User mailing list archive at Nabble.com.
> 
> 

-- 
View this message in context: http://www.nabble.com/Cannot-apply-decimals-tf3238944.html#a9011869
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: [2] Cannot apply decimals

Posted by Jacques Le Roux <ja...@les7arts.com>.
What is the currency of the store ?

Jacques

----- Original Message ----- 
From: "carlj" <ma...@carl-johansson.com>
To: <us...@ofbiz.apache.org>
Sent: Friday, February 16, 2007 5:28 PM
Subject: Re: [2] Cannot apply decimals


> 
> Indeed it should be, and perhaps it is. However I cannot be doing this the
> right way. I looked in my general.properties and change this:
> 
> # -- the default currency to use for prices, etc
> currency.uom.id.default=SWE
> 
> # -- the default decimal format for currency
> currency.decimal.format=##0,00
> 
> Perhaps I am very wrong?
> 
> 
> cjhowe wrote:
> > 
> > Just to give you a quick answer that you can try until someone can
> > confirm it.  
> > 
> > This may be a locale problem.  If your default locale is the US, the
> > decimal format should be 1259.61 instead of 1259,61.  I believe the
> > comma is supported if you change your default locale.
> > 
> > This is changed in ofbizhome/framework/common/config/general.properties
> > 
> > --- carlj <ma...@carl-johansson.com> wrote:
> > 
> >> 
> >> When I try to apply say 1259,61 I can only apply 1259 and the 0,61
> >> remains.
> >> Is there a know fix? I didn't find anything on the forum.
> >> 
> >> Carl
> >> -- 
> >> View this message in context:
> >> http://www.nabble.com/Cannot-apply-decimals-tf3238944.html#a9002619
> >> Sent from the OFBiz - User mailing list archive at Nabble.com.
> >> 
> >> 
> > 
> > 
> > 
> 
> -- 
> View this message in context: http://www.nabble.com/Cannot-apply-decimals-tf3238944.html#a9007604
> Sent from the OFBiz - User mailing list archive at Nabble.com.