DBA Data[Home] [Help]

APPS.IEX_UWQ_DELIN_ENUMS_PVT dependencies on AR_COLLECTORS

Line 138: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp, ' ||

134: l_bkr_filter := NVL(fnd_profile.value('IEX_BANKRUPTCY_FILTER'), 'Y');
135: --Bug4221359. Implement Group Hierarchy. Fix By LKKUMAR on 22-Mar-2006. Start.
136: /* l_additional_where :=
137: ' UNION ALL SELECT hp.party_id ' ||
138: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp, ' ||
139: ' JTF_RS_GROUPS_DENORM jrg ' ||
140: ' WHERE hp.collector_id = ac.collector_id ' ||
141: ' AND ac.resource_ID = jtgrp.group_id ' ||
142: ' AND jtgrp.group_id = jrg.group_id ' ||

Line 252: ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||

248: If (l_check > 0) then
249: l_security_where :=
250: --'customer_id in (select hp.party_id '||
251: l_filter_col_str1|| -- Added for Bug #6311505 bibeura 23-Oct-2007
252: ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||
253: ' iex_assignments iea ' ||
254: ' WHERE hp.collector_id = ac.collector_id ' ||
255: l_filter_cond_str|| -- Added for Bug #6311505 bibeura 23-Oct-2007
256: -- ' AND hp.cust_account_id = -1 ' || Bug4775052. Fix By LKKUMAR on 29-Nov-2005

Line 263: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||

259: ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) ' ||
260: ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) ' ||
261: --' UNION ALL select hp.party_id '||
262: ' UNION ALL '|| l_filter_col_str2 || -- Added for Bug #6311505 bibeura 23-Oct-2007
263: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
264: ' WHERE hp.collector_id = ac.collector_id ' ||
265: l_filter_cond_str|| -- Added for Bug #6311505 bibeura 23-Oct-2007
266: -- ' AND hp.cust_account_id = -1 ' || Bug4775052. Fix By LKKUMAR on 29-Nov-2005
267: ' AND ac.employee_id = :PERSON_ID ' ||

Line 271: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||

267: ' AND ac.employee_id = :PERSON_ID ' ||
268: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
269: ' UNION ALL ' || l_filter_col_str2 || -- Added for Bug #6311505 bibeura 23-Oct-2007
270: --' UNION ALL SELECT hp.party_id ' ||
271: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
272: ' WHERE hp.collector_id = ac.collector_id ' ||
273: ' AND ac.resource_ID = jtgrp.group_id ' ||
274: l_filter_cond_str|| -- Added for Bug #6311505 bibeura 23-Oct-2007
275: -- ' AND hp.cust_account_id = -1 ' || Bug4775052. Fix By LKKUMAR on 29-Nov-2005

Line 304: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||

300: Else
301: l_security_where :=
302: --'customer_id in (select hp.party_id '||
303: l_filter_col_str1 || -- Added for Bug #6311505 bibeura 23-Oct-2007
304: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
305: ' WHERE hp.collector_id = ac.collector_id ' ||
306: l_filter_cond_str || -- Added for Bug #6311505 bibeura 23-Oct-2007
307: -- ' AND hp.cust_account_id = -1 ' || Bug4775052. Fix By LKKUMAR on 29-Nov-2005
308: ' AND ac.employee_id = :PERSON_ID ' ||

Line 312: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||

308: ' AND ac.employee_id = :PERSON_ID ' ||
309: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
310: --' UNION ALL SELECT hp.party_id ' ||
311: ' UNION ALL ' || l_filter_col_str2 || -- Added for Bug #6311505 bibeura 23-Oct-2007
312: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
313: ' WHERE hp.collector_id = ac.collector_id ' ||
314: ' AND ac.resource_ID = jtgrp.group_id ' ||
315: l_filter_cond_str || -- Added for Bug #6311505 bibeura 23-Oct-2007
316: -- ' AND hp.cust_account_id = -1 ' || Bug4775052. Fix By LKKUMAR on 29-Nov-2005

Line 428: ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||

424: If (l_check > 0) then
425: l_security_where :=
426: --'customer_id in (select hp.party_id '||
427: l_filter_col_str1|| -- Added for Bug #6311505 bibeura 23-Oct-2007
428: ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||
429: ' iex_assignments iea ' ||
430: ' WHERE hp.collector_id = ac.collector_id ' ||
431: l_filter_cond_str|| -- Added for Bug #6311505 bibeura 23-Oct-2007
432: -- ' AND hp.cust_account_id = -1 ' || Bug4775052. Fix By LKKUMAR on 29-Nov-2005

Line 439: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||

435: ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) ' ||
436: ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) ' ||
437: --' UNION ALL select hp.party_id '||
438: ' UNION ALL ' || l_filter_col_str2 || -- Added for Bug #6311505 bibeura 23-Oct-2007
439: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
440: ' WHERE hp.collector_id = ac.collector_id ' ||
441: l_filter_cond_str|| -- Added for Bug #6311505 bibeura 23-Oct-2007
442: -- ' AND hp.cust_account_id = -1 ' || Bug4775052. Fix By LKKUMAR on 29-Nov-2005
443: ' AND ac.employee_id = :PERSON_ID ' ||

Line 447: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||

443: ' AND ac.employee_id = :PERSON_ID ' ||
444: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
445: --' UNION ALL SELECT hp.party_id ' ||
446: ' UNION ALL ' || l_filter_col_str2 || -- Added for Bug #6311505 bibeura 23-Oct-2007
447: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
448: ' WHERE hp.collector_id = ac.collector_id ' ||
449: ' AND ac.resource_ID = jtgrp.group_id ' ||
450: l_filter_cond_str|| -- Added for Bug #6311505 bibeura 23-Oct-2007
451: -- ' AND hp.cust_account_id = -1 ' || Bug4775052. Fix By LKKUMAR on 29-Nov-2005

Line 460: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||

456: Else
457: l_security_where :=
458: --'customer_id in (select hp.party_id '||
459: l_filter_col_str1|| -- Added for Bug #6311505 bibeura 23-Oct-2007
460: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
461: ' WHERE hp.collector_id = ac.collector_id ' ||
462: l_filter_cond_str|| -- Added for Bug #6311505 bibeura 23-Oct-2007
463: -- ' AND hp.cust_account_id = -1 ' || Bug4775052. Fix By LKKUMAR on 29-Nov-2005
464: ' AND ac.employee_id = :PERSON_ID ' ||

Line 468: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||

464: ' AND ac.employee_id = :PERSON_ID ' ||
465: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
466: --' UNION ALL SELECT hp.party_id ' ||
467: ' UNION ALL ' || l_filter_col_str2 || -- Added for Bug #6311505 bibeura 23-Oct-2007
468: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
469: ' WHERE hp.collector_id = ac.collector_id ' ||
470: ' AND ac.resource_ID = jtgrp.group_id ' ||
471: l_filter_cond_str || -- Added for Bug #6311505 bibeura 23-Oct-2007
472: -- ' AND hp.cust_account_id = -1 ' || Bug4775052. Fix By LKKUMAR on 29-Nov-2005

Line 605: SELECT collector_id from AR_COLLECTORS where resource_id = p_resource_id

601: FROM ieu_uwq_sel_enumerators
602: WHERE sel_enum_id = in_sel_enum_id;
603:
604: CURSOR c_collector_id IS
605: SELECT collector_id from AR_COLLECTORS where resource_id = p_resource_id
606: and resource_type = 'RS_RESOURCE';
607:
608: l_sel_enum_rec c_sel_enum%ROWTYPE;
609:

Line 673: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp, ' ||

669:
670: --Bug4221349. Implement Group Hierarchy. Fix By LKKUMAR on 22-Mar-2006. Start.
671: /* l_additional_where :=
672: ' UNION ALL SELECT hp.party_id ' ||
673: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp, ' ||
674: ' JTF_RS_GROUPS_DENORM jrg ' ||
675: ' WHERE hp.collector_id = ac.collector_id ' ||
676: ' AND ac.resource_ID = jtgrp.group_id ' ||
677: ' AND jtgrp.group_id = jrg.group_id ' ||

Line 751: from ar_collectors where status='A' and

747: end;
748:
749: begin
750: select count(1) into l_group_check
751: from ar_collectors where status='A' and
752: nvl(inactive_date,sysdate)>=sysdate and resource_type='RS_GROUP';
753: exception
754: when others then l_group_check := 0;
755: end;

Line 763: ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||

759: --Start bug#5874874 gnramasa 25-Apr-2007
760: /* If (l_check > 0 ) then
761: l_security_where :=
762: 'party_id in (select hp.party_id ' ||
763: ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||
764: ' iex_assignments iea ' ||
765: ' WHERE hp.collector_id = ac.collector_id ' ||
766: ' AND ac.resource_id = iea.resource_id ' ||
767: ' AND hp.cust_account_id = -1 ' ||

Line 773: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||

769: ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) ' ||
770: ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) ' ||
771: ' AND NVL(IEA.DELETED_FLAG,''N'') = ''N'' ' ||
772: ' UNION ALL select hp.party_id '||
773: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
774: ' WHERE hp.collector_id = ac.collector_id ' ||
775: ' AND ac.employee_id = :PERSON_ID ' ||
776: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
777: ' AND hp.cust_account_id = -1 ' ||

Line 779: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||

775: ' AND ac.employee_id = :PERSON_ID ' ||
776: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
777: ' AND hp.cust_account_id = -1 ' ||
778: ' UNION ALL SELECT hp.party_id ' ||
779: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
780: ' WHERE hp.collector_id = ac.collector_id ' ||
781: ' AND ac.resource_ID = jtgrp.group_id ' ||
782: ' AND hp.cust_account_id = -1 ' ||
783: ' AND ac.resource_type = ''RS_GROUP'' ' ||

Line 793: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||

789:
790: Else
791: l_security_where :=
792: 'party_id in (select hp.party_id '||
793: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
794: ' WHERE hp.collector_id = ac.collector_id ' ||
795: ' AND ac.employee_id = :PERSON_ID ' ||
796: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
797: ' AND hp.cust_account_id = -1 ' ||

Line 799: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||

795: ' AND ac.employee_id = :PERSON_ID ' ||
796: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
797: ' AND hp.cust_account_id = -1 ' ||
798: ' UNION ALL SELECT hp.party_id ' ||
799: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
800: ' WHERE hp.collector_id = ac.collector_id ' ||
801: ' AND ac.resource_ID = jtgrp.group_id ' ||
802: ' AND hp.cust_account_id = -1 ' ||
803: ' AND ac.resource_type = ''RS_GROUP'' ' ||

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 ';

809: End If; */
810:
811: if l_check>0 or l_group_check>0 then
812: --l_security_where := ' :person_id = :person_id and collector_resource_id in (select :COLLECTOR_RESOURCE_ID from dual ';
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 ';
814:
815: else
816: l_security_where := ' :person_id = :person_id and collector_resource_id = :COLLECTOR_RESOURCE_ID ';
817: end if;

