[Home] [Help]
PACKAGE BODY: APPS.FA_CUA_TRX_APPROVAL_EXT_PKG
Source
1 PACKAGE BODY FA_CUA_TRX_APPROVAL_EXT_PKG AS
2 /* $Header: FACPX09MB.pls 120.0 2002/08/24 07:13:16 appldev noship $ */
3
4 -- created: msiddiqu 01-NOV-99
5
6 -- replaces fa_transaction_headers_hr_bri
7 -- returns TRUE if transaction allowed
8 FUNCTION facuas1 ( x_txn_type_code in varchar2
9 , x_book_type_code in varchar2
10 , x_asset_id in number ) RETURN BOOLEAN IS
11
12 v_result BOOLEAN:= FALSE;
13 v_error_code varchar2(630);
14
15 BEGIN
16 if x_txn_type_code IN ( 'ADJUSTMENT'
17 -- , 'CIP ADDITION'
18 , 'FULL RETIREMENT'
19 , 'PARTIAL RETIREMENT'
20 , 'RECLASS'
21 , 'REINSTATEMENT'
22 , 'REVALUATION'
23 , 'TRANSFER'
24 , 'UNIT ADJUSTMENT' ) then
25
26 -- bugfix 1680737 msiddiqu 08-Mar-2001
27 -- modified call to check_pending_batch
28 v_result:=
29 fa_cua_hr_retirements_pkg.check_pending_batch( x_calling_function => 'TRANSACTION'
30 , x_book_type_code => x_book_type_code
31 , x_event_code => null
32 , x_asset_id => x_asset_id
33 , x_node_id => null
34 , x_category_id => null
35 , x_attribute => null
36 , x_conc_request_id => null
37 , x_status => v_error_code
38 );
39 end if;
40
41 if (v_result) then
42 -- pending batch found
43 return FALSE; -- transaction not allowed
44 else
45 return TRUE; -- transaction allowed
46 end if;
47 END facuas1;
48
49
50
51 /* replaces the ifa_book_controls_bru trigger */
52 -- returns TRUE if transaction allowed
53 FUNCTION facuas2 ( x_book_type_code in varchar2
54 , x_deprn_status in varchar2 ) RETURN BOOLEAN IS
55
56 v_result BOOLEAN:= FALSE;
57 v_error_code varchar2(630);
58 BEGIN
59
60 if x_deprn_status = 'R' then
61
62 -- bugfix 1680737 msiddiqu 08-Mar-2001
63 -- modified call to check_pending_batch
64 v_result :=
65 fa_cua_hr_retirements_pkg.check_pending_batch('DEPRECIATION'
66 , x_book_type_code
67 , null, null, null
68 , null, null, null, v_error_code);
69 end if;
70
71 if (v_result) then
72 return FALSE; -- transaction not allowed
73 else
74 return TRUE; -- transaction allowed
75 end if;
76
77 END facuas2;
78
79 END FA_CUA_TRX_APPROVAL_EXT_PKG;