CLOSINGREQUIREMENTDETAIL

This table holds details of the closing requirement.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
REQUIRETOBALANCE bit Default = 0 Require to balance?
ACCOUNTREQUIREMENTSCODE tinyint Default = 0 List of account requirements
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.
ACCOUNTREQUIREMENTS nvarchar(25) (Computed) yes CASE [ACCOUNTREQUIREMENTSCODE] WHEN 0 THEN N'' WHEN 1 THEN N'Do not require' WHEN 2 THEN N'Income statement accounts' WHEN 3 THEN N'All accounts' END Provides a translation for the 'ACCOUNTREQUIREMENTSCODE' field.
PRESERVEDETAILSDURINGCLOSING bit Default = 0 Should we prevent details during closing?

Foreign Keys

Foreign Key Field Type Null Notes Description
CLOSINGREQUIREMENTID uniqueidentifier CLOSINGREQUIREMENT.ID Refers to the closing requirement this belongs to.
ACCOUNTSTRUCTUREID uniqueidentifier PDACCOUNTSTRUCTURE.ID Refers to the accounting element this represents.
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.

Indexes

Index Name Fields Unique Primary Clustered
IX_CLOSINGREQUIREMENTDETAIL_DATEADDED DATEADDED yes
IX_CLOSINGREQUIREMENTDETAIL_DATECHANGED DATECHANGED
PK_CLOSINGREQUIREMENTDETAIL ID yes yes
UIX_CLOSINGREQUIREMENTDETAIL_CLOSINGREQUIREMENTID_ACCOUNTSTRUCTUREID CLOSINGREQUIREMENTID, ACCOUNTSTRUCTUREID yes

Triggers

Trigger Name Description
TR_CLOSINGREQUIREMENTDETAIL_AUDIT_DELETE
TR_CLOSINGREQUIREMENTDETAIL_AUDIT_UPDATE