Line 820: l_security_where := l_security_where || ' union all SELECT ac.resource_id FROM iex_assignments iea,ar_collectors ac where '||

816: l_security_where := ' :person_id = :person_id and collector_resource_id = :COLLECTOR_RESOURCE_ID ';
817: end if;
818:
819: if l_check>0 then
820: l_security_where := l_security_where || ' union all SELECT ac.resource_id FROM iex_assignments iea,ar_collectors ac where '||
821: ' iea.alt_employee_id = :PERSON_ID '||
822: ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) '||
823: ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) '||
824: ' AND NVL(iea.DELETED_FLAG,''N'') = ''N'' '||

Line 831: ' FROM ar_collectors ac , jtf_rs_group_members jtgrp '||

827: end if;
828:
829: if l_group_check>0 then
830: l_security_where := l_security_where || ' union all SELECT ac.resource_ID '||
831: ' FROM ar_collectors ac , jtf_rs_group_members jtgrp '||
832: ' WHERE ac.resource_ID = jtgrp.group_id '||
833: ' AND ac.resource_type = ''RS_GROUP'''||
834: ' AND NVL(jtgrp.delete_flag,''N'') = ''N'''||
835: ' AND jtgrp.resource_ID = :COLLECTOR_RESOURCE_ID ';

Line 953: ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||

