Table: dbo.Bank_Reconciliation_Statement_Import
This table will hold the list of bank statement transactions imported from the bank via a file. These transactions will be used by bank reconciliation to clear bank transactions. It will hold on to these transactions when the user chooses to finish the bank rec later and once the user finalizes, it will lose all its data for the given Bank Statement.
Columns
Name | Type | Constraints | Description
bank_reconciliation_statement_import_KEY | int (4) | NOT NULL | Primary key.
bank_reconciliation_statement_KEY | int (4) | NOT NULL | Link to the bank_reconciliation_statement record.
bank_reconciliation_statement_detail_KEY | int (4) |  | Link to the reconciliation detail recond. Could be null when non-matched.
transaction_date | smalldatetime (4) | NOT NULL | Transaction date from the bank statement import file.
reference_number | nvarchar (32) | NOT NULL | Reference (check) number from the bank statement import file.
amount | decimal (9, 2) | NOT NULL | Transaction amount from the bank statement import file.
transaction_description | nvarchar (240) | NOT NULL | Transaction description from the bank statement import file.
is_credit | bit (1) | NOT NULL | T/F: true if this transaction is a Credit, false it a Debit
bank_reconciliation_statement_imported_file_name_KEY | int (4) | NOT NULL | Foreign key linking a transaction back to the imported statement file it was read from.
ach_file_header_record_KEY | int (4) |  | This key is used in statement import for auto matching a single bank reconciliation statement import record with direct deposit Ach totals ["BR"] (sum of amounts from BTRD rows grouped by both ACH file header record key and bank reconciliation statement key). Null means that there is no ["BR"] match found and a valid key value links the statement import record to its ACH record match in the direct deposit. When a user unclears a direct deposit ["BR"] ACH file record in direct deposit tab in bank reconciliaiton, this key is used with the bank reconciliation statement key to find the matched record ["BR"] in bank reconciliation statement import table and set the key value to null (this way, the statement import record is available for matching).

Primary key
Name | Columns | Description
PK_Bank_Reconciliation_Statement_Import | bank_reconciliation_statement_import_KEY |

Foreign keys
Name | Columns | Referenced table | Description
FK_Bank_Reconciliation_Statement_Import__Ach_File_Header_Record__ach_file_header_record_KEY | ach_file_header_record_KEY | Ach_File_Header_Record (ach_file_header_record_KEY) |
FK_Bank_Reconciliation_Statement_Import__Bank_Reconciliation_Statement__bank_reconciliation_statement_KEY | bank_reconciliation_statement_KEY | Bank_Reconciliation_Statement (bank_reconciliation_statement_KEY) |
FK_Bank_Reconciliation_Statement_Import__Bank_Reconciliation_Statement_Detail__bank_reconciliation_statement_detail_KEY | bank_reconciliation_statement_detail_KEY | Bank_Reconciliation_Statement_Detail (bank_reconciliation_statement_detail_KEY) |
FK_Bank_Reconciliation_Statement_Import__Bank_Reconciliation_Statement_Imported_File_Name__bank_reconciliation_statement_KEY__ba | bank_reconciliation_statement_KEY, bank_reconciliation_statement_imported_file_name_KEY | Bank_Reconciliation_Statement_Imported_File_Name (bank_reconciliation_statement_KEY, bank_reconciliation_statement_imported_file_name_KEY) |

Incoming foreign keys
Name | Columns | Referencing table | Description
FK_BS_Bank_Reconciliation_Statement_Import__Ach_File_Header_Record__Bank_Reconciliation_Statement_Import | bank_reconciliation_statement_import_KEY | BS_Bank_Reconciliation_Statement_Import__Ach_File_Header_Record |