[
https://issues.apache.org/jira/browse/OFBIZ-1696?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12577475#action_12577475
]
Adrian Crum commented on OFBIZ-1696:
------------------------------------
My two cents:
I agree that there needs to be more work done to clean up how locales are
handled. I had considered setting up a configurable default locale - similar to
the configurable default time zone that exists now. I would also like to see
all locale utility or "worker" code moved to its own utility class, but that's
getting a bit off topic.
Looking at Christian's patch, it seems to me it would be better to get the
user's locale from the context Map, and if it doesn't exist in there, then go
get the default locale.
A general best practice for working with Locale arguments is to supply
something rather than passing a null (which is something Christian's patch
fixes). The reason is, if you're not specific about your intentions, then there
is no way to know what the framework code is going to do with that null
argument.
> Decimal formatting messed up in Trial Balance with German locale
> ----------------------------------------------------------------
>
> Key: OFBIZ-1696
> URL: https://issues.apache.org/jira/browse/OFBIZ-1696
> Project: OFBiz
> Issue Type: Bug
> Components: accounting
> Affects Versions: SVN trunk
> Environment: svn trunk with clean-all run-install
> Reporter: Christian Geisert
> Attachments: ofbiz_trialbalance_german.png,
> patch_ofbiz_convert_locale.diff
>
>
> This is the Trial Balance after one sales order (4 x GZ-1000)
> Trial Balance
> Gl Account Id Debit Credit
> [120000] [120000] ACCOUNTS RECEIVABLE 4.317,00 $
> [140000] [140000] INVENTORY 300,00 $
> [400000] [400000] SALES 4.797,00 $
> [410000] [410000] DISCOUNTS ON SALES 48,00 $
> [500000] [500000] COST OF GOODS SOLD 300,00 $
> Gesamtsumme 43.170.780.000.000.000.000,00 $ 7.797.000,00 $
> (I'll attach this also as an image)
> ACCOUNTS RECEIVABLE should be 43,17 $ instead of 4.317,00 $
> Strange, postedBalance is ok in GlAccountOrganization, it looks like the
> following line messes it up:
> <set field="absolutePostedBalance" value="${bsh:(postedBalance >= 0?
> postedBalance: (-1)*postedBalance)}" type="Double"/>
> If I start OFBiz with the English locale (-Duser.language=en) the Trial
> Balance looks correct.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.