[Home] [Help]
PACKAGE BODY: APPS.JG_WITHHOLDING_TAX_PKG
Source
1 package body JG_WITHHOLDING_TAX_PKG as
2 /* $Header: jgzzawtb.pls 120.4.12010000.2 2008/08/04 13:54:18 vgadde ship $ */
3
4 function Get_Rate_Id (
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 l_product_code varchar2(2);
14 BEGIN
15
16 l_product_code := jg_zz_shared_pkg.get_product(ap_calc_withholding_pkg.g_org_id, NULL);
17
18 IF l_product_code = 'JA' then
19 return ( JA_AWT_PKG.Get_Rate_Id(
20 P_Tax_Name
21 ,P_Invoice_Id
22 ,P_Payment_Num
23 ,P_Awt_Date
24 ,P_Amount
25 ));
26 /* commented for June 24 th release bug by shijain, uncomment later
27 ELSIF jg_zz_shared_pkg.get_product(l_ou_id, NULL) = 'JE' then
28 return ( JE_AWT_PKG.Get_Rate_Id(
29 P_Tax_Name
30 ,P_Invoice_Id
31 ,P_Payment_Num
32 ,P_Awt_Date
33 ,P_Amount
34 ));
35 */
36 ELSIF l_product_code = 'JL' then
37 return ( JL_AWT_PKG.Get_Rate_Id(
38 P_Tax_Name
39 ,P_Invoice_Id
40 ,P_Payment_Num
41 ,P_Awt_Date
42 ,P_Amount
43 ));
44 ELSE
45 return(null);
46 END IF;
47
48
49 END Get_Rate_Id;
50
51
52 procedure AWT_Rounding (
53 P_Checkrun_Name IN varchar2
54 )
55 is
56 l_ou_id NUMBER;
57 BEGIN
58
59 fnd_profile.get('ORG_ID',l_ou_id);
60
61 IF jg_zz_shared_pkg.get_product(l_ou_id, NULL) = 'JA' then
62 JA_AWT_PKG.AWT_Rounding(P_Checkrun_Name);
63 /* commented for June 24 th release bug by shijain, uncomment later
64 ELSIF jg_zz_shared_pkg.get_product(l_ou_id, NULL) = 'JE' then
65 JE_AWT_PKG.AWT_Rounding(P_Checkrun_Name);
66 */
67 ELSIF jg_zz_shared_pkg.get_product(l_ou_id, NULL) = 'JL' then
68 JL_AWT_PKG.AWT_Rounding(P_Checkrun_Name);
69 ELSE
70 null;
71 END IF;
72
73 END AWT_Rounding;
74
75 /**************************************************************
76 Procedure JG_Special_Rounding
77 Objective: Make special rounding for the Withheld Amount
78 and Check a minimum withheld amount.
79 Countries: Korea. (So far)
80 **************************************************************/
81
82 PROCEDURE JG_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
93 IS
94 l_country_code VARCHAR2(10);
95 current_calling_sequence VARCHAR2(2000);
96 BEGIN
97 current_calling_sequence := 'JG_WITHHOLDING_TAX_PKG.<-Jg_Special_Withheld_Amt ' ||
98 P_Calling_Sequence;
99
100 l_country_code := jg_zz_shared_pkg.get_country(ap_calc_withholding_pkg.g_org_id, NULL);
101 IF (l_country_code = 'KR') THEN
102
103 Ja_Kr_Ap_Special_Wh_PKG.Ja_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 END IF;
113 END JG_Special_Withheld_Amt;
114
115 end JG_WITHHOLDING_TAX_PKG;