Uploaded image for project: 'PUBLIC - Liferay Commerce'
  1. PUBLIC - Liferay Commerce
  2. COMMERCE-3299

Currencies don't respect the Minimum Decimal Places Currency setting

    Details

      Description

      Steps to Reproduce

      1. Go to Control Panel → Commerce → Settings → Currencies
      2. Create a currency
      3. Fill out the required fields
      4. Set Minimum Decimal Places field to 3
      5. Set Maximum Decimal Places field to 10
      6. Save currency
      7. Create a catalog (Control Panel → Commerce → Catalogs) and set the currency to the currency created in steps 1 - 6
      8. Create a product (Control Panel → Commerce → Products) inside the catalog created in step 7
      9. Go to the SKUs tab and edit the default SKU
      10. Set the price for the product to 1.1 and save

      Expected Behavior

      The display of the price is 1.100 because the minimum decimal places value is 3 and the price doesn't include non-zero numbers past the 3rd decimal place.

      Actual Behavior

      The display of the price is 1.1000000000

      Reproduced On

      7.2

      Tomcat 9.0.33 + HSQL 2.3.3
      DXP 7.2 git hash cf49d78b37a0575edbf96a54bf53199ac6fae0ca
      Commerce git hash fd1da8617e20241bb86e8662ff04f7a64edf0faf

      7.1

      Tomcat 9.0.33 + HSQL 2.3.3
      DXP 7.1 and Commerce git hash fd1da8617e20241bb86e8662ff04f7a64edf0faf

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            corbin.murakami Corbin Murakami
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Packages

                Version Package
                2.1.2