Uploaded image for project: 'In-Portal CMS'
  1. In-Portal CMS
  2. INP-929

Ability to cut trailing zeros from field value being displayed

    XMLWordPrintable

    Details

    • Type: Bug Report
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.1.3
    • Fix Version/s: 5.2.0-B1
    • Component/s: Data Management
    • Labels:
      None

      Description

      In-Portal has powerful number formatting engine, that allows to format numbers, stored in database in the way you need using sprintf function.

      However I recently stumbled upon situation, where I need to remove trailing spaces from a formatted number, that was displayed, e.g. make "545.00" appear as "545", but keep "345.22" as is.

      Patch attached gives ability to enable such behavior for any database field needed via adding "cut_zeros" option to field definition in unit config.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alex Alex
                Reporter:
                alex Alex
                Developer:
                Alex
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: