Table: Ledger_Entry_Type
Tags: read-only

Content:
1INVInvoice1INV
2SCService Charge1SC
3DMDebit Memo1DM
4CHKCheck-1CHK
5CMCredit Memo-1CM
6NSFNon-Sufficient Funds1NSF
7WOWrite Off-1WO
8CACash-1CA
9CCCredit Card-1CC
10CCRCredit Card Return1CCR
11ACHElectronic Funds Transfer-1ACH
12PWOProforma Write Off-1Proforma Write Off
13CNAReversal (Application)-1CNA
Columns
NameTypeConstraintsDescription
ledger_entry_type_KEYintNOT NULLDatabase assigned primary key for this table.
ledger_entry_type_idnvarchar (250)NOT NULLUser defined identifier (unique).
descriptionnvarchar (250)NOT NULLUser defined description (unique).
normal_signdecimal (1)NOT NULLDebit (1) or Credit (-1).
ledger_entry_type_id_sortablevarchar (250)NOT NULLA 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
NameColumnsDescription
PK_Ledger_Entry_Type$ledger_entry_type_KEYledger_entry_type_KEYCLUSTERED
Unique constraints
NameColumnsDescription
UK_Ledger_Entry_Type$descriptiondescriptionEach description must be unique.
UK_Ledger_Entry_Type$ledger_entry_type_idledger_entry_type_idEach id must be unique.
UK_Ledger_Entry_Type$ledger_entry_type_id_sortableledger_entry_type_id_sortableAn index by the sortable ID is desired, and the algorithm ends up producing unique values.
Incoming foreign keys
NameColumnsReferencing tableDescription
FK_Ledger_Entry_Subtype__Ledger_Entry_Type__ledger_entry_type_KEYledger_entry_type_KEYLedger_Entry_Subtype
FK_Ledger_Entry__Ledger_Entry_Type__ledger_entry_type_KEYledger_entry_type_KEYLedger_Entry
FK_User_Preference__Ledger_Entry_Type__receipt_entry__ledger_entry_type_KEYreceipt_entry__ledger_entry_type_KEYUser_Preference

Schema diagram