Notifications

18 views

Description

Currency and price fields marked as read-only at the field definition level [sys_dictionary] are saved incorrectly if the user locale is not the default one and uses a different decimal separator than the default one. As a result, the amount is multiplied by 100 or 1000.

Steps to Reproduce

The issue can be reproduced for fields marked as read-only at the field definition level [sys_dictionary]. The issue does not occur for fields marked as read-only via a UI Policy.

Steps to reproduce:
V1.
1. Create [sys_choice] record with value 'da', label 'Danish' for element country on table [sys_user].
2. Create [sys_choice] record with value 'DK', label 'Denmark' for element preferred_language on table [sys_user].
3. Update an itil user by setting the language to Danish and the country code to Denmark.
4. Impersonate the user of step 3.
5. Navigate to: Service Catalog->Catalog
6. Order one item from hardware ex Developer Laptop (Mac) - about kr 9567
7. Open the request. Notice the price in danish kr (ex kr 9.569,9647)
8. Save the request
9. Notice the price has changed kr 95.699.647,00 (multiplied by 1000).

V2.
1. Create [sys_choice] record with value 'da', label 'Danish' for element country on table [sys_user].
2. Create [sys_choice] record with value 'DK', label 'Denmark' for element preferred_language on table [sys_user].
3. Update the admin user by setting the language to Danish and the country code to Denmark. Logout and relogin.
4. Open the list view of the [alm_asset] table.
5. Personalize the list layout, add columns "Residual value" and "Depreciated amount".
6. Filter the list for Asset tag is P1000479.
7. Notice values for "Residual value" and "Depreciated amount".
8. Open record with Asset tag P1000479.
9. Check on depreciation form section "Residual value" and "Depreciated amount".
10. Save record.
11. Notice new values for "Residual value" and "Depreciated amount" (multiplied by 1000).

Workaround

This problem has been fixed. If you are able to upgrade, review the Fixed In or Intended Fix Version fields to determine whether any versions have a planned or permanent fix.

As a workaround, turn off the 'Read-only' option at the field definition level [sys_dictionary] and instead create a UI Policy (navigation: System UI > UI Policies) against the table in question and add an Action for the currency or price field with Read only = 'true'.


Related Problem: PRB1238030

Seen In

There is no data to report.

Fixed In

Jakarta Patch 10
Jakarta Patch 9 Hot Fix 1
Kingston Patch 7
London

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2020-01-16 05:40:16
Published:2020-01-16