DBA Data[Home] [Help]

APPS.IEX_UWQ_DELIN_ENUMS_PVT SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 10

CURSOR C_ORG_ID IS SELECT ORGANIZATION_ID FROM HR_OPERATING_UNITS
    WHERE MO_GLOBAL.CHECK_ACCESS(ORGANIZATION_ID) = 'Y';
Line: 22

     'SELECT  GLSOB.CURRENCY_CODE CURRENCY from GL_SETS_OF_BOOKS GLSOB, AR_SYSTEM_PARAMETERS ARSYS WHERE ARSYS.SET_OF_BOOKS_ID ' ||
     ' = GLSOB.SET_OF_BOOKS_ID');
Line: 24

  L := IEX_UTILITIES.get_cache_value('DEFAULT_EXCHANGE_RATE_TYPE'||I_ORG.ORGANIZATION_ID, 'SELECT DEFAULT_EXCHANGE_RATE_TYPE FROM AR_CMGT_SETUP_OPTIONS');
Line: 51

    select source_id
    from jtf_rs_resource_extns
    where resource_id = p_resource_id;
Line: 56

    select lookup_code, meaning from fnd_lookup_values
    where lookup_type = 'IEX_UWQ_NODE_STATUS' and LANGUAGE = userenv('LANG');
Line: 60

    SELECT meaning
    FROM fnd_lookup_values
    WHERE lookup_type = in_lookup_type
    AND lookup_code = in_lookup_code
    AND LANGUAGE = userenv('LANG');
Line: 67

    SELECT work_q_view_for_primary_node, work_q_label_lu_type, work_q_label_lu_code
    FROM ieu_uwq_sel_enumerators
    WHERE sel_enum_id = in_sel_enum_id;
Line: 72

  select DEFINE_PARTY_RUNNING_LEVEL,DEFINE_OU_RUNNING_LEVEL
  from IEX_QUESTIONNAIRE_ITEMS;
Line: 79

      select nvl(using_delinquency_level,'N') from iex_questionnaire_items;
Line: 137

          ' UNION ALL  SELECT hp.party_id ' ||
          ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp, ' ||
	  ' JTF_RS_GROUPS_DENORM jrg ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ac.resource_ID = jtgrp.group_id ' ||
	  ' AND jtgrp.group_id = jrg.group_id ' ||
          ' AND ac.resource_type = ''RS_GROUP'' ' ||
          ' AND NVL(jtgrp.delete_flag,''N'') = ''N'' ' ||
          ' AND jtgrp.PERSON_ID = :PERSON_ID ) ';
Line: 150

  select preference_value
  into l_strategy_level
  from iex_app_preferences_b
  where preference_name='COLLECTIONS STRATEGY LEVEL'
  and org_id is null
  and enabled_flag='Y';
Line: 173

	l_filter_col_str1 := 'customer_id in (select hp.party_id ';
Line: 174

	l_filter_col_str2 := 'select hp.party_id ';
Line: 178

        l_filter_col_str1 := 'cust_account_id in (select hp.cust_account_id ';
Line: 179

	l_filter_col_str2 := 'select hp.cust_account_id ';
Line: 183

        l_filter_col_str1 := 'site_use_id in (select hp.site_use_id ';
Line: 184

	l_filter_col_str2 := 'select hp.site_use_id ';
Line: 187

	l_filter_col_str1 := 'customer_id in (select hp.party_id ';
Line: 188

	l_filter_col_str2 := 'select hp.party_id ';
