View: dbo.Vendor_View
View definition
`create view dbo.Vendor_View as select vendor_KEY = V.vendor_KEY, client_KEY = V.client_KEY, vendor_name = V.vendor_name, vendor_id = V.vendor_id, ein_ssn = V.ein_ssn, payee_name = V.payee_name, status = V.status, exclude_from_fee_calculations = V.exclude_from_fee_calculations, contact_KEY = V.contact_KEY, default_payment__checkbook_KEY = V.default_payment__checkbook_KEY, default__vendor_payment_method_KEY = V.default__vendor_payment_method_KEY, print_stub = V.print_stub, auto_consolidate_for_payment = V.auto_consolidate_for_payment, auto_select_for_payment_when_due = V.auto_select_for_payment_when_due, lead_days = V.lead_days, is_paycard_recipient = V.is_paycard_recipient, direct_deposit_method_KEY = V.direct_deposit_method_KEY, direct_deposit_amount_percent = V.direct_deposit_amount_percent, direct_deposit_distribution_method_KEY = V.direct_deposit_distribution_method_KEY, vendor_id_sortable = V.vendor_id_sortable, date_tin_verified = V.date_tin_verified, description = V.description, inactive_reason = V.inactive_reason, date_inactive = V.date_inactive, vendor_account_number = V.vendor_account_number, current__vendor_type_KEY = V.current__vendor_type_KEY, default_payment__memo = V.default_payment__memo, use_same_checkbook_as_paychecks = V.use_same_checkbook_as_paychecks, zero_liability_created_date = V.zero_liability_created_date, ap__gl_account_KEY = V.ap__gl_account_KEY, purchase_order_number = V.purchase_order_number, vendor_payment_memo = V.vendor_payment_memo, payment_term_KEY = V.payment_term_KEY, online_bill_pay_vendor_ID = V.online_bill_pay_vendor_ID, export__quick_books_payee_KEY = V.export__quick_books_payee_KEY, payment_reminder_note = V.payment_reminder_note, include_payment_worksheet = V.include_payment_worksheet, -- This column is included to support filter formula as well as to handle active and inactive status. active_status_KEY = CASE WHEN V.date_inactive IS NULL OR V.date_inactive > GetDate() THEN 1 /* ACTIVE */ ELSE 2 /*INACTIVE*/ END from dbo.Vendor V`