REVENUERECEIPTRERECEIPTDETAIL

Stores details about why a receipt was re-receipted.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
DETAILS nvarchar(300) Default = '' Contains any notes the user wants to store about the re-receipting
NEWNUMBERONRERECEIPT bit Default = 0 Indicates whether the new receipt will be printed with a new number or not
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.

Foreign Keys

Foreign Key Field Type Null Notes Description
RERECEIPTREASONCODEID uniqueidentifier yes RERECEIPTREASONCODE.ID Indicates which re-receipt reason code was used
REVENUERECEIPTID uniqueidentifier REVENUERECEIPT.ID Indicates which receipt has been marked for re-receipt
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.

Indexes

Index Name Fields Unique Primary Clustered
IX_REVENUERECEIPTRERECEIPTDETAIL_DATEADDED DATEADDED yes
IX_REVENUERECEIPTRERECEIPTDETAIL_DATECHANGED DATECHANGED
IX_REVENUERECEIPTRERECEIPTDETAIL_REVENUERECEIPTID REVENUERECEIPTID
PK_REVENUERECEIPTRERECEIPTDETAIL ID yes yes

Triggers

Trigger Name Description
TR_REVENUERECEIPTRERECEIPTDETAIL_AUDIT_UPDATE
TR_REVENUERECEIPTRERECEIPTDETAIL_AUDIT_DELETE