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
NameTypeConstraintsDescription
payable_transaction_distribution_KEYint (4)NOT NULLThe primary key.
payable_transaction_KEYint (4)NOT NULLThe foreign key to the parent payable record to which this distribution belongs.
gl_account_KEYint (4)NOT NULLIf 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.
descriptionnvarchar (240)NOT NULLDescription of the distribution, left blank if the account description is to be used.
amountdecimal (9, 2)NOT NULLThe amount of this distribution.
discount_allowed_amount_originaldecimal (9, 2)NOT NULLThe original amount for the discount allowed amount
sequence_numberint (4)NOT NULLThe sequence of the distributions.
is_dedicated_discount_distributionbit (1)NOT NULLtrue if the distribution is has a discount.
first__w2_1099_box_type_KEYint (4)FK to the first w2 1099 box type.
second__w2_1099_box_type_KEYint (4)FK to the second w2 1099 box type.
notenvarchar (480)NOT NULLA Note.
discount_allowed_amount_overridedecimal (9, 2)The optional override of the discount allowed amount
existing_bad_databit (1)NOT NULLContains 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
NameColumnsDescription
PK_Payable_Transaction_Distributionpayable_transaction_distribution_KEY
Foreign keys
NameColumnsReferenced tableDescription
FK_Payable_Transaction_Distribution__GL_Account__gl_account_KEYgl_account_KEYGL_Account (gl_account_KEY)
FK_Payable_Transaction_Distribution__Payable_Transaction__payable_transaction_KEYpayable_transaction_KEYPayable_Transaction (payable_transaction_KEY)
FK_Payable_Transaction_Distribution__W2_1099_Box_Type__first__w2_1099_box_type_KEYfirst__w2_1099_box_type_KEYW2_1099_Box_Type (w2_1099_box_type_KEY)
FK_Payable_Transaction_Distribution__W2_1099_Box_Type__second__w2_1099_box_type_KEYsecond__w2_1099_box_type_KEYW2_1099_Box_Type (w2_1099_box_type_KEY)
Incoming foreign keys
NameColumnsReferencing tableDescription
FK_Payable_Payment_Application_Payable_Distribution__Payable_Transaction_Distribution__payable_transaction_distribution_KEYpayable_transaction_distribution_KEYPayable_Payment_Application_Payable_Distribution
FK_Payable_Payment_Application_Payment_Distribution__Payable_Transaction_Distribution__payable_transaction_distribution_KEYpayable_transaction_distribution_KEYPayable_Payment_Application_Payment_Distribution

Schema diagram