View: dbo.Vendor_Check_Direct_Deposit_Allocation_View
View definition
`CREATE VIEW dbo.Vendor_Check_Direct_Deposit_Allocation_View AS SELECT DDBTA.direct_deposit_bank_transaction_allocation_KEY , DDBTA.bank_account_number , DDBTA.bank_account_type_KEY , DDBTA.bank_KEY , DDBTA.amount as allocation_amount , DDBTA.direct_deposit_status_KEY as allocation_direct_deposit_status_KEY , DDBTA.use_international_format , DDBTA.us_gateway_operator__bank_KEY , DDBTA.destination__country_code_KEY , DDBTA.is_processed , DDBTA.effective_date , VBT.vendor_KEY , VBT.bank_transaction_KEY , V.ein_ssn as ssn_ein , BT.bank_transaction_type_KEY , BT.checkbook_KEY , BT.description as payee_name , BT.transaction_date , BT.reference_number , BT.funding_processed_status_KEY , BT.origin__accounting_application_KEY , CB.client_KEY , CB.description AS checkbook__description , CB.bank_KEY AS checkbook__bank_KEY , CB.bank_account_number AS checkbook__bank_account_number , CB.bank_account_type_KEY AS checkbook__bank_account_type_KEY FROM dbo.Direct_Deposit_Bank_Transaction_Allocation AS DDBTA INNER JOIN dbo.Vendor_Bank_Transaction AS VBT ON DDBTA.bank_transaction_KEY = VBT.bank_transaction_KEY INNER JOIN dbo.Vendor AS V ON V.vendor_KEY = VBT.vendor_KEY INNER JOIN dbo.Bank_Transaction AS BT ON VBT.bank_transaction_KEY = BT.bank_transaction_KEY INNER JOIN dbo.Checkbook AS CB ON BT.checkbook_KEY = CB.checkbook_KEY WHERE BT.transaction_status_KEY IN (1, 9) AND BT.bank_transaction_type_KEY IN (1,5,10) AND BT.is_handwritten_check = 0;`