949: --Start bug#5874874 gnramasa 25-Apr-2007
950: /* If (l_check > 0 ) then
951: l_security_where :=
952: 'party_id in (select hp.party_id '||
953: ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||
954: ' iex_assignments iea ' ||
955: ' WHERE hp.collector_id = ac.collector_id ' ||
956: ' AND ac.resource_id = iea.resource_id ' ||
957: ' AND hp.cust_account_id = -1 ' ||

Line 963: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||

959: ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) ' ||
960: ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) ' ||
961: ' AND NVL(IEA.DELETED_FLAG,''N'') = ''N'' ' ||
962: ' UNION ALL select hp.party_id '||
963: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
964: ' WHERE hp.collector_id = ac.collector_id ' ||
965: ' AND ac.employee_id = :PERSON_ID ' ||
966: ' AND hp.cust_account_id = -1 ' ||
967: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||

Line 969: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||

965: ' AND ac.employee_id = :PERSON_ID ' ||
966: ' AND hp.cust_account_id = -1 ' ||
967: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
968: ' UNION ALL SELECT hp.party_id ' ||
969: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
970: ' WHERE hp.collector_id = ac.collector_id ' ||
971: ' AND ac.resource_ID = jtgrp.group_id ' ||
972: ' AND hp.cust_account_id = -1 ' ||
973: ' AND ac.resource_type = ''RS_GROUP'' ' ||

Line 982: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||

978: --Bug4221349. Implement Group Hierarchy. Fix By LKKUMAR on 22-Mar-2006. End.
979: Else
980: l_security_where :=
981: 'party_id in (select hp.party_id '||
982: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
983: ' WHERE hp.collector_id = ac.collector_id ' ||
984: ' AND ac.employee_id = :PERSON_ID ' ||
985: ' AND hp.cust_account_id = -1 ' ||
986: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||

Line 988: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||

984: ' AND ac.employee_id = :PERSON_ID ' ||
985: ' AND hp.cust_account_id = -1 ' ||
986: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
987: ' UNION ALL SELECT hp.party_id ' ||
988: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
989: ' WHERE hp.collector_id = ac.collector_id ' ||
990: ' AND ac.resource_ID = jtgrp.group_id ' ||
991: ' AND NVL(jtgrp.delete_flag,''N'') = ''N'' ' ||
992: ' AND hp.cust_account_id = -1 ' ||

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 ';

999:
1000:
1001: if l_check>0 or l_group_check>0 then
1002: --l_security_where := ' :person_id = :person_id and collector_resource_id in (select :COLLECTOR_RESOURCE_ID from dual ';
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 ';
1004:
1005: else
1006: l_security_where := ' :person_id = :person_id and collector_resource_id = :COLLECTOR_RESOURCE_ID ';
1007: end if;

Line 1010: l_security_where := l_security_where || ' union all SELECT ac.resource_id FROM iex_assignments iea,ar_collectors ac where '||

1006: l_security_where := ' :person_id = :person_id and collector_resource_id = :COLLECTOR_RESOURCE_ID ';
1007: end if;
1008:
1009: if l_check>0 then
1010: l_security_where := l_security_where || ' union all SELECT ac.resource_id FROM iex_assignments iea,ar_collectors ac where '||
1011: ' iea.alt_employee_id = :PERSON_ID '||
1012: ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) '||
1013: ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) '||
1014: ' AND NVL(iea.DELETED_FLAG,''N'') = ''N'' '||

Line 1021: ' FROM ar_collectors ac , jtf_rs_group_members jtgrp '||

1017: end if;
1018:
1019: if l_group_check>0 then
1020: l_security_where := l_security_where || ' union all SELECT ac.resource_ID '||
1021: ' FROM ar_collectors ac , jtf_rs_group_members jtgrp '||
1022: ' WHERE ac.resource_ID = jtgrp.group_id '||
1023: ' AND ac.resource_type = ''RS_GROUP'''||
1024: ' AND NVL(jtgrp.delete_flag,''N'') = ''N'''||
1025: ' AND jtgrp.resource_ID = :COLLECTOR_RESOURCE_ID ';

Line 1167: SELECT collector_id from AR_COLLECTORS where resource_id = p_resource_id

1163: FROM ieu_uwq_sel_enumerators
1164: WHERE sel_enum_id = in_sel_enum_id;
1165:
1166: CURSOR c_collector_id IS
1167: SELECT collector_id from AR_COLLECTORS where resource_id = p_resource_id
1168: and resource_type = 'RS_RESOURCE';
1169:
1170: l_sel_enum_rec c_sel_enum%ROWTYPE;
1171:

Line 1268: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp, ' ||

1264:
1265: --Bug4221349. Implement Group Hierarchy. Fix By LKKUMAR on 22-Mar-2006. Start.
1266: /* l_additional_where1 :=
1267: ' UNION ALL SELECT hp.party_id ' ||
1268: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp, ' ||
1269: ' JTF_RS_GROUPS_DENORM jrg ' ||
1270: ' WHERE hp.collector_id = ac.collector_id ' ||
1271: ' AND ac.resource_ID = jtgrp.group_id ' ||
1272: ' AND jtgrp.group_id = jrg.group_id ' ||

Line 1279: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp, ' ||

1275: ' AND jtgrp.PERSON_ID = :PERSON_ID ) ';
1276:
1277: l_additional_where2 :=
1278: ' UNION ALL SELECT hp.party_id ' ||
1279: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp, ' ||
1280: ' JTF_RS_GROUPS_DENORM jrg ' ||
1281: ' WHERE hp.collector_id = ac.collector_id ' ||
1282: ' AND ac.resource_ID = jtgrp.group_id ' ||
1283: ' AND jtgrp.group_id = jrg.group_id ' ||

Line 1315: from ar_collectors where status='A' and

1311: end;
1312:
1313: begin
1314: select count(1) into l_group_check
1315: from ar_collectors where status='A' and
1316: nvl(inactive_date,sysdate)>=sysdate and resource_type='RS_GROUP';
1317: exception
1318: when others then l_group_check := 0;
1319: end;

Line 1327: ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||

1323: /* IF l_Level = 'PARTY' then
1324: If (l_check > 0) then
1325: l_security_where :=
1326: 'party_id in (select hp.party_id '||
1327: ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||
1328: ' iex_assignments iea ' ||
1329: ' WHERE hp.collector_id = ac.collector_id ' ||
1330: ' AND hp.cust_account_id = -1 ' ||
1331: ' AND ac.resource_id = iea.resource_id ' ||

Line 1337: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||

1333: ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) ' ||
1334: ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) ' ||
1335: ' AND NVL(IEA.DELETED_FLAG,''N'') = ''N'' ' ||
1336: ' UNION ALL select hp.party_id '||
1337: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
1338: ' WHERE hp.collector_id = ac.collector_id ' ||
1339: ' AND ac.employee_id = :PERSON_ID ' ||
1340: ' AND hp.cust_account_id = -1 ' ||
1341: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||

Line 1343: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||

1339: ' AND ac.employee_id = :PERSON_ID ' ||
1340: ' AND hp.cust_account_id = -1 ' ||
1341: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
1342: ' UNION ALL SELECT hp.party_id ' ||
1343: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
1344: ' WHERE hp.collector_id = ac.collector_id ' ||
1345: ' AND ac.resource_ID = jtgrp.group_id ' ||
1346: ' AND hp.cust_account_id = -1 ' ||
1347: ' AND ac.resource_type = ''RS_GROUP'' ' ||

Line 1356: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||

1352: --Bug4221349. Implement Group Hierarchy. Fix By LKKUMAR on 22-Mar-2006. End.
1353: Else
1354: l_security_where :=
1355: 'party_id in (select hp.party_id '||
1356: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
1357: ' WHERE hp.collector_id = ac.collector_id ' ||
1358: ' AND ac.employee_id = :PERSON_ID ' ||
1359: ' AND hp.cust_account_id = -1 ' ||
1360: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||

Line 1362: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||

1358: ' AND ac.employee_id = :PERSON_ID ' ||
1359: ' AND hp.cust_account_id = -1 ' ||
1360: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
1361: ' UNION ALL SELECT hp.party_id ' ||
1362: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
1363: ' WHERE hp.collector_id = ac.collector_id ' ||
1364: ' AND ac.resource_ID = jtgrp.group_id ' ||
1365: ' AND hp.cust_account_id = -1 ' ||
1366: ' AND ac.resource_type = ''RS_GROUP'' ' ||

Line 1378: ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||

1374: ELSE
1375: If (l_check > 0) then
1376: l_security_where :=
1377: 'party_id in (select hp.party_id '||
1378: ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||
1379: ' iex_assignments iea ' ||
1380: ' WHERE hp.collector_id = ac.collector_id ' ||
1381: ' AND ' || l_view_name ||
1382: '.cust_account_id = hp.cust_account_id ' ||

Line 1390: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||

1386: ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) ' ||
1387: ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) ' ||
1388: ' AND NVL(IEA.DELETED_FLAG,''N'') = ''N'' ' ||
1389: ' UNION ALL select hp.party_id '||
1390: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
1391: ' WHERE hp.collector_id = ac.collector_id ' ||
1392: ' AND ' || l_view_name ||
1393: '.cust_account_id = hp.cust_account_id ' ||
1394: ' AND hp.site_use_id is NULL ' ||

Line 1398: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||

1394: ' AND hp.site_use_id is NULL ' ||
1395: ' AND ac.employee_id = :PERSON_ID ' ||
1396: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
1397: ' UNION ALL SELECT hp.party_id ' ||
1398: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
1399: ' WHERE hp.collector_id = ac.collector_id ' ||
1400: ' AND ac.resource_ID = jtgrp.group_id ' ||
1401: ' AND ' || l_view_name ||
1402: '.cust_account_id = hp.cust_account_id ' ||

Line 1414: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||

1410:
1411: Else
1412: l_security_where :=
1413: 'party_id in (select hp.party_id '||
1414: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
1415: ' WHERE hp.collector_id = ac.collector_id ' ||
1416: ' AND ' || l_view_name ||
1417: '.cust_account_id = hp.cust_account_id ' ||
1418: ' AND hp.site_use_id is NULL ' ||

Line 1422: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||

1418: ' AND hp.site_use_id is NULL ' ||
1419: ' AND ac.employee_id = :PERSON_ID ' ||
1420: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
1421: ' UNION ALL SELECT hp.party_id ' ||
1422: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
1423: ' WHERE hp.collector_id = ac.collector_id ' ||
1424: ' AND ac.resource_ID = jtgrp.group_id ' ||
1425: ' AND ' || l_view_name ||
1426: '.cust_account_id = hp.cust_account_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 ';

1436: END IF; */
1437:
1438: if l_check>0 or l_group_check>0 then
1439: --l_security_where := ' :person_id = :person_id and collector_resource_id in (select :COLLECTOR_RESOURCE_ID from dual ';
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 ';
1441:
1442: else
1443: l_security_where := ' :person_id = :person_id and collector_resource_id = :COLLECTOR_RESOURCE_ID ';
1444: end if;

