query GetMainOptionsForKP(
  $statecode: Int
  $evo_brandid: Uuid
  $evo_modelid: Uuid
  $salonaccountid: Uuid!
  $currentDate: DateTime
  $dealer_person_accountid: Uuid!
  $dealer_broker_accountid: Uuid!
  # $ind_agent_accountid: Uuid!
  $double_agent_accountid: Uuid!
  # $broker_accountid: Uuid!
  # $findepartment_accountid: Uuid!
  $evo_gps_brandid: Uuid!
  $evo_agency_agreementid_param: GuidParamInput
) {
  selectModel: evo_models(statecode: $statecode, evo_brandid: $evo_brandid) {
    evo_id
    evo_name
    evo_modelid
    evo_leasingobject_risk
    evo_importer_reward_perc
    evo_importer_reward_rub
    evo_impairment_groupid
    evo_vehicle_type
    evo_gps
    evo_vehicle_body_typeidData {
      evo_id_elt
    }
    evo_running_gear
  }
  selectConfiguration: evo_equipments(
    statecode: $statecode
    evo_modelid: $evo_modelid
  ) {
    evo_equipmentid
    evo_name
    evo_impairment_groupid
    evo_leasingobject_risk
    evo_start_production_year
  }
  selectDealerPerson: salon_providers(
    statecode: $statecode
    salonaccountid: $salonaccountid
  ) {
    accountid
    name
    evo_broker_accountid
    evo_kpp
    evo_inn
    evo_supplier_type
  }
  selectDealerRewardCondition: evo_reward_conditions(
    evo_agent_accountid: $dealer_person_accountid
    evo_datefrom_param: { lte: $currentDate }
    evo_dateto_param: { gte: $currentDate }
    statecode: $statecode
    evo_agency_agreementid_param: $evo_agency_agreementid_param
  ) {
    evo_reward_conditionid
    evo_name
    evo_reward_summ
    evo_reduce_reward
    evo_agency_agreementidData {
      evo_reward_without_other_agent
      evo_required_reward
      evo_leasingobject_price
    }
    evo_min_reward_summ
    evo_calc_reward_rules
  }
  selectDealerBrokerRewardCondition: evo_reward_conditions(
    evo_agent_accountid: $dealer_broker_accountid
    evo_datefrom_param: { lte: $currentDate }
    evo_dateto_param: { gte: $currentDate }
    statecode: $statecode
    evo_agency_agreementid_param: $evo_agency_agreementid_param
  ) {
    evo_reward_conditionid
    evo_name
    evo_reward_summ
    evo_reduce_reward
    evo_agency_agreementidData {
      evo_reward_without_other_agent
      evo_required_reward
      evo_leasingobject_price
    }
    evo_min_reward_summ
    evo_calc_reward_rules
  }
  # selectIndAgentRewardCondition: evo_reward_conditions(
  #   evo_agent_accountid: $ind_agent_accountid
  #   evo_datefrom_param: { lte: $currentDate }
  #   evo_dateto_param: { gte: $currentDate }
  #   statecode: $statecode
  # evo_agency_agreementid_param: $evo_agency_agreementid_param
  # ) {
  #   evo_reward_conditionid
  #   evo_name
  #   evo_double_agent_accountid
  #   evo_reward_summ
  #   evo_reduce_reward
  # }
  calcDoubleAgentRewardCondition: evo_reward_conditions(
    evo_agent_accountid: $double_agent_accountid
    evo_datefrom_param: { lte: $currentDate }
    evo_dateto_param: { gte: $currentDate }
    statecode: $statecode
    evo_agency_agreementid_param: $evo_agency_agreementid_param
  ) {
    evo_reward_conditionid
    evo_name
    evo_reward_summ
    evo_reduce_reward
    evo_agency_agreementidData {
      evo_reward_without_other_agent
      evo_required_reward
      evo_leasingobject_price
    }
    evo_min_reward_summ
    evo_calc_reward_rules
  }
  # calcBrokerRewardCondition: evo_reward_conditions(
  #   evo_agent_accountid: $broker_accountid
  #   evo_datefrom_param: { lte: $currentDate }
  #   evo_dateto_param: { gte: $currentDate }
  #   statecode: $statecode
  # evo_agency_agreementid_param: $evo_agency_agreementid_param
  # ) {
  #   evo_reward_conditionid
  #   evo_name
  #   evo_reward_summ
  #   evo_reduce_reward
  # }
  # selectFinDepartmentRewardCondtion: evo_reward_conditions(
  #   evo_agent_accountid: $findepartment_accountid
  #   evo_datefrom_param: { lte: $currentDate }
  #   evo_dateto_param: { gte: $currentDate }
  #   statecode: $statecode
  # evo_agency_agreementid_param: $evo_agency_agreementid_param
  # ) {
  #   evo_reward_conditionid
  #   evo_name
  #   evo_reward_summ
  #   evo_reduce_reward
  # }
  selectGPSModel: evo_gps_models(
    statecode: $statecode
    evo_gps_brandid: $evo_gps_brandid
  ) {
    evo_name
    evo_gps_modelid
  }
}
