View: dbo.Tax_Agent_View
View definition
-- This exists to create the integer state_KEY so we can filter on the state.
-- Filters can't join on non-integer keys, so we can't use ste_state_code_KEY.
create view dbo.Tax_Agent_View
as
select
tax_agent_KEY = TA.tax_agent_KEY
, tax_agent_name = TA.tax_agent_name
, tax_agent_id = TA.tax_agent_id
, payee_name = TA.payee_name
, description = TA.tax_agent_name
, ste_state_code_KEY = TA.ste_state_code_KEY
, state_KEY = convert(int, convert(decimal, TA.ste_state_code_KEY)) -- table doesn't allow null so don't worry about it here.
, include_payment_coupon_with_payment = TA.include_payment_coupon_with_payment
, coupon_required_if_no_payment_is_due = TA.coupon_required_if_no_payment_is_due
, consolidate_payments_for_funded_clients = TA.consolidate_payments_for_funded_clients
, contact_KEY = TA.contact_KEY
, tax_agent_id_sortable = TA.tax_agent_id_sortable
, default__vendor_payment_method_KEY = TA.default__vendor_payment_method_KEY
, direct_deposit_distribution_method_KEY = TA.direct_deposit_distribution_method_KEY
, zero_payment_eft_accepted = TA.zero_payment_eft_accepted
, do_not_calculate_missouri_compensation_deduction = TA.do_not_calculate_missouri_compensation_deduction
, tax_agent_system_KEY = TA.tax_agent_system_KEY
, coupon_not_accepted_for_zero_payment = TA.coupon_not_accepted_for_zero_payment
, system_provided_tax_agent_is_local = TA.system_provided_tax_agent_is_local
, include_payment_worksheet = TA.include_payment_worksheet
from
dbo.Tax_Agent TA