A row in this table represents a CalculationCode. CalculationCodes represent ways of determining monetary amounts associated with OrderItems. They are used to calculate discounts, shipping charges, sales tax, and shipping tax.
Column Descriptions
Column Name
| Column Type
| Description
|
CALCODE_ID
| INTEGER NOT NULL
| Generated unique identifier.
|
CODE
| CHAR(128) NOT NULL
| A character string that uniquely identifies this CalculationCode, given a particular CalculationUsage and StoreEntity.
|
CALUSAGE_ID
| INTEGER NOT NULL
| Indicates the kind of calculation this CalculationCode is used for. For example, the CalculationCode may be used to calculate one of the following monetary amounts: discounts, shipping charges, sales tax, or shipping tax. Out of box: -1 is for Discount, -2 is for Shipping, -3 is for Sales Tax. -4 is for Shipping Tax, -5 is for Coupon and -6 is for Surcharge.
|
STOREENT_ID
| INTEGER NOT NULL
| The CalculationCode is part of this StoreEntity.
|
GROUPBY
| INTEGER NOT NULL DEFAULT 0
| Bit flags indicating to the CalculationCodeCombineMethod how OrderItems should be grouped when performing calculations. Each group of OrderItems is used to calculate a monetary amount, which is applied separately using the CalculationCodeApplyMethod. The default CalculationCodeCombineMethods recognize the following bit flags, from low to high order bits:
1 = perProduct - OrderItems with different CatalogEntries should be grouped separately. When a CatlogEntry has a PRODUCT_ITEM parent in the CATENTREL table, then the parent CatalogEntry is used instead.
2 = perTradingAgreement - OrderItems with different TradingAgreements should be grouped separately.
4 = perOffer - OrderItems with different Offers should be grouped separately.
8 = perAddress - OrderItems with different shipping addresses should be grouped separately.
Bit flags can be added together to specify combinations of the above groupings. For example:
0 = No grouping. Place all applicable OrderItems in a single group.
1 = Use perProduct grouping.
2 = Use perTradingAgreement grouping.
3 = Use perProduct and perTradingAgreement grouping.
4 = Use perOffer grouping.
6 = Use perOffer and perTradingAgreement grouping.
9 = Use perProduct and perAddress grouping.
|
TXCDCLASS_ID
| INTEGER
| For Taxation CalculationCodes, the TaxCodeClassification, if any, associated with this CalculationCode.
|
PUBLISHED
| INTEGER NOT NULL DEFAULT 0
| Specifies whether or not the calculation code is published:
0 = not published (temporarily disabled).
1 = published.
2 = marked for deletion (and not published).
|
SEQUENCE
| DOUBLE NOT NULL DEFAULT 0
| CalculationCodes are calculated and applied in sequence from lowest to highest.
|
COMBINATION
| INTEGER
| For schema based discount, this column is used to check if there is a combination between CALCODE and CALRULE.
For rules based discount, this column is used to check if this Promotion requires a PromotionCode.
|
LASTUPDATE
| TIMESTAMP
| The time this CalculationCode (including its CalculationRules) was most recently updated.
|
CALMETHOD_ID
| INTEGER NOT NULL
| The CalculationCodeCalculateMethod that defines how to calculate a monetary amount for this CalculationCode.
|
CALMETHOD_ID_APP
| INTEGER NOT NULL
| The CalculationCodeApplyMethod that stores the calculated amount for the associated OrderItems.
|
CALMETHOD_ID_QFY
| INTEGER NOT NULL
| The CalculationCodeQualifyMethod that defines which OrderItems are associated with this CalculationCode.
|
FIELD1
| VARCHAR(254)
| Customizable.
|
DESCRIPTION
| VARCHAR(254)
| A brief description of this CalculationCode, suitable for display by a user interface that manages CalculationCodes.
|
DISPLAYLEVEL
| INTEGER NOT NULL DEFAULT 0
| Amounts calculated by this CalculationCode should be displayed with each:
0 = OrderItem
1 = Order
2 = Product
3 = Item
4 = Contract.
|
STARTDATE
| TIMESTAMP
| The time this CalculationCode begins being effective.
|
ENDDATE
| TIMESTAMP
| The time this CalculationCode stops being effective.
|
FLAGS
| INTEGER NOT NULL DEFAULT 0
| Specifies whether the CalculationCodeQualifyMethod of this CalculationCode should be invoked:
0 = unrestricted. The method will not be invoked.
1 = restricted. The method will be invoked.
|
PRECEDENCE
| DOUBLE NOT NULL DEFAULT 0
| Reserved for IBM internal use.
|
OPTCOUNTER
| SMALLINT
| Reserved for IBM internal use.
|