JOURNALENTRY

Contains journal entries.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
TRANSACTIONTYPECODE tinyint Default = 1 Transaction Type - Debit or Credit
TRANSACTIONTYPE nvarchar(6) (Computed) yes CASE [TRANSACTIONTYPECODE] WHEN 0 THEN N'Debit' WHEN 1 THEN N'Credit' END Provides a translation for the 'TRANSACTIONTYPECODE' field.
CLASSCODE tinyint Default = 0 Class
SEQUENCE int Default = 0 Sequence of this journal entry within the parent line item.
TRANSACTIONAMOUNT money Default = 0 The amount of the journal entry transaction currency.
PERCENTAGE decimal(20, 19) Default = 0 Percentage used when recalculating distributions.
DATAELEMENT1ID uniqueidentifier yes FK to the Data Element 1
DATAELEMENT2ID uniqueidentifier yes FK to the Data Element 2
DATAELEMENT3ID uniqueidentifier yes FK to the Data Element 3
DATAELEMENT4ID uniqueidentifier yes FK to the Data Element 4
DATAELEMENT5ID uniqueidentifier yes FK to the Data Element 5
DATAELEMENT6ID uniqueidentifier yes FK to the Data Element 6
DATAELEMENT7ID uniqueidentifier yes FK to the Data Element 7
DATAELEMENT8ID uniqueidentifier yes FK to the Data Element 8
DATAELEMENT9ID uniqueidentifier yes FK to the Data Element 9
DATAELEMENT10ID uniqueidentifier yes FK to the Data Element 10
DATAELEMENT11ID uniqueidentifier yes FK to the Data Element 11
DATAELEMENT12ID uniqueidentifier yes FK to the Data Element 12
DATAELEMENT13ID uniqueidentifier yes FK to the Data Element 13
DATAELEMENT14ID uniqueidentifier yes FK to the Data Element 14
DATAELEMENT15ID uniqueidentifier yes FK to the Data Element 15
DATAELEMENT16ID uniqueidentifier yes FK to the Data Element 16
DATAELEMENT17ID uniqueidentifier yes FK to the Data Element 17
DATAELEMENT18ID uniqueidentifier yes FK to the Data Element 18
DATAELEMENT19ID uniqueidentifier yes FK to the Data Element 19
DATAELEMENT20ID uniqueidentifier yes FK to the Data Element 20
DATAELEMENT21ID uniqueidentifier yes FK to the Data Element 21
DATAELEMENT22ID uniqueidentifier yes FK to the Data Element 22
DATAELEMENT23ID uniqueidentifier yes FK to the Data Element 23
DATAELEMENT24ID uniqueidentifier yes FK to the Data Element 24
DATAELEMENT25ID uniqueidentifier yes FK to the Data Element 25
DATAELEMENT26ID uniqueidentifier yes FK to the Data Element 26
DATAELEMENT27ID uniqueidentifier yes FK to the Data Element 27
DATAELEMENT28ID uniqueidentifier yes FK to the Data Element 28
DATAELEMENT29ID uniqueidentifier yes FK to the Data Element 29
DATAELEMENT30ID uniqueidentifier yes FK to the Data Element 30
COMMENT nvarchar(255) Default = '' User defined comment associated with this journal entry.
POSTDATE date yes Post date of the journal entry.
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.
SUBLEDGERTYPECODE tinyint Default = 1 Transaction Type for the subledger- Debit or Credit
SUBLEDGERTYPE nvarchar(6) (Computed) yes CASE [SUBLEDGERTYPECODE] WHEN 0 THEN N'Debit' WHEN 1 THEN N'Credit' END Provides a translation for the 'SUBLEDGERTYPECODE' field.
BASEAMOUNT money Default = 0 The amount of the journal entry in base currency
ORGAMOUNT money Default = 0 The amount of the journal entry in organization currency
CLASS nvarchar(33) (Computed) yes CASE [CLASSCODE] WHEN 0 THEN N'Unrestricted Net Assets' WHEN 1 THEN N'Temporarily Restricted Net Assets' WHEN 2 THEN N'Permanently Restricted Net Assets' END
TYPECODE tinyint Default = 0
TYPE nvarchar(32) (Computed) yes CASE [TYPECODE] WHEN 0 THEN N'Standard' WHEN 1 THEN N'System Multicurrency Rebalancing' END

Foreign Keys

Foreign Key Field Type Null Notes Description
FINANCIALTRANSACTIONLINEITEMID uniqueidentifier yes FINANCIALTRANSACTIONLINEITEM.ID The FK to the FinancialTransactionLineItem Table.
JOURNALCODEID uniqueidentifier yes JOURNALCODE.ID Journal
SUMMARYID uniqueidentifier yes JOURNALENTRY.ID FK to the journal entry which summarizes this entry.
BATCHID uniqueidentifier yes FINANCIALTRANSACTION.ID FK to the Financial Transaction (batch) this journal entry is part of. This is used by sub-ledgers during the posting process.
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
FINANCIALBATCHID uniqueidentifier yes FINANCIALBATCH.ID FK to the Financial Batch table
GLACCOUNTID uniqueidentifier yes GLACCOUNT.ID FK to GLACCOUNT
TRANSACTIONCURRENCYID uniqueidentifier yes CURRENCY.ID FK to CURRENCY

Indexes

Index Name Fields Unique Primary Clustered
IX_JOURNALENTRY_BATCHID BATCHID
IX_JOURNALENTRY_DATEADDED DATEADDED yes
IX_JOURNALENTRY_DATECHANGED DATECHANGED
IX_JOURNALENTRY_FINANCIALTRANSACTIONLINEITEMID_FINANCIALBATCHID_SEQUENCE_GLACCOUNTID FINANCIALTRANSACTIONLINEITEMID, FINANCIALBATCHID, SEQUENCE, GLACCOUNTID
IX_JOURNALENTRY_GLACCOUNTID GLACCOUNTID
IX_JOURNALENTRY_SUMMARYID SUMMARYID
PK_JOURNALENTRY ID yes yes

Triggers

Trigger Name Description
TR_JOURNALENTRY_AUDIT_UPDATE
TR_JOURNALENTRY_AUDIT_DELETE

Referenced by

Referenced by Field
ADJUSTMENTHISTORY GLTRANSACTIONID
ADJUSTMENTHISTORYGIFTINKIND GLTRANSACTIONID
ADJUSTMENTHISTORYPROPERTY GLTRANSACTIONID
ADJUSTMENTHISTORYSTOCK GLTRANSACTIONID
ADJUSTMENTHISTORYWRITEOFF GLTRANSACTIONID
DEPOSITGLDISTRIBUTIONLINK ID
JOURNALENTRY_EXT ID
JOURNALENTRY_EXT REVERSEDGLTRANSACTIONID
JOURNALENTRYANNOTATION JOURNALENTRYID