Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-5281

BigDecimal in Minilang are not correctly converted with Czech Locale

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    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...

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            adrianc@hlmksw.com Adrian Crum
            pytelka@lightcomp.cz Petr Pytelka
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment