DBA Data[Home] [Help]

APPS.IEX_UWQ_DELIN_ENUMS_PVT dependencies on AR_COLLECTORS

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

120: l_bkr_filter := NVL(fnd_profile.value('IEX_BANKRUPTCY_FILTER'), 'Y');
121: --Bug4221359. Implement Group Hierarchy. Fix By LKKUMAR on 22-Mar-2006. Start.
122: /* l_additional_where :=
123: ' UNION ALL SELECT hp.party_id ' ||
124: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp, ' ||
125: ' JTF_RS_GROUPS_DENORM jrg ' ||
126: ' WHERE hp.collector_id = ac.collector_id ' ||
127: ' AND ac.resource_ID = jtgrp.group_id ' ||
128: ' AND jtgrp.group_id = jrg.group_id ' ||

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

203: If (l_check > 0) then
204: l_security_where :=
205: --'customer_id in (select hp.party_id '||
206: l_filter_col_str1|| -- Added for Bug #6311505 bibeura 23-Oct-2007
207: ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||
208: ' iex_assignments iea ' ||
209: ' WHERE hp.collector_id = ac.collector_id ' ||
210: l_filter_cond_str|| -- Added for Bug #6311505 bibeura 23-Oct-2007
211: -- ' AND hp.cust_account_id = -1 ' || Bug4775052. Fix By LKKUMAR on 29-Nov-2005

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

214: ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) ' ||
215: ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) ' ||
216: --' UNION ALL select hp.party_id '||
217: ' UNION ALL '|| l_filter_col_str2 || -- Added for Bug #6311505 bibeura 23-Oct-2007
218: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
219: ' WHERE hp.collector_id = ac.collector_id ' ||
220: l_filter_cond_str|| -- Added for Bug #6311505 bibeura 23-Oct-2007
221: -- ' AND hp.cust_account_id = -1 ' || Bug4775052. Fix By LKKUMAR on 29-Nov-2005
222: ' AND ac.employee_id = :PERSON_ID ' ||

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

222: ' AND ac.employee_id = :PERSON_ID ' ||
223: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
224: ' UNION ALL ' || l_filter_col_str2 || -- Added for Bug #6311505 bibeura 23-Oct-2007
225: --' UNION ALL SELECT hp.party_id ' ||
226: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
227: ' WHERE hp.collector_id = ac.collector_id ' ||
228: ' AND ac.resource_ID = jtgrp.group_id ' ||
229: l_filter_cond_str|| -- Added for Bug #6311505 bibeura 23-Oct-2007
230: -- ' AND hp.cust_account_id = -1 ' || Bug4775052. Fix By LKKUMAR on 29-Nov-2005

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

237: Else
238: l_security_where :=
239: --'customer_id in (select hp.party_id '||
240: l_filter_col_str1 || -- Added for Bug #6311505 bibeura 23-Oct-2007
241: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
242: ' WHERE hp.collector_id = ac.collector_id ' ||
243: l_filter_cond_str || -- Added for Bug #6311505 bibeura 23-Oct-2007
244: -- ' AND hp.cust_account_id = -1 ' || Bug4775052. Fix By LKKUMAR on 29-Nov-2005
245: ' AND ac.employee_id = :PERSON_ID ' ||

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

245: ' AND ac.employee_id = :PERSON_ID ' ||
246: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
247: --' UNION ALL SELECT hp.party_id ' ||
248: ' UNION ALL ' || l_filter_col_str2 || -- Added for Bug #6311505 bibeura 23-Oct-2007
249: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
250: ' WHERE hp.collector_id = ac.collector_id ' ||
251: ' AND ac.resource_ID = jtgrp.group_id ' ||
252: l_filter_cond_str || -- Added for Bug #6311505 bibeura 23-Oct-2007
253: -- ' AND hp.cust_account_id = -1 ' || Bug4775052. Fix By LKKUMAR on 29-Nov-2005

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

338: If (l_check > 0) then
339: l_security_where :=
340: --'customer_id in (select hp.party_id '||
341: l_filter_col_str1|| -- Added for Bug #6311505 bibeura 23-Oct-2007
342: ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||
343: ' iex_assignments iea ' ||
344: ' WHERE hp.collector_id = ac.collector_id ' ||
345: l_filter_cond_str|| -- Added for Bug #6311505 bibeura 23-Oct-2007
346: -- ' AND hp.cust_account_id = -1 ' || Bug4775052. Fix By LKKUMAR on 29-Nov-2005

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

349: ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) ' ||
350: ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) ' ||
351: --' UNION ALL select hp.party_id '||
352: ' UNION ALL ' || l_filter_col_str2 || -- Added for Bug #6311505 bibeura 23-Oct-2007
353: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
354: ' WHERE hp.collector_id = ac.collector_id ' ||
355: l_filter_cond_str|| -- Added for Bug #6311505 bibeura 23-Oct-2007
356: -- ' AND hp.cust_account_id = -1 ' || Bug4775052. Fix By LKKUMAR on 29-Nov-2005
357: ' AND ac.employee_id = :PERSON_ID ' ||

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

357: ' AND ac.employee_id = :PERSON_ID ' ||
358: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
359: --' UNION ALL SELECT hp.party_id ' ||
360: ' UNION ALL ' || l_filter_col_str2 || -- Added for Bug #6311505 bibeura 23-Oct-2007
361: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
362: ' WHERE hp.collector_id = ac.collector_id ' ||
363: ' AND ac.resource_ID = jtgrp.group_id ' ||
364: l_filter_cond_str|| -- Added for Bug #6311505 bibeura 23-Oct-2007
365: -- ' AND hp.cust_account_id = -1 ' || Bug4775052. Fix By LKKUMAR on 29-Nov-2005

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

370: Else
371: l_security_where :=
372: --'customer_id in (select hp.party_id '||
373: l_filter_col_str1|| -- Added for Bug #6311505 bibeura 23-Oct-2007
374: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
375: ' WHERE hp.collector_id = ac.collector_id ' ||
376: l_filter_cond_str|| -- Added for Bug #6311505 bibeura 23-Oct-2007
377: -- ' AND hp.cust_account_id = -1 ' || Bug4775052. Fix By LKKUMAR on 29-Nov-2005
378: ' AND ac.employee_id = :PERSON_ID ' ||

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

378: ' AND ac.employee_id = :PERSON_ID ' ||
379: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
380: --' UNION ALL SELECT hp.party_id ' ||
381: ' UNION ALL ' || l_filter_col_str2 || -- Added for Bug #6311505 bibeura 23-Oct-2007
382: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
383: ' WHERE hp.collector_id = ac.collector_id ' ||
384: ' AND ac.resource_ID = jtgrp.group_id ' ||
385: l_filter_cond_str || -- Added for Bug #6311505 bibeura 23-Oct-2007
386: -- ' AND hp.cust_account_id = -1 ' || Bug4775052. Fix By LKKUMAR on 29-Nov-2005

Line 495: SELECT collector_id from AR_COLLECTORS where resource_id = p_resource_id

491: FROM ieu_uwq_sel_enumerators
492: WHERE sel_enum_id = in_sel_enum_id;
493:
494: CURSOR c_collector_id IS
495: SELECT collector_id from AR_COLLECTORS where resource_id = p_resource_id
496: and resource_type = 'RS_RESOURCE';
497:
498: l_sel_enum_rec c_sel_enum%ROWTYPE;
499:

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

547:
548: --Bug4221349. Implement Group Hierarchy. Fix By LKKUMAR on 22-Mar-2006. Start.
549: /* l_additional_where :=
550: ' UNION ALL SELECT hp.party_id ' ||
551: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp, ' ||
552: ' JTF_RS_GROUPS_DENORM jrg ' ||
553: ' WHERE hp.collector_id = ac.collector_id ' ||
554: ' AND ac.resource_ID = jtgrp.group_id ' ||
555: ' AND jtgrp.group_id = jrg.group_id ' ||

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

606: AND TRUNC(NVL(END_DATE,SYSDATE)) >= TRUNC(SYSDATE)
607: AND NVL(DELETED_FLAG,'N') = 'N';
608:
609: select count(1) into l_group_check
610: from ar_collectors where status='A' and
611: nvl(inactive_date,sysdate)>=sysdate and resource_type='RS_GROUP';
612:
613: END IF;
614:

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

615: --Start bug#5874874 gnramasa 25-Apr-2007
616: /* If (l_check > 0 ) then
617: l_security_where :=
618: 'party_id in (select hp.party_id ' ||
619: ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||
620: ' iex_assignments iea ' ||
621: ' WHERE hp.collector_id = ac.collector_id ' ||
622: ' AND ac.resource_id = iea.resource_id ' ||
623: ' AND hp.cust_account_id = -1 ' ||

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

625: ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) ' ||
626: ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) ' ||
627: ' AND NVL(IEA.DELETED_FLAG,''N'') = ''N'' ' ||
628: ' UNION ALL select hp.party_id '||
629: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
630: ' WHERE hp.collector_id = ac.collector_id ' ||
631: ' AND ac.employee_id = :PERSON_ID ' ||
632: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
633: ' AND hp.cust_account_id = -1 ' ||

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

631: ' AND ac.employee_id = :PERSON_ID ' ||
632: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
633: ' AND hp.cust_account_id = -1 ' ||
634: ' UNION ALL SELECT hp.party_id ' ||
635: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
636: ' WHERE hp.collector_id = ac.collector_id ' ||
637: ' AND ac.resource_ID = jtgrp.group_id ' ||
638: ' AND hp.cust_account_id = -1 ' ||
639: ' AND ac.resource_type = ''RS_GROUP'' ' ||

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

645:
646: Else
647: l_security_where :=
648: 'party_id in (select hp.party_id '||
649: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
650: ' WHERE hp.collector_id = ac.collector_id ' ||
651: ' AND ac.employee_id = :PERSON_ID ' ||
652: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
653: ' AND hp.cust_account_id = -1 ' ||

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

651: ' AND ac.employee_id = :PERSON_ID ' ||
652: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
653: ' AND hp.cust_account_id = -1 ' ||
654: ' UNION ALL SELECT hp.party_id ' ||
655: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
656: ' WHERE hp.collector_id = ac.collector_id ' ||
657: ' AND ac.resource_ID = jtgrp.group_id ' ||
658: ' AND hp.cust_account_id = -1 ' ||
659: ' AND ac.resource_type = ''RS_GROUP'' ' ||

Line 669: 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 ';

665: End If; */
666:
667: if l_check>0 or l_group_check>0 then
668: --l_security_where := ' :person_id = :person_id and collector_resource_id in (select :COLLECTOR_RESOURCE_ID from dual ';
669: 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 ';
670:
671: else
672: l_security_where := ' :person_id = :person_id and collector_resource_id = :COLLECTOR_RESOURCE_ID ';
673: end if;

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

