Preparing search index...

    Function scaleQuantityForPersons

    • Scales a quantity string according to a change in persons.

      • Scales only if the string contains exactly one numeric token (supports dot/comma decimals)
      • Preserves the rest of the string
      • Uses ',' as decimal separator in the output
      • Rounds to 2 decimals

      Parameters

      • quantity: string
      • fromPersons: number
      • toPersons: number

      Returns string