Table: dbo.Payable_Transaction_Distribution
A Payables amount is distributed among one or more liablity accounts. This collection of liabilities is called distributions which is what this table contains.
Columns
Name | Type | Constraints | Description
payable_transaction_distribution_KEY | int (4) | NOT NULL | The primary key.
payable_transaction_KEY | int (4) | NOT NULL | The foreign key to the parent payable record to which this distribution belongs.
gl_account_KEY | int (4) | NOT NULL | If one is provided, the GL account number pointed to by this foreign key is the liability account this payable distribution applies to. Otherwise it will be null and the consumers of this data will have to determine a proper response ie. use the undistributed account, bark at the user, display a blank GL account, etc.
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 | The amount of this distribution.
discount_allowed_amount_original | decimal (9, 2) | NOT NULL | The original amount for the discount allowed amount
sequence_number | int (4) | NOT NULL | The sequence of the distributions.
is_dedicated_discount_distribution | bit (1) | NOT NULL | true if the distribution is has a discount.
first__w2_1099_box_type_KEY | int (4) |  | FK to the first w2 1099 box type.
second__w2_1099_box_type_KEY | int (4) |  | FK to the second w2 1099 box type.
note | nvarchar (480) | NOT NULL | A Note.
discount_allowed_amount_override | decimal (9, 2) |  | The optional override of the discount allowed amount
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_Payable_Transaction_Distribution | payable_transaction_distribution_KEY |

Foreign keys
Name | Columns | Referenced table | Description
FK_Payable_Transaction_Distribution__GL_Account__gl_account_KEY | gl_account_KEY | GL_Account (gl_account_KEY) |
FK_Payable_Transaction_Distribution__Payable_Transaction__payable_transaction_KEY | payable_transaction_KEY | Payable_Transaction (payable_transaction_KEY) |
FK_Payable_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_Payable_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_Payable_Payment_Application_Payable_Distribution__Payable_Transaction_Distribution__payable_transaction_distribution_KEY | payable_transaction_distribution_KEY | Payable_Payment_Application_Payable_Distribution |
FK_Payable_Payment_Application_Payment_Distribution__Payable_Transaction_Distribution__payable_transaction_distribution_KEY | payable_transaction_distribution_KEY | Payable_Payment_Application_Payment_Distribution |