Line 1447: l_security_where := l_security_where || ' union all SELECT ac.resource_id FROM iex_assignments iea,ar_collectors ac where '||

1443: l_security_where := ' :person_id = :person_id and collector_resource_id = :COLLECTOR_RESOURCE_ID ';
1444: end if;
1445:
1446: if l_check>0 then
1447: l_security_where := l_security_where || ' union all SELECT ac.resource_id FROM iex_assignments iea,ar_collectors ac where '||
1448: ' iea.alt_employee_id = :PERSON_ID '||
1449: ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) '||
1450: ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) '||
1451: ' AND NVL(iea.DELETED_FLAG,''N'') = ''N'' '||

Line 1458: ' FROM ar_collectors ac , jtf_rs_group_members jtgrp '||

1454: end if;
1455:
1456: if l_group_check>0 then
1457: l_security_where := l_security_where || ' union all SELECT ac.resource_ID '||
1458: ' FROM ar_collectors ac , jtf_rs_group_members jtgrp '||
1459: ' WHERE ac.resource_ID = jtgrp.group_id '||
1460: ' AND ac.resource_type = ''RS_GROUP'''||
1461: ' AND NVL(jtgrp.delete_flag,''N'') = ''N'''||
1462: ' AND jtgrp.resource_ID = :COLLECTOR_RESOURCE_ID ';

Line 1564: ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||