672: l_security_where := ' :person_id = :person_id and collector_resource_id = :COLLECTOR_RESOURCE_ID ';
673: end if;
674:
675: if l_check>0 then
676: l_security_where := l_security_where || ' union all SELECT ac.resource_id FROM iex_assignments iea,ar_collectors ac where '||
677: ' iea.alt_employee_id = :PERSON_ID '||
678: ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) '||
679: ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) '||
680: ' AND NVL(iea.DELETED_FLAG,''N'') = ''N'' '||

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

683: end if;
684:
685: if l_group_check>0 then
686: l_security_where := l_security_where || ' union all SELECT ac.resource_ID '||
687: ' FROM ar_collectors ac , jtf_rs_group_members jtgrp '||
688: ' WHERE ac.resource_ID = jtgrp.group_id '||
689: ' AND ac.resource_type = ''RS_GROUP'''||
690: ' AND NVL(jtgrp.delete_flag,''N'') = ''N'''||
691: ' AND jtgrp.resource_ID = :COLLECTOR_RESOURCE_ID ';

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

805: --Start bug#5874874 gnramasa 25-Apr-2007
806: /* If (l_check > 0 ) then
807: l_security_where :=
808: 'party_id in (select hp.party_id '||
809: ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||
810: ' iex_assignments iea ' ||
811: ' WHERE hp.collector_id = ac.collector_id ' ||
812: ' AND ac.resource_id = iea.resource_id ' ||
813: ' AND hp.cust_account_id = -1 ' ||

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

815: ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) ' ||
816: ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) ' ||
817: ' AND NVL(IEA.DELETED_FLAG,''N'') = ''N'' ' ||
818: ' UNION ALL select hp.party_id '||
819: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
820: ' WHERE hp.collector_id = ac.collector_id ' ||
821: ' AND ac.employee_id = :PERSON_ID ' ||
822: ' AND hp.cust_account_id = -1 ' ||
823: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||

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

821: ' AND ac.employee_id = :PERSON_ID ' ||
822: ' AND hp.cust_account_id = -1 ' ||
823: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
824: ' UNION ALL SELECT hp.party_id ' ||
825: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
826: ' WHERE hp.collector_id = ac.collector_id ' ||
827: ' AND ac.resource_ID = jtgrp.group_id ' ||
828: ' AND hp.cust_account_id = -1 ' ||
829: ' AND ac.resource_type = ''RS_GROUP'' ' ||

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

834: --Bug4221349. Implement Group Hierarchy. Fix By LKKUMAR on 22-Mar-2006. End.
835: Else
836: l_security_where :=
837: 'party_id in (select hp.party_id '||
838: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
839: ' WHERE hp.collector_id = ac.collector_id ' ||
840: ' AND ac.employee_id = :PERSON_ID ' ||
841: ' AND hp.cust_account_id = -1 ' ||
842: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||

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

840: ' AND ac.employee_id = :PERSON_ID ' ||
841: ' AND hp.cust_account_id = -1 ' ||
842: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
843: ' UNION ALL SELECT hp.party_id ' ||
844: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
845: ' WHERE hp.collector_id = ac.collector_id ' ||
846: ' AND ac.resource_ID = jtgrp.group_id ' ||
847: ' AND NVL(jtgrp.delete_flag,''N'') = ''N'' ' ||
848: ' AND hp.cust_account_id = -1 ' ||

Line 859: 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 ';

855:
856:
857: if l_check>0 or l_group_check>0 then
858: --l_security_where := ' :person_id = :person_id and collector_resource_id in (select :COLLECTOR_RESOURCE_ID from dual ';
859: 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 ';
860:
861: else
862: l_security_where := ' :person_id = :person_id and collector_resource_id = :COLLECTOR_RESOURCE_ID ';
863: end if;

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

862: l_security_where := ' :person_id = :person_id and collector_resource_id = :COLLECTOR_RESOURCE_ID ';
863: end if;
864:
865: if l_check>0 then
866: l_security_where := l_security_where || ' union all SELECT ac.resource_id FROM iex_assignments iea,ar_collectors ac where '||
867: ' iea.alt_employee_id = :PERSON_ID '||
868: ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) '||
869: ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) '||
870: ' AND NVL(iea.DELETED_FLAG,''N'') = ''N'' '||

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

873: end if;
874:
875: if l_group_check>0 then
876: l_security_where := l_security_where || ' union all SELECT ac.resource_ID '||
877: ' FROM ar_collectors ac , jtf_rs_group_members jtgrp '||
878: ' WHERE ac.resource_ID = jtgrp.group_id '||
879: ' AND ac.resource_type = ''RS_GROUP'''||
880: ' AND NVL(jtgrp.delete_flag,''N'') = ''N'''||
881: ' AND jtgrp.resource_ID = :COLLECTOR_RESOURCE_ID ';

Line 1023: SELECT collector_id from AR_COLLECTORS where resource_id = p_resource_id

1019: FROM ieu_uwq_sel_enumerators
1020: WHERE sel_enum_id = in_sel_enum_id;
1021:
1022: CURSOR c_collector_id IS
1023: SELECT collector_id from AR_COLLECTORS where resource_id = p_resource_id
1024: and resource_type = 'RS_RESOURCE';
1025:
1026: l_sel_enum_rec c_sel_enum%ROWTYPE;
1027:

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

1093:
1094: --Bug4221349. Implement Group Hierarchy. Fix By LKKUMAR on 22-Mar-2006. Start.
1095: /* l_additional_where1 :=
1096: ' UNION ALL SELECT hp.party_id ' ||
1097: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp, ' ||
1098: ' JTF_RS_GROUPS_DENORM jrg ' ||
1099: ' WHERE hp.collector_id = ac.collector_id ' ||
1100: ' AND ac.resource_ID = jtgrp.group_id ' ||
1101: ' AND jtgrp.group_id = jrg.group_id ' ||

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

1104: ' AND jtgrp.PERSON_ID = :PERSON_ID ) ';
1105:
1106: l_additional_where2 :=
1107: ' UNION ALL SELECT hp.party_id ' ||
1108: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp, ' ||
1109: ' JTF_RS_GROUPS_DENORM jrg ' ||
1110: ' WHERE hp.collector_id = ac.collector_id ' ||
1111: ' AND ac.resource_ID = jtgrp.group_id ' ||
1112: ' AND jtgrp.group_id = jrg.group_id ' ||

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

1135: AND NVL(DELETED_FLAG,'N') = 'N';
1136: --Bug4646657 . Check for Deleted flag .Fixed by lkkumar. End.
1137:
1138: select count(1) into l_group_check
1139: from ar_collectors where status='A' and
1140: nvl(inactive_date,sysdate)>=sysdate and resource_type='RS_GROUP';
1141:
1142: END IF;
1143:

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

1144: /* IF l_Level = 'PARTY' then
1145: If (l_check > 0) then
1146: l_security_where :=
1147: 'party_id in (select hp.party_id '||
1148: ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||
1149: ' iex_assignments iea ' ||
1150: ' WHERE hp.collector_id = ac.collector_id ' ||
1151: ' AND hp.cust_account_id = -1 ' ||
1152: ' AND ac.resource_id = iea.resource_id ' ||

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

1154: ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) ' ||
1155: ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) ' ||
1156: ' AND NVL(IEA.DELETED_FLAG,''N'') = ''N'' ' ||
1157: ' UNION ALL select hp.party_id '||
1158: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
1159: ' WHERE hp.collector_id = ac.collector_id ' ||
1160: ' AND ac.employee_id = :PERSON_ID ' ||
1161: ' AND hp.cust_account_id = -1 ' ||
1162: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||

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

1160: ' AND ac.employee_id = :PERSON_ID ' ||
1161: ' AND hp.cust_account_id = -1 ' ||
1162: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
1163: ' UNION ALL SELECT hp.party_id ' ||
1164: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
1165: ' WHERE hp.collector_id = ac.collector_id ' ||
1166: ' AND ac.resource_ID = jtgrp.group_id ' ||
1167: ' AND hp.cust_account_id = -1 ' ||
1168: ' AND ac.resource_type = ''RS_GROUP'' ' ||

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

1173: --Bug4221349. Implement Group Hierarchy. Fix By LKKUMAR on 22-Mar-2006. End.
1174: Else
1175: l_security_where :=
1176: 'party_id in (select hp.party_id '||
1177: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
1178: ' WHERE hp.collector_id = ac.collector_id ' ||
1179: ' AND ac.employee_id = :PERSON_ID ' ||
1180: ' AND hp.cust_account_id = -1 ' ||
1181: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||

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

1179: ' AND ac.employee_id = :PERSON_ID ' ||
1180: ' AND hp.cust_account_id = -1 ' ||
1181: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
1182: ' UNION ALL SELECT hp.party_id ' ||
1183: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
1184: ' WHERE hp.collector_id = ac.collector_id ' ||
1185: ' AND ac.resource_ID = jtgrp.group_id ' ||
1186: ' AND hp.cust_account_id = -1 ' ||
1187: ' AND ac.resource_type = ''RS_GROUP'' ' ||

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

1195: ELSE
1196: If (l_check > 0) then
1197: l_security_where :=
1198: 'party_id in (select hp.party_id '||
1199: ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||
1200: ' iex_assignments iea ' ||
1201: ' WHERE hp.collector_id = ac.collector_id ' ||
1202: ' AND ' || l_view_name ||
1203: '.cust_account_id = hp.cust_account_id ' ||

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

1207: ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) ' ||
1208: ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) ' ||
1209: ' AND NVL(IEA.DELETED_FLAG,''N'') = ''N'' ' ||
1210: ' UNION ALL select hp.party_id '||
1211: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
1212: ' WHERE hp.collector_id = ac.collector_id ' ||
1213: ' AND ' || l_view_name ||
1214: '.cust_account_id = hp.cust_account_id ' ||
1215: ' AND hp.site_use_id is NULL ' ||

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

1215: ' AND hp.site_use_id is NULL ' ||
1216: ' AND ac.employee_id = :PERSON_ID ' ||
1217: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
1218: ' UNION ALL SELECT hp.party_id ' ||
1219: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
1220: ' WHERE hp.collector_id = ac.collector_id ' ||
1221: ' AND ac.resource_ID = jtgrp.group_id ' ||
1222: ' AND ' || l_view_name ||
1223: '.cust_account_id = hp.cust_account_id ' ||

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

1231:
1232: Else
1233: l_security_where :=
1234: 'party_id in (select hp.party_id '||
1235: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
1236: ' WHERE hp.collector_id = ac.collector_id ' ||
1237: ' AND ' || l_view_name ||
1238: '.cust_account_id = hp.cust_account_id ' ||
1239: ' AND hp.site_use_id is NULL ' ||

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

1239: ' AND hp.site_use_id is NULL ' ||
1240: ' AND ac.employee_id = :PERSON_ID ' ||
1241: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
1242: ' UNION ALL SELECT hp.party_id ' ||
1243: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
1244: ' WHERE hp.collector_id = ac.collector_id ' ||
1245: ' AND ac.resource_ID = jtgrp.group_id ' ||
1246: ' AND ' || l_view_name ||
1247: '.cust_account_id = hp.cust_account_id ' ||

Line 1261: 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 ';

1257: END IF; */
1258:
1259: if l_check>0 or l_group_check>0 then
1260: --l_security_where := ' :person_id = :person_id and collector_resource_id in (select :COLLECTOR_RESOURCE_ID from dual ';
1261: 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 ';
1262:
1263: else
1264: l_security_where := ' :person_id = :person_id and collector_resource_id = :COLLECTOR_RESOURCE_ID ';
1265: end if;

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

