Develop > Controller layer > Application developer > Currency


Number usage

Number usage defines the way a number is used in an application. For example, by using number usage codes in the WebSphere Commerce code, you can choose the way that you would like that number (currency or quantity) to be formatted and rounded. These codes (defined in the NUMBRUSG table) allow the number to be formatted according to the rules that you specify in the CURFORMAT, CURFMTDESC, QTYFORMAT and QTYFMTDESC tables. This allows stores to format numbers in different ways to meet a variety of requirements.

Each row in the NUMBRUSG table contains a record for a certain type of number usage. These are the pre-defined number usages that are allowed in the NUMBRUSG table:

These entries should not be changed. All formatting records in the CURFORMAT, CURFMTDESC, QTYFORMAT and QTYFMTDESC tables specify the default number usage for formatting unit prices and list prices. To have WebSphere Commerce format unit prices or list prices differently, add rows to the CURFORMAT table for the appropriate number usages.

When the application uses the CurrencyManager or QuantityManager to round or format amounts, you can specify the appropriate number usage code in the CODE column of the NUMBRUSG table. The CurrencyManager or QuantityManager uses the formatting rule for the specified number usage, if it exists.

When you create a row in the NUMBRUSG, CURFORMAT, or QTYFORMAT table, also create a row in the NUMBRUSGDS, QTYFMTDESC, or QTYFMTDESC table for each supported language.


Related concepts

Currency


Related tasks

Define new number usages


+

Search Tips   |   Advanced Search