28: select decode(nvl(evt_eval.eval_mandatory_flag,'N'), 'Y', 'Y',
29: decode(act_eval.evaluation_id,null,'N',decode(nvl(act_eval.eval_mandatory_flag,'N'),'Y','Y','N'))) flag --bug 7184369
30: from ota_evaluations evt_eval,
31: ota_evaluations act_eval,
32: ota_events evt
33: where evt_eval.object_id(+) = evt.event_id
34: and (evt_eval.object_type is null or evt_eval.object_type = 'E')
35: and act_eval.object_id(+) = evt.activity_version_id
36: and (act_eval.object_type is null or act_eval.object_type = 'A')
138: p_business_group_id_from in number
139: ) is
140:
141: l_auto_create_finance varchar2(40);
142: l_price_basis ota_events.price_basis%type;
143: l_business_group_id_to hr_all_organization_units.organization_id%type;
144: l_sponsor_organization_id hr_all_organization_units.organization_id%type;
145: l_event_currency_code ota_events.currency_code%type;
146: l_event_title ota_events.title%type;
141: l_auto_create_finance varchar2(40);
142: l_price_basis ota_events.price_basis%type;
143: l_business_group_id_to hr_all_organization_units.organization_id%type;
144: l_sponsor_organization_id hr_all_organization_units.organization_id%type;
145: l_event_currency_code ota_events.currency_code%type;
146: l_event_title ota_events.title%type;
147: l_course_start_date ota_events.course_start_date%type;
148: l_course_end_date ota_events.course_end_date%type;
149: l_owner_id ota_events.owner_id%type;
142: l_price_basis ota_events.price_basis%type;
143: l_business_group_id_to hr_all_organization_units.organization_id%type;
144: l_sponsor_organization_id hr_all_organization_units.organization_id%type;
145: l_event_currency_code ota_events.currency_code%type;
146: l_event_title ota_events.title%type;
147: l_course_start_date ota_events.course_start_date%type;
148: l_course_end_date ota_events.course_end_date%type;
149: l_owner_id ota_events.owner_id%type;
150: l_activity_version_id ota_activity_versions.activity_version_id%type;
143: l_business_group_id_to hr_all_organization_units.organization_id%type;
144: l_sponsor_organization_id hr_all_organization_units.organization_id%type;
145: l_event_currency_code ota_events.currency_code%type;
146: l_event_title ota_events.title%type;
147: l_course_start_date ota_events.course_start_date%type;
148: l_course_end_date ota_events.course_end_date%type;
149: l_owner_id ota_events.owner_id%type;
150: l_activity_version_id ota_activity_versions.activity_version_id%type;
151: l_offering_id ota_events.offering_id%type;
144: l_sponsor_organization_id hr_all_organization_units.organization_id%type;
145: l_event_currency_code ota_events.currency_code%type;
146: l_event_title ota_events.title%type;
147: l_course_start_date ota_events.course_start_date%type;
148: l_course_end_date ota_events.course_end_date%type;
149: l_owner_id ota_events.owner_id%type;
150: l_activity_version_id ota_activity_versions.activity_version_id%type;
151: l_offering_id ota_events.offering_id%type;
152: l_user number;
145: l_event_currency_code ota_events.currency_code%type;
146: l_event_title ota_events.title%type;
147: l_course_start_date ota_events.course_start_date%type;
148: l_course_end_date ota_events.course_end_date%type;
149: l_owner_id ota_events.owner_id%type;
150: l_activity_version_id ota_activity_versions.activity_version_id%type;
151: l_offering_id ota_events.offering_id%type;
152: l_user number;
153: l_cost_allocation_keyflex_id VARCHAR2(1000);
147: l_course_start_date ota_events.course_start_date%type;
148: l_course_end_date ota_events.course_end_date%type;
149: l_owner_id ota_events.owner_id%type;
150: l_activity_version_id ota_activity_versions.activity_version_id%type;
151: l_offering_id ota_events.offering_id%type;
152: l_user number;
153: l_cost_allocation_keyflex_id VARCHAR2(1000);
154: l_business_group_id_from PER_ALL_ASSIGNMENTS_F.business_group_id%TYPE;
155: l_organization_id PER_ALL_ASSIGNMENTS_F.organization_id%TYPE;
170: evt.owner_id,
171: off.activity_version_id,
172: evt.offering_id,
173: nvl(evt.price_basis,NULL)
174: FROM OTA_EVENTS_VL evt,
175: OTA_OFFERINGS off,
176: HR_ALL_ORGANIZATION_UNITS hao
177: WHERE evt.event_id = p_event_id
178: AND off.offering_id = evt.parent_offering_id
396: l_automatic_transfer_gl varchar2(40);
397:
398: Cursor chk_for_comp_upd is
399: select ocu.online_flag , off.Learning_object_id from ota_category_usages ocu,
400: ota_offerings off , ota_events oev
401: where ocu.category_usage_id = off.delivery_mode_id
402: and off.offering_id = oev.parent_offering_id
403: and oev.event_id = p_event_id;
404:
415: l_LO_id ota_offerings.Learning_object_id%type;
416:
417: --Bug 5386501
418: Cursor csr_class_data is
419: Select title from ota_events_vl
420: where event_id = p_event_id;
421: l_class_name ota_events_tl.title%type;
422: l_incoming_status_type varchar2(30);
423:
417: --Bug 5386501
418: Cursor csr_class_data is
419: Select title from ota_events_vl
420: where event_id = p_event_id;
421: l_class_name ota_events_tl.title%type;
422: l_incoming_status_type varchar2(30);
423:
424: --Bug 6683076
425: Cursor c_eval_info is
426: select decode(nvl(evt_eval.eval_mandatory_flag,'N'), 'Y', 'Y',
427: decode(act_eval.evaluation_id,null,'N',decode(nvl(act_eval.eval_mandatory_flag,'N'),'Y','Y','N'))) flag --bug 7184369,6935364,7174996
428: from ota_evaluations evt_eval,
429: ota_evaluations act_eval,
430: ota_events evt
431: where evt_eval.object_id(+) = evt.event_id
432: and (evt_eval.object_type is null or evt_eval.object_type = 'E')
433: and act_eval.object_id(+) = evt.activity_version_id
434: and (act_eval.object_type is null or act_eval.object_type = 'A')
437:
438: l_eval_mand varchar2(1);
439:
440: cursor csr_get_currency_code is
441: select currency_code from ota_events
442: where event_id = p_event_id;
443:
444: l_currency_code varchar2(40);
445:
1135: select decode(nvl(evt_eval.eval_mandatory_flag,'N'), 'Y', 'Y',
1136: decode(act_eval.evaluation_id,null,'N',decode(nvl(act_eval.eval_mandatory_flag,'N'),'Y','Y','N'))) flag --bug 7184369
1137: from ota_evaluations evt_eval,
1138: ota_evaluations act_eval,
1139: ota_events evt
1140: where evt_eval.object_id(+) = evt.event_id
1141: and (evt_eval.object_type is null or evt_eval.object_type = 'E')
1142: and act_eval.object_id(+) = evt.activity_version_id
1143: and (act_eval.object_type is null or act_eval.object_type = 'A')
1424: CURSOR csr_get_class_details IS
1425: SELECT evt.course_start_time
1426: ,evt.course_start_date
1427: ,evt.event_id
1428: FROM ota_events evt,
1429: ota_delegate_bookings tdb
1430: WHERE tdb.event_id = evt.event_id
1431: AND tdb.booking_id = p_booking_id;
1432:
1437: WHERE tdb.booking_status_type_id = bst.booking_status_type_id
1438: AND bst.type = 'W'
1439: AND tdb.event_id = p_event_id;
1440:
1441: l_course_start_time OTA_EVENTS.course_start_time%TYPE;
1442: l_course_start_date OTA_EVENTS.course_start_date%TYPE;
1443: l_event_id OTA_EVENTS.event_id%TYPE;
1444: l_waitlist_count NUMBER;
1445:
1438: AND bst.type = 'W'
1439: AND tdb.event_id = p_event_id;
1440:
1441: l_course_start_time OTA_EVENTS.course_start_time%TYPE;
1442: l_course_start_date OTA_EVENTS.course_start_date%TYPE;
1443: l_event_id OTA_EVENTS.event_id%TYPE;
1444: l_waitlist_count NUMBER;
1445:
1446: BEGIN
1439: AND tdb.event_id = p_event_id;
1440:
1441: l_course_start_time OTA_EVENTS.course_start_time%TYPE;
1442: l_course_start_date OTA_EVENTS.course_start_date%TYPE;
1443: l_event_id OTA_EVENTS.event_id%TYPE;
1444: l_waitlist_count NUMBER;
1445:
1446: BEGIN
1447: OPEN csr_get_class_details;
1603:
1604: --bug 603768 changes starts
1605: l_hours_until_class_starts NUMBER := 0;
1606: l_sysdate VARCHAR2(30);
1607: l_course_start_date ota_events.course_start_date%TYPE;
1608: l_course_start_time ota_events.course_start_time%TYPE;
1609: l_event_title ota_events.title%TYPE;
1610: l_old_event_id ota_delegate_bookings.event_id%TYPE;
1611: l_owner_id ota_events.owner_id%TYPE;
1604: --bug 603768 changes starts
1605: l_hours_until_class_starts NUMBER := 0;
1606: l_sysdate VARCHAR2(30);
1607: l_course_start_date ota_events.course_start_date%TYPE;
1608: l_course_start_time ota_events.course_start_time%TYPE;
1609: l_event_title ota_events.title%TYPE;
1610: l_old_event_id ota_delegate_bookings.event_id%TYPE;
1611: l_owner_id ota_events.owner_id%TYPE;
1612: l_username fnd_user.user_name%TYPE;
1605: l_hours_until_class_starts NUMBER := 0;
1606: l_sysdate VARCHAR2(30);
1607: l_course_start_date ota_events.course_start_date%TYPE;
1608: l_course_start_time ota_events.course_start_time%TYPE;
1609: l_event_title ota_events.title%TYPE;
1610: l_old_event_id ota_delegate_bookings.event_id%TYPE;
1611: l_owner_id ota_events.owner_id%TYPE;
1612: l_username fnd_user.user_name%TYPE;
1613: l_auto_waitlist_days NUMBER;
1607: l_course_start_date ota_events.course_start_date%TYPE;
1608: l_course_start_time ota_events.course_start_time%TYPE;
1609: l_event_title ota_events.title%TYPE;
1610: l_old_event_id ota_delegate_bookings.event_id%TYPE;
1611: l_owner_id ota_events.owner_id%TYPE;
1612: l_username fnd_user.user_name%TYPE;
1613: l_auto_waitlist_days NUMBER;
1614: l_auto_waitlist varchar2(1) := 'N';
1615: l_waitlist_size NUMBER := 0;
1614: l_auto_waitlist varchar2(1) := 'N';
1615: l_waitlist_size NUMBER := 0;
1616:
1617:
1618: CURSOR event_csr(p_old_event_id ota_events.event_id%TYPE) IS
1619: SELECT oet.title,oe.course_start_date,oe.course_start_time,oe.owner_id
1620: FROM ota_events_tl oet, ota_events oe
1621: WHERE oet.event_id = oe.event_id
1622: AND oe.event_id = p_old_event_id
1616:
1617:
1618: CURSOR event_csr(p_old_event_id ota_events.event_id%TYPE) IS
1619: SELECT oet.title,oe.course_start_date,oe.course_start_time,oe.owner_id
1620: FROM ota_events_tl oet, ota_events oe
1621: WHERE oet.event_id = oe.event_id
1622: AND oe.event_id = p_old_event_id
1623: AND oet.language = userenv('LANG');
1624:
1626: CURSOR sys_date_csr IS
1627: SELECT to_char(sysdate,'DD-MON-YYYY:HH24:MI:SS')
1628: FROM dual;
1629:
1630: CURSOR fnduser_csr(l_owner_id ota_events.owner_id%TYPE) IS
1631: SELECT user_name
1632: FROM fnd_user
1633: WHERE employee_id = l_owner_id
1634: AND trunc(sysdate) BETWEEN trunc(start_date) AND nvl(trunc(end_date),trunc(sysdate)+1);
1658:
1659: Cursor chk_for_comp_upd
1660: is
1661: select ocu.online_flag , off.Learning_object_id from ota_category_usages ocu,
1662: ota_offerings off , ota_events oev
1663: where ocu.category_usage_id = off.delivery_mode_id
1664: and off.offering_id = oev.parent_offering_id
1665: and oev.event_id = p_event_id;
1666:
1715: decode(act_eval.evaluation_id,null,'N',decode(nvl(act_eval.eval_mandatory_flag,'N'),'Y','Y','N'))) flag, --bug 7184369,6935364,7174996
1716: act_eval.evaluation_id act_eval_id
1717: from ota_evaluations evt_eval,
1718: ota_evaluations act_eval,
1719: ota_events evt
1720: where evt_eval.object_id(+) = evt.event_id
1721: and (evt_eval.object_type is null or evt_eval.object_type = 'E')
1722: and act_eval.object_id(+) = evt.activity_version_id
1723: and (act_eval.object_type is null or act_eval.object_type = 'A')
2915: --bug 6063768 changes starts
2916:
2917: l_hours_until_class_starts NUMBER := 0;
2918: l_sysdate VARCHAR2(30) ;
2919: l_course_start_date ota_events.course_start_date%TYPE;
2920: l_course_start_time ota_events.course_start_time%TYPE;
2921: l_event_title ota_events.title%TYPE;
2922: l_owner_id ota_events.owner_id%TYPE;
2923: l_event_id ota_delegate_bookings.event_id%TYPE;
2916:
2917: l_hours_until_class_starts NUMBER := 0;
2918: l_sysdate VARCHAR2(30) ;
2919: l_course_start_date ota_events.course_start_date%TYPE;
2920: l_course_start_time ota_events.course_start_time%TYPE;
2921: l_event_title ota_events.title%TYPE;
2922: l_owner_id ota_events.owner_id%TYPE;
2923: l_event_id ota_delegate_bookings.event_id%TYPE;
2924: l_booking_status_type_id ota_delegate_bookings.booking_status_type_id%TYPE;
2917: l_hours_until_class_starts NUMBER := 0;
2918: l_sysdate VARCHAR2(30) ;
2919: l_course_start_date ota_events.course_start_date%TYPE;
2920: l_course_start_time ota_events.course_start_time%TYPE;
2921: l_event_title ota_events.title%TYPE;
2922: l_owner_id ota_events.owner_id%TYPE;
2923: l_event_id ota_delegate_bookings.event_id%TYPE;
2924: l_booking_status_type_id ota_delegate_bookings.booking_status_type_id%TYPE;
2925: l_booking_status ota_booking_status_types.type%TYPE;
2918: l_sysdate VARCHAR2(30) ;
2919: l_course_start_date ota_events.course_start_date%TYPE;
2920: l_course_start_time ota_events.course_start_time%TYPE;
2921: l_event_title ota_events.title%TYPE;
2922: l_owner_id ota_events.owner_id%TYPE;
2923: l_event_id ota_delegate_bookings.event_id%TYPE;
2924: l_booking_status_type_id ota_delegate_bookings.booking_status_type_id%TYPE;
2925: l_booking_status ota_booking_status_types.type%TYPE;
2926: l_username fnd_user.user_name%TYPE;
2927: l_auto_waitlist_days NUMBER;
2928: l_auto_waitlist VARCHAR2(2) := 'N';
2929: l_waitlist_size NUMBER := 0;
2930:
2931: CURSOR event_csr(p_event_id ota_events.event_id%TYPE) IS
2932: SELECT oet.title,oe.course_start_date,oe.course_start_time,oe.owner_id
2933: FROM ota_events_tl oet, ota_events oe
2934: WHERE oet.event_id = oe.event_id
2935: AND oe.event_id = p_event_id
2929: l_waitlist_size NUMBER := 0;
2930:
2931: CURSOR event_csr(p_event_id ota_events.event_id%TYPE) IS
2932: SELECT oet.title,oe.course_start_date,oe.course_start_time,oe.owner_id
2933: FROM ota_events_tl oet, ota_events oe
2934: WHERE oet.event_id = oe.event_id
2935: AND oe.event_id = p_event_id
2936: AND oet.language = userenv('LANG');
2937:
2938: CURSOR sys_date_csr IS
2939: SELECT to_char(sysdate,'DD-MON-YYYY:HH24:MI:SS')
2940: FROM dual;
2941:
2942: CURSOR fnduser_csr(l_owner_id ota_events.owner_id%TYPE) IS
2943: SELECT user_name
2944: FROM fnd_user
2945: WHERE employee_id = l_owner_id
2946: AND trunc(sysdate) BETWEEN trunc(start_date) AND nvl(trunc(end_date),trunc(sysdate)+1);
3177:
3178: l_delegate_person_id ota_delegate_bookings.delegate_person_id%TYPE;
3179: l_delegate_contact_id ota_delegate_bookings.delegate_contact_id%TYPE;
3180: l_customer_id ota_delegate_bookings.customer_id%TYPE;
3181: l_event_id ota_events.event_id%TYPE;
3182: l_booking_status_type_id ota_delegate_bookings.booking_status_type_id%TYPE;
3183: l_check_prereq boolean;
3184: l_old_status_type varchar2(30);
3185: l_new_status_type varchar2(30);