| Primary Key | Field Type |
|---|---|
ID |
uniqueidentifier |
| Field | Field Type | Null | Notes | Description |
|---|---|---|---|---|
AMOUNT |
money | Default = 0 | The actual amount of the credit. | |
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. |
COMMENT |
nvarchar(500) | Default = '' | The comment attached to the credit item. | |
TRANSACTIONDATE |
datetime | ![]() |
The date of the order transaction. | |
TYPECODE |
tinyint | Default = 0 | The type of credit (discount, refund) of this record. | |
TYPE |
nvarchar(8) (Computed) | ![]() |
CASE [TYPECODE] WHEN 0 THEN N'Refund' WHEN 1 THEN N'Discount' END | Provides a translation for the 'TYPECODE' field. |
TRANSACTIONDATEWITHTIMEOFFSET |
datetimeoffset | ![]() |
The date of the order transaction with time zone awareness. |
| Foreign Key | Field Type | Null | Notes | Description |
|---|---|---|---|---|
SALESORDERID |
uniqueidentifier | ![]() |
SALESORDER.ID | The sales order record for this credit. |
ADDEDBYID |
uniqueidentifier | CHANGEAGENT.ID | FK to CHANGEAGENT. | |
CHANGEDBYID |
uniqueidentifier | CHANGEAGENT.ID | FK to CHANGEAGENT. | |
CREDITREASONCODEID |
uniqueidentifier | ![]() |
CREDITREASONCODE.ID | FK to CREDITREASONCODE |
APPUSERID |
uniqueidentifier | ![]() |
APPUSER.ID | The application user who entered the payment. |
DISCOUNTID |
uniqueidentifier | ![]() |
DISCOUNT.ID | The discount record for this credit. |
CONSTITUENTID |
uniqueidentifier | ![]() |
CONSTITUENT.LOCALID | The constituent linked to this credit. |
MEMBERSHIPPROMOID |
uniqueidentifier | ![]() |
MEMBERSHIPPROMO.ID | The membership promo record for this credit |
SALESORDERITEMMEMBERSHIPITEMPROMOTIONID |
uniqueidentifier | ![]() |
SALESORDERITEMMEMBERSHIPITEMPROMOTION.ID | The sales order item membership promo record for this credit |
| Index Name | Field(s) | Unique | Primary | Clustered |
|---|---|---|---|---|
IX_CREDIT_CONSTITUENTID |
CONSTITUENTID | |||
IX_CREDIT_DATEADDED |
DATEADDED | ![]() |
||
IX_CREDIT_DATECHANGED |
DATECHANGED | |||
IX_CREDIT_SALESORDERID |
SALESORDERID | |||
IX_CREDIT_TRANSACTIONDATE |
TRANSACTIONDATE (DESC) | |||
PK_CREDIT |
ID | ![]() |
![]() |
| Trigger Name | Description |
|---|---|
TR_CREDIT_AUDIT_UPDATE |
|
TR_CREDIT_AUDIT_DELETE |
|
TR_CREDIT_UPDATE_TRANSACTIONDATETIMEWITHOFFSET |
| Referenced by | Field |
|---|---|
CREDITITEM |
CREDITID |
CREDITPAYMENT |
CREDITID |
DOCUMENTPRINTINGHISTORY |
CREDITID |

ID
AMOUNT
TSLONG
SALESORDERID
IX_CREDIT_CONSTITUENTID
IX_CREDIT_DATEADDED