| ID |
uniqueidentifier |
|
Default = (newid()) |
Primary Key. |
| 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 |
| DEPOSITID |
uniqueidentifier |
|
|
The bank account deposit record to which this correction belongs. |
| ADDEDBYID |
uniqueidentifier |
|
|
FK to CHANGEAGENT. |
| CHANGEDBYID |
uniqueidentifier |
|
|
FK to CHANGEAGENT. |
| 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. |
| CORRECTIONTYPECODE |
tinyint |
|
Default = 0 |
Correction type |
| PAYMENTMETHOD |
nvarchar(11) (Computed) |
yes |
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) |
yes |
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. |
| BASECURRENCYID |
uniqueidentifier |
yes |
|
The base currency associated with this revenue. |
| ORGANIZATIONEXCHANGERATEID |
uniqueidentifier |
yes |
|
The exchange rate used to convert to organization amount. |
| BASEEXCHANGERATEID |
uniqueidentifier |
yes |
|
The exchange rate used to convert from transaction amount to amount. |
| SIGNEDAMOUNT |
decimal(21, 4) (Computed) |
yes |
CASE WHEN [CORRECTIONTYPECODE] in (0, 2) THEN -1 * [AMOUNT] ELSE [AMOUNT] END |
This amount is signed based on the correction type |
| SIGNEDTRANSACTIONAMOUNT |
money (Computed) |
yes |
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) |
yes |
CASE WHEN [CORRECTIONTYPECODE] in (0, 2) THEN -1 * [ORGANIZATIONAMOUNT] ELSE [ORGANIZATIONAMOUNT] END |
The amount of the deposit correction signed base on the correction type |