1264: l_security_where := ' :person_id = :person_id and collector_resource_id = :COLLECTOR_RESOURCE_ID ';
1265: end if;
1266:
1267: if l_check>0 then
1268: l_security_where := l_security_where || ' union all SELECT ac.resource_id FROM iex_assignments iea,ar_collectors ac where '||
1269: ' iea.alt_employee_id = :PERSON_ID '||
1270: ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) '||
1271: ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) '||
1272: ' AND NVL(iea.DELETED_FLAG,''N'') = ''N'' '||

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

1275: end if;
1276:
1277: if l_group_check>0 then
1278: l_security_where := l_security_where || ' union all SELECT ac.resource_ID '||
1279: ' FROM ar_collectors ac , jtf_rs_group_members jtgrp '||
1280: ' WHERE ac.resource_ID = jtgrp.group_id '||
1281: ' AND ac.resource_type = ''RS_GROUP'''||
1282: ' AND NVL(jtgrp.delete_flag,''N'') = ''N'''||
1283: ' AND jtgrp.resource_ID = :COLLECTOR_RESOURCE_ID ';

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

1381: /* IF l_Level = 'PARTY' then
1382: If (l_check > 0) then
1383: l_security_where :=
1384: 'party_id in (select hp.party_id '||
1385: ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||
1386: ' iex_assignments iea ' ||
1387: ' WHERE hp.collector_id = ac.collector_id ' ||
1388: ' AND hp.cust_account_id = -1 ' ||
1389: ' AND ac.resource_id = iea.resource_id ' ||

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

1391: ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) ' ||
1392: ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) ' ||
1393: ' AND NVL(IEA.DELETED_FLAG,''N'') = ''N'' ' ||
1394: ' UNION ALL select hp.party_id '||
1395: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
1396: ' WHERE hp.collector_id = ac.collector_id ' ||
1397: ' AND hp.cust_account_id = -1 ' ||
1398: ' AND ac.employee_id = :PERSON_ID ' ||
1399: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||

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

1397: ' AND hp.cust_account_id = -1 ' ||
1398: ' AND ac.employee_id = :PERSON_ID ' ||
1399: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
1400: ' UNION ALL SELECT hp.party_id ' ||
1401: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
1402: ' WHERE hp.collector_id = ac.collector_id ' ||
1403: ' AND ac.resource_ID = jtgrp.group_id ' ||
1404: ' AND hp.cust_account_id = -1 ' ||
1405: ' AND ac.resource_type = ''RS_GROUP'' ' ||

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

1411:
1412: Else
1413: l_security_where :=
1414: 'party_id in (select hp.party_id '||
1415: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
1416: ' WHERE hp.collector_id = ac.collector_id ' ||
1417: ' AND hp.cust_account_id = -1 ' ||
1418: ' AND ac.employee_id = :PERSON_ID ' ||
1419: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||

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

1417: ' AND hp.cust_account_id = -1 ' ||
1418: ' AND ac.employee_id = :PERSON_ID ' ||
1419: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
1420: ' UNION ALL SELECT hp.party_id ' ||
1421: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
1422: ' WHERE hp.collector_id = ac.collector_id ' ||
1423: ' AND ac.resource_ID = jtgrp.group_id ' ||
1424: ' AND hp.cust_account_id = -1 ' ||
1425: ' AND ac.resource_type = ''RS_GROUP'' ' ||

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

1433: ELSE
1434: If (l_check > 0) then
1435: l_security_where :=
1436: 'party_id in (select hp.party_id '||
1437: ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||
1438: ' iex_assignments iea ' ||
1439: ' WHERE hp.collector_id = ac.collector_id ' ||
1440: ' AND ' || l_view_name ||
1441: '.cust_account_id = hp.cust_account_id ' ||

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

1445: ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) ' ||
1446: ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) ' ||
1447: ' AND NVL(IEA.DELETED_FLAG,''N'') = ''N'' ' ||
1448: ' UNION ALL select hp.party_id '||
1449: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
1450: ' WHERE hp.collector_id = ac.collector_id ' ||
1451: ' AND ' || l_view_name ||
1452: '.cust_account_id = hp.cust_account_id ' ||
1453: ' AND hp.site_use_id is NULL ' ||

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

1453: ' AND hp.site_use_id is NULL ' ||
1454: ' AND ac.employee_id = :PERSON_ID '||
1455: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
1456: ' UNION ALL SELECT hp.party_id ' ||
1457: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
1458: ' WHERE hp.collector_id = ac.collector_id ' ||
1459: ' AND ac.resource_ID = jtgrp.group_id ' ||
1460: ' AND ' || l_view_name ||
1461: '.cust_account_id = hp.cust_account_id ' ||

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

1469:
1470: Else
1471: l_security_where :=
1472: 'party_id in (select hp.party_id '||
1473: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
1474: ' WHERE hp.collector_id = ac.collector_id ' ||
1475: ' AND ' || l_view_name ||
1476: '.cust_account_id = hp.cust_account_id ' ||
1477: ' AND hp.site_use_id is NULL ' ||

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

1477: ' AND hp.site_use_id is NULL ' ||
1478: ' AND ac.employee_id = :PERSON_ID '||
1479: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
1480: ' UNION ALL SELECT hp.party_id ' ||
1481: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
1482: ' WHERE hp.collector_id = ac.collector_id ' ||
1483: ' AND ac.resource_ID = jtgrp.group_id ' ||
1484: ' AND ' || l_view_name ||
1485: '.cust_account_id = hp.cust_account_id ' ||

Line 1499: 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 ';

1495: END IF; */
1496:
1497: if l_check>0 or l_group_check>0 then
1498: --l_security_where := ' :person_id = :person_id and collector_resource_id in (select :COLLECTOR_RESOURCE_ID from dual ';
1499: 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 ';
1500:
1501: else
1502: l_security_where := ' :person_id = :person_id and collector_resource_id = :COLLECTOR_RESOURCE_ID ';
1503: end if;

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

