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

The format of a price when entering the price should consider the "Maximum Number of Decimal Places" setting

    Details

    • Severity of Issue:
      Minor

      Description

      Assumptions

      1. Pricing engine V2.0

      Steps to Reproduce

      1. Go to Control Panel → Commerce → Pricing → Price Lists
      2. Create a new price list and add price entries

      Expected Behavior

      The number of decimal places displayed for users is the larger between the following:

      1. the number of decimal places until there are no additional non-zero digits, or
      2. the number of decimal places defined in the "Maximum Decimal Places" setting on the price list's currency

      Example 1: Max Decimal Places is larger

      • Maximum Decimal Places = 2
      • Price is defined as 10.1
      • Display: 10.10

      Example 2: Max Decimal Places is smaller

      • Maximum Decimal Places = 2
      • Price is defined as 10.001
      • Display: 10.001

      Actual Behavior

      The number of decimal places displayed does not consider the maximum decimal places setting on the currency and defaults to a minimum of 1 decimal place.

      Notes

      • This same logic should apply wherever users are allowed to input a price, across price lists, discounts and promotions


      An example of a price input box


      An example of a price input box that seems to behaving correctly

      Reproduced On

      7.1

      Tomcat 9.0.33 + HSQL 2.3.3
      marco-leo/liferay-portal-ee:7.1.x git hash f6228ce4798853c4074a36021934c732012b438f

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              riccardo.alberti Riccardo Alberti
              Reporter:
              corbin.murakami Corbin Murakami
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:

                  Packages

                  Version Package