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