1 package body AP_CUSTOM_WITHHOLDING_PKG as
2 /* $Header: apcmawtb.pls 120.3.12010000.2 2008/08/08 03:06:52 sparames ship $ */
3 --
4 function Ap_Special_Rate (
5 P_Tax_Name IN varchar2
6 ,P_Invoice_Id IN number
7 ,P_Payment_Num IN number
8 ,P_Awt_Date IN date
9 ,P_Amount IN number
10 )
11 return number
12 is
13
14 BEGIN
15
16 -- IMPORTANT: This section is reserved for Globalization features.
17 -- Please do not modify code here.
18
19 -- BUG 7232736 replaced sys_context with g_zz_shared_pkg.get_product
20
21 -- IF sys_context('JG','JGZZ_PRODUCT_CODE') is not null THEN
22 IF jg_zz_shared_pkg.get_product(AP_CALC_WITHHOLDING_PKG.g_org_id, NULL) is not null THEN
23 return(JG_WITHHOLDING_TAX_PKG.Get_Rate_Id(
24 P_Tax_Name
25 ,P_Invoice_Id
26 ,P_Payment_Num
27 ,P_Awt_Date
28 ,P_Amount
29 ));
30 END IF;
31
32 -- Please enter all custom code below this line.
33 -- Begin Custom Code
34
35 return(null);
36
37 -- End Custom Code
38
39 END Ap_Special_Rate;
40
41 --
42 procedure Ap_Special_Rounding (P_Checkrun_Name IN varchar2)
43 is
44 --l_org_id NUMBER(15); -- BUG 7232736
45
46 BEGIN
47 -- BUG 7232736 : added select ot get the Org_id using checkrun_id (p_checkrun_name)
48 -- select org_id into l_org_id
49 -- from ap_checks_all
50 -- where checkrun_id = P_Checkrun_Name;
51
52
53
54 -- IMPORTANT: This section is reserved for Globalization features.
55 -- Please do not modify code here.
56
57 -- BUG 7232736 replaced sys_context with g_zz_shared_pkg.get_product/reverted to Orginal code.
58 IF sys_context('JG','JGZZ_PRODUCT_CODE') is not null THEN
59 -- IF jg_zz_shared_pkg.get_product(l_org_id, NULL) is not null THEN
60 JG_WITHHOLDING_TAX_PKG.AWT_Rounding(
61 P_Checkrun_Name
62 );
63 END IF;
64
65 -- Please enter all custom code below this line.
66 -- Begin Custom Code
67
68 null;
69
70 -- End Custom Code
71
72 END Ap_Special_Rounding;
73
74 /*****************************************************************
75 Procedure: Ap_Special_Withheld_Amt
76 Objective: This procedure enable globalization to make some
77 adjusments in the withheld amount, for example
78 rounding. This procedure is called from
79 AP_CALC_WITHHOLDING_PKG.Insert_Temp_Distribution
80 ******************************************************************/
81
82 procedure Ap_Special_Withheld_Amt
83 (
84 P_Withheld_Amount IN OUT NOCOPY Number
85 ,P_Base_WT_amount IN OUT NOCOPY Number
86 ,P_CurrCode IN Varchar2
87 ,P_BaseCurrCode IN Varchar2
88 ,P_Invoice_exchange_rate IN Number
89 ,P_Tax_Name IN Varchar2
90 ,P_Calling_sequence IN Varchar2
91 )
92 is
93
94 BEGIN
95
96 -- IMPORTANT: This section is reserved for Globalization features.
97 -- Please do not modify code here.
98 -- BUG 7232736 replaced sys_context with g_zz_shared_pkg.get_product
99 -- Uncommented the call to JG_WITHHOLDING_TAX_PKG.JG_Special_Withheld_Amt
100
101 -- IF sys_context('JG','JGZZ_PRODUCT_CODE') is not null THEN
102 IF jg_zz_shared_pkg.get_product(AP_CALC_WITHHOLDING_PKG.g_org_id, NULL) is not null THEN
103 JG_WITHHOLDING_TAX_PKG.JG_Special_Withheld_Amt
104 (P_Withheld_Amount
105 ,P_Base_WT_amount
106 ,P_CurrCode
107 ,P_BaseCurrCode
108 ,P_Invoice_exchange_rate
109 ,P_Tax_Name
110 ,P_Calling_sequence
111 );
112 NULL;
113
114 END IF;
115
116 -- Please enter all custom code below this line.
117 -- Begin Custom Code
118
119 null;
120
121 -- End Custom Code
122
123 END Ap_Special_Withheld_Amt;
124
125 end AP_CUSTOM_WITHHOLDING_PKG;