IBM Support What's New?

How to remove decimal part from Application Console for monetary attributes

Technote (FAQ)


Requirement is to not show the decimal part for monetary attributes on the Application Console.

For example, the Japanese currency YEN does not have a decimal part, so if order amount is 100 Yen, it should be displayed as 100 rather than 100.00.


This is the default behavior for the Out Of The Box monetary fields.


There is no straight forward flag/attribute which can remove the decimal part from the price related attributes. To achieve this requirement the below approach can be followed:

1. extend the 'yfsdatatypes.xml' to create a new datatype like below which will not have a decimal part.
2. extend the 'yfsdatatypemap.xml', to point the existing attributes to the new data type defined above in step1.
This way the UI fields(which currently show the decimal point) will now refer to the new datatype and hence will not show the decimals on the screens.

1. New data type in extended yfsdatatypes.xml:
<DataType Name="Price_JP" NegativeAllowed="false"
Size="19" Type="NUMBER">
<UIType Size="7" UITableSize="7"/>

2. Update existing attributes (which were pointing to price related types like 'Price', 'Money', UnitPrice' etc) in the extended yfsdatatypemap.xml to point to the new datatype.

<Attribute DataType="Price_JP" Name="TotalAmount"/>
<Attribute DataType="Price_JP" Name="GrandCharges"/>
<Attribute DataType="Price_JP" Name="GrandTax"/>
<Attribute DataType="Price_JP" Name="GrandTotal"/>

Document information

More support for: Sterling Order Management

Software version: 9.0, 9.1, 9.2

Operating system(s): AIX, HP-UX, Linux, Solaris, Windows

Reference #: 1632895

Modified date: 2013-03-31