1502: l_security_where := ' :person_id = :person_id and collector_resource_id = :COLLECTOR_RESOURCE_ID ';
1503: end if;
1504:
1505: if l_check>0 then
1506: l_security_where := l_security_where || ' union all SELECT ac.resource_id FROM iex_assignments iea,ar_collectors ac where '||
1507: ' iea.alt_employee_id = :PERSON_ID '||
1508: ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) '||
1509: ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) '||
1510: ' AND NVL(iea.DELETED_FLAG,''N'') = ''N'' '||

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

1513: end if;
1514:
1515: if l_group_check>0 then
1516: l_security_where := l_security_where || ' union all SELECT ac.resource_ID '||
1517: ' FROM ar_collectors ac , jtf_rs_group_members jtgrp '||
1518: ' WHERE ac.resource_ID = jtgrp.group_id '||
1519: ' AND ac.resource_type = ''RS_GROUP'''||
1520: ' AND NVL(jtgrp.delete_flag,''N'') = ''N'''||
1521: ' AND jtgrp.resource_ID = :COLLECTOR_RESOURCE_ID ';

Line 1666: SELECT collector_id from AR_COLLECTORS where resource_id = p_resource_id

1662: FROM ieu_uwq_sel_enumerators
1663: WHERE sel_enum_id = in_sel_enum_id;
1664:
1665: CURSOR c_collector_id IS
1666: SELECT collector_id from AR_COLLECTORS where resource_id = p_resource_id
1667: and resource_type = 'RS_RESOURCE';
1668:
1669: l_sel_enum_rec c_sel_enum%ROWTYPE;
1670:

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

