1 PACKAGE BODY JAI_PO_VSA_TRIGGER_PKG AS
2 /* $Header: jai_po_vsa_t.plb 120.1 2006/05/26 11:49:44 lgopalsa noship $ */
3
4 /*
5 REM +======================================================================+
6 REM NAME ARU_T1
7 REM
8 REM DESCRIPTION Called from trigger JAI_PO_VSA_ARIUD_T1
9 REM
10 REM NOTES Refers to old trigger JAI_PO_VSA_ARU_T1
11 REM
12 REM +======================================================================+
13 */
14 PROCEDURE ARU_T1 ( pr_old t_rec%type , pr_new t_rec%type , pv_action varchar2 , pv_return_code out nocopy varchar2 , pv_return_message out nocopy varchar2 ) IS
15 -- added by Gsr 12-jul-01
16 v_operating_id number; --File.Sql.35 Cbabu :=pr_new.ORG_ID;
17 v_gl_set_of_bks_id gl_sets_of_books.set_of_books_id%type;
18 v_currency_code gl_sets_of_books.currency_code%type;
19
20 /* Bug 5243532. Added by Lakshmi Gopalsami
21 * Removed cursor Fetch_Book_Id_cur and implemented
22 * caching logic.
23 * Removed unused cursor sob_cur
24 * Defined variable for implementing caching logic.
25 */
26 l_func_curr_det jai_plsql_cache_pkg.func_curr_details;
27 -- End for bug 5243532
28 BEGIN
29 pv_return_code := jai_constants.successful ;
30 /*------------------------------------------------------------------------------------------
31 FILENAME: ja_in_dis_inactive_vend_trg.sql
32
33 CHANGE HISTORY:
34 S.No Date Author and Details
35 1 29-Nov-2004 Sanjikum for 4035297. Version 115.1
36 Changed the 'INR' check. Added the call to jai_cmn_utils_pkg.check_jai_exists
37
38 2 08-Jun-2005 This Object is Modified to refer to New DB Entry names in place of Old
39 DB as required for CASE COMPLAINCE. Version 116.1
40
41 3 13-Jun-2005 File Version: 116.3
42 Ramananda for bug#4428980. Removal of SQL LITERALs is done
43
44 Dependency Due to this Bug:-
45 The current trigger becomes dependent on the function jai_cmn_utils_pkg.check_jai_exists version 115.0.
46
47 4 26-Jul-2005 R12 Changes to replace po_vendor_sites_all with po_vendor_sites
48
49 5. 03-Aug-2005 Aiyer for the bug 4532841,File Version 120.3
50 Issue:-
51 Compilation error for the trigger as the synonym po_vendor_sites_all does not exists.
52
53 Fix :-
54 As per the revised TCA structure the synonym po_vendor_sites_all has been renamed to po_ap_vendor_sites_all
55
56 Dependency Due to this Bug:-
57 None
58
59 Future Dependencies For the release Of this Object:-
60 (Please add a row in the section below only if your bug introduces a dependency due to spec change/ A new call to a object/
61 A datamodel change )
62 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
63 Current Version Current Bug Dependent Files Version Author Date Remarks
64 Of File On Bug/Patchset Dependent On
65
66 ja_in_dis_inactive_vend_trg.sql
67 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------
68 115.1 4035297 IN60105D2+4033992 ja_in_util_pkg_s.sql 115.0 Sanjikum 29-Nov-2004 Call to this function.
69 ja_in_util_pkg_s.sql 115.0 Sanjikum
70
71 -----------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
72
73 v_operating_id := pr_new.ORG_ID;
74
75 /* Bug 5243532. Added by Lakshmi Gopalsami
76 * Removed the cursor Fetch_Book_Id_Cur
77 * and implemented using caching logic.
78 */
79 l_func_curr_det := jai_plsql_cache_pkg.return_sob_curr
80 (p_org_id => v_operating_id);
81 v_gl_set_of_bks_id := l_func_curr_det.ledger_id;
82
83 --IF jai_cmn_utils_pkg.check_jai_exists( p_calling_object => 'JA_IN_DIS_INACTIVE_VEND_TRG',
84 -- p_set_of_books_id => v_gl_set_of_bks_id ) = FALSE THEN
85 -- RETURN;
86 -- END IF;
87
88 IF pr_old.inactive_date IS NULL AND pr_new.inactive_date IS NOT NULL THEN
89 UPDATE JAI_CMN_VENDOR_SITES
90 SET inactive_flag = 'Y'
91 WHERE vendor_site_id = pr_new.vendor_site_id;
92 ELSIF pr_old.inactive_date IS NOT NULL AND pr_new.inactive_date IS NULL THEN
93 UPDATE JAI_CMN_VENDOR_SITES
94 SET inactive_flag = ''
95 WHERE vendor_site_id = pr_new.vendor_site_id;
96 END IF;
97 END ARU_T1 ;
98
99 END JAI_PO_VSA_TRIGGER_PKG ;