1560: /* IF l_Level = 'PARTY' then
1561: If (l_check > 0) then
1562: l_security_where :=
1563: 'party_id in (select hp.party_id '||
1564: ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||
1565: ' iex_assignments iea ' ||
1566: ' WHERE hp.collector_id = ac.collector_id ' ||
1567: ' AND hp.cust_account_id = -1 ' ||
1568: ' AND ac.resource_id = iea.resource_id ' ||

Line 1574: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||

1570: ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) ' ||
1571: ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) ' ||
1572: ' AND NVL(IEA.DELETED_FLAG,''N'') = ''N'' ' ||
1573: ' UNION ALL select hp.party_id '||
1574: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
1575: ' WHERE hp.collector_id = ac.collector_id ' ||
1576: ' AND hp.cust_account_id = -1 ' ||
1577: ' AND ac.employee_id = :PERSON_ID ' ||
1578: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||

Line 1580: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||

1576: ' AND hp.cust_account_id = -1 ' ||
1577: ' AND ac.employee_id = :PERSON_ID ' ||
1578: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
1579: ' UNION ALL SELECT hp.party_id ' ||
1580: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
1581: ' WHERE hp.collector_id = ac.collector_id ' ||
1582: ' AND ac.resource_ID = jtgrp.group_id ' ||
1583: ' AND hp.cust_account_id = -1 ' ||
1584: ' AND ac.resource_type = ''RS_GROUP'' ' ||

Line 1594: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||

1590:
1591: Else
1592: l_security_where :=
1593: 'party_id in (select hp.party_id '||
1594: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
1595: ' WHERE hp.collector_id = ac.collector_id ' ||
1596: ' AND hp.cust_account_id = -1 ' ||
1597: ' AND ac.employee_id = :PERSON_ID ' ||
1598: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||

Line 1600: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||

1596: ' AND hp.cust_account_id = -1 ' ||
1597: ' AND ac.employee_id = :PERSON_ID ' ||
1598: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
1599: ' UNION ALL SELECT hp.party_id ' ||
1600: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
1601: ' WHERE hp.collector_id = ac.collector_id ' ||
1602: ' AND ac.resource_ID = jtgrp.group_id ' ||
1603: ' AND hp.cust_account_id = -1 ' ||
1604: ' AND ac.resource_type = ''RS_GROUP'' ' ||

Line 1616: ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||

1612: ELSE
1613: If (l_check > 0) then
1614: l_security_where :=
1615: 'party_id in (select hp.party_id '||
1616: ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||
1617: ' iex_assignments iea ' ||
1618: ' WHERE hp.collector_id = ac.collector_id ' ||
1619: ' AND ' || l_view_name ||
1620: '.cust_account_id = hp.cust_account_id ' ||

Line 1628: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||

1624: ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) ' ||
1625: ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) ' ||
1626: ' AND NVL(IEA.DELETED_FLAG,''N'') = ''N'' ' ||
1627: ' UNION ALL select hp.party_id '||
1628: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
1629: ' WHERE hp.collector_id = ac.collector_id ' ||
1630: ' AND ' || l_view_name ||
1631: '.cust_account_id = hp.cust_account_id ' ||
1632: ' AND hp.site_use_id is NULL ' ||

Line 1636: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||

1632: ' AND hp.site_use_id is NULL ' ||
1633: ' AND ac.employee_id = :PERSON_ID '||
1634: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
1635: ' UNION ALL SELECT hp.party_id ' ||
1636: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
1637: ' WHERE hp.collector_id = ac.collector_id ' ||
1638: ' AND ac.resource_ID = jtgrp.group_id ' ||
1639: ' AND ' || l_view_name ||
1640: '.cust_account_id = hp.cust_account_id ' ||

Line 1652: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||

1648:
1649: Else
1650: l_security_where :=
1651: 'party_id in (select hp.party_id '||
1652: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
1653: ' WHERE hp.collector_id = ac.collector_id ' ||
1654: ' AND ' || l_view_name ||
1655: '.cust_account_id = hp.cust_account_id ' ||
1656: ' AND hp.site_use_id is NULL ' ||

Line 1660: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||

1656: ' AND hp.site_use_id is NULL ' ||
1657: ' AND ac.employee_id = :PERSON_ID '||
1658: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
1659: ' UNION ALL SELECT hp.party_id ' ||
1660: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
1661: ' WHERE hp.collector_id = ac.collector_id ' ||
1662: ' AND ac.resource_ID = jtgrp.group_id ' ||
1663: ' AND ' || l_view_name ||
1664: '.cust_account_id = hp.cust_account_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 ';

1674: END IF; */
1675:
1676: if l_check>0 or l_group_check>0 then
1677: --l_security_where := ' :person_id = :person_id and collector_resource_id in (select :COLLECTOR_RESOURCE_ID from dual ';
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 ';
1679:
1680: else
1681: l_security_where := ' :person_id = :person_id and collector_resource_id = :COLLECTOR_RESOURCE_ID ';
1682: end if;

Line 1685: l_security_where := l_security_where || ' union all SELECT ac.resource_id FROM iex_assignments iea,ar_collectors ac where '||

1681: l_security_where := ' :person_id = :person_id and collector_resource_id = :COLLECTOR_RESOURCE_ID ';
1682: end if;
1683:
1684: if l_check>0 then
1685: l_security_where := l_security_where || ' union all SELECT ac.resource_id FROM iex_assignments iea,ar_collectors ac where '||
1686: ' iea.alt_employee_id = :PERSON_ID '||
1687: ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) '||
1688: ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) '||
1689: ' AND NVL(iea.DELETED_FLAG,''N'') = ''N'' '||

Line 1696: ' FROM ar_collectors ac , jtf_rs_group_members jtgrp '||

1692: end if;
1693:
1694: if l_group_check>0 then
1695: l_security_where := l_security_where || ' union all SELECT ac.resource_ID '||
1696: ' FROM ar_collectors ac , jtf_rs_group_members jtgrp '||
1697: ' WHERE ac.resource_ID = jtgrp.group_id '||
1698: ' AND ac.resource_type = ''RS_GROUP'''||
1699: ' AND NVL(jtgrp.delete_flag,''N'') = ''N'''||
1700: ' AND jtgrp.resource_ID = :COLLECTOR_RESOURCE_ID ';

Line 1845: SELECT collector_id from AR_COLLECTORS where resource_id = p_resource_id

1841: FROM ieu_uwq_sel_enumerators
1842: WHERE sel_enum_id = in_sel_enum_id;
1843:
1844: CURSOR c_collector_id IS
1845: SELECT collector_id from AR_COLLECTORS where resource_id = p_resource_id
1846: and resource_type = 'RS_RESOURCE';
1847:
1848: l_sel_enum_rec c_sel_enum%ROWTYPE;
1849:

Line 1953: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp, ' ||

