Table: dbo.Custom_Office_Account_Grouping
This table will store all the grouping and grouping codes for the custom excel grid if the grid is grouped by account grouping
Columns
NameTypeConstraintsDescription
custom_office_account_grouping_KEYint (4)NOT NULLPrimary key
trial_balance_grid_KEYint (4)NOT NULLForeign key to custom excel grid table
gl_account_grouping_KEYint (4)NOT NULLForeign key to the gl account grouping table
gl_account_grouping_code_KEYint (4)NOT NULLForeign key to the gl account grouping code table
include_subcodebit (1)NOT NULLBoolean that tells us whether to include subcode for the given account grouping code
include_accountsbit (1)NOT NULLBoolean that tells us whether to include accounts for the given account grouping code
sequence_numberint (4)NOT NULLTo order the codes in a specific order
Primary key
NameColumnsDescription
PK_Custom_Office_Account_Groupingcustom_office_account_grouping_KEY
Unique constraints
NameColumnsDescription
UK_Custom_Office_Account_Grouping$trial_balance_grid_KEY$gl_account_grouping_KEY$gl_account_grouping_code_KEYtrial_balance_grid_KEY, gl_account_grouping_KEY, gl_account_grouping_code_KEY
Foreign keys
NameColumnsReferenced tableDescription
FK_Custom_Office_Account_Grouping__GL_Account_Grouping__gl_account_grouping_KEYgl_account_grouping_KEYGL_Account_Grouping (gl_account_grouping_KEY)
FK_Custom_Office_Account_Grouping__GL_Account_Grouping_Code__gl_account_grouping_code_KEYgl_account_grouping_code_KEYGL_Account_Grouping_Code (gl_account_grouping_code_KEY)
FK_Custom_Office_Account_Grouping__Trial_Balance_Grid__trial_balance_grid_KEYtrial_balance_grid_KEYTrial_Balance_Grid (trial_balance_grid_KEY)

Schema diagram