1744:
1745: --Bug4221349. Implement Group Hierarchy. Fix By LKKUMAR on 22-Mar-2006. Start.
1746: /* l_additional_where1 :=
1747: ' UNION ALL SELECT hp.party_id ' ||
1748: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp, ' ||
1749: ' JTF_RS_GROUPS_DENORM jrg ' ||
1750: ' WHERE hp.collector_id = ac.collector_id ' ||
1751: ' AND ac.resource_ID = jtgrp.group_id ' ||
1752: ' AND jtgrp.group_id = jrg.group_id ' ||

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

1755: ' AND jtgrp.PERSON_ID = :PERSON_ID ) ';
1756:
1757: l_additional_where2 :=
1758: ' UNION ALL SELECT hp.party_id ' ||
1759: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp, ' ||
1760: ' JTF_RS_GROUPS_DENORM jrg ' ||
1761: ' WHERE hp.collector_id = ac.collector_id ' ||
1762: ' AND ac.resource_ID = jtgrp.group_id ' ||
1763: ' AND jtgrp.group_id = jrg.group_id ' ||

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

1782: AND NVL(DELETED_FLAG,'N') = 'N';
1783: --Bug4646657 . Check for Deleted flag .Fixed by lkkumar. End.
1784:
1785: select count(1) into l_group_check
1786: from ar_collectors where status='A' and
1787: nvl(inactive_date,sysdate)>=sysdate and resource_type='RS_GROUP';
1788:
1789: END IF;
1790:

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

1792: /* IF l_Level = 'PARTY' then
1793: If (l_check > 0) then
1794: l_security_where :=
1795: 'party_id in (select hp.party_id '||
1796: ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||
1797: ' iex_assignments iea ' ||
1798: ' WHERE hp.collector_id = ac.collector_id ' ||
1799: ' AND hp.cust_account_id = -1 ' ||
1800: ' AND ac.resource_id = iea.resource_id ' ||

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

1802: ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) ' ||
1803: ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) ' ||
1804: ' AND NVL(IEA.DELETED_FLAG,''N'') = ''N'' '||
1805: ' UNION ALL select hp.party_id '||
1806: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
1807: ' WHERE hp.collector_id = ac.collector_id ' ||
1808: ' AND hp.cust_account_id = -1 ' ||
1809: ' AND ac.employee_id = :PERSON_ID ' ||
1810: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||

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

1808: ' AND hp.cust_account_id = -1 ' ||
1809: ' AND ac.employee_id = :PERSON_ID ' ||
1810: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
1811: ' UNION ALL SELECT hp.party_id ' ||
1812: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
1813: ' WHERE hp.collector_id = ac.collector_id ' ||
1814: ' AND ac.resource_ID = jtgrp.group_id ' ||
1815: ' AND hp.cust_account_id = -1 ' ||
1816: ' AND ac.resource_type = ''RS_GROUP'' ' ||

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

1821: --Bug4221349. Implement Group Hierarchy. Fix By LKKUMAR on 22-Mar-2006. End.
1822: Else
1823: l_security_where :=
1824: 'party_id in (select hp.party_id '||
1825: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
1826: ' WHERE hp.collector_id = ac.collector_id ' ||
1827: ' AND hp.cust_account_id = -1 ' ||
1828: ' AND ac.employee_id = :PERSON_ID ' ||
1829: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||

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

1827: ' AND hp.cust_account_id = -1 ' ||
1828: ' AND ac.employee_id = :PERSON_ID ' ||
1829: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
1830: ' UNION ALL SELECT hp.party_id ' ||
1831: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
1832: ' WHERE hp.collector_id = ac.collector_id ' ||
1833: ' AND ac.resource_ID = jtgrp.group_id ' ||
1834: ' AND hp.cust_account_id = -1 ' ||
1835: ' AND ac.resource_type = ''RS_GROUP'' ' ||

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

1842: ELSIF l_level = 'ACCOUNT' then
1843: If (l_check > 0) then
1844: l_security_where :=
1845: 'party_id in (select hp.party_id '||
1846: ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||
1847: ' iex_assignments iea ' ||
1848: ' WHERE hp.collector_id = ac.collector_id ' ||
1849: ' AND ' || l_view_name ||
1850: '.cust_account_id = hp.cust_account_id ' ||

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

1854: ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) ' ||
1855: ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) ' ||
1856: ' AND NVL(IEA.DELETED_FLAG,''N'') = ''N'' '||
1857: ' UNION ALL select hp.party_id '||
1858: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
1859: ' WHERE hp.collector_id = ac.collector_id ' ||
1860: ' AND ' || l_view_name ||
1861: '.cust_account_id = hp.cust_account_id ' ||
1862: ' AND hp.site_use_id is NULL '||

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

1862: ' AND hp.site_use_id is NULL '||
1863: ' AND ac.employee_id = :PERSON_ID ' ||
1864: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
1865: ' UNION ALL SELECT hp.party_id ' ||
1866: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
1867: ' WHERE hp.collector_id = ac.collector_id ' ||
1868: ' AND ac.resource_ID = jtgrp.group_id ' ||
1869: ' AND ac.resource_type = ''RS_GROUP'' ' ||
1870: ' AND NVL(jtgrp.delete_flag,''N'') = ''N'' ' ||

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

1877: --Bug4221349. Implement Group Hierarchy. Fix By LKKUMAR on 22-Mar-2006. End.
1878: Else
1879: l_security_where :=
1880: 'party_id in (select hp.party_id '||
1881: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
1882: ' WHERE hp.collector_id = ac.collector_id ' ||
1883: ' AND ' || l_view_name ||
1884: '.cust_account_id = hp.cust_account_id ' ||
1885: ' AND hp.site_use_id is NULL '||

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

1885: ' AND hp.site_use_id is NULL '||
1886: ' AND ac.employee_id = :PERSON_ID ' ||
1887: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
1888: ' UNION ALL SELECT hp.party_id ' ||
1889: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
1890: ' WHERE hp.collector_id = ac.collector_id ' ||
1891: ' AND ac.resource_ID = jtgrp.group_id ' ||
1892: ' AND ac.resource_type = ''RS_GROUP'' ' ||
1893: ' AND NVL(jtgrp.delete_flag,''N'') = ''N'' ' ||

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

1902: Else
1903: If (l_check > 0) then
1904: l_security_where :=
1905: 'party_id in (select hp.party_id '||
1906: ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||
1907: ' iex_assignments iea ' ||
1908: ' WHERE hp.collector_id = ac.collector_id ' ||
1909: ' AND ' || l_view_name ||
1910: '.site_use_id = hp.site_use_id ' ||

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

1913: ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) ' ||
1914: ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) ' ||
1915: ' AND NVL(IEA.DELETED_FLAG,''N'') = ''N'' ' ||
1916: ' UNION ALL select hp.party_id '||
1917: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
1918: ' WHERE hp.collector_id = ac.collector_id ' ||
1919: ' AND ' || l_view_name ||
1920: '.site_use_id = hp.site_use_id ' ||
1921: ' AND ac.employee_id = :PERSON_ID ' ||

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

1920: '.site_use_id = hp.site_use_id ' ||
1921: ' AND ac.employee_id = :PERSON_ID ' ||
1922: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
1923: ' UNION ALL SELECT hp.party_id ' ||
1924: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
1925: ' WHERE hp.collector_id = ac.collector_id ' ||
1926: ' AND ' || l_view_name ||
1927: '.site_use_id = hp.site_use_id ' ||
1928: ' AND ac.resource_ID = jtgrp.group_id ' ||

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

1934: --Bug4221349. Implement Group Hierarchy. Fix By LKKUMAR on 22-Mar-2006. End.
1935: Else
1936: l_security_where :=
1937: 'party_id in (select hp.party_id '||
1938: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
1939: ' WHERE hp.collector_id = ac.collector_id ' ||
1940: ' AND ' || l_view_name ||
1941: '.site_use_id = hp.site_use_id ' ||
1942: ' AND ac.employee_id = :PERSON_ID ' ||

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

1941: '.site_use_id = hp.site_use_id ' ||
1942: ' AND ac.employee_id = :PERSON_ID ' ||
1943: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
1944: ' UNION ALL SELECT hp.party_id ' ||
1945: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
1946: ' WHERE hp.collector_id = ac.collector_id ' ||
1947: ' AND ' || l_view_name ||
1948: '.site_use_id = hp.site_use_id ' ||
1949: ' AND ac.resource_ID = jtgrp.group_id ' ||

Line 1961: 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 ';

1957: END IF; */
1958:
1959: if l_check>0 or l_group_check>0 then
1960: --l_security_where := ' :person_id = :person_id and collector_resource_id in (select :COLLECTOR_RESOURCE_ID from dual ';
1961: 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 ';
1962: else
1963: l_security_where := ' :person_id = :person_id and collector_resource_id = :COLLECTOR_RESOURCE_ID ';
1964: end if;
1965:

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

