SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO
CREATE   VIEW [xtract].[dealer_vehicles] AS

SELECT [client_db]
     , [dealer_vehicle_type]
     , [dealer_vehicle_number]
--      , [vehicle_number]
--      , [location]
--      , [buyer_customer_no]
--      , [deregistration_date]
--      , [refinancing_start_date]
--      , [refinancing_end_date]
--      , [refinancing_value]
--      , [refinancing_refundment]
--      , [refinancing_bank_customer_no]
--      , [refinanc_interest_free_date]
     , [in_subsidiary]
--      , [in_buy_salesman_number]
--      , [in_buy_order_no]
--      , [in_buy_order_no_date]
--      , [in_buy_invoice_no]
     , [in_buy_invoice_no_date]
--      , [in_buy_edp_order_no]
--      , [in_buy_edp_order_no_date]
--      , [in_is_trade_in_ken]
--      , [in_is_trade_in_kom]
--      , [in_used_vehicle_buy_type]
--      , [in_buy_list_price]
     , [in_arrival_date]
--      , [in_expected_arrival_date]
--      , [in_accounting_document_type]
--      , [in_accounting_document_number]
--      , [in_accounting_document_date]
--      , [in_acntg_exceptional_group]
--      , [in_acntg_cost_unit_new_vehicle]
--      , [in_accounting_make]
--      , [in_registration_reference]
--      , [in_expected_repair_cost]
--      , [in_order_status]
--      , [out_subsidiary]
--      , [out_is_ready_for_sale]
--      , [out_ready_for_sale_date]
--      , [out_sale_type]
--      , [out_sales_contract_number]
--      , [out_sales_contract_date]
--      , [out_is_sales_contract_confrmed]
--      , [out_salesman_number_1]
--      , [out_salesman_number_2]
--      , [out_desired_shipment_date]
--      , [out_is_registration_included]
--      , [out_recommended_retail_price]
--      , [out_extra_expenses]
--      , [out_sale_price]
--      , [out_sale_price_dealer]
--      , [out_sale_price_minimum]
--      , [out_sale_price_internet]
--      , [out_estimated_invoice_value]
--      , [out_discount_percent_vehicle]
--      , [out_discount_percent_accessory]
--      , [out_order_number]
--      , [out_invoice_type]
     , [out_invoice_number]
--      , [out_invoice_date]
--      , [out_deposit_invoice_type]
--      , [out_deposit_invoice_number]
--      , [out_deposit_value]
--      , [out_license_plate]
--      , [out_make_number]
--      , [out_model_code]
--      , [out_license_plate_country]
--      , [out_license_plate_season]
     , [calc_basic_charge]
     , [calc_accessory]
     , [calc_extra_expenses]
     , [calc_usage_value_encr_external]
     , [calc_usage_value_encr_internal]
     , [calc_usage_value_encr_other]
     , [calc_total_writedown]
     , [calc_cost_percent_stockingdays]
     , [calc_interest_percent_stkdays]
     , [calc_actual_payed_interest]
     , [calc_commission_for_arranging]
     , [calc_commission_for_salesman]
     , [calc_cost_internal_invoices]
     , [calc_cost_other]
     , [calc_sales_aid]
     , [calc_sales_aid_finish]
     , [calc_sales_aid_bonus]
     , [calc_returns_workshop]
--      , [exclusive_reserved_employee_no]
--      , [exclusive_reserved_until]
     , [pre_owned_car_code]
--      , [is_sale_internet]
--      , [is_sale_prohibit]
--      , [is_agency_business]
--      , [is_rental_or_school_vehicle]
--      , [previous_owner_number]
--      , [mileage_km]
--      , [memo]
--      , [keys_box_number]
--      , [last_change_date]
--      , [last_change_employee_no]
--      , [created_date]
--      , [created_employee_no]
--      , [has_financing_example]
--      , [has_leasing_example_ref]
--      , [deactivated_by_employee_no]
--      , [deactivated_date]
--      , [access_limit]
--      , [lock_by_workstation]
--      , [lock_time]
--      , [lock_trace]
--      , [lock_trigger]
--      , [lock_by_employee]
--      , [lock_sourcecode]

FROM [LOCOSOFT].[dbo].[dealer_vehicles]
GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS OFF 
GO

GO
