DBA Data[Home] [Help]

APPS.IEX_UTILITIES dependencies on HZ_CUSTOMER_PROFILES

Line 513: FROM hz_customer_profiles hp,ar_collectors ac

509: x_resource_tab OUT NOCOPY resource_tab_type) IS
510: --Territory Assignment Changes
511: CURSOR c_get_person IS
512: SELECT DISTINCT ac.employee_id
513: FROM hz_customer_profiles hp,ar_collectors ac
514: WHERE hp.collector_id = ac.collector_id
515: AND ac.employee_id is not null
516: AND hp.party_id = p_party_id;
517:

Line 539: FROM hz_customer_profiles hp,ar_collectors ac

535: IF PG_DEBUG < 10 THEN
536: iex_debug_pub.logmessage ('**** BEGIN get_access_resources ************');
537: iex_debug_pub.logmessage ('get_person cursor = ' ||
538: 'SELECT DISTINCT hp.employee_id
539: FROM hz_customer_profiles hp,ar_collectors ac
540: WHERE m.person_id = ac.employee_id
541: AND hp.collector_id = ac.collector_id
542: and ac.employee_id is not null
543: AND hp.party_id = p_party_id ' ||

Line 646: FROM hz_customer_profiles hp, jtf_rs_resource_extns rs, iex_strategy_work_items wi,

642: --Territory Assignment Changes
643: CURSOR c_get_person IS
644: (
645: SELECT ac.employee_id, ac.resource_id, count(work_item_id)
646: FROM hz_customer_profiles hp, jtf_rs_resource_extns rs, iex_strategy_work_items wi,
647: ar_collectors ac
648: WHERE hp.party_id = p_party_id
649: and hp.cust_account_id = -1
650: and rs.resource_id = ac.resource_id

Line 659: FROM hz_customer_profiles hp, jtf_rs_resource_extns rs,ar_collectors ac

655: and ac.employee_id is not null
656: group by ac.resource_id, ac.employee_id
657: union all
658: SELECT ac.employee_id, ac.resource_id, 0
659: FROM hz_customer_profiles hp, jtf_rs_resource_extns rs,ar_collectors ac
660: WHERE hp.party_id = p_party_id
661: and hp.cust_account_id = -1
662: and rs.resource_id = ac.resource_id
663: and hp.collector_id = ac.collector_id

Line 673: /* We use hz_customer_profiles and

669: group by ac.resource_id, ac.employee_id
670: ) order by 3;
671: */
672:
673: /* We use hz_customer_profiles and
674: Load balancing when the assigned with Group Resource
675: */
676: /*cursor c_get_person IS
677: SELECT ac.employee_id, ac.resource_id, 0

Line 678: FROM hz_customer_profiles hp, ar_collectors ac

674: Load balancing when the assigned with Group Resource
675: */
676: /*cursor c_get_person IS
677: SELECT ac.employee_id, ac.resource_id, 0
678: FROM hz_customer_profiles hp, ar_collectors ac
679: WHERE hp.party_id = p_party_id
680: and hp.cust_account_id = -1
681: and hp.collector_id = ac.collector_id
682: and ac.resource_type = 'RS_RESOURCE'

Line 689: FROM hz_customer_profiles hp, iex_strategy_work_items wi,

685: and nvl(ac.status,'A') = 'A'
686: -- Bug4483896. Fixed by lkkumar. Check for inactive_date. End.
687: union all
688: ( SELECT jtg.person_id, jtg.resource_id, count(work_item_id)
689: FROM hz_customer_profiles hp, iex_strategy_work_items wi,
690: ar_collectors ac, jtf_rs_group_members jtg
691: WHERE hp.party_id = P_PARTY_ID
692: and hp.cust_account_id = -1
693: and hp.collector_id = ac.collector_id

Line 704: FROM hz_customer_profiles hp, ar_collectors ac,

700: and nvl(ac.status,'A') = 'A'
701: group by jtg.resource_id, jtg.person_id
702: UNION ALL
703: SELECT jtg.person_id, jtg.resource_id, 0
704: FROM hz_customer_profiles hp, ar_collectors ac,
705: jtf_rs_group_members jtg
706: WHERE hp.party_id = p_party_id
707: and hp.cust_account_id = -1
708: and hp.collector_id = ac.collector_id

Line 742: ' FROM hz_customer_profiles hp, jtf_rs_resource_extns rs, iex_strategy_work_items wi, '||

738: get_access_resources ************');
739: l_init_msg_list := p_init_msg_list;
740: iex_debug_pub.logmessage ('get_person cursor = ' ||
741: 'SELECT ac.employee_id, ac.resource_id, count(work_item_id) ' ||
742: ' FROM hz_customer_profiles hp, jtf_rs_resource_extns rs, iex_strategy_work_items wi, '||
743: ' ar_collectors ac ' ||
744: ' WHERE hp.party_id = p_party_id ' ||
745: ' and rs.resource_id = ac.resource_id' ||
746: ' and hp.collector_id = ac.collector_id' ||

Line 830: FROM hz_customer_profiles hp, jtf_rs_resource_extns rs, iex_strategy_work_items wi,

826: --Territory Assignment Changes
827: /* CURSOR c_get_person IS
828: (
829: SELECT ac.employee_id, ac.resource_id, count(work_item_id)
830: FROM hz_customer_profiles hp, jtf_rs_resource_extns rs, iex_strategy_work_items wi,
831: ar_collectors ac
832: WHERE hp.cust_account_id = p_account_id
833: and hp.site_use_id is null
834: and rs.resource_id = ac.resource_id

Line 843: FROM hz_customer_profiles hp, jtf_rs_resource_extns rs,ar_collectors ac

839: and ac.employee_id is not null
840: group by ac.resource_id, ac.employee_id
841: union all
842: SELECT ac.employee_id, ac.resource_id, 0
843: FROM hz_customer_profiles hp, jtf_rs_resource_extns rs,ar_collectors ac
844: WHERE hp.cust_account_id = p_account_id
845: and hp.site_use_id is null
846: and rs.resource_id = ac.resource_id
847: and hp.collector_id = ac.collector_id

Line 857: /* We use hz_customer_profiles and

853: group by ac.resource_id, ac.employee_id
854: ) order by 3;
855: */
856:
857: /* We use hz_customer_profiles and
858: Load balancing when the assigned with Group Resource
859: */
860: /*CURSOR c_get_person IS
861: SELECT ac.employee_id, ac.resource_id, 0

Line 862: FROM hz_customer_profiles hp, ar_collectors ac

858: Load balancing when the assigned with Group Resource
859: */
860: /*CURSOR c_get_person IS
861: SELECT ac.employee_id, ac.resource_id, 0
862: FROM hz_customer_profiles hp, ar_collectors ac
863: WHERE hp.cust_account_id = p_account_id
864: and hp.site_use_id is null
865: and hp.collector_id = ac.collector_id
866: and ac.resource_type = 'RS_RESOURCE'

Line 869: FROM hz_customer_profiles hp, iex_strategy_work_items wi,

865: and hp.collector_id = ac.collector_id
866: and ac.resource_type = 'RS_RESOURCE'
867: union all
868: ( SELECT jtg.person_id, jtg.resource_id, count(work_item_id)
869: FROM hz_customer_profiles hp, iex_strategy_work_items wi,
870: ar_collectors ac, jtf_rs_group_members jtg
871: WHERE hp.cust_account_id = p_account_id
872: and hp.site_use_id is NULL
873: and hp.collector_id = ac.collector_id

Line 881: FROM hz_customer_profiles hp, ar_collectors ac,

877: and wi.status_code = 'OPEN'
878: group by jtg.resource_id, jtg.person_id
879: UNION ALL
880: SELECT jtg.person_id, jtg.resource_id, 0
881: FROM hz_customer_profiles hp, ar_collectors ac,
882: jtf_rs_group_members jtg
883: WHERE hp.cust_account_id = p_account_id
884: and hp.site_use_id is null
885: and hp.collector_id = ac.collector_id

Line 915: ' FROM hz_customer_profiles hp, jtf_rs_resource_extns rs, iex_strategy_work_items wi, '||

911: get_access_resources ************');
912: l_init_msg_list := p_init_msg_list;
913: iex_debug_pub.logmessage ('get_person cursor = ' ||
914: 'SELECT ac.employee_id, ac.resource_id, count(work_item_id) ' ||
915: ' FROM hz_customer_profiles hp, jtf_rs_resource_extns rs, iex_strategy_work_items wi, '||
916: ' ar_collectors ac ' ||
917: ' WHERE hp.party_id = p_party_id ' ||
918: ' and rs.resource_id = ac.resource_id' ||
919: ' and hp.collector_id = ac.collector_id' ||

Line 1002: FROM hz_customer_profiles hp, jtf_rs_resource_extns rs, iex_cases_vl wi,ar_collectors ac

998: x_resource_tab OUT NOCOPY resource_tab_type) IS
999: --Territory Assignment Changes
1000: CURSOR c_get_person IS
1001: SELECT ac.employee_id, ac.resource_id, count(cas_id)
1002: FROM hz_customer_profiles hp, jtf_rs_resource_extns rs, iex_cases_vl wi,ar_collectors ac
1003: WHERE hp.party_id = p_party_id
1004: and rs.resource_id = ac.resource_id
1005: and hp.collector_id = ac.collector_id
1006: and ac.resource_id = wi.owner_resource_id(+)

Line 1030: FROM hz_customer_profiles hp, jtf_rs_resource_extns rs, iex_cases_vl wi,ar_collectors ac

1026:
1027: iex_debug_pub.logmessage ('**** BEGIN get_case_resources ************');
1028: iex_debug_pub.logmessage ('get_person cursor = ' ||
1029: 'SELECT ac.employee_id, ac.resource_id, count(cas_id)
1030: FROM hz_customer_profiles hp, jtf_rs_resource_extns rs, iex_cases_vl wi,ar_collectors ac
1031: WHERE hp.party_id = p_party_id
1032: and rs.resource_id = ac.resource_id
1033: and hp.collector_id = ac.collector_id
1034: and ac.resource_id = wi.owner_resource_id(+)

Line 1170: FROM hz_customer_profiles hp, jtf_rs_resource_extns rs,

1166: --Territory Assignment Changes
1167: /* CURSOR c_get_person IS
1168: (
1169: SELECT ac.employee_id, ac.resource_id
1170: FROM hz_customer_profiles hp, jtf_rs_resource_extns rs,
1171: ar_collectors ac
1172: WHERE hp.site_use_id = p_site_use_id
1173: and rs.resource_id = ac.resource_id
1174: and hp.collector_id = ac.collector_id

Line 1180: FROM hz_customer_profiles hp, jtf_rs_resource_extns rs,ar_collectors ac

1176: and ac.employee_id is not null
1177: group by ac.resource_id, ac.employee_id
1178: union all
1179: SELECT ac.employee_id, ac.resource_id, 0
1180: FROM hz_customer_profiles hp, jtf_rs_resource_extns rs,ar_collectors ac
1181: WHERE hp.site_use_id = p_site_use_id
1182: and rs.resource_id = ac.resource_id
1183: and hp.collector_id = ac.collector_id
1184: and rs.user_id is not null and

Line 1192: /* We use hz_customer_profiles and

1188: and ac.employee_id is not null
1189: group by ac.resource_id, ac.employee_id
1190: ) order by 3;
1191: */
1192: /* We use hz_customer_profiles and
1193: Load balancing when the assigned with Group Resource
1194: */
1195: /*CURSOR c_get_person is
1196: SELECT ac.employee_id, ac.resource_id, 0

Line 1197: FROM hz_customer_profiles hp, ar_collectors ac

1193: Load balancing when the assigned with Group Resource
1194: */
1195: /*CURSOR c_get_person is
1196: SELECT ac.employee_id, ac.resource_id, 0
1197: FROM hz_customer_profiles hp, ar_collectors ac
1198: WHERE hp.site_use_id = p_site_use_id
1199: and hp.collector_id = ac.collector_id
1200: and ac.resource_type = 'RS_RESOURCE'
1201: union all

Line 1203: FROM hz_customer_profiles hp, iex_strategy_work_items wi,

1199: and hp.collector_id = ac.collector_id
1200: and ac.resource_type = 'RS_RESOURCE'
1201: union all
1202: ( SELECT jtg.person_id, jtg.resource_id, count(work_item_id)
1203: FROM hz_customer_profiles hp, iex_strategy_work_items wi,
1204: ar_collectors ac, jtf_rs_group_members jtg
1205: WHERE hp.site_use_id = p_site_use_id
1206: and hp.collector_id = ac.collector_id
1207: and ac.resource_type = 'RS_GROUP'

Line 1214: FROM hz_customer_profiles hp, ar_collectors ac,

1210: and wi.status_code = 'OPEN'
1211: group by jtg.resource_id, jtg.person_id
1212: UNION ALL
1213: SELECT jtg.person_id, jtg.resource_id, 0
1214: FROM hz_customer_profiles hp, ar_collectors ac,
1215: jtf_rs_group_members jtg
1216: WHERE hp.site_use_id = p_site_use_id
1217: and hp.collector_id = ac.collector_id
1218: and ac.resource_type = 'RS_GROUP'

Line 1240: FROM hz_customer_profiles hp, jtf_rs_resource_extns rs, iex_strategy_work_items wi,ar_collectors ac

1236: iex_debug_pub.logmessage ('**** BEGIN on all
1237: get_billto_resources ************');
1238: iex_debug_pub.logmessage ('get_person cursor = ' ||
1239: ' SELECT ac.employee_id, ac.resource_id, count(work_item_id)
1240: FROM hz_customer_profiles hp, jtf_rs_resource_extns rs, iex_strategy_work_items wi,ar_collectors ac
1241: WHERE hp.site_use_id = p_site_use_id
1242: and rs.resource_id = ac.resource_id
1243: and ac.resource_id = wi.resource_id
1244: and hp.collector_id = ac.collector_id

Line 1428: select dunning_letters from hz_customer_profiles

1424: AND acct_sites.cust_acct_site_id = site_uses.cust_acct_site_id
1425: AND ca.cust_account_id = acct_sites.cust_account_id;
1426:
1427: cursor c_billto (p_site_use_id number) is
1428: select dunning_letters from hz_customer_profiles
1429: where site_use_id = p_site_use_id and status = 'A';
1430:
1431: CURSOR get_party_id_cur (p_cust_account_id number) is
1432: SELECT party_id FROM HZ_CUST_ACCOUNTS

Line 1436: select dunning_letters from hz_customer_profiles

1432: SELECT party_id FROM HZ_CUST_ACCOUNTS
1433: WHERE cust_account_id = p_cust_account_id ;
1434:
1435: cursor c_account (p_cust_account_id number) is
1436: select dunning_letters from hz_customer_profiles
1437: where cust_account_id = p_cust_account_id and status = 'A' and site_use_id is null;
1438:
1439: cursor c_party (p_party_id number) is
1440: select dunning_letters from hz_customer_profiles

Line 1440: select dunning_letters from hz_customer_profiles

1436: select dunning_letters from hz_customer_profiles
1437: where cust_account_id = p_cust_account_id and status = 'A' and site_use_id is null;
1438:
1439: cursor c_party (p_party_id number) is
1440: select dunning_letters from hz_customer_profiles
1441: -- begin bug 4587842 ctlee 09/06/2005
1442: where party_id = p_party_id and status = 'A'
1443: and site_use_id is null;
1444: -- where party_id = p_party_id and status = 'A' and site_use_id is null and cust_account_id is null;

Line 1968: FROM hz_customer_profiles hp, ar_collectors ac

1964:
1965: /* ------ SQLs assembled at run time -----------------------------------
1966: CURSOR c_billto_collector is
1967: SELECT ac.employee_id, ac.resource_id, 0
1968: FROM hz_customer_profiles hp, ar_collectors ac
1969: WHERE hp.site_use_id = p_site_use_id
1970: and hp.collector_id = ac.collector_id
1971: and ac.resource_type = 'RS_RESOURCE'
1972: and trunc(nvl(ac.inactive_date,sysdate)) >= trunc(sysdate)

Line 1977: FROM hz_customer_profiles hp, iex_strategy_work_items wi,

1973: and nvl(ac.status,'A') = 'A'
1974: and nvl(hp.status,'A') = 'A'
1975: union all
1976: ( SELECT jtg.person_id, jtg.resource_id, count(work_item_id)
1977: FROM hz_customer_profiles hp, iex_strategy_work_items wi,
1978: ar_collectors ac, jtf_rs_group_members jtg
1979: WHERE hp.site_use_id = p_site_use_id
1980: and hp.collector_id = ac.collector_id
1981: and ac.resource_type = 'RS_GROUP'

Line 1992: FROM hz_customer_profiles hp, ar_collectors ac,

1988: and nvl(jtg.delete_flag,'N') = 'N'
1989: group by jtg.resource_id, jtg.person_id
1990: UNION ALL
1991: SELECT jtg.person_id, jtg.resource_id, 0
1992: FROM hz_customer_profiles hp, ar_collectors ac,
1993: jtf_rs_group_members jtg
1994: WHERE hp.site_use_id = p_site_use_id
1995: and hp.collector_id = ac.collector_id
1996: and ac.resource_type = 'RS_GROUP'

Line 2010: FROM hz_customer_profiles hp, ar_collectors ac

2006: ) order by 3;
2007:
2008: CURSOR c_account_collector IS
2009: SELECT ac.employee_id, ac.resource_id, 0
2010: FROM hz_customer_profiles hp, ar_collectors ac
2011: WHERE hp.cust_account_id = p_account_id
2012: and hp.site_use_id is null
2013: and hp.collector_id = ac.collector_id
2014: and ac.resource_type = 'RS_RESOURCE'

Line 2020: FROM hz_customer_profiles hp, iex_strategy_work_items wi,

2016: and nvl(ac.status,'A') = 'A'
2017: and nvl(hp.status,'A') = 'A'
2018: union all
2019: ( SELECT jtg.person_id, jtg.resource_id, count(work_item_id)
2020: FROM hz_customer_profiles hp, iex_strategy_work_items wi,
2021: ar_collectors ac, jtf_rs_group_members jtg
2022: WHERE hp.cust_account_id = p_account_id
2023: and hp.site_use_id is NULL
2024: and hp.collector_id = ac.collector_id

Line 2036: FROM hz_customer_profiles hp, ar_collectors ac,

2032: and nvl(jtg.delete_flag,'N') = 'N'
2033: group by jtg.resource_id, jtg.person_id
2034: UNION ALL
2035: SELECT jtg.person_id, jtg.resource_id, 0
2036: FROM hz_customer_profiles hp, ar_collectors ac,
2037: jtf_rs_group_members jtg
2038: WHERE hp.cust_account_id = p_account_id
2039: and hp.site_use_id is null
2040: and hp.collector_id = ac.collector_id

Line 2055: FROM hz_customer_profiles hp, ar_collectors ac

2051: ) order by 3;
2052:
2053: cursor c_party_collector IS
2054: SELECT ac.employee_id, ac.resource_id, 0
2055: FROM hz_customer_profiles hp, ar_collectors ac
2056: WHERE hp.party_id = p_party_id
2057: and hp.cust_account_id = -1
2058: and hp.collector_id = ac.collector_id
2059: and ac.resource_type = 'RS_RESOURCE'

Line 2065: FROM hz_customer_profiles hp, iex_strategy_work_items wi,

2061: and nvl(ac.status,'A') = 'A'
2062: and nvl(hp.status,'A') = 'A'
2063: union all
2064: ( SELECT jtg.person_id, jtg.resource_id, count(work_item_id)
2065: FROM hz_customer_profiles hp, iex_strategy_work_items wi,
2066: ar_collectors ac, jtf_rs_group_members jtg
2067: WHERE hp.party_id = P_PARTY_ID
2068: and hp.cust_account_id = -1
2069: and hp.collector_id = ac.collector_id

Line 2081: FROM hz_customer_profiles hp, ar_collectors ac,

2077: and nvl(jtg.delete_flag,'N') = 'N'
2078: group by jtg.resource_id, jtg.person_id
2079: UNION ALL
2080: SELECT jtg.person_id, jtg.resource_id, 0
2081: FROM hz_customer_profiles hp, ar_collectors ac,
2082: jtf_rs_group_members jtg
2083: WHERE hp.party_id = p_party_id
2084: and hp.cust_account_id = -1
2085: and hp.collector_id = ac.collector_id

Line 2100: FROM hz_customer_profiles hp, jtf_rs_resource_extns rs, iex_cases_vl wi,ar_collectors ac

2096: ) order by 3;
2097:
2098: CURSOR c_case_collector IS
2099: SELECT ac.employee_id, ac.resource_id, count(cas_id)
2100: FROM hz_customer_profiles hp, jtf_rs_resource_extns rs, iex_cases_vl wi,ar_collectors ac
2101: WHERE hp.party_id = p_party_id
2102: and rs.resource_id = ac.resource_id
2103: and hp.collector_id = ac.collector_id
2104: and ac.resource_id = wi.owner_resource_id(+)

Line 2182: l_select1 := l_select1 || 'FROM hz_customer_profiles hp, ar_collectors ac,jtf_rs_resource_extns rs ';

2178: --Start Bug 7134688 gnramasa 17th June 08
2179:
2180: -- Initialize SQL statements - REMEMBER CHANGING 1 MEANS CHANGING ALL
2181: l_select1 := 'SELECT ac.employee_id, ac.resource_id, 0 ';
2182: l_select1 := l_select1 || 'FROM hz_customer_profiles hp, ar_collectors ac,jtf_rs_resource_extns rs ';
2183: l_where1 := 'WHERE ';
2184: l_where1 := l_where1 || ' hp.collector_id = ac.collector_id ';
2185: l_where1 := l_where1 || ' and ac.resource_type = ''RS_RESOURCE'' ';
2186: l_where1 := l_where1 || ' and trunc(nvl(ac.inactive_date,sysdate)) >= trunc(sysdate) ';

Line 2193: l_select2 := l_select2 || 'FROM hz_customer_profiles hp, iex_strategy_work_items wi, ';

2189: l_where1 := l_where1 || ' and ac.resource_id = rs.resource_id ';
2190: l_where1 := l_where1 || ' and trunc(nvl(rs.end_date_active,sysdate)) >= trunc(sysdate) ';
2191:
2192: l_select2 := 'SELECT jtg.person_id, jtg.resource_id, count(work_item_id) ';
2193: l_select2 := l_select2 || 'FROM hz_customer_profiles hp, iex_strategy_work_items wi, ';
2194: l_select2 := l_select2 || ' ar_collectors ac, jtf_rs_group_members jtg, jtf_rs_resource_extns rs ';
2195: l_select2 := l_select2 || ' , jtf_rs_role_relations jtr,JTF_RS_ROLES_b jtrr ';
2196: l_where2 := 'WHERE ';
2197: l_where2 := l_where2 || ' hp.collector_id = ac.collector_id ';

Line 2216: l_select3 := l_select3 || 'FROM hz_customer_profiles hp, ar_collectors ac, ';

2212: l_where2 := l_where2 || ' and trunc(nvl(jtr.end_date_active,sysdate)) >= trunc(sysdate) ';
2213: l_group2 := 'group by jtg.resource_id, jtg.person_id ';
2214:
2215: l_select3 := 'SELECT jtg.person_id, jtg.resource_id, 0 ';
2216: l_select3 := l_select3 || 'FROM hz_customer_profiles hp, ar_collectors ac, ';
2217: l_select3 := l_select3 || ' jtf_rs_group_members jtg, jtf_rs_resource_extns rs ';
2218: l_select3 := l_select3 || ' , jtf_rs_role_relations jtr,JTF_RS_ROLES_b jtrr ';
2219: l_where3 := ' WHERE ';
2220: l_where3 := l_where3 || ' hp.collector_id = ac.collector_id ';

Line 2241: -- l_select4 := l_select4 || ' FROM hz_customer_profiles hp, jtf_rs_resource_extns rs, iex_cases_vl wi,ar_collectors ac ';

2237: l_group3 := ' group by jtg.resource_id, jtg.person_id ';
2238:
2239: l_select4 := 'SELECT ac.employee_id, ac.resource_id, count(cas_id) ';
2240: --Begin Bug#6962575 29-Jul-2008 barathsr
2241: -- l_select4 := l_select4 || ' FROM hz_customer_profiles hp, jtf_rs_resource_extns rs, iex_cases_vl wi,ar_collectors ac ';
2242: l_select4 := l_select4 || ' FROM hz_customer_profiles hp, jtf_rs_resource_extns rs, iex_cases_all_b wi,ar_collectors ac ';
2243: --End Bug#6962575 29-Jul-2008 barathsr
2244: l_where4 := ' WHERE hp.party_id = :1 ';
2245: l_where4 := l_where4 || ' and rs.resource_id = ac.resource_id ';

Line 2242: l_select4 := l_select4 || ' FROM hz_customer_profiles hp, jtf_rs_resource_extns rs, iex_cases_all_b wi,ar_collectors ac ';

2238:
2239: l_select4 := 'SELECT ac.employee_id, ac.resource_id, count(cas_id) ';
2240: --Begin Bug#6962575 29-Jul-2008 barathsr
2241: -- l_select4 := l_select4 || ' FROM hz_customer_profiles hp, jtf_rs_resource_extns rs, iex_cases_vl wi,ar_collectors ac ';
2242: l_select4 := l_select4 || ' FROM hz_customer_profiles hp, jtf_rs_resource_extns rs, iex_cases_all_b wi,ar_collectors ac ';
2243: --End Bug#6962575 29-Jul-2008 barathsr
2244: l_where4 := ' WHERE hp.party_id = :1 ';
2245: l_where4 := l_where4 || ' and rs.resource_id = ac.resource_id ';
2246: l_where4 := l_where4 || ' and hp.collector_id = ac.collector_id ';

Line 2259: l_select5 := l_select5 || ' FROM hz_customer_profiles hp, jtf_tasks_vl t, jtf_task_statuses_vl s, ';

2255:
2256: --Begin Bug#5229763 schekuri 27-Jul-2006
2257: --Added following sql's for getting resource for task creation in dunning callback concurrent program
2258: l_select5 := ' SELECT jtg.person_id, jtg.resource_id, count(t.task_id) ';
2259: l_select5 := l_select5 || ' FROM hz_customer_profiles hp, jtf_tasks_vl t, jtf_task_statuses_vl s, ';
2260: l_select5 := l_select5 || ' ar_collectors ac, jtf_rs_group_members jtg, jtf_rs_resource_extns rs ';
2261: l_select5 := l_select5 || ' , jtf_rs_role_relations jtr,JTF_RS_ROLES_b jtrr ';
2262: l_where5 := ' WHERE ';
2263: l_where5 := l_where5 || ' hp.collector_id = ac.collector_id ';

Line 2284: l_select6 := l_select6 || ' FROM hz_customer_profiles hp, ar_collectors ac, ';

2280: l_where5 := l_where5 || ' and trunc(nvl(jtr.end_date_active,sysdate)) >= trunc(sysdate) ';
2281: l_group5 := 'group by jtg.resource_id, jtg.person_id ';
2282:
2283: l_select6 := 'SELECT jtg.person_id, jtg.resource_id, 0 ';
2284: l_select6 := l_select6 || ' FROM hz_customer_profiles hp, ar_collectors ac, ';
2285: l_select6 := l_select6 || ' jtf_rs_group_members jtg, jtf_rs_resource_extns rs ';
2286: l_select6 := l_select6 || ' , jtf_rs_role_relations jtr,JTF_RS_ROLES_b jtrr ';
2287: l_where6 := ' WHERE ';
2288: l_where6 := l_where6 || ' hp.collector_id = ac.collector_id ';