DBA Data[Home] [Help]

PACKAGE: APPS.OE_BULK_TAX_UTIL

Source


1 PACKAGE OE_BULK_TAX_UTIL AS
2 /* $Header: OEBUTAXS.pls 120.0.12010000.5 2009/01/09 04:32:28 smanian noship $ */
3 /*#
4 * This API contains the utilities used in tax calculation.
5 * @rep:scope            private
6 * @rep:product          ONT
7 * @rep:lifecycle        active
8 * @rep:displayname      Order Management Tax Utility API
9 * @rep:category         BUSINESS_ENTITY ONT_SALES_ORDER
10 */
11 
12 G_CURRENCY_CODE   VARCHAR2(15);
13 G_MINIMUM_ACCOUNTABLE_UNIT NUMBER;
14 G_PRECISION       NUMBER(1);
15 
16 TYPE TAX_NUMBER_TBL_TYPE IS TABLE OF NUMBER
17 INDEX BY BINARY_INTEGER;
18 
19 G_TAX_LINE_ID     TAX_NUMBER_TBL_TYPE;
20 G_TAX_LINE_VALUE  TAX_NUMBER_TBL_TYPE;
21 G_MISS_TAX_NUMBER_TBL TAX_NUMBER_TBL_TYPE;
22 
23 TYPE Line_Adj_Rec_Type IS RECORD
24 (PRICE_ADJUSTMENT_ID  OE_WSH_BULK_GRP.T_NUM := OE_WSH_BULK_GRP.T_NUM()
25 ,CREATED_BY           OE_WSH_BULK_GRP.T_NUM := OE_WSH_BULK_GRP.T_NUM()
26 ,CREATION_DATE        OE_WSH_BULK_GRP.T_DATE := OE_WSH_BULK_GRP.T_DATE()
27 ,LAST_UPDATE_DATE     OE_WSH_BULK_GRP.T_DATE := OE_WSH_BULK_GRP.T_DATE()
28 ,LAST_UPDATED_BY      OE_WSH_BULK_GRP.T_NUM := OE_WSH_BULK_GRP.T_NUM()
29 ,HEADER_ID            OE_WSH_BULK_GRP.T_NUM := OE_WSH_BULK_GRP.T_NUM()
30 ,LINE_ID              OE_WSH_BULK_GRP.T_NUM := OE_WSH_BULK_GRP.T_NUM()
31 ,TAX_CODE             OE_WSH_BULK_GRP.T_V50 := OE_WSH_BULK_GRP.T_V50()
32 ,OPERAND              OE_WSH_BULK_GRP.T_NUM := OE_WSH_BULK_GRP.T_NUM()
33 ,ADJUSTED_AMOUNT      OE_WSH_BULK_GRP.T_NUM := OE_WSH_BULK_GRP.T_NUM()
34 ,TAX_RATE_ID          OE_WSH_BULK_GRP.T_NUM := OE_WSH_BULK_GRP.T_NUM()--bug7685103
35 ,AUTOMATIC_FLAG       OE_WSH_BULK_GRP.T_V1 := OE_WSH_BULK_GRP.T_V1()
36 ,LIST_LINE_TYPE_CODE  OE_WSH_BULK_GRP.T_V30 := OE_WSH_BULK_GRP.T_V30()
37 ,ARITHMETIC_OPERATOR  OE_WSH_BULK_GRP.T_V30 := OE_WSH_BULK_GRP.T_V30()
38 );
39 
40 G_LINE_ADJ_REC        Line_Adj_Rec_Type;
41 
42 /*#
43 * This procedure populates the default tax code on order lines when no tax code has been specified.
44 * @rep:scope	 	private
45 * @rep:lifecycle	active
46 * @rep:category	        BUSINESS_ENTITY	ONT_SALES_ORDER
47 * @rep:displayname	Get Default Tax Code
48 */
49 PROCEDURE Get_Default_Tax_Code;
50 
51 /*#
52 * This procedure calculates the tax amount for order lines.
53 * @param                p_post_insert Input parameter that specifies whether the tax amount will be updated before or after the order lines have been inserted.
54 * @rep:scope	 	private
55 * @rep:lifecycle	active
56 * @rep:category	        BUSINESS_ENTITY	ONT_SALES_ORDER
57 * @rep:displayname	Calculate Tax
58 */
59 PROCEDURE Calculate_Tax
60           (p_post_insert            IN    BOOLEAN
61           );
62 
63 /*#
64 * This procedure extends the size of the global price adjustment record.
65 * @param                p_count Input parameter that specifies how far to extend the record.
66 * @param                p_adj_rec Input parameter containing the global adjustment record to be extended
67 * @rep:scope	 	private
68 * @rep:lifecycle	active
69 * @rep:category	        BUSINESS_ENTITY	ONT_SALES_ORDER
70 * @rep:displayname	Extend Adjustment Record
71 */
72 PROCEDURE Extend_Adj_Rec
73         (p_count               IN NUMBER
74         ,p_adj_rec            IN OUT NOCOPY LINE_ADJ_REC_TYPE
75         );
76 
77 /*#
78 * This procedure inserts the price adjustment records that are associated with the tax on each line.
79 * @param                p_post_insert Input parameter that specifies whether the tax amount will be updated calculated before or after the order lines have been inserted.
80 * @rep:scope	 	private
81 * @rep:lifecycle	active
82 * @rep:category	        BUSINESS_ENTITY	ONT_SALES_ORDER
83 * @rep:displayname	Insert Tax Records
84 */
85 PROCEDURE Insert_Tax_Records
86         (p_post_insert            IN    BOOLEAN
87         );
88 
89 /*#
90 * This procedure marks header and line records for error.
91 * @param                p_header_index Input parameter containing the index value for the header to be marked for error
92 * @rep:scope	 	private
93 * @rep:lifecycle	active
94 * @rep:category	        BUSINESS_ENTITY	ONT_SALES_ORDER
95 * @rep:displayname	Handle Error
96 */
97 PROCEDURE Handle_Error
98         (p_header_index               IN NUMBER
99 ---bug 7653825        ,p_line_index                 IN NUMBER
100         );
101 
102 /*#
103 * This procedure handles tax code retrieval and validation errors
104 * @param                p_index Input parameter containing the index value for the line
105 * @param                p_header_index Input parameter containing the index value for the header
106 * @rep:scope	 	private
107 * @rep:lifecycle	active
108 * @rep:category	        BUSINESS_ENTITY	ONT_SALES_ORDER
109 * @rep:displayname	Handle Tax Code Error
110 */
111 PROCEDURE Handle_Tax_Code_Error(p_index IN NUMBER,
112                                 p_header_index IN NUMBER,
113 				x_index_inc OUT NOCOPY NUMBER);
114 
115 END OE_BULK_TAX_UTIL;