1949:
1950: --Bug4221349. Implement Group Hierarchy. Fix By LKKUMAR on 22-Mar-2006. Start.
1951: /* l_additional_where1 :=
1952: ' UNION ALL SELECT hp.party_id ' ||
1953: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp, ' ||
1954: ' JTF_RS_GROUPS_DENORM jrg ' ||
1955: ' WHERE hp.collector_id = ac.collector_id ' ||
1956: ' AND ac.resource_ID = jtgrp.group_id ' ||
1957: ' AND jtgrp.group_id = jrg.group_id ' ||

Line 1964: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp, ' ||

1960: ' AND jtgrp.PERSON_ID = :PERSON_ID ) ';
1961:
1962: l_additional_where2 :=
1963: ' UNION ALL SELECT hp.party_id ' ||
1964: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp, ' ||
1965: ' JTF_RS_GROUPS_DENORM jrg ' ||
1966: ' WHERE hp.collector_id = ac.collector_id ' ||
1967: ' AND ac.resource_ID = jtgrp.group_id ' ||
1968: ' AND jtgrp.group_id = jrg.group_id ' ||

Line 1996: from ar_collectors where status='A' and

1992: end;
1993:
1994: begin
1995: select count(1) into l_group_check
1996: from ar_collectors where status='A' and
1997: nvl(inactive_date,sysdate)>=sysdate and resource_type='RS_GROUP';
1998: exception
1999: when others then l_group_check := 0;
2000: end;

Line 2009: ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||

2005: /* IF l_Level = 'PARTY' then
2006: If (l_check > 0) then
2007: l_security_where :=
2008: 'party_id in (select hp.party_id '||
2009: ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||
2010: ' iex_assignments iea ' ||
2011: ' WHERE hp.collector_id = ac.collector_id ' ||
2012: ' AND hp.cust_account_id = -1 ' ||
2013: ' AND ac.resource_id = iea.resource_id ' ||

Line 2019: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||

2015: ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) ' ||
2016: ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) ' ||
2017: ' AND NVL(IEA.DELETED_FLAG,''N'') = ''N'' '||
2018: ' UNION ALL select hp.party_id '||
2019: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
2020: ' WHERE hp.collector_id = ac.collector_id ' ||
2021: ' AND hp.cust_account_id = -1 ' ||
2022: ' AND ac.employee_id = :PERSON_ID ' ||
2023: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||

Line 2025: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||

2021: ' AND hp.cust_account_id = -1 ' ||
2022: ' AND ac.employee_id = :PERSON_ID ' ||
2023: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
2024: ' UNION ALL SELECT hp.party_id ' ||
2025: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
2026: ' WHERE hp.collector_id = ac.collector_id ' ||
2027: ' AND ac.resource_ID = jtgrp.group_id ' ||
2028: ' AND hp.cust_account_id = -1 ' ||
2029: ' AND ac.resource_type = ''RS_GROUP'' ' ||

Line 2038: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||

2034: --Bug4221349. Implement Group Hierarchy. Fix By LKKUMAR on 22-Mar-2006. End.
2035: Else
2036: l_security_where :=
2037: 'party_id in (select hp.party_id '||
2038: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
2039: ' WHERE hp.collector_id = ac.collector_id ' ||
2040: ' AND hp.cust_account_id = -1 ' ||
2041: ' AND ac.employee_id = :PERSON_ID ' ||
2042: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||

Line 2044: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||

2040: ' AND hp.cust_account_id = -1 ' ||
2041: ' AND ac.employee_id = :PERSON_ID ' ||
2042: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
2043: ' UNION ALL SELECT hp.party_id ' ||
2044: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
2045: ' WHERE hp.collector_id = ac.collector_id ' ||
2046: ' AND ac.resource_ID = jtgrp.group_id ' ||
2047: ' AND hp.cust_account_id = -1 ' ||
2048: ' AND ac.resource_type = ''RS_GROUP'' ' ||

Line 2059: ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||

2055: ELSIF l_level = 'ACCOUNT' then
2056: If (l_check > 0) then
2057: l_security_where :=
2058: 'party_id in (select hp.party_id '||
2059: ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||
2060: ' iex_assignments iea ' ||
2061: ' WHERE hp.collector_id = ac.collector_id ' ||
2062: ' AND ' || l_view_name ||
2063: '.cust_account_id = hp.cust_account_id ' ||

Line 2071: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||

2067: ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) ' ||
2068: ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) ' ||
2069: ' AND NVL(IEA.DELETED_FLAG,''N'') = ''N'' '||
2070: ' UNION ALL select hp.party_id '||
2071: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
2072: ' WHERE hp.collector_id = ac.collector_id ' ||
2073: ' AND ' || l_view_name ||
2074: '.cust_account_id = hp.cust_account_id ' ||
2075: ' AND hp.site_use_id is NULL '||

Line 2079: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||

2075: ' AND hp.site_use_id is NULL '||
2076: ' AND ac.employee_id = :PERSON_ID ' ||
2077: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
2078: ' UNION ALL SELECT hp.party_id ' ||
2079: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
2080: ' WHERE hp.collector_id = ac.collector_id ' ||
2081: ' AND ac.resource_ID = jtgrp.group_id ' ||
2082: ' AND ac.resource_type = ''RS_GROUP'' ' ||
2083: ' AND NVL(jtgrp.delete_flag,''N'') = ''N'' ' ||

Line 2094: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||

2090: --Bug4221349. Implement Group Hierarchy. Fix By LKKUMAR on 22-Mar-2006. End.
2091: Else
2092: l_security_where :=
2093: 'party_id in (select hp.party_id '||
2094: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
2095: ' WHERE hp.collector_id = ac.collector_id ' ||
2096: ' AND ' || l_view_name ||
2097: '.cust_account_id = hp.cust_account_id ' ||
2098: ' AND hp.site_use_id is NULL '||

Line 2102: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||

2098: ' AND hp.site_use_id is NULL '||
2099: ' AND ac.employee_id = :PERSON_ID ' ||
2100: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
2101: ' UNION ALL SELECT hp.party_id ' ||
2102: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
2103: ' WHERE hp.collector_id = ac.collector_id ' ||
2104: ' AND ac.resource_ID = jtgrp.group_id ' ||
2105: ' AND ac.resource_type = ''RS_GROUP'' ' ||
2106: ' AND NVL(jtgrp.delete_flag,''N'') = ''N'' ' ||

Line 2119: ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||

2115: Else
2116: If (l_check > 0) then
2117: l_security_where :=
2118: 'party_id in (select hp.party_id '||
2119: ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||
2120: ' iex_assignments iea ' ||
2121: ' WHERE hp.collector_id = ac.collector_id ' ||
2122: ' AND ' || l_view_name ||
2123: '.site_use_id = hp.site_use_id ' ||

Line 2130: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||

2126: ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) ' ||
2127: ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) ' ||
2128: ' AND NVL(IEA.DELETED_FLAG,''N'') = ''N'' ' ||
2129: ' UNION ALL select hp.party_id '||
2130: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
2131: ' WHERE hp.collector_id = ac.collector_id ' ||
2132: ' AND ' || l_view_name ||
2133: '.site_use_id = hp.site_use_id ' ||
2134: ' AND ac.employee_id = :PERSON_ID ' ||

Line 2137: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||

2133: '.site_use_id = hp.site_use_id ' ||
2134: ' AND ac.employee_id = :PERSON_ID ' ||
2135: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
2136: ' UNION ALL SELECT hp.party_id ' ||
2137: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
2138: ' WHERE hp.collector_id = ac.collector_id ' ||
2139: ' AND ' || l_view_name ||
2140: '.site_use_id = hp.site_use_id ' ||
2141: ' AND ac.resource_ID = jtgrp.group_id ' ||

Line 2151: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||

2147: --Bug4221349. Implement Group Hierarchy. Fix By LKKUMAR on 22-Mar-2006. End.
2148: Else
2149: l_security_where :=
2150: 'party_id in (select hp.party_id '||
2151: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
2152: ' WHERE hp.collector_id = ac.collector_id ' ||
2153: ' AND ' || l_view_name ||
2154: '.site_use_id = hp.site_use_id ' ||
2155: ' AND ac.employee_id = :PERSON_ID ' ||

Line 2158: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||

2154: '.site_use_id = hp.site_use_id ' ||
2155: ' AND ac.employee_id = :PERSON_ID ' ||
2156: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
2157: ' UNION ALL SELECT hp.party_id ' ||
2158: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
2159: ' WHERE hp.collector_id = ac.collector_id ' ||
2160: ' AND ' || l_view_name ||
2161: '.site_use_id = hp.site_use_id ' ||
2162: ' AND ac.resource_ID = jtgrp.group_id ' ||

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 ';

2170: END IF; */
2171:
2172: if l_check>0 or l_group_check>0 then
2173: --l_security_where := ' :person_id = :person_id and collector_resource_id in (select :COLLECTOR_RESOURCE_ID from dual ';
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 ';
2175: else
2176: l_security_where := ' :person_id = :person_id and collector_resource_id = :COLLECTOR_RESOURCE_ID ';
2177: end if;
2178:

