Enterprise: Locale: Mask incorrectly applied on large negative number.

Created on 11 Jun 2021  路  16Comments  路  Source: infor-design/enterprise

Describe the bug
The mask is adding a 0 to large negative numbers.

To Reproduce

  1. Navigate to https://master-enterprise.demo.design.infor.com/components/locale/test-format-big-negative.html
  2. Enter the value -1,482,409,800.81
  3. Hit the format button
  4. See that the read only field now has an additional 0 inserted into it: -14824098000.81

Expected behavior
Extra zeros should not be inserted into the number

Version

  • ids-enterprise: v4.51.0-dev

Screenshots
MaskOnNegativeBigNumber

Platform

  • Infor Application/Team Name: Infor Landmark
  • Device: All
  • OS Version: All
  • Browser Name: All
  • Browser Version: All

Additional context
If you hit format on the value that initially there, it seems to work. Maybe an issue having a zero before the decimal point?

[3] critical landmark type

All 16 comments

Multiple customers (three FSM thus far) reporting this. Raised priority from my perspective.

Only seems to happen for a number with 10 digits before the decimal point

And only with the minus. What kind of numbers are minus billions? (curious - country debt?)

Certainly something in financials!

@EdwardCoyle can you maybe please see about this one and if it has any easy fix?

@tmcconechy and @EdwardCoyle We need a patch for 4.51 and potentially 4.50 if it's low risk.

Have to see about 4.50 we don't usually patch that far back and i think it might have a problem building. But i will try..

Also i know there was another issue you wanted a patch for but i dont know which one? Can you remind me of that other issue and i can add that too to 4.51

@Sovia do you guys use the "round" option on purpose as far as you know? Or is it just our code doing that by default?

bug is here...

this.truncateDecimals(-1482409800.81, 2, 2, { round: true})
"-14824098000.81"
this.truncateDecimals(-1482409800.81, 2, 2, { round: false})
"-14824098000.81"

OK this issue and #4974 are now patched in 4.51.3 -> Did an angular build and its [email protected]

@tmcconechy Can we get a patch for 4.50? THanks

Only this one in the 4.50 patch please!

So two patches done
NG 9.4.6 -> This has 4.50.4 which contains just #5308
NG 9.5.2 -> This has 4.51.4 which contains both #5308 and #5318

Was this page helpful?
0 / 5 - 0 ratings