DBA Data[Home] [Help]

PACKAGE BODY: APPS.JAI_PO_V_TRIGGER_PKG

Source


1 PACKAGE BODY JAI_PO_V_TRIGGER_PKG AS
2 /* $Header: jai_po_v_t.plb 120.0 2005/09/01 12:37:13 rallamse noship $ */
3 
4 /*
5   REM +======================================================================+
6   REM NAME          ARU_T1
7   REM
8   REM DESCRIPTION   Called from trigger JAI_PO_V_ARIUD_T1
9   REM
10   REM NOTES         Refers to old trigger JAI_PO_V_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 GSri on 14-JUL-01
16 V_SET_OF_BOOKS_ID NUMBER ; --File.Sql.35 Cbabu  :=pr_new.SET_OF_BOOKS_ID;
17 v_currency_code VARCHAR2(15);
18 
19 CURSOR Sob_Cur is
20      select Currency_code
21        from gl_sets_of_books
22       where set_of_books_id = V_SET_OF_BOOKS_ID;
23 ------ End of addition by Gsri on 14-jul-01
24   BEGIN
25     pv_return_code := jai_constants.successful ;
26     /*------------------------------------------------------------------------------------------
27  FILENAME: ja_in_dis_inact_vendor_trg.sql
28 
29  CHANGE HISTORY:
30 S.No      Date          Author and Details
31 
32 
33 1.    29-nov-2004  ssumaith - bug# 4037690  - File version 115.1
34                    Check whether india localization is being used was done using a INR check in every trigger.
35                    This check has now been moved into a new package and calls made to this package from this trigger
36                    If the function jai_cmn_utils_pkg.check_jai_exists returns true it means INR is the set of books currency ,
37                    Hence if this function returns FALSE , control should return.
38 
39 2.    08-Jun-2005   This Object is Modified to refer to New DB Entry names in place of Old
40                     DB as required for CASE COMPLAINCE. Version 116.1
41 
42 3. 13-Jun-2005    File Version: 116.2
43                   Ramananda for bug#4428980. Removal of SQL LITERALs is done
44 
45 4   26-Jul-2005   R12 Changes to replace po_vendors with po_ap_vendors table
46 
47 Future Dependencies For the release Of this Object:-
48 (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/
49 A datamodel change )
50 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
51 Current Version    Current Bug    Dependent           Files                Version   Author   Date          Remarks
52 Of File                           On Bug/Patchset    Dependent On
53 
54 ja_in_dis_inact_vendor_trg.sql
55 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------
56 115.1              4037690        IN60105D2          ja_in_util_pkg_s.sql  115.0     ssumaith 29-Nov-2004  Call to this function.
57                                                      ja_in_util_pkg_s.sql  115.0     ssumaith
58 
59 -----------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
60 
61 -- Added by GSri on 14-jul-01
62 
63 V_SET_OF_BOOKS_ID := pr_new.SET_OF_BOOKS_ID;
64 
65   --If jai_cmn_utils_pkg.check_jai_exists(P_CALLING_OBJECT => 'JA_IN_DIS_INACT_VENDOR_TRG', P_SET_OF_BOOKS_ID => pr_new.set_of_books_id) = false then
66   --    return;
67   -- end if;
68 
69   IF pr_old.end_date_active IS NULL AND pr_new.end_date_active IS NOT NULL THEN
70      UPDATE JAI_CMN_VENDOR_SITES
71      SET    inactive_flag = 'Y'
72      WHERE  vendor_id  = pr_new.vendor_id
73      AND    vendor_site_id = 0 ;
74   ELSIF pr_old.end_date_active IS NOT NULL AND pr_new.end_date_active IS NULL THEN
75      UPDATE JAI_CMN_VENDOR_SITES
76      SET    inactive_flag = ''
77      WHERE  vendor_id  = pr_new.vendor_id
78      AND    vendor_site_id = 0 ;
79   END IF;
80   END ARU_T1 ;
81 
82 END JAI_PO_V_TRIGGER_PKG ;