1270: -- Set up local variables
1271: --
1272:
1273: l_old_booking_status varchar2(30) := ota_tdb_bus.booking_status_type(
1274: ota_tdb_shd.g_old_rec.booking_status_type_id);
1275:
1276: l_booking_status varchar2(30) := ota_tdb_bus.booking_status_type(
1277: p_booking_status_type_id);
1278:
1276: l_booking_status varchar2(30) := ota_tdb_bus.booking_status_type(
1277: p_booking_status_type_id);
1278:
1279: l_booking_status_changed boolean := ota_general.value_changed(
1280: ota_tdb_shd.g_old_rec.booking_status_type_id,
1281: p_booking_status_type_id);
1282:
1283: l_number_of_places_changed boolean := ota_general.value_changed(
1284: ota_tdb_shd.g_old_rec.number_of_places,
1280: ota_tdb_shd.g_old_rec.booking_status_type_id,
1281: p_booking_status_type_id);
1282:
1283: l_number_of_places_changed boolean := ota_general.value_changed(
1284: ota_tdb_shd.g_old_rec.number_of_places,
1285: p_number_of_places);
1286:
1287: l_vacancies number := ota_evt_bus2.get_vacancies(p_event_id);
1288:
1285: p_number_of_places);
1286:
1287: l_vacancies number := ota_evt_bus2.get_vacancies(p_event_id);
1288:
1289: l_old_number_of_places number := ota_tdb_shd.g_old_rec.number_of_places;
1290:
1291: l_old_event_id number := ota_tdb_shd.g_old_rec.event_id;
1292:
1293: Cursor c_eval_info is
1287: l_vacancies number := ota_evt_bus2.get_vacancies(p_event_id);
1288:
1289: l_old_number_of_places number := ota_tdb_shd.g_old_rec.number_of_places;
1290:
1291: l_old_event_id number := ota_tdb_shd.g_old_rec.event_id;
1292:
1293: Cursor c_eval_info is
1294: select decode(nvl(evt_eval.eval_mandatory_flag,'N'), 'Y', 'Y',
1295: decode(act_eval.evaluation_id,null,'N',decode(nvl(act_eval.eval_mandatory_flag,'N'),'Y','Y','N'))) flag --bug 7184369
2067: --
2068: --
2069: -- Lock Enrollment (Bug 2468167)
2070: --
2071: ota_tdb_shd.lck(p_booking_id,p_object_version_number);
2072: --
2073:
2074: -- Prerequisite Validation Code
2075: -- Can be overridden if p_override_prerequisites parameter is 'Y'
2126: CLOSE csr_get_cur_booking_status;
2127:
2128: --Added for Bug#4106893
2129: IF nvl(p_event_id,hr_api.g_number) <> hr_api.g_number THEN
2130: IF p_event_id <> ota_tdb_shd.g_old_rec.event_id THEN
2131: l_event_id_changed:= true;
2132: l_new_event_id := p_event_id;
2133: END IF;
2134: ELSE -- Changed for bug 12647700
2131: l_event_id_changed:= true;
2132: l_new_event_id := p_event_id;
2133: END IF;
2134: ELSE -- Changed for bug 12647700
2135: l_new_event_id := ota_tdb_shd.g_old_rec.event_id;
2136: END IF;
2137:
2138: IF l_new_booking_status_type_id = hr_api.g_number THEN
2139: l_new_booking_status_type_id := l_existing_booking_status_id;
2447: );
2448: */
2449: --
2450: l_status_type_id_changed :=
2451: ota_general.value_changed (ota_tdb_shd.g_old_rec.booking_status_type_id,
2452: l_new_booking_status_type_id);
2453:
2454: -- Getting the old booking status to manipulate the fourm notification records
2455: l_old_booking_status := ota_tdb_bus.booking_status_type(
2452: l_new_booking_status_type_id);
2453:
2454: -- Getting the old booking status to manipulate the fourm notification records
2455: l_old_booking_status := ota_tdb_bus.booking_status_type(
2456: ota_tdb_shd.g_old_rec.booking_status_type_id);
2457:
2458: OPEN is_contact;
2459: FETCH is_contact INTO l_contact_id,l_delegate_contact_id;
2460: CLOSE is_contact;
2607: l_date_status_changed, --p_date_status_changed,Bug6801749
2608: p_administrator,
2609: l_status_change_comments, --p_status_change_comments,Bug 2359495
2610: p_booking_id,
2611: ota_tdb_shd.g_old_rec.date_status_changed,
2612: ota_tdb_shd.g_old_rec.booking_status_type_id,
2613: ota_tdb_shd.g_created_by,
2614: p_date_booking_placed);
2615: end if;
2608: p_administrator,
2609: l_status_change_comments, --p_status_change_comments,Bug 2359495
2610: p_booking_id,
2611: ota_tdb_shd.g_old_rec.date_status_changed,
2612: ota_tdb_shd.g_old_rec.booking_status_type_id,
2613: ota_tdb_shd.g_created_by,
2614: p_date_booking_placed);
2615: end if;
2616: --
2609: l_status_change_comments, --p_status_change_comments,Bug 2359495
2610: p_booking_id,
2611: ota_tdb_shd.g_old_rec.date_status_changed,
2612: ota_tdb_shd.g_old_rec.booking_status_type_id,
2613: ota_tdb_shd.g_created_by,
2614: p_date_booking_placed);
2615: end if;
2616: --
2617: ota_tdb_bus.ota_letter_lines
2625: --
2626: END IF;
2627: --
2628: IF p_delegate_person_id <> hr_api.g_number
2629: AND p_delegate_person_id <> ota_tdb_shd.g_old_rec.delegate_person_id THEN
2630: l_person_id_changed := true;
2631: END IF;
2632:
2633: IF p_delegate_contact_id <> hr_api.g_number
2630: l_person_id_changed := true;
2631: END IF;
2632:
2633: IF p_delegate_contact_id <> hr_api.g_number
2634: AND p_delegate_contact_id <> ota_tdb_shd.g_old_rec.delegate_contact_id THEN
2635: l_contact_id_changed := true;
2636: END IF;
2637:
2638: --bug 603768 changes starts
2637:
2638: --bug 603768 changes starts
2639: --Send ntf to class owner if any enrollment has been cancelled
2640: --or deleted or class changed
2641: l_old_event_id := ota_tdb_shd.g_old_rec.event_id;
2642: l_auto_waitlist := fnd_profile.value('OTA_AUTO_WAITLIST_ACTIVE');
2643: l_waitlist_size := ota_utility.students_on_waitlist(l_old_event_id);
2644:
2645: if (l_auto_waitlist = 'Y' and l_waitlist_size > 0) then
2723: update lme must be called once for old class, old learner and once for new class and new learner
2724: **/
2725: IF l_event_id_changed AND NOT l_person_id_changed AND NOT l_contact_id_changed THEN
2726: IF l_person_id IS NOT NULL THEN
2727: ota_lrng_path_member_util.update_lme_enroll_status_chg(p_event_id => ota_tdb_shd.g_old_rec.event_id,
2728: p_person_id => l_person_id,
2729: p_contact_id => null,
2730: p_lp_enrollment_ids => l_lp_enrollment_ids);
2731:
2729: p_contact_id => null,
2730: p_lp_enrollment_ids => l_lp_enrollment_ids);
2731:
2732: -- update any associated cert member enrollment statuses
2733: ota_cme_util.update_cme_status(p_event_id => ota_tdb_shd.g_old_rec.event_id,
2734: p_person_id => l_person_id,
2735: p_contact_id => null,
2736: p_cert_prd_enrollment_ids => l_cert_prd_enrollment_ids);
2737:
2747: p_cert_prd_enrollment_ids => l_cert_prd_enrollment_ids);
2748:
2749: --If the event has changed, the forum notification record should be deleted and created for the new event
2750: -- FRM Notification should be created only for Placed or Attended status. Not for 'C','W' or 'R'.
2751: deleteForumNotification(ota_tdb_shd.g_old_rec.event_id, l_person_id, null);
2752: createForumNotification(l_new_event_id, l_person_id, null, l_effective_date, l_new_booking_status_type_id);
2753:
2754: ELSIF l_delegate_contact_id IS NOT NULL THEN
2755: ota_lrng_path_member_util.update_lme_enroll_status_chg(p_event_id => ota_tdb_shd.g_old_rec.event_id,
2751: deleteForumNotification(ota_tdb_shd.g_old_rec.event_id, l_person_id, null);
2752: createForumNotification(l_new_event_id, l_person_id, null, l_effective_date, l_new_booking_status_type_id);
2753:
2754: ELSIF l_delegate_contact_id IS NOT NULL THEN
2755: ota_lrng_path_member_util.update_lme_enroll_status_chg(p_event_id => ota_tdb_shd.g_old_rec.event_id,
2756: p_person_id => null,
2757: p_contact_id => l_delegate_contact_id,
2758: p_lp_enrollment_ids => l_lp_enrollment_ids);
2759:
2757: p_contact_id => l_delegate_contact_id,
2758: p_lp_enrollment_ids => l_lp_enrollment_ids);
2759:
2760: -- update any associated cert member enrollment statuses
2761: ota_cme_util.update_cme_status(p_event_id => ota_tdb_shd.g_old_rec.event_id,
2762: p_person_id => null,
2763: p_contact_id => l_delegate_contact_id,
2764: p_cert_prd_enrollment_ids => l_cert_prd_enrollment_ids);
2765:
2773: p_person_id => null,
2774: p_contact_id => l_delegate_contact_id,
2775: p_cert_prd_enrollment_ids => l_cert_prd_enrollment_ids);
2776:
2777: deleteForumNotification(ota_tdb_shd.g_old_rec.event_id, null, l_delegate_contact_id);
2778: createForumNotification(l_new_event_id, null, l_delegate_contact_id, l_effective_date, l_new_booking_status_type_id);
2779:
2780: END IF;
2781: ELSIF l_event_id_changed THEN
2779:
2780: END IF;
2781: ELSIF l_event_id_changed THEN
2782: IF l_person_id_changed THEN
2783: ota_lrng_path_member_util.update_lme_enroll_status_chg(p_event_id => ota_tdb_shd.g_old_rec.event_id,
2784: p_person_id =>ota_tdb_shd.g_old_rec.delegate_person_id,
2785: p_contact_id => null,
2786: p_lp_enrollment_ids => l_lp_enrollment_ids);
2787:
2780: END IF;
2781: ELSIF l_event_id_changed THEN
2782: IF l_person_id_changed THEN
2783: ota_lrng_path_member_util.update_lme_enroll_status_chg(p_event_id => ota_tdb_shd.g_old_rec.event_id,
2784: p_person_id =>ota_tdb_shd.g_old_rec.delegate_person_id,
2785: p_contact_id => null,
2786: p_lp_enrollment_ids => l_lp_enrollment_ids);
2787:
2788: -- update any associated cert member enrollment statuses
2785: p_contact_id => null,
2786: p_lp_enrollment_ids => l_lp_enrollment_ids);
2787:
2788: -- update any associated cert member enrollment statuses
2789: ota_cme_util.update_cme_status(p_event_id => ota_tdb_shd.g_old_rec.event_id,
2790: p_person_id => ota_tdb_shd.g_old_rec.delegate_person_id,
2791: p_contact_id => null,
2792: p_cert_prd_enrollment_ids => l_cert_prd_enrollment_ids);
2793:
2786: p_lp_enrollment_ids => l_lp_enrollment_ids);
2787:
2788: -- update any associated cert member enrollment statuses
2789: ota_cme_util.update_cme_status(p_event_id => ota_tdb_shd.g_old_rec.event_id,
2790: p_person_id => ota_tdb_shd.g_old_rec.delegate_person_id,
2791: p_contact_id => null,
2792: p_cert_prd_enrollment_ids => l_cert_prd_enrollment_ids);
2793:
2794: ota_lrng_path_member_util.update_lme_enroll_status_chg(p_event_id => l_new_event_id,
2803: p_cert_prd_enrollment_ids => l_cert_prd_enrollment_ids);
2804:
2805: -- the class and the learner have change.So delete the forum record for old class and person
2806: -- and create a notification record for the new class and new person
2807: deleteForumNotification(ota_tdb_shd.g_old_rec.event_id, ota_tdb_shd.g_old_rec.delegate_person_id, null);
2808: createForumNotification(l_new_event_id, l_person_id, null, l_effective_date, l_new_booking_status_type_id);
2809:
2810: ELSIF l_contact_id_changed THEN
2811:
2808: createForumNotification(l_new_event_id, l_person_id, null, l_effective_date, l_new_booking_status_type_id);
2809:
2810: ELSIF l_contact_id_changed THEN
2811:
2812: ota_lrng_path_member_util.update_lme_enroll_status_chg(p_event_id => ota_tdb_shd.g_old_rec.event_id,
2813: p_person_id => null,
2814: p_contact_id =>ota_tdb_shd.g_old_rec.delegate_contact_id,
2815: p_lp_enrollment_ids => l_lp_enrollment_ids);
2816:
2810: ELSIF l_contact_id_changed THEN
2811:
2812: ota_lrng_path_member_util.update_lme_enroll_status_chg(p_event_id => ota_tdb_shd.g_old_rec.event_id,
2813: p_person_id => null,
2814: p_contact_id =>ota_tdb_shd.g_old_rec.delegate_contact_id,
2815: p_lp_enrollment_ids => l_lp_enrollment_ids);
2816:
2817: -- update any associated cert member enrollment statuses
2818: ota_cme_util.update_cme_status(p_event_id => ota_tdb_shd.g_old_rec.event_id,
2814: p_contact_id =>ota_tdb_shd.g_old_rec.delegate_contact_id,
2815: p_lp_enrollment_ids => l_lp_enrollment_ids);
2816:
2817: -- update any associated cert member enrollment statuses
2818: ota_cme_util.update_cme_status(p_event_id => ota_tdb_shd.g_old_rec.event_id,
2819: p_person_id => null,
2820: p_contact_id => ota_tdb_shd.g_old_rec.delegate_contact_id,
2821: p_cert_prd_enrollment_ids => l_cert_prd_enrollment_ids);
2822:
2816:
2817: -- update any associated cert member enrollment statuses
2818: ota_cme_util.update_cme_status(p_event_id => ota_tdb_shd.g_old_rec.event_id,
2819: p_person_id => null,
2820: p_contact_id => ota_tdb_shd.g_old_rec.delegate_contact_id,
2821: p_cert_prd_enrollment_ids => l_cert_prd_enrollment_ids);
2822:
2823: ota_lrng_path_member_util.update_lme_enroll_status_chg(p_event_id => l_new_event_id,
2824: p_person_id => null,
2830: p_person_id => null,
2831: p_contact_id => p_delegate_contact_id,
2832: p_cert_prd_enrollment_ids => l_cert_prd_enrollment_ids);
2833:
2834: deleteForumNotification(ota_tdb_shd.g_old_rec.event_id, null, ota_tdb_shd.g_old_rec.delegate_contact_id);
2835: createForumNotification(l_new_event_id, null, l_delegate_contact_id, l_effective_date, l_new_booking_status_type_id);
2836:
2837: END IF;
2838:
2836:
2837: END IF;
2838:
2839: ELSIF l_person_id_changed THEN
2840: ota_lrng_path_member_util.update_lme_enroll_status_chg(p_event_id => ota_tdb_shd.g_old_rec.event_id,
2841: p_person_id =>ota_tdb_shd.g_old_rec.delegate_person_id,
2842: p_contact_id => null,
2843: p_lp_enrollment_ids => l_lp_enrollment_ids);
2844:
2837: END IF;
2838:
2839: ELSIF l_person_id_changed THEN
2840: ota_lrng_path_member_util.update_lme_enroll_status_chg(p_event_id => ota_tdb_shd.g_old_rec.event_id,
2841: p_person_id =>ota_tdb_shd.g_old_rec.delegate_person_id,
2842: p_contact_id => null,
2843: p_lp_enrollment_ids => l_lp_enrollment_ids);
2844:
2845: -- update any associated cert member enrollment statuses
2842: p_contact_id => null,
2843: p_lp_enrollment_ids => l_lp_enrollment_ids);
2844:
2845: -- update any associated cert member enrollment statuses
2846: ota_cme_util.update_cme_status(p_event_id => ota_tdb_shd.g_old_rec.event_id,
2847: p_person_id => ota_tdb_shd.g_old_rec.delegate_person_id,
2848: p_contact_id => null,
2849: p_cert_prd_enrollment_ids => l_cert_prd_enrollment_ids);
2850:
2843: p_lp_enrollment_ids => l_lp_enrollment_ids);
2844:
2845: -- update any associated cert member enrollment statuses
2846: ota_cme_util.update_cme_status(p_event_id => ota_tdb_shd.g_old_rec.event_id,
2847: p_person_id => ota_tdb_shd.g_old_rec.delegate_person_id,
2848: p_contact_id => null,
2849: p_cert_prd_enrollment_ids => l_cert_prd_enrollment_ids);
2850:
2851: ota_lrng_path_member_util.update_lme_enroll_status_chg(p_event_id => ota_tdb_shd.g_old_rec.event_id,
2847: p_person_id => ota_tdb_shd.g_old_rec.delegate_person_id,
2848: p_contact_id => null,
2849: p_cert_prd_enrollment_ids => l_cert_prd_enrollment_ids);
2850:
2851: ota_lrng_path_member_util.update_lme_enroll_status_chg(p_event_id => ota_tdb_shd.g_old_rec.event_id,
2852: p_person_id => l_person_id,
2853: p_contact_id => null,
2854: p_lp_enrollment_ids => l_lp_enrollment_ids);
2855: -- update any associated cert member enrollment statuses
2852: p_person_id => l_person_id,
2853: p_contact_id => null,
2854: p_lp_enrollment_ids => l_lp_enrollment_ids);
2855: -- update any associated cert member enrollment statuses
2856: ota_cme_util.update_cme_status(p_event_id => ota_tdb_shd.g_old_rec.event_id,
2857: p_person_id => l_person_id,
2858: p_contact_id => null,
2859: p_cert_prd_enrollment_ids => l_cert_prd_enrollment_ids);
2860:
2859: p_cert_prd_enrollment_ids => l_cert_prd_enrollment_ids);
2860:
2861: -- the learner has changed.So delete the forum record for old person
2862: --and create a notification record for the new person
2863: deleteForumNotification(ota_tdb_shd.g_old_rec.event_id, ota_tdb_shd.g_old_rec.delegate_person_id, null);
2864: createForumNotification(ota_tdb_shd.g_old_rec.event_id, l_person_id, null, l_effective_date, l_new_booking_status_type_id);
2865:
2866: ELSIF l_contact_id_changed THEN
2867: ota_lrng_path_member_util.update_lme_enroll_status_chg(p_event_id => ota_tdb_shd.g_old_rec.event_id,
2860:
2861: -- the learner has changed.So delete the forum record for old person
2862: --and create a notification record for the new person
2863: deleteForumNotification(ota_tdb_shd.g_old_rec.event_id, ota_tdb_shd.g_old_rec.delegate_person_id, null);
2864: createForumNotification(ota_tdb_shd.g_old_rec.event_id, l_person_id, null, l_effective_date, l_new_booking_status_type_id);
2865:
2866: ELSIF l_contact_id_changed THEN
2867: ota_lrng_path_member_util.update_lme_enroll_status_chg(p_event_id => ota_tdb_shd.g_old_rec.event_id,
2868: p_person_id => null,
2863: deleteForumNotification(ota_tdb_shd.g_old_rec.event_id, ota_tdb_shd.g_old_rec.delegate_person_id, null);
2864: createForumNotification(ota_tdb_shd.g_old_rec.event_id, l_person_id, null, l_effective_date, l_new_booking_status_type_id);
2865:
2866: ELSIF l_contact_id_changed THEN
2867: ota_lrng_path_member_util.update_lme_enroll_status_chg(p_event_id => ota_tdb_shd.g_old_rec.event_id,
2868: p_person_id => null,
2869: p_contact_id =>ota_tdb_shd.g_old_rec.delegate_contact_id,
2870: p_lp_enrollment_ids => l_lp_enrollment_ids);
2871:
2865:
2866: ELSIF l_contact_id_changed THEN
2867: ota_lrng_path_member_util.update_lme_enroll_status_chg(p_event_id => ota_tdb_shd.g_old_rec.event_id,
2868: p_person_id => null,
2869: p_contact_id =>ota_tdb_shd.g_old_rec.delegate_contact_id,
2870: p_lp_enrollment_ids => l_lp_enrollment_ids);
2871:
2872: -- update any associated cert member enrollment statuses
2873: ota_cme_util.update_cme_status(p_event_id => ota_tdb_shd.g_old_rec.event_id,
2869: p_contact_id =>ota_tdb_shd.g_old_rec.delegate_contact_id,
2870: p_lp_enrollment_ids => l_lp_enrollment_ids);
2871:
2872: -- update any associated cert member enrollment statuses
2873: ota_cme_util.update_cme_status(p_event_id => ota_tdb_shd.g_old_rec.event_id,
2874: p_person_id => null,
2875: p_contact_id => ota_tdb_shd.g_old_rec.delegate_contact_id,
2876: p_cert_prd_enrollment_ids => l_cert_prd_enrollment_ids);
2877:
2871:
2872: -- update any associated cert member enrollment statuses
2873: ota_cme_util.update_cme_status(p_event_id => ota_tdb_shd.g_old_rec.event_id,
2874: p_person_id => null,
2875: p_contact_id => ota_tdb_shd.g_old_rec.delegate_contact_id,
2876: p_cert_prd_enrollment_ids => l_cert_prd_enrollment_ids);
2877:
2878: ota_lrng_path_member_util.update_lme_enroll_status_chg(p_event_id => ota_tdb_shd.g_old_rec.event_id,
2879: p_person_id => null,
2874: p_person_id => null,
2875: p_contact_id => ota_tdb_shd.g_old_rec.delegate_contact_id,
2876: p_cert_prd_enrollment_ids => l_cert_prd_enrollment_ids);
2877:
2878: ota_lrng_path_member_util.update_lme_enroll_status_chg(p_event_id => ota_tdb_shd.g_old_rec.event_id,
2879: p_person_id => null,
2880: p_contact_id => p_delegate_contact_id,
2881: p_lp_enrollment_ids => l_lp_enrollment_ids);
2882:
2880: p_contact_id => p_delegate_contact_id,
2881: p_lp_enrollment_ids => l_lp_enrollment_ids);
2882:
2883: -- update any associated cert member enrollment statuses
2884: ota_cme_util.update_cme_status(p_event_id => ota_tdb_shd.g_old_rec.event_id,
2885: p_person_id => null,
2886: p_contact_id => p_delegate_contact_id,
2887: p_cert_prd_enrollment_ids => l_cert_prd_enrollment_ids);
2888:
2885: p_person_id => null,
2886: p_contact_id => p_delegate_contact_id,
2887: p_cert_prd_enrollment_ids => l_cert_prd_enrollment_ids);
2888:
2889: deleteForumNotification(ota_tdb_shd.g_old_rec.event_id, null, ota_tdb_shd.g_old_rec.delegate_contact_id);
2890: createForumNotification(ota_tdb_shd.g_old_rec.event_id, null, p_delegate_contact_id, l_effective_date, l_new_booking_status_type_id);
2891:
2892: END IF;
2893:
2886: p_contact_id => p_delegate_contact_id,
2887: p_cert_prd_enrollment_ids => l_cert_prd_enrollment_ids);
2888:
2889: deleteForumNotification(ota_tdb_shd.g_old_rec.event_id, null, ota_tdb_shd.g_old_rec.delegate_contact_id);
2890: createForumNotification(ota_tdb_shd.g_old_rec.event_id, null, p_delegate_contact_id, l_effective_date, l_new_booking_status_type_id);
2891:
2892: END IF;
2893:
2894: --bug#6683076.Added for sending notifications to learners for
2936:
2937: ota_utility.get_booking_status_type( p_status_type_id => l_new_booking_status_type_id,
2938: p_type => l_new_booking_status_type) ;
2939:
2940: ota_utility.get_booking_status_type( p_status_type_id => ota_tdb_shd.g_old_rec.booking_status_type_id,
2941: p_type => l_old_booking_status_type) ;
2942:
2943: if l_new_booking_status_type in ('A','P','E') and l_old_booking_status_type in ('A','P','E') AND
2944: l_new_event_id = ota_tdb_shd.g_old_rec.event_id
2940: ota_utility.get_booking_status_type( p_status_type_id => ota_tdb_shd.g_old_rec.booking_status_type_id,
2941: p_type => l_old_booking_status_type) ;
2942:
2943: if l_new_booking_status_type in ('A','P','E') and l_old_booking_status_type in ('A','P','E') AND
2944: l_new_event_id = ota_tdb_shd.g_old_rec.event_id
2945: AND p_number_of_places = ota_tdb_shd.g_old_rec.number_of_places THEN
2946: --- do nothing
2947: hr_utility.trace('Entered do nothing');
2948: null;
2941: p_type => l_old_booking_status_type) ;
2942:
2943: if l_new_booking_status_type in ('A','P','E') and l_old_booking_status_type in ('A','P','E') AND
2944: l_new_event_id = ota_tdb_shd.g_old_rec.event_id
2945: AND p_number_of_places = ota_tdb_shd.g_old_rec.number_of_places THEN
2946: --- do nothing
2947: hr_utility.trace('Entered do nothing');
2948: null;
2949: else
2969:
2970: --
2971: -- *** In case of Event Change -- Reset Event Status for Old Event ***
2972: --
2973: IF l_new_event_id <> ota_tdb_shd.g_old_rec.event_id THEN
2974: ota_evt_bus2.lock_event(ota_tdb_shd.g_old_rec.event_id);
2975:
2976: ota_evt_shd.get_event_details (ota_tdb_shd.g_old_rec.event_id,
2977: l_event_rec,
2970: --
2971: -- *** In case of Event Change -- Reset Event Status for Old Event ***
2972: --
2973: IF l_new_event_id <> ota_tdb_shd.g_old_rec.event_id THEN
2974: ota_evt_bus2.lock_event(ota_tdb_shd.g_old_rec.event_id);
2975:
2976: ota_evt_shd.get_event_details (ota_tdb_shd.g_old_rec.event_id,
2977: l_event_rec,
2978: l_event_exists);
2972: --
2973: IF l_new_event_id <> ota_tdb_shd.g_old_rec.event_id THEN
2974: ota_evt_bus2.lock_event(ota_tdb_shd.g_old_rec.event_id);
2975:
2976: ota_evt_shd.get_event_details (ota_tdb_shd.g_old_rec.event_id,
2977: l_event_rec,
2978: l_event_exists);
2979:
2980: ota_evt_bus2.reset_event_status(ota_tdb_shd.g_old_rec.event_id
2976: ota_evt_shd.get_event_details (ota_tdb_shd.g_old_rec.event_id,
2977: l_event_rec,
2978: l_event_exists);
2979:
2980: ota_evt_bus2.reset_event_status(ota_tdb_shd.g_old_rec.event_id
2981: ,l_event_rec.object_version_number
2982: ,l_event_rec.event_status
2983: ,l_event_rec.maximum_attendees);
2984:
3434: -- Prerequisite Validation Code
3435: l_check_prereq := false;
3436:
3437: If ( p_delegate_person_id = hr_api.g_number ) Then
3438: l_delegate_person_id := ota_tdb_shd.g_old_rec.delegate_person_id;
3439: Else
3440: l_delegate_person_id := p_delegate_person_id;
3441: End If;
3442:
3440: l_delegate_person_id := p_delegate_person_id;
3441: End If;
3442:
3443: If ( p_delegate_contact_id = hr_api.g_number ) Then
3444: l_delegate_contact_id := ota_tdb_shd.g_old_rec.delegate_contact_id;
3445: Else
3446: l_delegate_contact_id := p_delegate_contact_id;
3447: End If;
3448:
3446: l_delegate_contact_id := p_delegate_contact_id;
3447: End If;
3448:
3449: If ( p_customer_id = hr_api.g_number ) Then
3450: l_customer_id := ota_tdb_shd.g_old_rec.customer_id;
3451: Else
3452: l_customer_id := p_customer_id;
3453: End If;
3454:
3452: l_customer_id := p_customer_id;
3453: End If;
3454:
3455: If ( p_event_id = hr_api.g_number ) Then
3456: l_event_id := ota_tdb_shd.g_old_rec.event_id;
3457: Else
3458: l_event_id := p_event_id;
3459: End If;
3460:
3458: l_event_id := p_event_id;
3459: End If;
3460:
3461: If ( p_booking_status_type_id = hr_api.g_number ) Then
3462: l_booking_status_type_id := ota_tdb_shd.g_old_rec.booking_status_type_id;
3463: Else
3464: l_booking_status_type_id := p_booking_status_type_id;
3465: End If;
3466:
3463: Else
3464: l_booking_status_type_id := p_booking_status_type_id;
3465: End If;
3466:
3467: If (ota_general.value_changed (ota_tdb_shd.g_old_rec.delegate_person_id, l_delegate_person_id) ) Then
3468: l_check_prereq := true;
3469: End If;
3470:
3471: If (ota_general.value_changed (ota_tdb_shd.g_old_rec.delegate_contact_id, l_delegate_contact_id) ) Then
3467: If (ota_general.value_changed (ota_tdb_shd.g_old_rec.delegate_person_id, l_delegate_person_id) ) Then
3468: l_check_prereq := true;
3469: End If;
3470:
3471: If (ota_general.value_changed (ota_tdb_shd.g_old_rec.delegate_contact_id, l_delegate_contact_id) ) Then
3472: l_check_prereq := true;
3473: End If;
3474:
3475: If (ota_general.value_changed (ota_tdb_shd.g_old_rec.customer_id, l_customer_id) ) Then
3471: If (ota_general.value_changed (ota_tdb_shd.g_old_rec.delegate_contact_id, l_delegate_contact_id) ) Then
3472: l_check_prereq := true;
3473: End If;
3474:
3475: If (ota_general.value_changed (ota_tdb_shd.g_old_rec.customer_id, l_customer_id) ) Then
3476: l_check_prereq := true;
3477: End If;
3478:
3479: If (ota_general.value_changed (ota_tdb_shd.g_old_rec.event_id, l_event_id) ) Then
3475: If (ota_general.value_changed (ota_tdb_shd.g_old_rec.customer_id, l_customer_id) ) Then
3476: l_check_prereq := true;
3477: End If;
3478:
3479: If (ota_general.value_changed (ota_tdb_shd.g_old_rec.event_id, l_event_id) ) Then
3480: l_check_prereq := true;
3481: End If;
3482:
3483: ota_utility.get_booking_status_type(p_status_type_id => ota_tdb_shd.g_old_rec.booking_status_type_id,
3479: If (ota_general.value_changed (ota_tdb_shd.g_old_rec.event_id, l_event_id) ) Then
3480: l_check_prereq := true;
3481: End If;
3482:
3483: ota_utility.get_booking_status_type(p_status_type_id => ota_tdb_shd.g_old_rec.booking_status_type_id,
3484: p_type => l_old_status_type);
3485:
3486: ota_utility.get_booking_status_type(p_status_type_id => l_booking_status_type_id,
3487: p_type => l_new_status_type);