26: r_ap_invoices_all c_ap_invoices_all%rowtype;
27: ln_org_id ap_invoices_all.org_id%type;
28:
29: BEGIN
30: pv_return_code := jai_constants.successful ;
31: /*------------------------------------------------------------------------------------------
32: FILENAME: ja_in_ap_apsa_before_trg.sql
33:
34: CHANGE HISTORY:
57: 4033992.
58: ja_in_util_pkg_s.sql 115.0
59: ja_in_util_pkg_b.sql 115.0
60: ------------------------------------------------------------------------------------------ */
61: /*if pv_action = jai_constants.inserting or pv_action = jai_constants.updating then
62: ln_org_id := pr_new.org_id;
63: elsif pv_action = jai_constants.deleting then
64: ln_org_id := pr_old.org_id;
65: end if;*/
59: ja_in_util_pkg_b.sql 115.0
60: ------------------------------------------------------------------------------------------ */
61: /*if pv_action = jai_constants.inserting or pv_action = jai_constants.updating then
62: ln_org_id := pr_new.org_id;
63: elsif pv_action = jai_constants.deleting then
64: ln_org_id := pr_old.org_id;
65: end if;*/
66:
67: --if
77:
78:
79: /* Payment Priority Functionality */
80:
81: if pv_action = jai_constants.inserting then
82:
83: open c_ap_invoices_all(pr_new.invoice_id);
84: fetch c_ap_invoices_all into r_ap_invoices_all;
85: close c_ap_invoices_all;
98: if ln_parent_inv_payment_priority is not null then
99: pr_new.payment_priority := ln_parent_inv_payment_priority;
100: end if;
101:
102: end if; /* if pv_action = jai_constants.inserting than */
103:
104: << exit_from_trigger >>
105: return;
106:
107: /* Added an exception block by Ramananda for bug#4570303 */
108: EXCEPTION
109: WHEN OTHERS THEN
110: --raise_application_error(-20000, 'Error - trigger ja_in_ap_apsa_before_trg on ap_payment_schedules_all : ' || sqlerrm);
111: Pv_return_code := jai_constants.unexpected_error;
112: Pv_return_message := 'Encountered an error in JAI_AP_PSA_TRIGGER_PKG.BRIUD_T1 ' ||
113: 'Error on ap_payment_schedules_all : ' || substr(sqlerrm,1,1800);
114: END BRIUD_T1 ;
115: