Home > Technical > Table Definitions > COST

COST

Stores the costs for an item. A cost is given by a supplier for a product which means the COST record primarily links to the RANGE record via lintRangeCode. However, if we are looking at the ITEM, which is possibly available from many suppliers and therefore will have multiple RANGE records, we link the COST record to ITEM via lintItemNumber.

Column

Type

Description

CTRCODE

INT

Unique number assigned by the system.

STRCOMPANYCODE

VARCHAR(5)

No longer used. Should be set to 'ALL'.

DTMEFFECTIVE

DATETIME

The date the cost is to become effective.

STRSTORECODE

VARCHAR(10)

The trading unit which this cost is for.
link.gif (858 bytes) TRADUNIT.strTradeCode

STRCOSTTYPE

VARCHAR(10)

The type of cost. Normal/Deal/Our Deal/Dbl Deal.

LINTRANGECODE

INT

link.gif (858 bytes) RANGE.lintRangeCode

CURCOST

DECIMAL(19,4)

Invoice cost (extax cost + service fee+ullage+sales tax).

INTCARTONSIZE

DECIMAL(9,3)

Number of units in the carton.

INTMINORDER

DECIMAL(9,3)

Minimum number of units which can be ordered. Normally the same as intCartonSize.

CURCASEDEAL

DECIMAL(19,4)

No longer used.

CURDEALAMT

DECIMAL(19,4)

No longer used.

CURDEFERCASEDEAL

DECIMAL(19,4)

No longer used.

CURDEFERDEALAMT

DECIMAL(19,4)

No longer used.

DTMEXPIRY

DATETIME

The date the cost will expire. Only filled in if a deal cost.

YSNAVAILABLE

VARCHAR(1)

‘T’ if the cost is currently in effective, ‘F’ otherwise. The system will set this flag as required according to the effective and expiry dates.

LINTITEMNUMBER

INT

link.gif (858 bytes) RANGE.lintItemNumber
link.gif (858 bytes) ITEM.lintItemNumber

STRSUPPLIERCODE

VARCHAR(10)

Supplier which gave this cost. This is not really normalised as we should get the supplier from the RANGE record, however it is a introduced redundancy for efficiency. If the user changes the supplier in the RANGE record, the system will update this supplier automatically.
link.gif (858 bytes) SUPPLIER.strSupplierCode

STRORDERCODE

VARCHAR(20)

Not used.

LINTPROMOCODE

INT

If the system generated this cost because of a promotion deal, the promotion number will be stored in this field.
link.gif (858 bytes) PROMOHDR.lintPromoCode

STRPROMOSTATUS

VARCHAR(1)

Not used.

STRPROMOCOMMENT

VARCHAR(10)

Not used.

STRWHO

VARCHAR(20)

The person who entered the record. Maintained by the system.

DTMWHEN

DATETIME

The time the record was entered. Maintained by the system.

CUREXTAXCOST

DECIMAL(19,4)

The ex-tax cost. This is exclusive of everything - deals, fees, taxes.

CURSERVICEFEE

DECIMAL(19,4)

The service fee charged on the ex-tax cost.

CURULLAGEFEE

DECIMAL(19,4)

The ullage charged on the ex-tax cost.

CURSALESTAX

DECIMAL(19,4)

The sales tax (GST) on (ex-tax cost + service fee + ullage).

STRSERVICEMETHOD

VARCHAR(5)

The method used to calculate the service fee.1=%/Cost2=$/Carton

STRULLAGEMETHOD

VARCHAR(5)

The method used to calculate the service fee.1=%/Cost2=$/Carton

STRDEALTYPE

VARCHAR(5)

This is used in conjunction with dblDealRate to work out the deal value. It allows deals to be expressed in terms of dollar or percentage, ex tax or inc tax. Its values are '% Ex', '$ Ex', '% Inc' or  '$ Inc'. A 15% ex- tax deal would have this value set to '%

DBLDEALRATE

DECIMAL(19,4)

This is used in conjunction with strDealType to work out the deal value. It is simply a number which when used with strDealType enables the system to calculate the value. A 15% ex- tax deal would have this value set to 15.

STRCOMMENT

VARCHAR(255)

A general comment about the cost record.

CURWETAMT

DECIMAL(19,4)

The WET (Wine Equalisation Tax) charged

STRCURRENCYCODE

VARCHAR(5)

The code of the currency that the cost is in.

link.gif (858 bytes) CURRENCYCODE.strCurrencyCode

INTLEVEL

INT

Used for 'Deal' costs. Indicates the level of the deal. All deals of a certain level will be calculated together then added to the ex-tax cost. The next level of deals will then be calculated on this new subtotal.

link.gif (858 bytes) DEALLEVEL.intLevel

CURCOSTADJ

MONEY

????


Converted from CHM to HTML with chm2web Pro 2.85 (unicode)