Number usage

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

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

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, you must add rows to the CURFORMAT table for the appropriate number usages.

When your 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.

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