ADJUSTMENTHISTORYSTOCKDISTRIBUTION (4.0SP20)

Stores GL distribution information for historic sold stock adjustments.

Primary Key
Primary Key Field Type

ID

uniqueidentifier

Foreign Key Fields
Foreign Key Field Type Null Notes Description

ADJUSTMENTHISTORYSTOCKID

uniqueidentifier

false

Indicates the adjustment history item to which this distribution applies.

ADDEDBYID

uniqueidentifier

false

FK to CHANGEAGENT.

CHANGEDBYID

uniqueidentifier

false

FK to CHANGEAGENT.

BASECURRENCYID

uniqueidentifier

true

The base currency associated with this distribution.

TRANSACTIONCURRENCYID

uniqueidentifier

true

The transaction currency associated with this distribution.

Fields
Field Field Type Null Notes Description

TYPECODE

tinyint

false

0

Indicates if this distribution is part of the reversal or the adjustment.

PROJECT

nvarchar(100)

false

''

Indicates the project for this distribution.

REFERENCE

nvarchar(255)

false

''

Indicates the reference for this distribution.

AMOUNT

money

false

0

Indicates the amount for this distribution.

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.

ACCOUNT

nvarchar(100)

false

''

Indicates the account for this distribution.

TRANSACTIONTYPECODE

tinyint

false

0

The transaction type (debit or credit) for the record

TYPE

nvarchar(10) (Computed)

true

Provides a translation for the 'TYPECODE' field.

TRANSACTIONTYPE

nvarchar(6) (Computed)

true

Provides a translation for the 'TRANSACTIONTYPECODE' field.

TRANSACTIONAMOUNT

money

false

0

Indicates the amount for this distribution in transaction currency.

ORGANIZATIONAMOUNT

money

false

0

Indicates the amount for this distribution in organization currency.

Indexes
Index Name Field(s) Unique Primary Clustered

IX_ADJUSTMENTHISTORYSTOCKDISTRIBUTION_DATEADDED

DATEADDED

False

False

True

IX_ADJUSTMENTHISTORYSTOCKDISTRIBUTION_DATECHANGED

DATECHANGED

False

False

False

PK_ADJUSTMENTHISTORYSTOCKDISTRIBUTION

ID

True

True

False

Triggers
Trigger Name Description

TR_ADJUSTMENTHISTORYSTOCKDISTRIBUTION_AUDIT_UPDATE

TR_ADJUSTMENTHISTORYSTOCKDISTRIBUTION_AUDIT_DELETE