If you are using Payables to automatically withhold tax, you may want to
customize the AP_CUSTOM_WITHHOLDING_PKG to perform special behavior. This PL/SQL
package contains a procedure Ap_Special_Withheld_Amt which can be used to implement functionality like rounding witholding tax.
Eg:
procedure Ap_Special_Withheld_Amt
(
P_Withheld_Amount IN OUT NOCOPY Number
,P_Base_WT_amount IN OUT NOCOPY Number
,P_CurrCode IN Varchar2
,P_BaseCurrCode IN Varchar2
,P_Invoice_exchange_rate IN Number
,P_Tax_Name IN Varchar2
,P_Calling_sequence IN Varchar2
,P_Unrounded_WT_Amount IN Number DEFAULT NULL --bug 10262174
,P_Calling_parameter IN Varchar2 DEFAULT NULL --bug 14271407
)
is
BEGIN
-- IMPORTANT: This section is reserved for Globalization features.
-- Please do not modify code here.
-- BUG 7232736 replaced sys_context with g_zz_shared_pkg.get_product
-- Uncommented the call to JG_WITHHOLDING_TAX_PKG.JG_Special_Withheld_Amt
-- IF sys_context('JG','JGZZ_PRODUCT_CODE') is not null THEN
IF jg_zz_shared_pkg.get_product(AP_CALC_WITHHOLDING_PKG.g_org_id, NULL) is not null THEN
JG_WITHHOLDING_TAX_PKG.JG_Special_Withheld_Amt
(P_Withheld_Amount
,P_Base_WT_amount
,P_CurrCode
,P_BaseCurrCode
,P_Invoice_exchange_rate
,P_Tax_Name
,P_Calling_sequence
);
NULL;
END IF;
-- Please enter all custom code below this line.
-- Begin Custom Code
--Added by Siddhartha S. for rounding witholding tax to floor value.
P_Withheld_Amount:= FLOOR(P_Unrounded_WT_Amount);
--END of addition
-- End Custom Code
END Ap_Special_Withheld_Amt;
Eg:
procedure Ap_Special_Withheld_Amt
(
P_Withheld_Amount IN OUT NOCOPY Number
,P_Base_WT_amount IN OUT NOCOPY Number
,P_CurrCode IN Varchar2
,P_BaseCurrCode IN Varchar2
,P_Invoice_exchange_rate IN Number
,P_Tax_Name IN Varchar2
,P_Calling_sequence IN Varchar2
,P_Unrounded_WT_Amount IN Number DEFAULT NULL --bug 10262174
,P_Calling_parameter IN Varchar2 DEFAULT NULL --bug 14271407
)
is
BEGIN
-- IMPORTANT: This section is reserved for Globalization features.
-- Please do not modify code here.
-- BUG 7232736 replaced sys_context with g_zz_shared_pkg.get_product
-- Uncommented the call to JG_WITHHOLDING_TAX_PKG.JG_Special_Withheld_Amt
-- IF sys_context('JG','JGZZ_PRODUCT_CODE') is not null THEN
IF jg_zz_shared_pkg.get_product(AP_CALC_WITHHOLDING_PKG.g_org_id, NULL) is not null THEN
JG_WITHHOLDING_TAX_PKG.JG_Special_Withheld_Amt
(P_Withheld_Amount
,P_Base_WT_amount
,P_CurrCode
,P_BaseCurrCode
,P_Invoice_exchange_rate
,P_Tax_Name
,P_Calling_sequence
);
NULL;
END IF;
-- Please enter all custom code below this line.
-- Begin Custom Code
--Added by Siddhartha S. for rounding witholding tax to floor value.
P_Withheld_Amount:= FLOOR(P_Unrounded_WT_Amount);
--END of addition
-- End Custom Code
END Ap_Special_Withheld_Amt;
Great post
ReplyDelete