Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
Release Branch 12.04
-
Czech locale
Description
I've found problem in accounting transactions when running Ofbiz with Czech locale. Problem is in the method:
<simple-method method-name="postAcctgTrans" short-description="Post a AcctgTrans">
Namely with the lines containing decimal numbers, like:
<if-compare field="trialBalanceResultMap.debitCreditDifference" operator="greater-equals" value="0.01" type="BigDecimal" >
When running Ofbiz with Czech locale decimal number format is like: 0,01. Minilang files are parsed according actual locale it means that number is incorectly parsed as 0.0 instead of 0.01. I see this as a critical issue for using Ofbiz with Czech locale.
My first ideas how to solve this issue:
1. Refactor minilang files to contain only 0 as a decical value,e.g.:
<if-compare field="trialBalanceResultMap.debitCreditDifference" operator="greater-equals" value="0.01" type="BigDecimal" >
to
<if-compare field="trialBalanceResultMap.debitCreditDifference" operator="greater" value="0" type="BigDecimal" >
2. Change minilang parser to have special support for parsing BigDecimal with C locale
3. Append attribute with number format specification for each line with
big decimal in particular format, e.g.: format="C"
Any help with this issue is welcomed...