1: PACKAGE BODY igs_fi_refunds_process AS
2: /* $Header: IGSFI66B.pls 120.4 2006/06/27 14:21:13 skharida noship $ */
3:
4: /***********************************************************************************************
5:
9: refunds tables.
10: Known limitations,enhancements,remarks:
11: Change History
12: Who When What
13: skharida 26-Jun-2006 Bug# 5208136 - Modified update_refunds proc, removed the obsoleted columns from IGS_FI_REFUNDS_PKG
14: sapanigr 03-May-2006 Enh#3924836 Precision Issue. Modified update_refunds and insert_interface.
15: sapanigr 14-Feb-2006 Bug#5018036 - R12 Repository tuning. Cursors changed in procedures log_person and transfer_to_int.
16: pathipat 23-Apr-2003 Enh 2831569 - Commercial Receivables build
17: Modified transfer_to_int() - added call to chk_manage_account()
44: e_resource_busy EXCEPTION;
45: PRAGMA EXCEPTION_INIT(e_resource_busy,-0054);
46:
47: CURSOR cur_ref(cp_person_id igs_pe_person.person_id%TYPE,
48: cp_start_date igs_fi_refunds.voucher_date%TYPE,
49: cp_end_date igs_fi_refunds.voucher_date%TYPE) IS
50: SELECT rfnd.*,rfnd.rowid
51: FROM igs_fi_refunds rfnd
52: WHERE (rfnd.person_id=cp_person_id OR (cp_person_id IS NULL))
45: PRAGMA EXCEPTION_INIT(e_resource_busy,-0054);
46:
47: CURSOR cur_ref(cp_person_id igs_pe_person.person_id%TYPE,
48: cp_start_date igs_fi_refunds.voucher_date%TYPE,
49: cp_end_date igs_fi_refunds.voucher_date%TYPE) IS
50: SELECT rfnd.*,rfnd.rowid
51: FROM igs_fi_refunds rfnd
52: WHERE (rfnd.person_id=cp_person_id OR (cp_person_id IS NULL))
53: AND rfnd.transfer_status='TODO'
47: CURSOR cur_ref(cp_person_id igs_pe_person.person_id%TYPE,
48: cp_start_date igs_fi_refunds.voucher_date%TYPE,
49: cp_end_date igs_fi_refunds.voucher_date%TYPE) IS
50: SELECT rfnd.*,rfnd.rowid
51: FROM igs_fi_refunds rfnd
52: WHERE (rfnd.person_id=cp_person_id OR (cp_person_id IS NULL))
53: AND rfnd.transfer_status='TODO'
54: AND rfnd.source_refund_id IS NOT NULL
55: AND (TRUNC(rfnd.voucher_date) >= TRUNC(cp_start_date) OR (cp_start_date IS NULL))
56: AND (TRUNC(rfnd.voucher_date) <= TRUNC(cp_end_date) OR (cp_end_date IS NULL))
57: ORDER BY rfnd.person_id,rfnd.refund_id;
58:
59: CURSOR cur_refund(cp_person_id igs_pe_person.person_id%TYPE,
60: cp_start_date igs_fi_refunds.voucher_date%TYPE,
61: cp_end_date igs_fi_refunds.voucher_date%TYPE) IS
62: SELECT rfnd.*,rfnd.rowid
63: FROM igs_fi_refunds rfnd
64: WHERE (rfnd.person_id=cp_person_id OR (cp_person_id IS NULL))
57: ORDER BY rfnd.person_id,rfnd.refund_id;
58:
59: CURSOR cur_refund(cp_person_id igs_pe_person.person_id%TYPE,
60: cp_start_date igs_fi_refunds.voucher_date%TYPE,
61: cp_end_date igs_fi_refunds.voucher_date%TYPE) IS
62: SELECT rfnd.*,rfnd.rowid
63: FROM igs_fi_refunds rfnd
64: WHERE (rfnd.person_id=cp_person_id OR (cp_person_id IS NULL))
65: AND rfnd.transfer_status='TODO'
59: CURSOR cur_refund(cp_person_id igs_pe_person.person_id%TYPE,
60: cp_start_date igs_fi_refunds.voucher_date%TYPE,
61: cp_end_date igs_fi_refunds.voucher_date%TYPE) IS
62: SELECT rfnd.*,rfnd.rowid
63: FROM igs_fi_refunds rfnd
64: WHERE (rfnd.person_id=cp_person_id OR (cp_person_id IS NULL))
65: AND rfnd.transfer_status='TODO'
66: AND rfnd.source_refund_id IS NULL
67: AND NVL(rfnd.reversal_ind,'N') <> 'Y'
94: RETURN l_cur_desc;
95: END lookup_desc;
96:
97: PROCEDURE log_person(p_person_id igs_pe_person_v.person_id%TYPE,
98: p_invoice_id igs_fi_refunds.invoice_id%TYPE,
99: p_refund_id igs_fi_refunds.refund_id%TYPE,
100: p_pay_person_id igs_fi_refunds.pay_person_id%TYPE,
101: p_fee_type igs_fi_refunds.fee_type%TYPE,
102: p_fee_cal_type igs_fi_refunds.fee_cal_type%TYPE,
95: END lookup_desc;
96:
97: PROCEDURE log_person(p_person_id igs_pe_person_v.person_id%TYPE,
98: p_invoice_id igs_fi_refunds.invoice_id%TYPE,
99: p_refund_id igs_fi_refunds.refund_id%TYPE,
100: p_pay_person_id igs_fi_refunds.pay_person_id%TYPE,
101: p_fee_type igs_fi_refunds.fee_type%TYPE,
102: p_fee_cal_type igs_fi_refunds.fee_cal_type%TYPE,
103: p_sequence_number igs_fi_refunds.fee_ci_sequence_number%TYPE,
96:
97: PROCEDURE log_person(p_person_id igs_pe_person_v.person_id%TYPE,
98: p_invoice_id igs_fi_refunds.invoice_id%TYPE,
99: p_refund_id igs_fi_refunds.refund_id%TYPE,
100: p_pay_person_id igs_fi_refunds.pay_person_id%TYPE,
101: p_fee_type igs_fi_refunds.fee_type%TYPE,
102: p_fee_cal_type igs_fi_refunds.fee_cal_type%TYPE,
103: p_sequence_number igs_fi_refunds.fee_ci_sequence_number%TYPE,
104: p_reversal_ind igs_fi_refunds.reversal_ind%TYPE,
97: PROCEDURE log_person(p_person_id igs_pe_person_v.person_id%TYPE,
98: p_invoice_id igs_fi_refunds.invoice_id%TYPE,
99: p_refund_id igs_fi_refunds.refund_id%TYPE,
100: p_pay_person_id igs_fi_refunds.pay_person_id%TYPE,
101: p_fee_type igs_fi_refunds.fee_type%TYPE,
102: p_fee_cal_type igs_fi_refunds.fee_cal_type%TYPE,
103: p_sequence_number igs_fi_refunds.fee_ci_sequence_number%TYPE,
104: p_reversal_ind igs_fi_refunds.reversal_ind%TYPE,
105: p_rec_status VARCHAR2,
98: p_invoice_id igs_fi_refunds.invoice_id%TYPE,
99: p_refund_id igs_fi_refunds.refund_id%TYPE,
100: p_pay_person_id igs_fi_refunds.pay_person_id%TYPE,
101: p_fee_type igs_fi_refunds.fee_type%TYPE,
102: p_fee_cal_type igs_fi_refunds.fee_cal_type%TYPE,
103: p_sequence_number igs_fi_refunds.fee_ci_sequence_number%TYPE,
104: p_reversal_ind igs_fi_refunds.reversal_ind%TYPE,
105: p_rec_status VARCHAR2,
106: p_err_msg fnd_new_messages.message_text%TYPE,
99: p_refund_id igs_fi_refunds.refund_id%TYPE,
100: p_pay_person_id igs_fi_refunds.pay_person_id%TYPE,
101: p_fee_type igs_fi_refunds.fee_type%TYPE,
102: p_fee_cal_type igs_fi_refunds.fee_cal_type%TYPE,
103: p_sequence_number igs_fi_refunds.fee_ci_sequence_number%TYPE,
104: p_reversal_ind igs_fi_refunds.reversal_ind%TYPE,
105: p_rec_status VARCHAR2,
106: p_err_msg fnd_new_messages.message_text%TYPE,
107: p_status BOOLEAN ) AS
100: p_pay_person_id igs_fi_refunds.pay_person_id%TYPE,
101: p_fee_type igs_fi_refunds.fee_type%TYPE,
102: p_fee_cal_type igs_fi_refunds.fee_cal_type%TYPE,
103: p_sequence_number igs_fi_refunds.fee_ci_sequence_number%TYPE,
104: p_reversal_ind igs_fi_refunds.reversal_ind%TYPE,
105: p_rec_status VARCHAR2,
106: p_err_msg fnd_new_messages.message_text%TYPE,
107: p_status BOOLEAN ) AS
108: /***********************************************************************************************
213: FND_MESSAGE.SET_TOKEN('PARAMETER_VAL' ,p_msg_val) ;
214: FND_FILE.PUT_LINE(FND_FILE.LOG,FND_MESSAGE.GET);
215: END log_messages ;
216:
217: PROCEDURE update_refunds(p_status IN igs_fi_refunds.transfer_status%TYPE,
218: p_cur_ref_upd IN cur_refund%ROWTYPE ,
219: p_dml_status OUT NOCOPY BOOLEAN,
220: p_err_msg OUT NOCOPY fnd_new_messages.message_text%TYPE) AS
221: /***********************************************************************************************
226:
227: Known limitations,enhancements,remarks:
228: Change History
229: Who When What
230: skharida 26-Jun-2006 Bug# 5208136 - Removed the obsoleted columns from the table IGS_FI_REFUNDS
231: sapanigr 03-May-2006 Enh#3924836 Precision Issue. Amount values being inserted into igs_fi_refunds
232: is now rounded off to currency precision
233: vvutukur 19-Nov-2002 Modified the call to igs_fi_refunds_pkg.update_row to add new parameters gl_date,
234: reversal_gl_date.
227: Known limitations,enhancements,remarks:
228: Change History
229: Who When What
230: skharida 26-Jun-2006 Bug# 5208136 - Removed the obsoleted columns from the table IGS_FI_REFUNDS
231: sapanigr 03-May-2006 Enh#3924836 Precision Issue. Amount values being inserted into igs_fi_refunds
232: is now rounded off to currency precision
233: vvutukur 19-Nov-2002 Modified the call to igs_fi_refunds_pkg.update_row to add new parameters gl_date,
234: reversal_gl_date.
235: ********************************************************************************************** */
229: Who When What
230: skharida 26-Jun-2006 Bug# 5208136 - Removed the obsoleted columns from the table IGS_FI_REFUNDS
231: sapanigr 03-May-2006 Enh#3924836 Precision Issue. Amount values being inserted into igs_fi_refunds
232: is now rounded off to currency precision
233: vvutukur 19-Nov-2002 Modified the call to igs_fi_refunds_pkg.update_row to add new parameters gl_date,
234: reversal_gl_date.
235: ********************************************************************************************** */
236:
237: BEGIN
238: p_dml_status:=TRUE;
239: p_err_msg:=NULL;
240:
241: -- Call to igs_fi_gen_gl.get_formatted_amount formats refund_amount by rounding off to currency precision
242: igs_fi_refunds_pkg.update_row(X_ROWID => p_cur_ref_upd.rowid,
243: X_REFUND_ID => p_cur_ref_upd.refund_id,
244: X_VOUCHER_DATE => p_cur_ref_upd.voucher_date,
245: X_PERSON_ID => p_cur_ref_upd.person_id,
246: X_PAY_PERSON_ID => p_cur_ref_upd.pay_person_id,
370: END insert_interface;
371:
372: PROCEDURE transfer_int_rec(p_person_id igs_pe_person.person_id%TYPE,
373: p_test_run igs_lookups_view.lookup_code%TYPE,
374: p_start_date igs_fi_refunds.voucher_date%TYPE,
375: p_end_date igs_fi_refunds.voucher_date%TYPE) AS
376: /***********************************************************************************************
377:
378: Created By : Sarakshi
371:
372: PROCEDURE transfer_int_rec(p_person_id igs_pe_person.person_id%TYPE,
373: p_test_run igs_lookups_view.lookup_code%TYPE,
374: p_start_date igs_fi_refunds.voucher_date%TYPE,
375: p_end_date igs_fi_refunds.voucher_date%TYPE) AS
376: /***********************************************************************************************
377:
378: Created By : Sarakshi
379: Date Created By: 1-Mar-2001
391: Also made individual calls to Log_Person in case the Refunds table
392: is updated for bug 2374103
393: ********************************************************************************************** */
394:
395: CURSOR cur_check(cp_refund_id igs_fi_refunds.refund_id%TYPE) IS
396: SELECT r.*,r.rowid
397: FROM igs_fi_refunds r
398: WHERE refund_id = cp_refund_id
399: AND NVL(reversal_ind,'N') = 'Y';
393: ********************************************************************************************** */
394:
395: CURSOR cur_check(cp_refund_id igs_fi_refunds.refund_id%TYPE) IS
396: SELECT r.*,r.rowid
397: FROM igs_fi_refunds r
398: WHERE refund_id = cp_refund_id
399: AND NVL(reversal_ind,'N') = 'Y';
400: l_cur_check cur_check%ROWTYPE;
401:
814: IGS_GE_MSG_STACK.Add;
815: APP_EXCEPTION.Raise_Exception;
816: END update_pay_info;
817:
818: END igs_fi_refunds_process;