| Primary Key | Field Type |
|---|---|
ID |
uniqueidentifier |
| Field | Field Type | Null | Notes | Description |
|---|---|---|---|---|
DECLARATIONMADE |
datetime | ![]() |
Date the declaration was made. | |
DECLARATIONSTARTS |
datetime | Date the declaration starts. | ||
DECLARATIONENDS |
datetime | ![]() |
Date the declaration ends. | |
DECLARATIONINDICATORCODE |
tinyint | Default = 0 | The indicator for this declaration. | |
PAYSTAXCODE |
tinyint | Default = 2 | Indicates whether a constituent pays tax. | |
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. |
DECLARATIONINDICATOR |
nvarchar(8) (Computed) | ![]() |
CASE [DECLARATIONINDICATORCODE] WHEN 0 THEN N'Written' WHEN 1 THEN N'Oral' WHEN 2 THEN N'Internet' END | Provides a translation for the 'DECLARATIONINDICATORCODE' field. |
PAYSTAX |
nvarchar(7) (Computed) | ![]() |
CASE [PAYSTAXCODE] WHEN 0 THEN N'No' WHEN 1 THEN N'Yes' WHEN 2 THEN N'Unknown' END | Provides a translation for the 'PAYSTAXCODE' field. |
| Foreign Key | Field Type | Null | Notes | Description |
|---|---|---|---|---|
BATCHREVENUEID |
uniqueidentifier | BATCHREVENUE.ID | The revenue batch record to which this declaration belongs. | |
DECLARATIONSOURCECODEID |
uniqueidentifier | ![]() |
DECLARATIONSOURCECODE.LOCALID | The source of this declaration. |
ADDEDBYID |
uniqueidentifier | CHANGEAGENT.ID | FK to CHANGEAGENT. | |
CHANGEDBYID |
uniqueidentifier | CHANGEAGENT.ID | FK to CHANGEAGENT. | |
CHARITYCLAIMREFERENCENUMBERID |
uniqueidentifier | CHARITYCLAIMREFERENCENUMBER.ID | The charity claim reference number associated with this declaration. |
| Index Name | Field(s) | Unique | Primary | Clustered |
|---|---|---|---|---|
IX_BATCHREVENUETAXDECLARATION_DATEADDED |
DATEADDED | ![]() |
||
IX_BATCHREVENUETAXDECLARATION_DATECHANGED |
DATECHANGED | |||
PK_BATCHREVENUETAXDECLARATION |
ID | ![]() |
![]() |
| Trigger Name | Description |
|---|---|
TR_BATCHREVENUETAXDECLARATION_AUDIT_UPDATE |
|
TR_BATCHREVENUETAXDECLARATION_AUDIT_DELETE |

ID
DECLARATIONMADE
TSLONG
BATCHREVENUEID
IX_BATCHREVENUETAXDECLARATION_DATEADDED
IX_BATCHREVENUETAXDECLARATION_DATECHANGED