CREDITPAYMENT
Stores payments for a credit
Primary Key
Primary Key |
Field Type |
ID |
uniqueidentifier |
Fields
Field |
Field Type |
Null |
Notes |
Description |
AMOUNT |
money |
|
Default = 0 |
The actual amount of the payment. |
PAYMENTMETHODCODE |
tinyint |
|
Default = 0 |
The method of payment in which the revenue was received. |
PAYMENTMETHOD |
nvarchar(14) (Computed) |
yes |
CASE [PAYMENTMETHODCODE] WHEN 0 THEN N'Cash' WHEN 1 THEN N'Check' WHEN 2 THEN N'Credit card' WHEN 3 THEN N'Direct debit' WHEN 4 THEN N'Stock' WHEN 5 THEN N'Property' WHEN 6 THEN N'Gift-in-kind' WHEN 9 THEN N'None' WHEN 10 THEN N'Other' WHEN 11 THEN N'Standing order' END |
Provides a translation for the 'PAYMENTMETHODCODE' field. |
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. |
DESCRIPTION |
nvarchar(1000) |
|
Default = '' |
The description of payments on this credit item. |
REFUNDPROCESSED |
bit |
|
Default = 1 |
Indicates whether the refund processed successfully. |
STATUS |
nvarchar(255) |
|
Default = '' |
Credit card refund status. |
CREDITPAYMENTDATEWITHTIMEOFFSET |
datetimeoffset |
yes |
|
The date the credit was made with time zone awareness. |
SETTLEMENTTYPECODE |
tinyint |
|
Default = 0 |
|
SETTLEMENTTYPE |
nvarchar(14) (Computed) |
yes |
CASE [SETTLEMENTTYPECODE] WHEN 0 THEN N'Unsettled' WHEN 1 THEN N'Manually' WHEN 2 THEN N'System settled' END |
|
SETTLEMENTDATE |
datetime |
yes |
|
|
DEPOSITED |
bit |
|
Default = 0 |
|
Foreign Keys
Indexes
Index Name |
Fields |
Unique |
Primary |
Clustered |
IX_CREDITPAYMENT_APPUSERID |
APPUSERID |
|
|
|
IX_CREDITPAYMENT_CREDITID |
CREDITID |
|
|
|
IX_CREDITPAYMENT_DATEADDED |
DATEADDED |
|
|
yes |
IX_CREDITPAYMENT_DATECHANGED |
DATECHANGED |
|
|
|
IX_CREDITPAYMENT_RECONCILIATIONID |
RECONCILIATIONID |
|
|
|
IX_CREDITPAYMENT_REVENUEID |
REVENUEID |
|
|
|
IX_CREDITPAYMENT_REVENUESPLITID |
REVENUESPLITID |
|
|
|
PK_CREDITPAYMENT |
ID |
yes |
yes |
|
Triggers
Referenced by