Table: dbo.Bank_Transaction_Template_Distribution
This table contains the distributions associated with a bank transaction template.
Columns
Name | Type | Constraints | Description
bank_transaction_template_distribution_KEY | int (4) | NOT NULL | Primary key.
transaction_template_KEY | int (4) | NOT NULL | Key of the bank transaction template parent.
gl_account_KEY | int (4) |  | Key of the general ledger account associated with the distribution. If null, this sigifies that the application will not default the GL account on the bank transaction distribution we create when we apply the template.
description | nvarchar (240) | NOT NULL | The description of the distribution.
amount | decimal (9, 2) | NOT NULL | The amount of the distribution.
sequence_number | int (4) | NOT NULL | A value that orders the distributions linked to a specific bank transaction template record.
first__w2_1099_box_type_KEY | int (4) |  | The foreign key to the first 1099 form box in which the distribution amount should appear. If this field is null, then the distribution amount will not appear in a 1099 form box.
second__w2_1099_box_type_KEY | int (4) |  | The foreign key to the second 1099 form box in which the distribution amount should appear. If second__w2_1099_box_type_KEY and first__w2_1099_box_type_KEY are both null, then the distribution amount will not appear in a 1099 form box. If second__w2_1099_box_type_KEY field is null and first__w2_1099_box_type_KEY is not null, then the distribution amount will appear only in the 1099 box denoted by first__w2_1099_box_type_KEY. If second__w2_1099_box_type_KEY and first__w2_1099_box_type_KEY are both not null, then the distribution amount will appear in two 1099 boxes denoted by those two keys.

Primary key
Name | Columns | Description
PK_Bank_Transaction_Template_Distribution | bank_transaction_template_distribution_KEY |

Foreign keys
Name | Columns | Referenced table | Description
FK_Bank_Transaction_Template_Distribution__Bank_Transaction_Template__transaction_template_KEY | transaction_template_KEY | Bank_Transaction_Template (transaction_template_KEY) |
FK_Bank_Transaction_Template_Distribution__GL_Account__gl_account_KEY | gl_account_KEY | GL_Account (gl_account_KEY) |
FK_Bank_Transaction_Template_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_Template_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) |