CREDITMEMO

All credit memo records.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
PURCHASEORDERID nvarchar(20) Default = '' User defined purchase order number
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.
ZEROBALANCE bit Default = 0 True when the invoice is paid
TYPE int (Computed) 102 The Financial Transaction Type
BALANCE money (Computed) yes dbo.UFN_CREDITMEMO_GETBALANCE(ID)

Foreign Keys

Foreign Key Field Type Null Notes Description
ID uniqueidentifier FINANCIALTRANSACTION.ID Primary Key.
BANKACCOUNTID uniqueidentifier yes BANKACCOUNT.ID Foreign Key to the BankAccount table
REMITADDRESSID uniqueidentifier yes ADDRESS.LOCALID Foreign Key to the Address Table
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
DISBURSEMENTPROCESSID uniqueidentifier yes DISBURSEMENTPROCESS.ID Link to the current disbursement process selecting this credit memo

Indexes

Index Name Fields Unique Primary Clustered
IX_CREDITMEMO_BANKACCOUNTID BANKACCOUNTID
IX_CREDITMEMO_DATEADDED DATEADDED yes
IX_CREDITMEMO_DATECHANGED DATECHANGED
IX_CREDITMEMO_DISBURSEMENTPROCESSID DISBURSEMENTPROCESSID
IX_CREDITMEMO_PURCHASEORDERID PURCHASEORDERID
IX_CREDITMEMO_REMITADDRESSID REMITADDRESSID
PK_CREDITMEMO ID yes yes

Triggers

Trigger Name Description
TR_CREDITMEMO_INSERT_UPDATE
TR_CREDITMEMO_DELETE
TR_CREDITMEMO_AUDIT_UPDATE
TR_CREDITMEMO_AUDIT_DELETE