Scott,
It's a bit complicated for snippet like
// get the selected amount
String selectedAmountStr = "0.00";
if (paramMap.containsKey("ADD_AMOUNT")) {
selectedAmountStr = (String) paramMap.remove("ADD_AMOUNT");
} else if (paramMap.containsKey("add_amount")) {
selectedAmountStr = (String) paramMap.remove("add_amount");
}
in ShoppingCartEvents.java
Though there are only 9 cases like that (only Strings) at all in OFBiz, so yes
maybe...
Jacques
From: "Scott Gray" <[email protected]>
Yes there may well be issues with formatting not being applied in
various places but I think it is those which should be fixed rather
than adding a property. My preference for BigDecimal initialization
would be to use BigDecimal.ZERO.
Regards
Scott
On 10/11/2009, at 10:30 AM, Jacques Le Roux wrote:
Yes, I agree that's why I asked. However these strings are
*intialized* to "0.00" or "'0.00" is a ternary ? default and, as
they are default, used if no formatted values replace them.
At least in POS
Receipt.java[472]
Operator.java[104]
But there are other similar cases outside of POS, look for "0.00"...
Jacques
From: "Scott Gray" <[email protected]>
Hi Jacques,
I think it should be irrelevant whether a BigDecimal is initialized
as 0, 0.00 or 0.0000000 because all number should be rounded if
needed before being presented in the UI anyway. Assuming that it
was currency that your Client wanted 1 decimal place for, wasn't
the number going through some sort of currency formatting before
being presented?
Regards
Scott
HotWax Media
http://www.hotwaxmedia.com
On 10/11/2009, at 10:10 AM, Jacques Le Roux wrote:
Hi,
I notice that we have number of "0.00" strings harcoded. I think
we should introduce a parameter for that in Arithmetic properties
Something like default.decimals.string="0.00"
A client of mine (POS) wanted to use only 1 decimal and I had to
harcode them, I'd like to generalize.
What do you think ?
Jacques