DISCOUNTAVAILABILITY (4.0SP17)

Stores availability for discount.

Primary Key
Primary Key Field Type

ID

uniqueidentifier

Foreign Key Fields
Foreign Key Field Type Null Notes Description

DISCOUNTID

uniqueidentifier

false

The ID of the Discount the Price Type belongs to.

ADDEDBYID

uniqueidentifier

false

FK to CHANGEAGENT.

CHANGEDBYID

uniqueidentifier

false

FK to CHANGEAGENT.

Fields
Field Field Type Null Notes Description

ALLOWMONDAY

bit

false

1

Indicates if the discount is available on Mondays.

ALLOWTUESDAY

bit

false

1

Indicates if the discount is available on Tuesdays.

ALLOWWEDNESDAY

bit

false

1

Indicates if the discount is available on Wednesdays.

ALLOWFRIDAY

bit

false

1

Indicates if the discount is available on Fridays.

ALLOWSATURDAY

bit

false

1

Indicates if the discount is available on Saturdays.

ALLOWSUNDAY

bit

false

1

Indicates if the discount is available on Sundays.

ALLOWDISCOUNTDATEFROM

date

true

Indicates the beginning date the discount is valid.

ALLOWDISCOUNTDATETO

date

true

Indicates the end date the discount is valid.

ALLOWDISCOUNTTIMEFROM

UDT_HOURMINUTE

false

''

Indicates the beginning time of day the discount is valid.

ALLOWDISCOUNTTIMETO

UDT_HOURMINUTE

false

''

Indicates the end time of day the discount is valid.

DATEADDED

datetime

false

getdate()

Indicates the date this record was added.

DATECHANGED

datetime

false

getdate()

Indicates the date this record was last changed.

TS

timestamp

false

Timestamp.

TSLONG

bigint (Computed)

true

Numeric representation of the timestamp.

ALLOWTHURSDAY

bit

false

1

Indicates if the discount is available on Thursdays.

SEQUENCE

int

false

0

The sequence for availability records.

Indexes
Index Name Field(s) Unique Primary Clustered

IX_DISCOUNTAVAILABILITY_DATEADDED

DATEADDED

False

False

True

IX_DISCOUNTAVAILABILITY_DATECHANGED

DATECHANGED

False

False

False

IX_DISCOUNTAVAILABILITY_DISCOUNTID

DISCOUNTID

False

False

False

PK_DISCOUNTAVAILABILITY

ID

True

True

False

Triggers
Trigger Name Description

TR_DISCOUNTAVAILABILITY_AUDIT_UPDATE

TR_DISCOUNTAVAILABILITY_AUDIT_DELETE

Referenced by
Referenced by Field

DISCOUNTAVAILABILITYCONSTITUENCY

DISCOUNTAVAILABILITYID

DISCOUNTAVAILABILITYMEMBER

DISCOUNTAVAILABILITYID

DISCOUNTAVAILABILITYSALESMETHOD

DISCOUNTAVAILABILITYID