1963: l_security_where := ' :person_id = :person_id and collector_resource_id = :COLLECTOR_RESOURCE_ID ';
1964: end if;
1965:
1966: if l_check>0 then
1967: l_security_where := l_security_where || ' union all SELECT ac.resource_id FROM iex_assignments iea,ar_collectors ac where '||
1968: ' iea.alt_employee_id = :PERSON_ID '||
1969: ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) '||
1970: ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) '||
1971: ' AND NVL(iea.DELETED_FLAG,''N'') = ''N'' '||

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

1974: end if;
1975:
1976: if l_group_check>0 then
1977: l_security_where := l_security_where || ' union all SELECT ac.resource_ID '||
1978: ' FROM ar_collectors ac , jtf_rs_group_members jtgrp '||
1979: ' WHERE ac.resource_ID = jtgrp.group_id '||
1980: ' AND ac.resource_type = ''RS_GROUP'''||
1981: ' AND NVL(jtgrp.delete_flag,''N'') = ''N'''||
1982: ' AND jtgrp.resource_ID = :COLLECTOR_RESOURCE_ID ';

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

2085: IF l_Level = 'PARTY' then
2086: If (l_check > 0) then
2087: l_security_where :=
2088: 'party_id in (select hp.party_id '||
2089: ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||
2090: ' iex_assignments iea ' ||
2091: ' WHERE hp.collector_id = ac.collector_id ' ||
2092: ' AND hp.cust_account_id = -1 ' ||
2093: ' AND ac.resource_id = iea.resource_id ' ||

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

