STOCKDETAIL

Stores stock detail information for a revenue records with a payment type of Stock

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
ISSUER nvarchar(100) Default = '' The issuer of the stock.
MEDIANPRICE decimal(19, 4) Default = 0 The median price of the stock.
NUMBEROFUNITS decimal(20, 3) Default = 0 The number of units of stock issued.
SYMBOL nvarchar(25) Default = '' The Symbol for the stock.
DATEADDED datetime Default = getdate() Indicates the date this record was added.
DATECHANGED datetime Default = getdate() Indicates the date this record was last changed.
TS timestamp Timestamp.
TSLONG bigint (Computed) yes CONVERT(bigint, TS) Numeric representation of the timestamp.
LOWPRICE decimal(19, 4) Default = 0 The low price the stock sold for.
HIGHPRICE decimal(19, 4) Default = 0 The high price the stock sold for.
ORGANIZATIONMEDIANPRICE decimal(19, 4) Default = 0 The median price of the stock in the organization currency.
ORGANIZATIONLOWPRICE decimal(19, 4) Default = 0 The low price the stock sold for in the organization currency.
ORGANIZATIONHIGHPRICE decimal(19, 4) Default = 0 The high price the stock sold for in the organization currency.
TRANSACTIONMEDIANPRICE decimal(19, 4) Default = 0 The median price of the stock in the transaction currency.
TRANSACTIONLOWPRICE decimal(19, 4) Default = 0 The low price the stock sold for in the transaction currency.
TRANSACTIONHIGHPRICE decimal(19, 4) Default = 0 The high price the stock sold for in the transaction currency.

Foreign Keys

Foreign Key Field Type Null Notes Description
ID uniqueidentifier REVENUEPAYMENTMETHOD.ID Primary Key.
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
BASECURRENCYID uniqueidentifier yes CURRENCY.ID The base currency associated with this record.
ORGANIZATIONEXCHANGERATEID uniqueidentifier yes CURRENCYEXCHANGERATE.ID The exchange rate used to calculate the organization amount.
TRANSACTIONCURRENCYID uniqueidentifier yes CURRENCY.ID The transaction currency associated with this record.
BASEEXCHANGERATEID uniqueidentifier yes CURRENCYEXCHANGERATE.ID The exchange rate used to calculate the base amount.

Indexes

Index Name Fields Unique Primary Clustered
IX_STOCKDETAIL_BASECURRENCYID BASECURRENCYID
IX_STOCKDETAIL_BASEEXCHANGERATEID BASEEXCHANGERATEID
IX_STOCKDETAIL_DATEADDED DATEADDED yes
IX_STOCKDETAIL_DATECHANGED DATECHANGED
IX_STOCKDETAIL_ORGANIZATIONEXCHANGERATEID ORGANIZATIONEXCHANGERATEID
IX_STOCKDETAIL_TRANSACTIONCURRENCYID TRANSACTIONCURRENCYID
PK_STOCKDETAIL ID yes yes

Triggers

Trigger Name Description
TR_STOCKDETAIL_AUDIT_UPDATE
TR_STOCKDETAIL_AUDIT_DELETE
TR_STOCKDETAIL_INSERTUPDATE_CURRENCY

Referenced by

Referenced by Field
STOCKSALE_EXT STOCKDETAILID