Primary Key Field Type
 ID uniqueidentifier

Field Field Type Null Notes Description
 DATE datetime   The date the correction was entered.
 REFERENCE nvarchar(100)   Default = '' The description of the correction.
 PAYMENTMETHODCODE tinyint   Default = 0 Payment method
 AMOUNT decimal(19, 4)   Default = 0 Amount
 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) CONVERT(bigint, TS) Numeric representation of the timestamp.
 CORRECTIONTYPECODE tinyint   Default = 0 Correction type
 PAYMENTMETHOD nvarchar(11) (Computed) CASE [PAYMENTMETHODCODE] WHEN 0 THEN N'Cash' WHEN 1 THEN N'Check' WHEN 2 THEN N'Credit card' WHEN 3 THEN N'Other' END Provides a translation for the 'PAYMENTMETHODCODE' field.
 CORRECTIONTYPE nvarchar(16) (Computed) CASE [CORRECTIONTYPECODE] WHEN 0 THEN N'Sales - Short' WHEN 1 THEN N'Sales - Over' WHEN 2 THEN N'Treasury - Short' WHEN 3 THEN N'Treasury - Over' END Provides a translation for the 'CORRECTIONTYPECODE' field.
 TRANSACTIONAMOUNT money   Default = 0 The amount of the deposit correction in the bank account's transaction currency.
 ORGANIZATIONAMOUNT money   Default = 0 The amount of the deposit correction in organization currency.
 SIGNEDAMOUNT decimal(21, 4) (Computed) CASE WHEN [CORRECTIONTYPECODE] in (0, 2) THEN -1 * [AMOUNT] ELSE [AMOUNT] END This amount is signed based on the correction type
 SIGNEDTRANSACTIONAMOUNT money (Computed) CASE WHEN [CORRECTIONTYPECODE] in (0, 2) THEN -1 * [TRANSACTIONAMOUNT] ELSE [TRANSACTIONAMOUNT] END The amount of the deposit correction signed base on the correction type
 SIGNEDORGANIZATIONAMOUNT money (Computed) CASE WHEN [CORRECTIONTYPECODE] in (0, 2) THEN -1 * [ORGANIZATIONAMOUNT] ELSE [ORGANIZATIONAMOUNT] END The amount of the deposit correction signed base on the correction type

Foreign Key Field Type Null Notes Description
 DEPOSITID uniqueidentifier   BANKACCOUNTDEPOSIT.ID The bank account deposit record to which this correction belongs.
 ADDEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.
 CHANGEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.
 BASECURRENCYID uniqueidentifier CURRENCY.ID The base currency associated with this revenue.
 ORGANIZATIONEXCHANGERATEID uniqueidentifier CURRENCYEXCHANGERATE.ID The exchange rate used to convert to organization amount.
 BASEEXCHANGERATEID uniqueidentifier CURRENCYEXCHANGERATE.ID The exchange rate used to convert from transaction amount to amount.

Index Name Field(s) Unique Primary Clustered
 IX_BANKACCOUNTDEPOSITCORRECTION_DATEADDED DATEADDED    
 IX_BANKACCOUNTDEPOSITCORRECTION_DATECHANGED DATECHANGED      
 IX_BANKACCOUNTDEPOSITCORRECTION_DEPOSITID DEPOSITID      
 PK_BANKACCOUNTDEPOSITCORRECTION ID  

Trigger Name Description
 TR_BANKACCOUNTDEPOSITCORRECTION_CURRENCY
 TR_BANKACCOUNTDEPOSITCORRECTION_AUDIT_UPDATE
 TR_BANKACCOUNTDEPOSITCORRECTION_AUDIT_DELETE
 TR_BANKACCOUNTDEPOSITCORRECTION_UD

Referenced by Field
 BANKACCOUNTDEPOSITCORRECTIONATTACHMENT BANKACCOUNTDEPOSITCORRECTIONID
 BANKACCOUNTDEPOSITCORRECTIONGLDISTRIBUTION BANKACCOUNTDEPOSITCORRECTIONID
 BANKACCOUNTDEPOSITCORRECTIONMEDIALINK DEPOSITCORRECTIONID
 BANKACCOUNTDEPOSITCORRECTIONNOTE DEPOSITCORRECTIONID

Entity-Relationship diagram of this table