CALSCALE

A row in this table represents a CalculationScale. It can be used to perform a scale lookup to calculate a monetary amount for a given set of OrderItems. CalculationScale defines what the charge is based on when calculating different kinds of charges. For example, the shipping charge can be charged by total price, weight, quantity, etc. CalculationScale can be associated with the CalculationRule through table CRULESCALE.


Column Descriptions:

Name Type Description
CALSCALE_ID INTEGER NOT NULL Generated unique identifier.
QTYUNIT_ID CHAR (16) If specified, the unit of measure for the rangeStart values of the CalculationRange objects for this CalculationScale. The CalculationScaleLookupMethod should return a "lookup number" in these units.
CODE CHAR (30) A character string that uniquely identifies this CalculationScale, given a particular CalculationUsage and StoreEntity.
DESCRIPTION VARCHAR (254) A brief description of this CalculationScale, suitable for display by a user interface. The user interface allows creators of CalculationRules to choose from a list of available CalculationScales.
STOREENT_ID INTEGER NOT NULL The CalculationScale is part of this StoreEntity.
CALUSAGE_ID INTEGER NOT NULL Indicates the kind of calculation this CalculationScale is used for. For example, the CalculationScale may be used to calculate one of the following monetary amounts: discounts, shipping charges, sales tax, or shipping tax.
SETCCURR CHAR (3) If specified, the currency for the rangeStart values of the CalculationRange objects for this CalculationScale. The CalculationScaleLookupMethod should return a "lookup number" in this currency. This is a currency code as per ISO 4217 standards.
CALMETHOD_ID INTEGER NOT NULL The CalculationScaleLookupMethod that given a set of OrderItems determines a "lookup number", a "base monetary value", a "result multiplier", and a set of mathematical weights that can be used by the CalculationScale to calculate a monetary amount.
FIELD1 VARCHAR (254) Customizable.
OPTCOUNTER SMALLINT NOT NULL DEFAULT 0 The optimistic concurrency control counter for the table. Every time there is an update to the table, the counter is incremented.


Indexes:

Name Column Names Type
<SYSTEM-GENERATED> CALSCALE_ID Primary Key
I0000059 CALUSAGE_ID+CODE+STOREENT_ID Unique Index
I0000508 CALMETHOD_ID Non-Unique Index
I0000509 STOREENT_ID Non-Unique Index


Constrained By Parent Tables:

Constraint Columns Parent Table Parent Columns Type
F_175 SETCCURR SETCURR SETCCURR Cascade
F_176 CALUSAGE_ID CALUSAGE CALUSAGE_ID Cascade
F_177 STOREENT_ID STOREENT STOREENT_ID Cascade
F_178 QTYUNIT_ID QTYUNIT QTYUNIT_ID Cascade
F_179 CALMETHOD_ID CALMETHOD CALMETHOD_ID Cascade


Referenced By Child Tables:

Constraint Columns Child Table Child Columns Type
F_165 CALSCALE_ID CALRANGE CALSCALE_ID Cascade
F_181 CALSCALE_ID CALSCALEDS CALSCALE_ID Cascade
F_281 CALSCALE_ID CRULESCALE CALSCALE_ID Cascade


Related reference
Calculation method data model
Calculation rule data model
Calculation scale data model
Calculation usage data model
Quantity unit - references data model