2095: ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) ' ||
2096: ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) ' ||
2097: ' AND NVL(IEA.DELETED_FLAG,''N'') = ''N'' ' ||
2098: ' UNION ALL select hp.party_id '||
2099: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
2100: ' WHERE hp.collector_id = ac.collector_id ' ||
2101: ' AND hp.cust_account_id = -1 ' ||
2102: ' AND ac.employee_id = :PERSON_ID ' ||
2103: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||

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

2101: ' AND hp.cust_account_id = -1 ' ||
2102: ' AND ac.employee_id = :PERSON_ID ' ||
2103: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
2104: ' UNION ALL SELECT hp.party_id ' ||
2105: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
2106: ' WHERE hp.collector_id = ac.collector_id ' ||
2107: ' AND ac.resource_ID = jtgrp.group_id ' ||
2108: ' AND hp.cust_account_id = -1 ' ||
2109: ' AND ac.resource_type = ''RS_GROUP'' ' ||

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

2114: --Bug4221349. Implement Group Hierarchy. Fix By LKKUMAR on 22-Mar-2006. End.
2115: Else
2116: l_security_where :=
2117: 'party_id in (select hp.party_id '||
2118: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
2119: ' WHERE hp.collector_id = ac.collector_id ' ||
2120: ' AND hp.cust_account_id = -1 ' ||
2121: ' AND ac.employee_id = :PERSON_ID ' ||
2122: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||

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

2120: ' AND hp.cust_account_id = -1 ' ||
2121: ' AND ac.employee_id = :PERSON_ID ' ||
2122: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
2123: ' UNION ALL SELECT hp.party_id ' ||
2124: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
2125: ' WHERE hp.collector_id = ac.collector_id ' ||
2126: ' AND ac.resource_ID = jtgrp.group_id ' ||
2127: ' AND hp.cust_account_id = -1 ' ||
2128: ' AND ac.resource_type = ''RS_GROUP'' ' ||

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