Line: 218

 /* l_str_bkr2 := ' AND NOT EXISTS (SELECT 1 FROM iex_bankruptcies bkr WHERE bkr.party_id = '
  || l_sel_enum_rec.work_q_view_for_primary_node || '.customer_id '
  --Bug5261831. Fix By LKKUMAR on 14-Jun-2006. Start.
  || ' AND NVL(BKR.DISPOSITION_CODE,''GRANTED'') NOT IN (''DISMISSED'',''NEGOTIATION'',''WITHDRAWN'')) ';
Line: 226

    l_str_bkr2 := ' AND NOT EXISTS (SELECT 1  FROM iex_bankruptcies bkr WHERE bkr.party_id = ' || l_sel_enum_rec.work_q_view_for_primary_node || '.customer_id and NVL(BKR.DISPOSITION_CODE,''GRANTED'') in (''GRANTED'',''NEGOTIATION'') ) ' ;
Line: 239

     SELECT count(*) into l_check from iex_assignments where alt_resource_id =  p_RESOURCE_ID
       AND TRUNC(START_DATE) <= TRUNC(SYSDATE)
       AND TRUNC(NVL(END_DATE,SYSDATE)) >= TRUNC(SYSDATE)
       AND NVL(DELETED_FLAG,'N') = 'N';
Line: 277

          ' AND NVL(jtgrp.delete_flag,''N'') = ''N'' ' ||
          ' AND jtgrp.PERSON_ID = :PERSON_ID  )'; -- Changed by gnramasa for bug 6363290 27-Aug-07
Line: 285

                l_security_where := l_security_where || ' and exists ( select 1 from hz_party_preferences hzprf where hzprf.value_varchar2= ''DELINQUENCY'' '
	                                                         ||' and hzprf.module= ''COLLECTIONS''and hzprf.category = ''COLLECTIONS LEVEL'' '
								 ||' and hzprf.preference_code = ''PARTY_ID'' and hzprf.party_id= iex_delinquencies_uwq_v.customer_id) ';
Line: 291

               l_security_where := l_security_where || ' and exists (select 1 from iex_app_preferences_b pref where pref.preference_name=''COLLECTIONS STRATEGY LEVEL'' '
	                                          ||' and pref.preference_value=''DELINQUENCY'' and pref.org_id = iex_delinquencies_uwq_v.org_id) ';
Line: 318

          ' AND NVL(jtgrp.delete_flag,''N'') = ''N'' ' ||
          ' AND jtgrp.PERSON_ID = :PERSON_ID  )'; -- Changed by gnramasa for bug 6363290 27-Aug-07
Line: 326

                l_security_where := l_security_where || ' and exists ( select 1 from hz_party_preferences hzprf where hzprf.value_varchar2= ''DELINQUENCY'' '
	                                                          ||' and hzprf.module=''COLLECTIONS'' and hzprf.category = ''COLLECTIONS LEVEL''  '
								  ||' and hzprf.preference_code = ''PARTY_ID'' and hzprf.party_id = iex_delinquencies_uwq_v.customer_id) ';
Line: 332

               l_security_where := l_security_where || ' and exists (select 1 from iex_app_preferences_b pref where pref.preference_name=''COLLECTIONS STRATEGY LEVEL'' '
	                                          ||' and pref.preference_value=''DELINQUENCY'' and pref.org_id=iex_delinquencies_uwq_v.org_id) ';
Line: 453

          ' AND NVL(jtgrp.delete_flag,''N'') = ''N'' ' ||
          ' AND jtgrp.PERSON_ID = :PERSON_ID ) '; --Added ) to fix 10275372 12/13/2010 SNUTHALA
Line: 474

          ' AND NVL(jtgrp.delete_flag,''N'') = ''N'' ' ||
          ' AND jtgrp.PERSON_ID = :PERSON_ID ) ';--Added ) to fix 10275372 12/13/2010 SNUTHALA
Line: 484

             l_security_where := l_security_where || ' and exists ( select 1 from hz_party_preferences hzprf where hzprf.value_varchar2= ''DELINQUENCY'' '
	                                                          ||' and hzprf.module=''COLLECTIONS'' and hzprf.category = ''COLLECTIONS LEVEL''  '
								  ||' and hzprf.preference_code = ''PARTY_ID'' and hzprf.party_id = iex_delinquencies_uwq_v.customer_id) ';
Line: 490

             l_security_where := l_security_where || ' and exists (select 1 from iex_app_preferences_b pref where pref.preference_name=''COLLECTIONS STRATEGY LEVEL'' '
	                                          ||' and pref.preference_value=''DELINQUENCY'' and pref.org_id=iex_delinquencies_uwq_v.org_id) ';
Line: 584

    select source_id
    from jtf_rs_resource_extns
    where resource_id = p_resource_id;
Line: 589

    select lookup_code, meaning from fnd_lookup_values
    where lookup_type = 'IEX_UWQ_NODE_STATUS' and LANGUAGE = userenv('LANG');
Line: 593

    SELECT meaning
    FROM fnd_lookup_values
    WHERE lookup_type = in_lookup_type
    AND lookup_code = in_lookup_code
    AND LANGUAGE = userenv('LANG');
Line: 600

    SELECT work_q_view_for_primary_node, work_q_label_lu_type, work_q_label_lu_code
    FROM ieu_uwq_sel_enumerators
    WHERE sel_enum_id = in_sel_enum_id;
Line: 605

    SELECT collector_id from AR_COLLECTORS where resource_id = p_resource_id
      and resource_type = 'RS_RESOURCE';
Line: 635

  CURSOR C_ORG_ID IS SELECT ORGANIZATION_ID FROM HR_OPERATING_UNITS
    WHERE MO_GLOBAL.CHECK_ACCESS(ORGANIZATION_ID) = 'Y';
Line: 639

    SELECT PREFERENCE_VALUE
	FROM IEX_APP_PREFERENCES_B
    WHERE PREFERENCE_NAME = 'COLLECTIONS STRATEGY LEVEL'
    and org_id is null
    and enabled_flag='Y';
Line: 652

  is select lookup_code
  from iex_lookups_v
  where lookup_type='IEX_RUNNING_LEVEL'
  and lookup_code= 'CUSTOMER'
  and  iex_utilities.validate_running_level(LOOKUP_CODE)='Y';
Line: 672

          ' UNION ALL  SELECT hp.party_id ' ||
          ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp, ' ||
	  ' JTF_RS_GROUPS_DENORM jrg ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ac.resource_ID = jtgrp.group_id ' ||
	  ' AND jtgrp.group_id = jrg.group_id ' ||
          ' AND hp.cust_account_id = -1 ' ||
          ' AND ac.resource_type = ''RS_GROUP'' ' ||
          ' AND NVL(jtgrp.delete_flag,''N'') = ''N'' ' ||
          ' AND jtgrp.PERSON_ID = :PERSON_ID ) ';
Line: 704

  select count(1)
  into l_level_count
  from iex_lookups_v
  where lookup_type='IEX_RUNNING_LEVEL'
  and  iex_utilities.validate_running_level(LOOKUP_CODE)='Y';
Line: 740

   SELECT count(*) INTO l_check FROM iex_assignments where
   alt_resource_id = p_RESOURCE_ID
   AND TRUNC(START_DATE) <= TRUNC(SYSDATE)
   AND TRUNC(NVL(END_DATE,SYSDATE)) >= TRUNC(SYSDATE)
   AND NVL(DELETED_FLAG,'N') = 'N';
Line: 750

   select count(1) into l_group_check
   from ar_collectors where status='A' and
   nvl(inactive_date,sysdate)>=sysdate and resource_type='RS_GROUP';
Line: 762

          'party_id in  (select hp.party_id ' ||
          ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||
          ' iex_assignments iea ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND  ac.resource_id = iea.resource_id ' ||
          ' AND hp.cust_account_id = -1 ' ||
          ' AND  iea.alt_employee_id = :PERSON_ID  ' ||
          ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE)  ' ||
          ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >=  TRUNC(SYSDATE) ' ||
  	  ' AND NVL(IEA.DELETED_FLAG,''N'') = ''N'' ' ||
          ' UNION ALL select hp.party_id '||
          ' FROM hz_customer_profiles  hp, ar_collectors ac ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND  ac.employee_id = :PERSON_ID ' ||
          ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
          ' AND hp.cust_account_id = -1   ' ||
          ' UNION ALL  SELECT hp.party_id ' ||
          ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ac.resource_ID = jtgrp.group_id ' ||
          ' AND hp.cust_account_id = -1   ' ||
          ' AND ac.resource_type = ''RS_GROUP'' ' ||
          ' AND NVL(jtgrp.delete_flag,''N'') = ''N'' ' ||
          ' AND jtgrp.PERSON_ID = :PERSON_ID  ';
Line: 792

          'party_id in (select hp.party_id '||
          ' FROM hz_customer_profiles  hp, ar_collectors ac ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND  ac.employee_id = :PERSON_ID ' ||
          ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
          ' AND hp.cust_account_id = -1   ' ||
          ' UNION ALL  SELECT hp.party_id ' ||
          ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ac.resource_ID = jtgrp.group_id ' ||
          ' AND hp.cust_account_id = -1   ' ||
          ' AND ac.resource_type = ''RS_GROUP'' ' ||
          ' AND NVL(jtgrp.delete_flag,''N'') = ''N'' ' ||
          ' AND jtgrp.PERSON_ID = :PERSON_ID  ';
Line: 813

        l_security_where := ' :person_id = :person_id and collector_resource_id in (select resource_id from ar_collectors where resource_type = ''RS_RESOURCE'' and resource_id = :COLLECTOR_RESOURCE_ID ';
Line: 820

	l_security_where := l_security_where || ' union all SELECT ac.resource_id FROM iex_assignments iea,ar_collectors ac where '||
    	                    ' iea.alt_employee_id = :PERSON_ID '||
			    ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) '||
			    ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) '||
                            ' AND NVL(iea.DELETED_FLAG,''N'') = ''N'' '||
                            ' and ac.resource_id=iea.resource_id '||
                            ' and ac.resource_type in (''RS_RESOURCE'',''RS_GROUP'') ';
Line: 830

        l_security_where := l_security_where || ' union all SELECT ac.resource_ID '||
			    ' FROM ar_collectors ac , jtf_rs_group_members jtgrp '||
			    ' WHERE ac.resource_ID = jtgrp.group_id '||
			    ' AND ac.resource_type = ''RS_GROUP'''||
			    ' AND NVL(jtgrp.delete_flag,''N'') = ''N'''||
			    ' AND jtgrp.resource_ID = :COLLECTOR_RESOURCE_ID ';
Line: 952

          'party_id in (select hp.party_id '||
          ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||
          ' iex_assignments iea ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND  ac.resource_id = iea.resource_id ' ||
          ' AND hp.cust_account_id = -1 ' ||
          ' AND  iea.alt_employee_id = :PERSON_ID   ' ||
          ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) ' ||
          ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >=  TRUNC(SYSDATE) ' ||
  	  ' AND NVL(IEA.DELETED_FLAG,''N'') = ''N'' ' ||
          ' UNION ALL select hp.party_id '||
          ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND  ac.employee_id = :PERSON_ID ' ||
          ' AND hp.cust_account_id = -1  ' ||
          ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
          ' UNION ALL  SELECT hp.party_id ' ||
          ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ac.resource_ID = jtgrp.group_id ' ||
          ' AND hp.cust_account_id = -1   ' ||
          ' AND ac.resource_type = ''RS_GROUP'' ' ||
          ' AND NVL(jtgrp.delete_flag,''N'') = ''N'' ' ||
          ' AND jtgrp.PERSON_ID = :PERSON_ID  ';
Line: 981

          'party_id in (select hp.party_id '||
          ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND  ac.employee_id = :PERSON_ID ' ||
          ' AND hp.cust_account_id = -1  ' ||
          ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
          ' UNION ALL  SELECT hp.party_id ' ||
          ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ac.resource_ID = jtgrp.group_id ' ||
          ' AND NVL(jtgrp.delete_flag,''N'') = ''N'' ' ||
          ' AND hp.cust_account_id = -1   ' ||
          ' AND ac.resource_type = ''RS_GROUP'' ' ||
          ' AND jtgrp.PERSON_ID = :PERSON_ID  ';
Line: 1003

        l_security_where := ' :person_id = :person_id and collector_resource_id in (select resource_id from ar_collectors where resource_type = ''RS_RESOURCE'' and resource_id = :COLLECTOR_RESOURCE_ID ';
Line: 1010

	l_security_where := l_security_where || ' union all SELECT ac.resource_id FROM iex_assignments iea,ar_collectors ac where '||
    	                    ' iea.alt_employee_id = :PERSON_ID '||
			    ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) '||
			    ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) '||
                            ' AND NVL(iea.DELETED_FLAG,''N'') = ''N'' '||
                            ' and ac.resource_id=iea.resource_id '||
                            ' and ac.resource_type in (''RS_RESOURCE'',''RS_GROUP'') ';
Line: 1020

        l_security_where := l_security_where || ' union all SELECT ac.resource_ID '||
			    ' FROM ar_collectors ac , jtf_rs_group_members jtgrp '||
			    ' WHERE ac.resource_ID = jtgrp.group_id '||
			    ' AND ac.resource_type = ''RS_GROUP'''||
			    ' AND NVL(jtgrp.delete_flag,''N'') = ''N'''||
			    ' AND jtgrp.resource_ID = :COLLECTOR_RESOURCE_ID ';
Line: 1146

    select source_id
    from jtf_rs_resource_extns
    where resource_id = p_resource_id;
Line: 1151

    select lookup_code, meaning from fnd_lookup_values
    where lookup_type = 'IEX_UWQ_NODE_STATUS' and LANGUAGE = userenv('LANG');
Line: 1155

    SELECT meaning
    FROM fnd_lookup_values
    WHERE lookup_type = in_lookup_type
    AND lookup_code = in_lookup_code
    AND LANGUAGE = userenv('LANG');
Line: 1162

    SELECT work_q_view_for_primary_node, work_q_label_lu_type, work_q_label_lu_code
    FROM ieu_uwq_sel_enumerators
    WHERE sel_enum_id = in_sel_enum_id;
Line: 1167

    SELECT collector_id from AR_COLLECTORS where resource_id = p_resource_id
      and resource_type = 'RS_RESOURCE';
Line: 1198

  CURSOR C_ORG_ID IS SELECT ORGANIZATION_ID FROM HR_OPERATING_UNITS
  WHERE MO_GLOBAL.CHECK_ACCESS(ORGANIZATION_ID) = 'Y';
Line: 1202

    SELECT PREFERENCE_VALUE
	FROM IEX_APP_PREFERENCES_B
    WHERE PREFERENCE_NAME = 'COLLECTIONS STRATEGY LEVEL'
    and org_id is null
    and enabled_flag='Y'; --bug#6717849 schekuri 31-Jul-2009
Line: 1214

  is select lookup_code
  from iex_lookups_v
  where lookup_type='IEX_RUNNING_LEVEL'
  and lookup_code= 'ACCOUNT'
  and  iex_utilities.validate_running_level(LOOKUP_CODE)='Y';
Line: 1247

  select count(1)
  into l_level_count
  from iex_lookups_v
  where lookup_type='IEX_RUNNING_LEVEL'
  and  iex_utilities.validate_running_level(LOOKUP_CODE)='Y';
Line: 1267

          ' UNION ALL  SELECT hp.party_id ' ||
          ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp, ' ||
	  ' JTF_RS_GROUPS_DENORM jrg ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ac.resource_ID = jtgrp.group_id ' ||
	  ' AND jtgrp.group_id = jrg.group_id ' ||
          ' AND ac.resource_type = ''RS_GROUP'' ' ||
          ' AND NVL(jtgrp.delete_flag,''N'') = ''N'' ' ||
          ' AND jtgrp.PERSON_ID = :PERSON_ID ) ';
Line: 1278

          ' UNION ALL  SELECT hp.party_id ' ||
          ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp, ' ||
	  ' JTF_RS_GROUPS_DENORM jrg ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ac.resource_ID = jtgrp.group_id ' ||
	  ' AND jtgrp.group_id = jrg.group_id ' ||
          ' AND hp.cust_account_id = -1 ' ||
          ' AND ac.resource_type = ''RS_GROUP'' ' ||
          ' AND NVL(jtgrp.delete_flag,''N'') = ''N'' ' ||
          ' AND jtgrp.PERSON_ID = :PERSON_ID ) ';
Line: 1302

      SELECT count(*) INTO l_check FROM iex_assignments
       where alt_resource_id =  P_RESOURCE_ID
         AND TRUNC(START_DATE) <= TRUNC(SYSDATE)
         AND TRUNC(NVL(END_DATE,SYSDATE)) >= TRUNC(SYSDATE)
         --Bug4646657 . Check for Deleted flag .Fixed by lkkumar. Start.
         AND NVL(DELETED_FLAG,'N') = 'N';
Line: 1314

      select count(1) into l_group_check
        from ar_collectors where status='A' and
        nvl(inactive_date,sysdate)>=sysdate and resource_type='RS_GROUP';
Line: 1326

          'party_id in (select hp.party_id '||
          ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||
          ' iex_assignments iea ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND hp.cust_account_id = -1 ' ||
          ' AND ac.resource_id = iea.resource_id ' ||
          ' AND iea.alt_employee_id = :PERSON_ID  '||
          ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) ' ||
          ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >=  TRUNC(SYSDATE) ' ||
  	  ' AND NVL(IEA.DELETED_FLAG,''N'') = ''N'' ' ||
          ' UNION ALL  select hp.party_id '||
          ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND  ac.employee_id = :PERSON_ID ' ||
          ' AND hp.cust_account_id = -1  ' ||
          ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
          ' UNION ALL  SELECT hp.party_id ' ||
          ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ac.resource_ID = jtgrp.group_id ' ||
          ' AND hp.cust_account_id = -1   ' ||
          ' AND ac.resource_type = ''RS_GROUP'' ' ||
          ' AND NVL(jtgrp.delete_flag,''N'') = ''N'' ' ||
          ' AND jtgrp.PERSON_ID = :PERSON_ID  ';
Line: 1355

          'party_id in (select hp.party_id '||
          ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND  ac.employee_id = :PERSON_ID ' ||
          ' AND hp.cust_account_id = -1  ' ||
          ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
          ' UNION ALL  SELECT hp.party_id ' ||
          ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ac.resource_ID = jtgrp.group_id ' ||
          ' AND hp.cust_account_id = -1   ' ||
          ' AND ac.resource_type = ''RS_GROUP'' ' ||
          ' AND NVL(jtgrp.delete_flag,''N'') = ''N'' ' ||
          ' AND jtgrp.PERSON_ID = :PERSON_ID  ';
Line: 1377

          'party_id in (select hp.party_id '||
          ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||
          ' iex_assignments iea ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ' || l_view_name ||
          '.cust_account_id = hp.cust_account_id ' ||
          ' AND ac.resource_id = iea.resource_id ' ||
          ' AND hp.site_use_id is NULL ' ||
          ' AND  iea.alt_employee_id = :PERSON_ID ' ||
          ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) ' ||
          ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >=  TRUNC(SYSDATE) ' ||
  	  ' AND NVL(IEA.DELETED_FLAG,''N'') = ''N'' ' ||
          ' UNION ALL select hp.party_id '||
          ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ' || l_view_name ||
          '.cust_account_id = hp.cust_account_id ' ||
          ' AND hp.site_use_id is NULL ' ||
          ' AND  ac.employee_id = :PERSON_ID  ' ||
          ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
          ' UNION ALL  SELECT hp.party_id ' ||
          ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ac.resource_ID = jtgrp.group_id ' ||
          ' AND ' || l_view_name ||
          '.cust_account_id = hp.cust_account_id ' ||
          ' AND hp.site_use_id is NULL ' ||
          ' AND ac.resource_type = ''RS_GROUP'' ' ||
          ' AND NVL(jtgrp.delete_flag,''N'') = ''N'' ' ||
          ' AND jtgrp.PERSON_ID = :PERSON_ID  ';
Line: 1413

          'party_id in (select hp.party_id '||
          ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ' || l_view_name ||
          '.cust_account_id = hp.cust_account_id ' ||
          ' AND hp.site_use_id is NULL ' ||
          ' AND  ac.employee_id = :PERSON_ID  ' ||
          ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
          ' UNION ALL  SELECT hp.party_id ' ||
          ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ac.resource_ID = jtgrp.group_id ' ||
          ' AND ' || l_view_name ||
          '.cust_account_id = hp.cust_account_id ' ||
          ' AND hp.site_use_id is NULL ' ||
          ' AND ac.resource_type = ''RS_GROUP'' ' ||
          ' AND NVL(jtgrp.delete_flag,''N'') = ''N'' ' ||
          ' AND jtgrp.PERSON_ID = :PERSON_ID  ';
Line: 1440

        l_security_where := ' :person_id = :person_id and collector_resource_id in (select resource_id from ar_collectors where resource_type = ''RS_RESOURCE'' and resource_id = :COLLECTOR_RESOURCE_ID ';
Line: 1447

	l_security_where := l_security_where || ' union all SELECT ac.resource_id FROM iex_assignments iea,ar_collectors ac where '||
    	                    ' iea.alt_employee_id = :PERSON_ID '||
			    ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) '||
			    ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) '||
                            ' AND NVL(iea.DELETED_FLAG,''N'') = ''N'' '||
                            ' and ac.resource_id=iea.resource_id '||
                            ' and ac.resource_type in (''RS_RESOURCE'',''RS_GROUP'') ';
Line: 1457

        l_security_where := l_security_where || ' union all SELECT ac.resource_ID '||
			    ' FROM ar_collectors ac , jtf_rs_group_members jtgrp '||
			    ' WHERE ac.resource_ID = jtgrp.group_id '||
			    ' AND ac.resource_type = ''RS_GROUP'''||
			    ' AND NVL(jtgrp.delete_flag,''N'') = ''N'''||
			    ' AND jtgrp.resource_ID = :COLLECTOR_RESOURCE_ID ';
Line: 1563

          'party_id in (select hp.party_id '||
          ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||
          ' iex_assignments iea ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND hp.cust_account_id = -1 ' ||
          ' AND ac.resource_id = iea.resource_id ' ||
          ' AND iea.alt_employee_id = :PERSON_ID  ' ||
          ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) ' ||
          ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >=  TRUNC(SYSDATE) ' ||
  	  ' AND NVL(IEA.DELETED_FLAG,''N'') = ''N'' ' ||
          ' UNION ALL select hp.party_id '||
          ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND hp.cust_account_id = -1 ' ||
          ' AND  ac.employee_id = :PERSON_ID ' ||
          ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
          ' UNION ALL  SELECT hp.party_id ' ||
          ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ac.resource_ID = jtgrp.group_id ' ||
          ' AND hp.cust_account_id = -1   ' ||
          ' AND ac.resource_type = ''RS_GROUP'' ' ||
          ' AND NVL(jtgrp.delete_flag,''N'') = ''N'' ' ||
          ' AND jtgrp.PERSON_ID = :PERSON_ID  ';
Line: 1593

          'party_id in (select hp.party_id '||
          ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND hp.cust_account_id = -1 ' ||
          ' AND  ac.employee_id = :PERSON_ID ' ||
          ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
          ' UNION ALL  SELECT hp.party_id ' ||
          ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ac.resource_ID = jtgrp.group_id ' ||
          ' AND hp.cust_account_id = -1   ' ||
          ' AND ac.resource_type = ''RS_GROUP'' ' ||
          ' AND NVL(jtgrp.delete_flag,''N'') = ''N'' ' ||
          ' AND jtgrp.PERSON_ID = :PERSON_ID  ';
Line: 1615

          'party_id in (select hp.party_id '||
          ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||
          ' iex_assignments iea ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ' || l_view_name ||
          '.cust_account_id = hp.cust_account_id ' ||
          ' AND ac.resource_id = iea.resource_id ' ||
          ' AND hp.site_use_id is NULL ' ||
          ' AND  iea.alt_employee_id = :PERSON_ID ' ||
          ' AND TRUNC(iea.START_DATE) <=  TRUNC(SYSDATE)  ' ||
          ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >=  TRUNC(SYSDATE) ' ||
  	  ' AND NVL(IEA.DELETED_FLAG,''N'') = ''N'' ' ||
          ' UNION ALL select hp.party_id '||
          ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ' || l_view_name ||
          '.cust_account_id = hp.cust_account_id ' ||
          ' AND hp.site_use_id is NULL ' ||
          ' AND  ac.employee_id = :PERSON_ID  '||
          ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
          ' UNION ALL  SELECT hp.party_id ' ||
          ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ac.resource_ID = jtgrp.group_id ' ||
          ' AND ' || l_view_name ||
          '.cust_account_id = hp.cust_account_id ' ||
          ' AND hp.site_use_id is NULL ' ||
          ' AND ac.resource_type = ''RS_GROUP'' ' ||
          ' AND NVL(jtgrp.delete_flag,''N'') = ''N'' ' ||
          ' AND jtgrp.PERSON_ID = :PERSON_ID  ';
Line: 1651

          'party_id in (select hp.party_id '||
          ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ' || l_view_name ||
          '.cust_account_id = hp.cust_account_id ' ||
          ' AND hp.site_use_id is NULL ' ||
          ' AND  ac.employee_id = :PERSON_ID  '||
          ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
          ' UNION ALL  SELECT hp.party_id ' ||
          ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ac.resource_ID = jtgrp.group_id ' ||
          ' AND ' || l_view_name ||
          '.cust_account_id = hp.cust_account_id ' ||
          ' AND hp.site_use_id is NULL ' ||
          ' AND ac.resource_type = ''RS_GROUP'' ' ||
          ' AND NVL(jtgrp.delete_flag,''N'') = ''N'' ' ||
          ' AND jtgrp.PERSON_ID = :PERSON_ID  ';
Line: 1678

        l_security_where := ' :person_id = :person_id and collector_resource_id in (select resource_id from ar_collectors where resource_type = ''RS_RESOURCE'' and resource_id = :COLLECTOR_RESOURCE_ID ';
Line: 1685

	l_security_where := l_security_where || ' union all SELECT ac.resource_id FROM iex_assignments iea,ar_collectors ac where '||
    	                    ' iea.alt_employee_id = :PERSON_ID '||
			    ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) '||
			    ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) '||
                            ' AND NVL(iea.DELETED_FLAG,''N'') = ''N'' '||
                            ' and ac.resource_id=iea.resource_id '||
                            ' and ac.resource_type in (''RS_RESOURCE'',''RS_GROUP'') ';
Line: 1695

        l_security_where := l_security_where || ' union all SELECT ac.resource_ID '||
			    ' FROM ar_collectors ac , jtf_rs_group_members jtgrp '||
			    ' WHERE ac.resource_ID = jtgrp.group_id '||
			    ' AND ac.resource_type = ''RS_GROUP'''||
			    ' AND NVL(jtgrp.delete_flag,''N'') = ''N'''||
			    ' AND jtgrp.resource_ID = :COLLECTOR_RESOURCE_ID ';
Line: 1824

    select source_id
    from jtf_rs_resource_extns
    where resource_id = p_resource_id;
Line: 1829

    select lookup_code, meaning from fnd_lookup_values
    where lookup_type = 'IEX_UWQ_NODE_STATUS' and LANGUAGE = userenv('LANG');
Line: 1833

    SELECT meaning
    FROM fnd_lookup_values
    WHERE lookup_type = in_lookup_type
    AND lookup_code = in_lookup_code
    AND LANGUAGE = userenv('LANG');
Line: 1840

    SELECT work_q_view_for_primary_node, work_q_label_lu_type, work_q_label_lu_code
    FROM ieu_uwq_sel_enumerators
    WHERE sel_enum_id = in_sel_enum_id;
Line: 1845

    SELECT collector_id from AR_COLLECTORS where resource_id = p_resource_id
      and resource_type = 'RS_RESOURCE';
Line: 1877

  CURSOR C_ORG_ID IS SELECT ORGANIZATION_ID FROM HR_OPERATING_UNITS
    WHERE MO_GLOBAL.CHECK_ACCESS(ORGANIZATION_ID) = 'Y';
Line: 1881

    SELECT PREFERENCE_VALUE
	FROM IEX_APP_PREFERENCES_B
    WHERE PREFERENCE_NAME = 'COLLECTIONS STRATEGY LEVEL'
    and org_id is null
    and enabled_flag='Y';
Line: 1893

  is select lookup_code
  from iex_lookups_v
  where lookup_type='IEX_RUNNING_LEVEL'
  and lookup_code= 'BILL_TO'
  and  iex_utilities.validate_running_level(LOOKUP_CODE)='Y';
Line: 1928

  select count(1)
  into l_level_count
  from iex_lookups_v
  where lookup_type='IEX_RUNNING_LEVEL'
  and  iex_utilities.validate_running_level(LOOKUP_CODE)='Y';
Line: 1952

          ' UNION ALL  SELECT hp.party_id ' ||
          ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp, ' ||
	  ' JTF_RS_GROUPS_DENORM jrg ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ac.resource_ID = jtgrp.group_id ' ||
	  ' AND jtgrp.group_id = jrg.group_id ' ||
          ' AND ac.resource_type = ''RS_GROUP'' ' ||
          ' AND NVL(jtgrp.delete_flag,''N'') = ''N'' ' ||
          ' AND jtgrp.PERSON_ID = :PERSON_ID ) ';
Line: 1963

          ' UNION ALL  SELECT hp.party_id ' ||
          ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp, ' ||
	  ' JTF_RS_GROUPS_DENORM jrg ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ac.resource_ID = jtgrp.group_id ' ||
	  ' AND jtgrp.group_id = jrg.group_id ' ||
          ' AND hp.cust_account_id = -1 ' ||
          ' AND ac.resource_type = ''RS_GROUP'' ' ||
          ' AND NVL(jtgrp.delete_flag,''N'') = ''N'' ' ||
          ' AND jtgrp.PERSON_ID = :PERSON_ID ) ';
Line: 1983

    SELECT count(*) INTO l_check FROM iex_assignments
      where alt_resource_id =  p_RESOURCE_ID
        AND TRUNC(START_DATE) <= TRUNC(SYSDATE)
        AND TRUNC(NVL(END_DATE,SYSDATE)) >= TRUNC(SYSDATE)
        --Bug4646657 . Check for Deleted flag .Fixed by lkkumar. Start.
        AND NVL(DELETED_FLAG,'N') = 'N';
Line: 1995

      select count(1) into l_group_check
        from ar_collectors where status='A' and
             nvl(inactive_date,sysdate)>=sysdate and resource_type='RS_GROUP';
Line: 2008

          'party_id in (select hp.party_id '||
          ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||
          ' iex_assignments iea ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND hp.cust_account_id = -1 ' ||
          ' AND ac.resource_id = iea.resource_id ' ||
          ' AND  iea.alt_employee_id = :PERSON_ID  ' ||
          ' AND TRUNC(iea.START_DATE) <=  TRUNC(SYSDATE)  ' ||
          ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >=  TRUNC(SYSDATE) ' ||
	  ' AND NVL(IEA.DELETED_FLAG,''N'') = ''N'' '||
          ' UNION ALL select hp.party_id '||
          ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND hp.cust_account_id = -1 ' ||
          ' AND  ac.employee_id = :PERSON_ID ' ||
          ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
          ' UNION ALL  SELECT hp.party_id ' ||
          ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ac.resource_ID = jtgrp.group_id ' ||
          ' AND hp.cust_account_id = -1   ' ||
          ' AND ac.resource_type = ''RS_GROUP'' ' ||
          ' AND NVL(jtgrp.delete_flag,''N'') = ''N'' ' ||
          ' AND jtgrp.PERSON_ID = :PERSON_ID  ';
Line: 2037

          'party_id in (select hp.party_id '||
          ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND hp.cust_account_id = -1 ' ||
          ' AND  ac.employee_id = :PERSON_ID ' ||
          ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
          ' UNION ALL  SELECT hp.party_id ' ||
          ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ac.resource_ID = jtgrp.group_id ' ||
          ' AND hp.cust_account_id = -1   ' ||
          ' AND ac.resource_type = ''RS_GROUP'' ' ||
          ' AND NVL(jtgrp.delete_flag,''N'') = ''N'' ' ||
          ' AND jtgrp.PERSON_ID = :PERSON_ID  ';
Line: 2058

          'party_id in (select hp.party_id '||
          ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||
          ' iex_assignments iea ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ' || l_view_name ||
          '.cust_account_id = hp.cust_account_id ' ||
          ' AND ac.resource_id = iea.resource_id ' ||
          ' AND hp.site_use_id is NULL '||
          ' AND  iea.alt_employee_id = :PERSON_ID  ' ||
          ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE)  ' ||
          ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >=  TRUNC(SYSDATE) ' ||
  	  ' AND NVL(IEA.DELETED_FLAG,''N'') = ''N'' '||
          ' UNION ALL select hp.party_id '||
          ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ' || l_view_name ||
          '.cust_account_id = hp.cust_account_id ' ||
          ' AND hp.site_use_id is NULL '||
          ' AND  ac.employee_id = :PERSON_ID  ' ||
          ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
          ' UNION ALL  SELECT hp.party_id ' ||
          ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ac.resource_ID = jtgrp.group_id ' ||
          ' AND ac.resource_type = ''RS_GROUP'' ' ||
          ' AND NVL(jtgrp.delete_flag,''N'') = ''N'' ' ||
          ' AND ' || l_view_name ||
          '.cust_account_id = hp.cust_account_id ' ||
          ' AND hp.site_use_id is NULL '||
          ' AND jtgrp.PERSON_ID = :PERSON_ID  ';
Line: 2093

          'party_id in (select hp.party_id '||
          ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ' || l_view_name ||
          '.cust_account_id = hp.cust_account_id ' ||
          ' AND hp.site_use_id is NULL '||
          ' AND  ac.employee_id = :PERSON_ID  ' ||
          ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
          ' UNION ALL  SELECT hp.party_id ' ||
          ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ac.resource_ID = jtgrp.group_id ' ||
          ' AND ac.resource_type = ''RS_GROUP'' ' ||
          ' AND NVL(jtgrp.delete_flag,''N'') = ''N'' ' ||
          ' AND ' || l_view_name ||
          '.cust_account_id = hp.cust_account_id ' ||
          ' AND hp.site_use_id is NULL '||
          ' AND jtgrp.PERSON_ID = :PERSON_ID  ';
Line: 2118

          'party_id in (select hp.party_id '||
          ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||
          ' iex_assignments iea ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ' || l_view_name ||
          '.site_use_id = hp.site_use_id ' ||
          ' AND ac.resource_id = iea.resource_id ' ||
          ' AND  iea.alt_employee_id = :PERSON_ID  ' ||
          ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE)  ' ||
          ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >=  TRUNC(SYSDATE) ' ||
  	  ' AND NVL(IEA.DELETED_FLAG,''N'') = ''N'' ' ||
          ' UNION ALL select hp.party_id '||
          ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ' || l_view_name ||
          '.site_use_id = hp.site_use_id ' ||
          ' AND  ac.employee_id = :PERSON_ID  ' ||
          ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
          ' UNION ALL  SELECT hp.party_id ' ||
          ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ' || l_view_name ||
          '.site_use_id = hp.site_use_id ' ||
          ' AND ac.resource_ID = jtgrp.group_id ' ||
          ' AND ac.resource_type = ''RS_GROUP'' ' ||
          ' AND NVL(jtgrp.delete_flag,''N'') = ''N'' ' ||
          ' AND jtgrp.PERSON_ID = :PERSON_ID  ';
Line: 2150

          'party_id in (select hp.party_id '||
          ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ' || l_view_name ||
          '.site_use_id = hp.site_use_id ' ||
          ' AND  ac.employee_id = :PERSON_ID  ' ||
          ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
          ' UNION ALL  SELECT hp.party_id ' ||
          ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ' || l_view_name ||
          '.site_use_id = hp.site_use_id ' ||
          ' AND ac.resource_ID = jtgrp.group_id ' ||
          ' AND ac.resource_type = ''RS_GROUP'' ' ||
          ' AND NVL(jtgrp.delete_flag,''N'') = ''N'' ' ||
          ' AND jtgrp.PERSON_ID = :PERSON_ID  ';
Line: 2173

	--l_security_where := ' :person_id = :person_id and collector_resource_id in (select :COLLECTOR_RESOURCE_ID from dual ';
Line: 2174

	l_security_where := ' :person_id = :person_id and collector_resource_id in (select resource_id from ar_collectors where resource_type = ''RS_RESOURCE'' and resource_id = :COLLECTOR_RESOURCE_ID ';
Line: 2180

	l_security_where := l_security_where || ' union all SELECT ac.resource_id FROM iex_assignments iea,ar_collectors ac where '||
    	                    ' iea.alt_employee_id = :PERSON_ID '||
			    ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) '||
			    ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) '||
                            ' AND NVL(iea.DELETED_FLAG,''N'') = ''N'' '||
                            ' and ac.resource_id=iea.resource_id '||
                            ' and ac.resource_type in (''RS_RESOURCE'',''RS_GROUP'') ';
Line: 2190

        l_security_where := l_security_where || ' union all SELECT ac.resource_ID '||
			    ' FROM ar_collectors ac , jtf_rs_group_members jtgrp '||
			    ' WHERE ac.resource_ID = jtgrp.group_id '||
			    ' AND ac.resource_type = ''RS_GROUP'''||
			    ' AND NVL(jtgrp.delete_flag,''N'') = ''N'''||
			    ' AND jtgrp.resource_ID = :COLLECTOR_RESOURCE_ID ';
Line: 2301

          'party_id in (select hp.party_id '||
          ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||
          ' iex_assignments iea ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND hp.cust_account_id = -1 ' ||
          ' AND ac.resource_id = iea.resource_id ' ||
          ' AND  iea.alt_employee_id = :PERSON_ID  ' ||
          ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) ' ||
          ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >=  TRUNC(SYSDATE) ' ||
  	  ' AND NVL(IEA.DELETED_FLAG,''N'') = ''N'' ' ||
          ' UNION ALL select hp.party_id '||
          ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND hp.cust_account_id = -1 ' ||
          ' AND  ac.employee_id = :PERSON_ID ' ||
          ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
          ' UNION ALL  SELECT hp.party_id ' ||
          ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ac.resource_ID = jtgrp.group_id ' ||
          ' AND hp.cust_account_id = -1   ' ||
          ' AND ac.resource_type = ''RS_GROUP'' ' ||
          ' AND NVL(jtgrp.delete_flag,''N'') = ''N'' ' ||
          ' AND jtgrp.PERSON_ID = :PERSON_ID  ';
Line: 2330

          'party_id in (select hp.party_id '||
          ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND hp.cust_account_id = -1 ' ||
          ' AND  ac.employee_id = :PERSON_ID ' ||
          ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
          ' UNION ALL  SELECT hp.party_id ' ||
          ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ac.resource_ID = jtgrp.group_id ' ||
          ' AND hp.cust_account_id = -1   ' ||
          ' AND ac.resource_type = ''RS_GROUP'' ' ||
          ' AND NVL(jtgrp.delete_flag,''N'') = ''N'' ' ||
          ' AND jtgrp.PERSON_ID = :PERSON_ID  ';
Line: 2351

          'party_id in (select hp.party_id '||
          ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||
          ' iex_assignments iea ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ' || l_view_name ||
          '.cust_account_id = hp.cust_account_id ' ||
          ' AND ac.resource_id = iea.resource_id ' ||
          ' AND hp.site_use_id is NULL '||
          ' AND  iea.alt_employee_id = :PERSON_ID  ' ||
          ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) ' ||
          ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >=  TRUNC(SYSDATE) ' ||
  	  ' AND NVL(IEA.DELETED_FLAG,''N'') = ''N'' ' ||
          ' UNION ALL select hp.party_id '||
          ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ' || l_view_name ||
          '.cust_account_id = hp.cust_account_id ' ||
          ' AND  ac.employee_id = :PERSON_ID  ' ||
          ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
          ' UNION ALL  SELECT hp.party_id ' ||
          ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ac.resource_ID = jtgrp.group_id ' ||
          ' AND ' || l_view_name ||
          '.cust_account_id = hp.cust_account_id ' ||
          ' AND ac.resource_type = ''RS_GROUP'' ' ||
          ' AND NVL(jtgrp.delete_flag,''N'') = ''N'' ' ||
          ' AND jtgrp.PERSON_ID = :PERSON_ID  ';
Line: 2384

          'party_id in (select hp.party_id '||
          ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ' || l_view_name ||
          '.cust_account_id = hp.cust_account_id ' ||
          ' AND  ac.employee_id = :PERSON_ID  ' ||
          ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
          ' UNION ALL  SELECT hp.party_id ' ||
          ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ac.resource_ID = jtgrp.group_id ' ||
          ' AND ' || l_view_name ||
          '.cust_account_id = hp.cust_account_id ' ||
          ' AND ac.resource_type = ''RS_GROUP'' ' ||
          ' AND NVL(jtgrp.delete_flag,''N'') = ''N'' ' ||
          ' AND jtgrp.PERSON_ID = :PERSON_ID  ';
Line: 2407

          'party_id in (select hp.party_id '||
          ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||
          ' iex_assignments iea ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ' || l_view_name ||
          '.site_use_id = hp.site_use_id ' ||
          ' AND ac.resource_id = iea.resource_id ' ||
          ' AND  iea.alt_employee_id = :PERSON_ID  ' ||
          ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) ' ||
          ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >=  TRUNC(SYSDATE) ' ||
  	  ' AND NVL(IEA.DELETED_FLAG,''N'') = ''N'' ' ||
          ' UNION ALL select hp.party_id '||
          ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ' || l_view_name ||
          '.site_use_id = hp.site_use_id ' ||
          ' AND  ac.employee_id = :PERSON_ID  ' ||
          ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
          ' UNION ALL  SELECT hp.party_id ' ||
          ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ac.resource_ID = jtgrp.group_id ' ||
          ' AND ' || l_view_name ||
          '.site_use_id = hp.site_use_id ' ||
          ' AND ac.resource_type = ''RS_GROUP'' ' ||
          ' AND NVL(jtgrp.delete_flag,''N'') = ''N'' ' ||
          ' AND jtgrp.PERSON_ID = :PERSON_ID  ';
Line: 2440

          'party_id in (select hp.party_id '||
          ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ' || l_view_name ||
          '.site_use_id = hp.site_use_id ' ||
          ' AND  ac.employee_id = :PERSON_ID  ' ||
          ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
          ' UNION ALL  SELECT hp.party_id ' ||
          ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
          ' WHERE hp.collector_id = ac.collector_id ' ||
          ' AND ac.resource_ID = jtgrp.group_id ' ||
          ' AND ' || l_view_name ||
          '.site_use_id = hp.site_use_id ' ||
          ' AND ac.resource_type = ''RS_GROUP'' ' ||
          ' AND NVL(jtgrp.delete_flag,''N'') = ''N'' ' ||
          ' AND jtgrp.PERSON_ID = :PERSON_ID  ';
Line: 2465

        l_security_where := ' :person_id = :person_id and collector_resource_id in (select resource_id from ar_collectors where resource_type = ''RS_RESOURCE'' and resource_id = :COLLECTOR_RESOURCE_ID ';
Line: 2472

	l_security_where := l_security_where || ' union all SELECT ac.resource_id FROM iex_assignments iea,ar_collectors ac where '||
    	                    ' iea.alt_employee_id = :PERSON_ID '||
			    ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) '||
			    ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) '||
                            ' AND NVL(iea.DELETED_FLAG,''N'') = ''N'' '||
                            ' and ac.resource_id=iea.resource_id '||
                            ' and ac.resource_type in (''RS_RESOURCE'',''RS_GROUP'') ';  --Bug#5691908 replaced RS_EMPLOYEE with RS_RESOURCE by schekuri 02-Feb-2007
Line: 2482

        l_security_where := l_security_where || ' union all SELECT ac.resource_ID '||
			    ' FROM ar_collectors ac , jtf_rs_group_members jtgrp '||
			    ' WHERE ac.resource_ID = jtgrp.group_id '||
			    ' AND ac.resource_type = ''RS_GROUP'''||
			    ' AND NVL(jtgrp.delete_flag,''N'') = ''N'''||
			    ' AND jtgrp.resource_ID = :COLLECTOR_RESOURCE_ID ';