Table: dbo.GL_Balancing_Entry
This table stores the balancing entry for one or more bank transactions. In the land of GL, bank transactions are created as unbalanced journal entries until such time as the user chooses to balance them. Balancing entails creating a GL balancing entry row that sums to the total of the selected bank transactions. These bank transaction must always belong to the same checkbook and said checkbook's GL account number is used to create a journal entry that balances the selected unbalanced bank transactions.
Columns
Name | Type | Constraints | Description
gl_balancing_entry_KEY | int (4) | NOT NULL | Primary key.
reference_number | nvarchar (32) | NOT NULL | A user defined alphnumeric reference number for the balancing entry.
transaction_date | smalldatetime (4) |  | A user defined date for the balancing entry.
description | nvarchar (240) | NOT NULL | A description for the balancing entry.
gl_balancing_entry_type_KEY | int (4) | NOT NULL | The type of each balancing entry.
reference_number_sortable | nvarchar (160) | NOT NULL | A representation of the reference_number column that sorts in natural order. A trigger keeps this field synchronized with the content of reference_number.
creation_date | datetime (8, 3) | NOT NULL | The date on which the application created the balancing entry.
staff_KEY | int (4) | NOT NULL | The key of the staff member who created the balancing entry.

Primary key
Name | Columns | Description
PK_GL_Balancing_Entry | gl_balancing_entry_KEY |

Foreign keys
Name | Columns | Referenced table | Description
FK_GL_Balancing_Entry__GL_Balancing_Entry_Type__gl_balancing_entry_type_KEY | gl_balancing_entry_type_KEY | GL_Balancing_Entry_Type (gl_balancing_entry_type_KEY) |
FK_GL_Balancing_Entry__Staff__staff_KEY | staff_KEY | Staff (staff_KEY) |

Incoming foreign keys
Name | Columns | Referencing table | Description
FK_GL_Transaction_N_GL_Balancing_Entry__GL_Balancing_Entry__gl_balancing_entry_KEY | gl_balancing_entry_KEY | GL_Transaction_N_GL_Balancing_Entry |
FK_GL_Balancing_Entry_N_Bank_Transaction__GL_Balancing_Entry__gl_balancing_entry_KEY | gl_balancing_entry_KEY | GL_Balancing_Entry_N_Bank_Transaction |