54: cp_message_out:= fnd_message.get;
55: END attach_isir;
56:
57: FUNCTION can_unlock_isir(
58: p_base_id IN igf_ap_fa_base_rec_all.base_id%TYPE,
59: p_user_id IN fnd_user.user_id%TYPE
60: )
61: RETURN VARCHAR2 IS
62: /*
70: || (reverse chronological order - newest change first)
71: */
72:
73: -- Cursor to check wether the user locked the specified ISIR or not.
74: CURSOR cur_is_user_locked_isir( cp_base_id igf_ap_fa_base_rec_all.base_id%TYPE,
75: cp_user_id fnd_user.user_id%TYPE
76: ) IS
77: SELECT 'X'
78: FROM IGF_AP_FA_BASE_REC_ALL fabase
74: CURSOR cur_is_user_locked_isir( cp_base_id igf_ap_fa_base_rec_all.base_id%TYPE,
75: cp_user_id fnd_user.user_id%TYPE
76: ) IS
77: SELECT 'X'
78: FROM IGF_AP_FA_BASE_REC_ALL fabase
79: WHERE fabase.base_id = cp_base_id
80: AND (fabase.isir_locked_by IS NULL OR fabase.isir_locked_by = cp_user_id);
81:
82: -- Cursor to check wether the user is system administrator or not.
147: END can_unlock_isir;
148:
149:
150: FUNCTION update_lock_status (
151: p_base_id IN igf_ap_fa_base_rec_all.base_id%TYPE,
152: p_user_id IN fnd_user.user_id%TYPE
153: )
154: RETURN VARCHAR2 IS
155: /*
163: || (reverse chronological order - newest change first)
164: */
165:
166: -- Cursor to get fa base record
167: CURSOR cur_fa_base( cp_base_id igf_ap_fa_base_rec_all.base_id%TYPE ) IS
168: SELECT fabase.*
169: FROM IGF_AP_FA_BASE_REC fabase
170: WHERE fabase.base_id = cp_base_id;
171:
165:
166: -- Cursor to get fa base record
167: CURSOR cur_fa_base( cp_base_id igf_ap_fa_base_rec_all.base_id%TYPE ) IS
168: SELECT fabase.*
169: FROM IGF_AP_FA_BASE_REC fabase
170: WHERE fabase.base_id = cp_base_id;
171:
172: rec_fa_base cur_fa_base%ROWTYPE;
173:
195: END IF;
196: CLOSE cur_fa_base;
197:
198: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
199: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_ap_isir_gen_pkg.update_lock_status.debug','Calling igf_ap_fa_base_rec_pkg.update_row for baseid : '||rec_fa_base.base_id);
200: END IF;
201:
202: -- if p_user_id is null, unlock the ISIR., update fa base record with ISIR lock status (ISIR_LOCKED_BY ) to null
203: -- If NOT NULL, update fa base record with ISIR lock status (ISIR_LOCKED_BY) to p_user_id
200: END IF;
201:
202: -- if p_user_id is null, unlock the ISIR., update fa base record with ISIR lock status (ISIR_LOCKED_BY ) to null
203: -- If NOT NULL, update fa base record with ISIR lock status (ISIR_LOCKED_BY) to p_user_id
204: igf_ap_fa_base_rec_pkg.update_row(
205: x_Mode => 'R' ,
206: x_rowid => rec_fa_base.row_id ,
207: x_base_id => rec_fa_base.base_id ,
208: x_ci_cal_type => rec_fa_base.ci_cal_type ,
322: END update_lock_status;
323:
324:
325: FUNCTION is_awarding_pymnt_isir_exists(
326: p_base_id IN igf_ap_fa_base_rec_all.base_id%TYPE
327: )
328: RETURN VARCHAR2 IS
329: /*
330: || Created By : ugummall
337: || (reverse chronological order - newest change first)
338: */
339:
340: -- Cursor to check wether the student has any outstanding corrections with status 'BATCHED' or 'READY'
341: CURSOR cur_isir( cp_base_id igf_ap_fa_base_rec_all.base_id%TYPE ) IS
342: SELECT 'X'
343: FROM igf_ap_isir_matched_all
344: WHERE base_id = p_base_id
345: AND system_record_type IN ('ORIGINAL','CORRECTION')
389: END is_awarding_pymnt_isir_exists;
390:
391:
392: FUNCTION are_corrections_exists (
393: p_base_id IN igf_ap_fa_base_rec_all.base_id%TYPE
394: )
395: RETURN VARCHAR2 IS
396: /*
397: || Created By : ugummall
404: || (reverse chronological order - newest change first)
405: */
406:
407: -- Cursor to check wether the student has any outstanding corrections with status 'BATCHED'
408: CURSOR cur_corrections( cp_base_id igf_ap_fa_base_rec_all.base_id%TYPE ) IS
409: SELECT 'X'
410: FROM IGF_AP_ISIR_CORR_ALL ic
411: WHERE ic.correction_status = 'BATCHED'
412: AND ic.isir_id IN ( SELECT im.isir_id
456: END are_corrections_exists;
457:
458:
459: PROCEDURE delete_isir_validations(
460: p_base_id IN igf_ap_fa_base_rec_all.base_id%TYPE,
461: p_isir_id IN igf_ap_isir_matched_all.isir_id%TYPE,
462: x_msg_count OUT NOCOPY NUMBER,
463: x_msg_data OUT NOCOPY VARCHAR2,
464: x_return_status OUT NOCOPY VARCHAR2
476: || (reverse chronological order - newest change first)
477: */
478:
479: -- Cursor to check wether the student has any non-simulated awards.
480: CURSOR cur_stud_non_simulated_awards( cp_base_id igf_ap_fa_base_rec_all.base_id%TYPE ) IS
481: SELECT 'X'
482: FROM IGF_AW_AWARD_ALL awards
483: WHERE awards.base_id = cp_base_id
484: AND awards.award_status <> 'SIMULATED';
483: WHERE awards.base_id = cp_base_id
484: AND awards.award_status <> 'SIMULATED';
485:
486: -- Cursor to check if internal created correction ISIR exists for the student or not.
487: CURSOR cur_stud_correction_isir( cp_base_id igf_ap_fa_base_rec_all.base_id%TYPE ) IS
488: SELECT 'X'
489: FROM IGF_AP_ISIR_MATCHED_ALL im
490: WHERE im.base_id = cp_base_id
491: AND im.system_record_type = 'CORRECTION';
569: END delete_isir_validations;
570:
571:
572: PROCEDURE delete_isir(
573: p_base_id IN igf_ap_fa_base_rec_all.base_id%TYPE,
574: p_isir_id IN igf_ap_isir_matched_all.isir_id%TYPE,
575: x_msg_count OUT NOCOPY NUMBER,
576: x_msg_data OUT NOCOPY VARCHAR2,
577: x_return_status OUT NOCOPY VARCHAR2
2124: END is_isir_exists;
2125:
2126:
2127: FUNCTION is_awards_exists (
2128: p_base_id IN igf_ap_fa_base_rec_all.base_id%TYPE
2129: ) RETURN VARCHAR2 IS
2130: /*
2131: || Created By : rasahoo
2132: || Created On :
2138: || Who When What
2139: */
2140:
2141: -- Cursor to check wether the student has any non-simulated awards.
2142: CURSOR cur_stud_non_simulated_awards( cp_base_id igf_ap_fa_base_rec_all.base_id%TYPE ) IS
2143: SELECT 'X'
2144: FROM IGF_AW_AWARD_ALL awards
2145: WHERE awards.base_id = cp_base_id
2146: AND awards.award_status <> 'SIMULATED';
2184: END is_awards_exists;
2185:
2186:
2187: FUNCTION chk_pell_orig (
2188: p_base_id IN igf_ap_fa_base_rec_all.base_id%TYPE,
2189: p_isir_id IN igf_ap_isir_matched_all.isir_id%TYPE
2190: ) RETURN VARCHAR2 IS
2191: /*
2192: || Created By : rasahoo
2200: */
2201:
2202: -- Cursor to check wether the student has any non-simulated awards.
2203: CURSOR cur_pell_orig_chk(
2204: cp_base_id igf_ap_fa_base_rec_all.base_id%TYPE,
2205: cp_isir_id igf_ap_isir_matched_all.isir_id%TYPE
2206: ) IS
2207: SELECT
2208: isir.transaction_num isir_trans,
2261: END chk_pell_orig;
2262:
2263:
2264: FUNCTION make_awarding_isir (
2265: p_base_id IN igf_ap_fa_base_rec_all.base_id%TYPE,
2266: p_isir_id IN igf_ap_isir_matched_all.isir_id%TYPE
2267: ) RETURN VARCHAR2 IS
2268: /*
2269: || Created By : rasahoo
2277: */
2278:
2279: -- Get all the ISIRs of the given person for marking it as Awarding and Payment
2280: CURSOR cur_isir_matched (
2281: cp_base_id igf_ap_fa_base_rec_all.base_id%TYPE
2282: ) IS
2283: SELECT *
2284: FROM igf_ap_isir_matched m
2285: WHERE m.base_id = cp_base_id;