Line 2180: l_security_where := l_security_where || ' union all SELECT ac.resource_id FROM iex_assignments iea,ar_collectors ac where '||

2176: l_security_where := ' :person_id = :person_id and collector_resource_id = :COLLECTOR_RESOURCE_ID ';
2177: end if;
2178:
2179: if l_check>0 then
2180: l_security_where := l_security_where || ' union all SELECT ac.resource_id FROM iex_assignments iea,ar_collectors ac where '||
2181: ' iea.alt_employee_id = :PERSON_ID '||
2182: ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) '||
2183: ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) '||
2184: ' AND NVL(iea.DELETED_FLAG,''N'') = ''N'' '||

Line 2191: ' FROM ar_collectors ac , jtf_rs_group_members jtgrp '||

2187: end if;
2188:
2189: if l_group_check>0 then
2190: l_security_where := l_security_where || ' union all SELECT ac.resource_ID '||
2191: ' FROM ar_collectors ac , jtf_rs_group_members jtgrp '||
2192: ' WHERE ac.resource_ID = jtgrp.group_id '||
2193: ' AND ac.resource_type = ''RS_GROUP'''||
2194: ' AND NVL(jtgrp.delete_flag,''N'') = ''N'''||
2195: ' AND jtgrp.resource_ID = :COLLECTOR_RESOURCE_ID ';

Line 2302: ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||

2298: IF l_Level = 'PARTY' then
2299: If (l_check > 0) then
2300: l_security_where :=
2301: 'party_id in (select hp.party_id '||
2302: ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||
2303: ' iex_assignments iea ' ||
2304: ' WHERE hp.collector_id = ac.collector_id ' ||
2305: ' AND hp.cust_account_id = -1 ' ||
2306: ' AND ac.resource_id = iea.resource_id ' ||

Line 2312: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||

2308: ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) ' ||
2309: ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) ' ||
2310: ' AND NVL(IEA.DELETED_FLAG,''N'') = ''N'' ' ||
2311: ' UNION ALL select hp.party_id '||
2312: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
2313: ' WHERE hp.collector_id = ac.collector_id ' ||
2314: ' AND hp.cust_account_id = -1 ' ||
2315: ' AND ac.employee_id = :PERSON_ID ' ||
2316: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||

Line 2318: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||

2314: ' AND hp.cust_account_id = -1 ' ||
2315: ' AND ac.employee_id = :PERSON_ID ' ||
2316: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
2317: ' UNION ALL SELECT hp.party_id ' ||
2318: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
2319: ' WHERE hp.collector_id = ac.collector_id ' ||
2320: ' AND ac.resource_ID = jtgrp.group_id ' ||
2321: ' AND hp.cust_account_id = -1 ' ||
2322: ' AND ac.resource_type = ''RS_GROUP'' ' ||

Line 2331: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||

2327: --Bug4221349. Implement Group Hierarchy. Fix By LKKUMAR on 22-Mar-2006. End.
2328: Else
2329: l_security_where :=
2330: 'party_id in (select hp.party_id '||
2331: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
2332: ' WHERE hp.collector_id = ac.collector_id ' ||
2333: ' AND hp.cust_account_id = -1 ' ||
2334: ' AND ac.employee_id = :PERSON_ID ' ||
2335: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||

Line 2337: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||

2333: ' AND hp.cust_account_id = -1 ' ||
2334: ' AND ac.employee_id = :PERSON_ID ' ||
2335: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
2336: ' UNION ALL SELECT hp.party_id ' ||
2337: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
2338: ' WHERE hp.collector_id = ac.collector_id ' ||
2339: ' AND ac.resource_ID = jtgrp.group_id ' ||
2340: ' AND hp.cust_account_id = -1 ' ||
2341: ' AND ac.resource_type = ''RS_GROUP'' ' ||

Line 2352: ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||

