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
NameTypeConstraintsDescription
bank_transaction_distribution_KEYint (4)NOT NULLPrimary key
bank_transaction_KEYint (4)NOT NULLForeign key to the parent bank transaction
gl_account_KEYint (4)Foreign key to the general ledger account
descriptionnvarchar (240)NOT NULLDescription of the distribution, left blank if the account description is to be used
amountdecimal (9, 2)NOT NULLDistribution amount
sequence_numberint (4)NOT NULLSequence number that determines the order within the transaction distributions
first__w2_1099_box_type_KEYint (4)The foreign key to the first box the amount is to appear in on the 1099 form.
second__w2_1099_box_type_KEYint (4)The foreign key to the second box the amount is to appear in on the 1099 form.
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_Bank_Transaction_Distributionbank_transaction_distribution_KEY
Unique constraints
NameColumnsDescription
UK_Bank_Transaction_Distribution$bank_transaction_KEY$bank_transaction_distribution_KEYbank_transaction_KEY, bank_transaction_distribution_KEY
Foreign keys
NameColumnsReferenced tableDescription
FK_Bank_Transaction_Distribution__Bank_Transaction__bank_transaction_KEYbank_transaction_KEYBank_Transaction (bank_transaction_KEY)
FK_Bank_Transaction_Distribution__GL_Account__gl_account_KEYgl_account_KEYGL_Account (gl_account_KEY)
FK_Bank_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_Bank_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_AR_Deposit_Cash_Back_Distribution__Bank_Transaction_Distribution__ar_deposit__bank_transaction_KEY__cash_back__bank_transactiar_deposit__bank_transaction_KEY, cash_back__bank_transaction_distribution_KEYAR_Deposit_Cash_Back_Distribution
FK_Bank_Transaction_Accounting_Source_Override_Bank_Transaction_Distribution__Bank_Transaction_Distribution__bank_transaction_dibank_transaction_distribution_KEYBank_Transaction_Accounting_Source_Override_Bank_Transaction_Distribution
FK_Payable_Payment_Application_Payment_Distribution__Bank_Transaction_Distribution__bank_transaction_distribution_KEYbank_transaction_distribution_KEYPayable_Payment_Application_Payment_Distribution

Schema diagram