Table: Ledger_Entry_Type
Tags: read-only Content:
1 | INV | Invoice | 1 | INV
2 | SC | Service Charge | 1 | SC
3 | DM | Debit Memo | 1 | DM
4 | CHK | Check | -1 | CHK
5 | CM | Credit Memo | -1 | CM
6 | NSF | Non-Sufficient Funds | 1 | NSF
7 | WO | Write Off | -1 | WO
8 | CA | Cash | -1 | CA
9 | CC | Credit Card | -1 | CC
10 | CCR | Credit Card Return | 1 | CCR
11 | ACH | Electronic Funds Transfer | -1 | ACH
Columns
Name | Type | Constraints | Description
ledger_entry_type_KEY | int | NOT NULL | Database assigned primary key for this table.
ledger_entry_type_id | nvarchar (11) | NOT NULL | User defined identifier (unique).
description | nvarchar (30) | NOT NULL | User defined description (unique).
normal_sign | decimal (1) | NOT NULL | Debit (1) or Credit (-1).
ledger_entry_type_id_sortable | varchar (48) | NOT NULL | A representation of the ledger_entry_type_id column that sorts in natural order, meaning that digits are sorted as numbers while non-digits are sorted alphabetically. A trigger keeps this field synchronized with the content of ledger_entry_type_id.

Primary key
Name | Columns | Description
PK_Ledger_Entry_Type$ledger_entry_type_KEY | ledger_entry_type_KEY | CLUSTERED
Unique constraints
Name | Columns | Description
UK_Ledger_Entry_Type__description | description | Each description must be unique.
UK_Ledger_Entry_Type__ledger_entry_type_id | ledger_entry_type_id | Each id must be unique.
UK_Ledger_Entry_Type__ledger_entry_type_id_sortable | ledger_entry_type_id_sortable | An index by the sortable ID is desired, and the algorithm ends up producing unique values.

Incoming foreign keys
Name | Columns | Referencing table | Description
FK_Ledger_Entry__Ledger_Entry_Type__ledger_entry_type_KEY | ledger_entry_type_KEY | Ledger_Entry |
FK_User_Preference__Ledger_Entry_Type__receipt_entry__ledger_entry_type_KEY | receipt_entry__ledger_entry_type_KEY | User_Preference |