2348: ELSIF l_level = 'ACCOUNT' then
2349: If (l_check > 0) then
2350: l_security_where :=
2351: 'party_id in (select hp.party_id '||
2352: ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||
2353: ' iex_assignments iea ' ||
2354: ' WHERE hp.collector_id = ac.collector_id ' ||
2355: ' AND ' || l_view_name ||
2356: '.cust_account_id = hp.cust_account_id ' ||

Line 2364: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||

2360: ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) ' ||
2361: ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) ' ||
2362: ' AND NVL(IEA.DELETED_FLAG,''N'') = ''N'' ' ||
2363: ' UNION ALL select hp.party_id '||
2364: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
2365: ' WHERE hp.collector_id = ac.collector_id ' ||
2366: ' AND ' || l_view_name ||
2367: '.cust_account_id = hp.cust_account_id ' ||
2368: ' AND ac.employee_id = :PERSON_ID ' ||

Line 2371: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||

2367: '.cust_account_id = hp.cust_account_id ' ||
2368: ' AND ac.employee_id = :PERSON_ID ' ||
2369: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
2370: ' UNION ALL SELECT hp.party_id ' ||
2371: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
2372: ' WHERE hp.collector_id = ac.collector_id ' ||
2373: ' AND ac.resource_ID = jtgrp.group_id ' ||
2374: ' AND ' || l_view_name ||
2375: '.cust_account_id = hp.cust_account_id ' ||

Line 2385: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||

2381: --Bug4221349. Implement Group Hierarchy. Fix By LKKUMAR on 22-Mar-2006. End.
2382: Else
2383: l_security_where :=
2384: 'party_id in (select hp.party_id '||
2385: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
2386: ' WHERE hp.collector_id = ac.collector_id ' ||
2387: ' AND ' || l_view_name ||
2388: '.cust_account_id = hp.cust_account_id ' ||
2389: ' AND ac.employee_id = :PERSON_ID ' ||

Line 2392: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||

2388: '.cust_account_id = hp.cust_account_id ' ||
2389: ' AND ac.employee_id = :PERSON_ID ' ||
2390: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
2391: ' UNION ALL SELECT hp.party_id ' ||
2392: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
2393: ' WHERE hp.collector_id = ac.collector_id ' ||
2394: ' AND ac.resource_ID = jtgrp.group_id ' ||
2395: ' AND ' || l_view_name ||
2396: '.cust_account_id = hp.cust_account_id ' ||

Line 2408: ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||

2404: Else
2405: If (l_check > 0) then
2406: l_security_where :=
2407: 'party_id in (select hp.party_id '||
2408: ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||
2409: ' iex_assignments iea ' ||
2410: ' WHERE hp.collector_id = ac.collector_id ' ||
2411: ' AND ' || l_view_name ||
2412: '.site_use_id = hp.site_use_id ' ||

Line 2419: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||

2415: ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) ' ||
2416: ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) ' ||
2417: ' AND NVL(IEA.DELETED_FLAG,''N'') = ''N'' ' ||
2418: ' UNION ALL select hp.party_id '||
2419: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
2420: ' WHERE hp.collector_id = ac.collector_id ' ||
2421: ' AND ' || l_view_name ||
2422: '.site_use_id = hp.site_use_id ' ||
2423: ' AND ac.employee_id = :PERSON_ID ' ||

Line 2426: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||

2422: '.site_use_id = hp.site_use_id ' ||
2423: ' AND ac.employee_id = :PERSON_ID ' ||
2424: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
2425: ' UNION ALL SELECT hp.party_id ' ||
2426: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
2427: ' WHERE hp.collector_id = ac.collector_id ' ||
2428: ' AND ac.resource_ID = jtgrp.group_id ' ||
2429: ' AND ' || l_view_name ||
2430: '.site_use_id = hp.site_use_id ' ||

Line 2441: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||

2437:
2438: Else
2439: l_security_where :=
2440: 'party_id in (select hp.party_id '||
2441: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
2442: ' WHERE hp.collector_id = ac.collector_id ' ||
2443: ' AND ' || l_view_name ||
2444: '.site_use_id = hp.site_use_id ' ||
2445: ' AND ac.employee_id = :PERSON_ID ' ||

Line 2448: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||

2444: '.site_use_id = hp.site_use_id ' ||
2445: ' AND ac.employee_id = :PERSON_ID ' ||
2446: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
2447: ' UNION ALL SELECT hp.party_id ' ||
2448: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
2449: ' WHERE hp.collector_id = ac.collector_id ' ||
2450: ' AND ac.resource_ID = jtgrp.group_id ' ||
2451: ' AND ' || l_view_name ||
2452: '.site_use_id = hp.site_use_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 ';

2461: */
2462:
2463: if l_check>0 or l_group_check>0 then
2464: --l_security_where := ' :person_id = :person_id and collector_resource_id in (select :COLLECTOR_RESOURCE_ID from dual ';
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 ';
2466:
2467: else
2468: l_security_where := ' :person_id = :person_id and collector_resource_id = :COLLECTOR_RESOURCE_ID ';
2469: end if;

Line 2472: l_security_where := l_security_where || ' union all SELECT ac.resource_id FROM iex_assignments iea,ar_collectors ac where '||

2468: l_security_where := ' :person_id = :person_id and collector_resource_id = :COLLECTOR_RESOURCE_ID ';
2469: end if;
2470:
2471: if l_check>0 then
2472: l_security_where := l_security_where || ' union all SELECT ac.resource_id FROM iex_assignments iea,ar_collectors ac where '||
2473: ' iea.alt_employee_id = :PERSON_ID '||
2474: ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) '||
2475: ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) '||
2476: ' AND NVL(iea.DELETED_FLAG,''N'') = ''N'' '||

Line 2483: ' FROM ar_collectors ac , jtf_rs_group_members jtgrp '||

2479: end if;
2480:
2481: if l_group_check>0 then
2482: l_security_where := l_security_where || ' union all SELECT ac.resource_ID '||
2483: ' FROM ar_collectors ac , jtf_rs_group_members jtgrp '||
2484: ' WHERE ac.resource_ID = jtgrp.group_id '||
2485: ' AND ac.resource_type = ''RS_GROUP'''||
2486: ' AND NVL(jtgrp.delete_flag,''N'') = ''N'''||
2487: ' AND jtgrp.resource_ID = :COLLECTOR_RESOURCE_ID ';