Table: dbo.Direct_Deposit_Bank_Transaction_Allocation
Columns
Name | Type | Constraints | Description
direct_deposit_bank_transaction_allocation_KEY | int (4) | NOT NULL | Primary key
bank_transaction_KEY | int (4) | NOT NULL | Foreign key to the parent direct deposit bank transaction.
bank_account_number | nvarchar (34) | NOT NULL | The direct deposit recipient's account number at their bank.
bank_account_type_KEY | nvarchar (22) | NOT NULL | Foreign key to the type of bank account the money is being direct deposited into.
amount_original | decimal (9, 2) | NOT NULL | The amount being deposited for this direct deposit allocation.
direct_deposit_status_KEY | nvarchar (40) | NOT NULL | Foreign key to the direct deposit status of this allocation.
is_processed | bit (1) | NOT NULL | Flag indicating that this entry has been processed for ACH and is frozen. ["BR"] Most entries are processed into ACH files. However, some (like reversed bank transactions ["BR"] and zero amount allocations) may simply be marked as processed but not placed into an ACH file.
effective_date | smalldatetime (4) |  | Effective date of the allocation if edited by the user - null otherwise
bank_KEY | int (4) | NOT NULL | Bank that the allocation is associated to.
use_international_format | bit (1) | NOT NULL | This allocation requires international ACH formatting.
us_gateway_operator__bank_KEY | int (4) |  | Key to bank acting as US gateway operator.
destination__country_code_KEY | int (4) |  | Key to destination country code.
amount_override | decimal (9, 2) |  | Overridden amount
amount | decimal (9, 2) | NOT NULL | Amount of item, either amount_override if not null otherwise amount_original. The trigger is used to determine where to get the value from.
ach_company_batch_header_record_KEY | int (4) |  |
is_included_in_ach_file | bit (1) | NOT NULL | About the purpose of this column -- this column keeps track of whether an allocation row has ever been added to an ACH file. ["BR"] It should be set true if it is or was once part of an ACH file, and false if it was never placed in an ACH file.["BR"] Here is some more detail:["BR"] this column should be set to true when a non null value is assigned to the ach_company_batch_header_record_KEY, ["BR"] and it should be set to false when a null value is assigned to the ach_company_batch_header_record_KEY. ["BR"] The purpose of is_included_in_ach_file is that its value should be maintained during ["BR"] the CDMU client backup and restore process, even when backing up a client from one database ["BR"] and restoring that client into a different ACS database. ach_company_batch_header_record_KEY ["BR"] will be set to null when restoring into a different database. ["BR"] This special client backup and restore scenario -- back up from one database, restore into another -- ["BR"] is the one situation where is_included_in_ach_file may be true when ach_company_batch_header_record_KEY is null. ["BR"] Otherwise, these two fields should be synchronized.

Primary key
Name | Columns | Description
PK_Direct_Deposit_Bank_Transaction_Allocation | direct_deposit_bank_transaction_allocation_KEY |

Foreign keys
Name | Columns | Referenced table | Description
FK_Direct_Deposit_Bank_Transaction_Allocation__Ach_Company_Batch_Header_Record__ach_company_batch_header_record_KEY | ach_company_batch_header_record_KEY | Ach_Company_Batch_Header_Record (ach_company_batch_header_record_KEY) |
FK_Direct_Deposit_Bank_Transaction_Allocation__Bank__bank_KEY | bank_KEY | Bank (bank_KEY) |
FK_Direct_Deposit_Bank_Transaction_Allocation__Bank__us_gateway_operator__bank_KEY | us_gateway_operator__bank_KEY | Bank (bank_KEY) |
FK_Direct_Deposit_Bank_Transaction_Allocation__Bank_Account_Type__bank_account_type_KEY | bank_account_type_KEY | Bank_Account_Type (bank_account_type_KEY) |
FK_Direct_Deposit_Bank_Transaction_Allocation__Country_Code__destination__country_code_KEY | destination__country_code_KEY | Country_Code (country_code_KEY) |
FK_Direct_Deposit_Bank_Transaction_Allocation__Direct_Deposit_Bank_Transaction__bank_transaction_KEY | bank_transaction_KEY | Direct_Deposit_Bank_Transaction (bank_transaction_KEY) |
FK_Direct_Deposit_Bank_Transaction_Allocation__Direct_Deposit_Status__direct_deposit_status_KEY | direct_deposit_status_KEY | Direct_Deposit_Status (direct_deposit_status_KEY) |

Incoming foreign keys
Name | Columns | Referencing table | Description
FK_BS_Direct_Deposit_Bank_Transaction_Allocation__Ach_Company_Batch_Header_Record | direct_deposit_bank_transaction_allocation_KEY | BS_Direct_Deposit_Bank_Transaction_Allocation__Ach_Company_Batch_Header_Record |
FK_Bank_Transaction_Reconciliation_Detail__Direct_Deposit_Bank_Transaction_Allocation__source__direct_deposit_bank_transaction_a | source__direct_deposit_bank_transaction_allocation_KEY | Bank_Transaction_Reconciliation_Detail |
FK_Direct_Deposit_Bank_Transaction_Allocation_Distribution__Direct_Deposit_Bank_Transaction_Allocation__direct_deposit_bank_tran | direct_deposit_bank_transaction_allocation_KEY | Direct_Deposit_Bank_Transaction_Allocation_Distribution |