2135: ELSIF l_level = 'ACCOUNT' then
2136: If (l_check > 0) then
2137: l_security_where :=
2138: 'party_id in (select hp.party_id '||
2139: ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||
2140: ' iex_assignments iea ' ||
2141: ' WHERE hp.collector_id = ac.collector_id ' ||
2142: ' AND ' || l_view_name ||
2143: '.cust_account_id = hp.cust_account_id ' ||

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

2147: ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) ' ||
2148: ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) ' ||
2149: ' AND NVL(IEA.DELETED_FLAG,''N'') = ''N'' ' ||
2150: ' UNION ALL 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: '.cust_account_id = hp.cust_account_id ' ||
2155: ' AND ac.employee_id = :PERSON_ID ' ||

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

2154: '.cust_account_id = hp.cust_account_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 ac.resource_ID = jtgrp.group_id ' ||
2161: ' AND ' || l_view_name ||
2162: '.cust_account_id = hp.cust_account_id ' ||

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

2168: --Bug4221349. Implement Group Hierarchy. Fix By LKKUMAR on 22-Mar-2006. End.
2169: Else
2170: l_security_where :=
2171: 'party_id in (select hp.party_id '||
2172: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
2173: ' WHERE hp.collector_id = ac.collector_id ' ||
2174: ' AND ' || l_view_name ||
2175: '.cust_account_id = hp.cust_account_id ' ||
2176: ' AND ac.employee_id = :PERSON_ID ' ||

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

2175: '.cust_account_id = hp.cust_account_id ' ||
2176: ' AND ac.employee_id = :PERSON_ID ' ||
2177: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
2178: ' UNION ALL SELECT hp.party_id ' ||
2179: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
2180: ' WHERE hp.collector_id = ac.collector_id ' ||
2181: ' AND ac.resource_ID = jtgrp.group_id ' ||
2182: ' AND ' || l_view_name ||
2183: '.cust_account_id = hp.cust_account_id ' ||

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

2191: Else
2192: If (l_check > 0) then
2193: l_security_where :=
2194: 'party_id in (select hp.party_id '||
2195: ' FROM hz_customer_profiles hp, ar_collectors ac, ' ||
2196: ' iex_assignments iea ' ||
2197: ' WHERE hp.collector_id = ac.collector_id ' ||
2198: ' AND ' || l_view_name ||
2199: '.site_use_id = hp.site_use_id ' ||

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

2202: ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) ' ||
2203: ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) ' ||
2204: ' AND NVL(IEA.DELETED_FLAG,''N'') = ''N'' ' ||
2205: ' UNION ALL select hp.party_id '||
2206: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
2207: ' WHERE hp.collector_id = ac.collector_id ' ||
2208: ' AND ' || l_view_name ||
2209: '.site_use_id = hp.site_use_id ' ||
2210: ' AND ac.employee_id = :PERSON_ID ' ||

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

2209: '.site_use_id = hp.site_use_id ' ||
2210: ' AND ac.employee_id = :PERSON_ID ' ||
2211: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
2212: ' UNION ALL SELECT hp.party_id ' ||
2213: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
2214: ' WHERE hp.collector_id = ac.collector_id ' ||
2215: ' AND ac.resource_ID = jtgrp.group_id ' ||
2216: ' AND ' || l_view_name ||
2217: '.site_use_id = hp.site_use_id ' ||

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

2224:
2225: Else
2226: l_security_where :=
2227: 'party_id in (select hp.party_id '||
2228: ' FROM hz_customer_profiles hp, ar_collectors ac ' ||
2229: ' WHERE hp.collector_id = ac.collector_id ' ||
2230: ' AND ' || l_view_name ||
2231: '.site_use_id = hp.site_use_id ' ||
2232: ' AND ac.employee_id = :PERSON_ID ' ||

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

2231: '.site_use_id = hp.site_use_id ' ||
2232: ' AND ac.employee_id = :PERSON_ID ' ||
2233: ' AND ac.resource_type = ''RS_RESOURCE'' ' ||
2234: ' UNION ALL SELECT hp.party_id ' ||
2235: ' FROM hz_customer_profiles hp, ar_collectors ac , jtf_rs_group_members jtgrp ' ||
2236: ' WHERE hp.collector_id = ac.collector_id ' ||
2237: ' AND ac.resource_ID = jtgrp.group_id ' ||
2238: ' AND ' || l_view_name ||
2239: '.site_use_id = hp.site_use_id ' ||

Line 2252: 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 ';

2248: */
2249:
2250: if l_check>0 or l_group_check>0 then
2251: --l_security_where := ' :person_id = :person_id and collector_resource_id in (select :COLLECTOR_RESOURCE_ID from dual ';
2252: 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 ';
2253:
2254: else
2255: l_security_where := ' :person_id = :person_id and collector_resource_id = :COLLECTOR_RESOURCE_ID ';
2256: end if;

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

2255: l_security_where := ' :person_id = :person_id and collector_resource_id = :COLLECTOR_RESOURCE_ID ';
2256: end if;
2257:
2258: if l_check>0 then
2259: l_security_where := l_security_where || ' union all SELECT ac.resource_id FROM iex_assignments iea,ar_collectors ac where '||
2260: ' iea.alt_employee_id = :PERSON_ID '||
2261: ' AND TRUNC(iea.START_DATE) <= TRUNC(SYSDATE) '||
2262: ' AND TRUNC(NVL(iea.END_DATE,SYSDATE)) >= TRUNC(SYSDATE) '||
2263: ' AND NVL(iea.DELETED_FLAG,''N'') = ''N'' '||

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

2266: end if;
2267:
2268: if l_group_check>0 then
2269: l_security_where := l_security_where || ' union all SELECT ac.resource_ID '||
2270: ' FROM ar_collectors ac , jtf_rs_group_members jtgrp '||
2271: ' WHERE ac.resource_ID = jtgrp.group_id '||
2272: ' AND ac.resource_type = ''RS_GROUP'''||
2273: ' AND NVL(jtgrp.delete_flag,''N'') = ''N'''||
2274: ' AND jtgrp.resource_ID = :COLLECTOR_RESOURCE_ID ';