Table: dbo.Print_Check_Selection
Columns
Name | Type | Constraints | Description
print_check_selection_KEY | int (4) | NOT NULL | Primary key.
user_session_guid | uniqueidentifier (16) | NOT NULL | The user session for the person printing the check. We note user session (as opposed to user) because the application allows a user to log in more than once. In turn, this permits a user to print from more than one session at the same time, which is one of potential problems we want to address with this table.
bank_transaction_KEY | int (4) | NOT NULL | The bank transaction for the payroll, vendor or vendor agent check we are printing.
reference_number | nvarchar (32) | NOT NULL | The check number of the payroll, vendor or vendor agent check we are printing.
transaction_date | smalldatetime (4) | NOT NULL | The check date of the payroll, vendor or vendor agent check we are printing.
was_check_created | bit (1) | NOT NULL | Flags the check as programmatically-created. Example: a vendor agent check, which the application creates.
source__payable_transaction_KEY | int (4) |  | If the vendor check being printed has a payable transaction as its source (ie. the vendor check was created to pay the payable transaction), then this foreign key will point to said payable. Otherwise, this column will be set to null.
source__pending_ap_payment_KEY | int (4) |  | If the AP check being printed has a pending AP payment from Manage Payments as its source (ie. the AP check was created to pay one or more AP payable transactions), then this foreign key will point to the Manage Payments pending payment row. Otherwise, this column will be set to null.
check_print_run_KEY | int (4) | NOT NULL | The print run this record is associated with.
vendor_payment_method_KEY | int (4) |  | Selected vendor payment method, NULL if there isn't one

Primary key
Name | Columns | Description
PK_Print_Check_Selection | print_check_selection_KEY |
Unique constraints
Name | Columns | Description
UK_Print_Check_Selection$bank_transaction_KEY | bank_transaction_KEY |

Foreign keys
Name | Columns | Referenced table | Description
FK_Print_Check_Selection__Bank_Transaction__bank_transaction_KEY | bank_transaction_KEY | Bank_Transaction (bank_transaction_KEY) |
FK_Print_Check_Selection__Check_Print_Run__check_print_run_KEY | check_print_run_KEY | Check_Print_Run (check_print_run_KEY) |
FK_Print_Check_Selection__Payable_Transaction__source__payable_transaction_KEY | source__payable_transaction_KEY | Payable_Transaction (payable_transaction_KEY) |
FK_Print_Check_Selection__Pending_AP_Payment__source__pending_ap_payment_KEY | source__pending_ap_payment_KEY | Pending_AP_Payment (pending_ap_payment_KEY) |
FK_Print_Check_Selection__User_Session__user_session_guid | user_session_guid | User_Session (user_session_guid) |
FK_Print_Check_Selection__Vendor_Payment_Method__vendor_payment_method_KEY | vendor_payment_method_KEY | Vendor_Payment_Method (vendor_payment_method_KEY) | Foreign key to the Vendor_Payment_Method table.