Table: dbo.Bank_Transaction_Distribution
Distributions of Bank_Transaction records are stored here unless it is a Payroll Check. In that case see Payroll_Check_Payroll_THING_Distribution. Bank_Transaction_Distribution_View exists with an explicit column list, so columns which should surface on the entity should be added there.
Columns
Name | Type | Constraints | Description
bank_transaction_distribution_KEY | int (4) | NOT NULL | Primary key
bank_transaction_KEY | int (4) | NOT NULL | Foreign key to the parent bank transaction
gl_account_KEY | int (4) |  | Foreign key to the general ledger account
description | nvarchar (240) | NOT NULL | Description of the distribution, left blank if the account description is to be used
amount | decimal (9, 2) | NOT NULL | Distribution amount
sequence_number | int (4) | NOT NULL | Sequence number that determines the order within the transaction distributions
first__w2_1099_box_type_KEY | int (4) |  | The foreign key to the first box the amount is to appear in on the 1099 form.
second__w2_1099_box_type_KEY | int (4) |  | The foreign key to the second box the amount is to appear in on the 1099 form.
existing_bad_data | bit (1) | NOT NULL | Contains 1 exactly when the distribution predates the addition of a DAL constraint which prohibits coding Nonemployee Compensation to the wrong form out of 1099-MISC or 1099-NEC based upon the year of the parent transaction's transaction_date. The data-wash service pack could not automatically handle all cases. A pair of DBMS TRIGGER objects keep any mutation to data from allowing a violation to remain.

Primary key
Name | Columns | Description
PK_Bank_Transaction_Distribution | bank_transaction_distribution_KEY |
Unique constraints
Name | Columns | Description
UK_Bank_Transaction_Distribution$bank_transaction_KEY$bank_transaction_distribution_KEY | bank_transaction_KEY, bank_transaction_distribution_KEY |

Foreign keys
Name | Columns | Referenced table | Description
FK_Bank_Transaction_Distribution__Bank_Transaction__bank_transaction_KEY | bank_transaction_KEY | Bank_Transaction (bank_transaction_KEY) |
FK_Bank_Transaction_Distribution__GL_Account__gl_account_KEY | gl_account_KEY | GL_Account (gl_account_KEY) |
FK_Bank_Transaction_Distribution__W2_1099_Box_Type__first__w2_1099_box_type_KEY | first__w2_1099_box_type_KEY | W2_1099_Box_Type (w2_1099_box_type_KEY) |
FK_Bank_Transaction_Distribution__W2_1099_Box_Type__second__w2_1099_box_type_KEY | second__w2_1099_box_type_KEY | W2_1099_Box_Type (w2_1099_box_type_KEY) |

Incoming foreign keys
Name | Columns | Referencing table | Description
FK_AR_Deposit_Cash_Back_Distribution__Bank_Transaction_Distribution__ar_deposit__bank_transaction_KEY__cash_back__bank_transacti | ar_deposit__bank_transaction_KEY, cash_back__bank_transaction_distribution_KEY | AR_Deposit_Cash_Back_Distribution |
FK_Bank_Transaction_Accounting_Source_Override_Bank_Transaction_Distribution__Bank_Transaction_Distribution__bank_transaction_di | bank_transaction_distribution_KEY | Bank_Transaction_Accounting_Source_Override_Bank_Transaction_Distribution |
FK_Payable_Payment_Application_Payment_Distribution__Bank_Transaction_Distribution__bank_transaction_distribution_KEY | bank_transaction_distribution_KEY | Payable_Payment_Application_Payment_Distribution |