[Home] [Help]
PACKAGE: APPS.AR_GTA_SPLIT_TRX_PROC
Source
4 --| Copyright (c) 2002 Oracle Corporation |
1 PACKAGE "AR_GTA_SPLIT_TRX_PROC" AUTHID CURRENT_USER AS
2 --$Header: ARGRXTRS.pls 120.0.12010000.3 2010/01/19 08:56:43 choli noship $
3 --+===========================================================================|
5 --| Redwood Shores, California, USA |
6 --| All rights reserved. |
7 --+===========================================================================|
8 --| |
9 --| FILENAME : |
10 --| ARRXTRS.pls |
11 --| |
12 --| DESCRIPTION: |
16 --| |
13 --| This package is used to slipt the trx by some |
14 --| condition such as tax rate, max_amount, max_line |
15 --| |
17 --| HISTORY: |
18 --| 10-MAY-2005: Jim.Zheng Create |
19 --| 30-sep-2005: Jim zheng modify because registration issue |
20 --| 13-Oct-2005: Jim Zheng fix get trx type bug |
21 --| 18-Jun-2007: Yanping Wang Modify g_module_prefix to use small case |
22 --| of ar |
23 --| 23-Jan-2009:Yao Zhang fix bug 7758496 CreditMemo whose line num exceeds|
24 --| max line number limitation should be transfered |
25 --| when sales list is enabled |
26 --| |
27 --+===========================================================================+
28
29
30 --=============================================================================
31 -- PROCEDURE NAME :
32 -- split_Transactions
33 -- TYPE :
34 -- PUBLIC
35 --
36 -- DESCRIPTION:
37 -- This procedure returns slpited tracsation by max_amount, max_lines
38 -- PARAMETERS :
39 -- P_ORG_ID IN org_id
40 -- p_transfer_id IN the transfer rule
41 -- P_GTA_TRX_Tbl IN a trx nested table as input
42 -- x_GTA_TRX_Tbl OUT a trx nestedt tabel as output
43 --
44 -- HISTORY:
45 -- 10-MAY-2005 : Jim.Zheng Create
46 --=============================================================================
47 PROCEDURE split_Transactions
48 ( P_ORG_ID IN NUMBER
49 , p_transfer_id IN NUMBER
50 , P_GTA_TRX_Tbl IN AR_GTA_TRX_UTIL.TRX_TBL_TYPE
51 , x_GTA_TRX_Tbl OUT NOCOPY AR_GTA_TRX_UTIL.TRX_TBL_TYPE
52 );
53
54
55 --=============================================================================
56 -- PROCEDURE NAME:
57 -- Copy_Header
58 -- TYPE:
59 -- PUBLIC
60 --
61 -- DESCRIPTION:
62 -- When split trx procedure new a trx, new a trx_header for the new trx
63 -- PARAMETERS :
64 -- p_GTA_TRX_Header_Rec in old trx_header
65 -- x_GTA_TRX_Header_Rec out new trx_header
66 --
67 -- HISTORY:
68 -- 10-MAY-2005 : Jim.Zheng Create
69 --=============================================================================
70 PROCEDURE Copy_Header
71 ( p_GTA_TRX_Header_Rec IN AR_GTA_TRX_UTIL.TRX_HEADER_REC_TYPE
72 , x_GTA_TRX_Header_Rec OUT NOCOPY AR_GTA_TRX_UTIL.TRX_HEADER_REC_TYPE
73 );
74
75
76
77 --=============================================================================
78 -- PROCEDURE NAME:
79 -- process_before_split
80 -- TYPE:
81 -- PUBLIC
82 --
83 -- DESCRIPTION:
84 -- When split trx procedure new a trx, the line_num, trx_num, trx_header_id alse
85 -- be change.
86 --
87 -- PARAMETERS:
88 -- x_gta_trx_rec IN OUT NOCOPY new trx which line number is changed
89 --
90 -- HISTORY:
91 -- 10-MAY-2005 : Jim.Zheng Create
92 --=============================================================================
93 PROCEDURE process_before_split
94 (
95 x_gta_trx_rec IN OUT NOCOPY AR_Gta_Trx_Util.TRX_REC_TYPE
96 );
97
98
99
100 --=============================================================================
101 -- PROCEDURE NAME :
102 -- split_nested_table
103 -- TYPE :
104 -- PUBLIC
105 --
106 -- DESCRIPTION:
107 -- a nested table hasn't a split method, this procedure make a
108 -- split table method for TRX_Line_tbl_type
109 -- be change.
110 -- PARAMETERS :
111 -- p_trx_lines in source table
112 -- split_flag in the position of table which be split
113 -- x_first_lines out first party of demanation table
114 -- x_last_lines out last party of demanation table
115 --
116 -- HISTORY:
117 -- 10-MAY-2005 : Jim.Zheng Create
118 --=============================================================================
119 PROCEDURE split_nested_table
120 (p_trx_lines IN AR_GTA_TRX_UTIL.TRX_line_Tbl_TYPE
121 , p_split_flag IN NUMBER
122 , x_first_lines OUT NOCOPY AR_GTA_TRX_UTIL.TRX_line_Tbl_TYPE
123 , x_last_lines OUT NOCOPY AR_GTA_TRX_UTIL.TRX_line_Tbl_TYPE
124 );
125
126
127 --=============================================================================
128 -- PROCEDURE NAME:
129 -- add_succ_to_temp
130 -- TYPE:
131 -- PUBLIC
132 --
133 -- DESCRIPTION:
134 -- insert a sucess row to temp table when a trx is due successed
135 -- be change.
136 -- PARAMETERS:
137 -- p_gta_trx_rec in the successed trx
138 --
139 -- HISTORY:
140 -- 10-MAY-2005 : Jim.Zheng Create
141 --=============================================================================
142 PROCEDURE add_succ_to_temp
143 (
144 p_gta_trx_rec IN AR_Gta_Trx_Util.TRX_REC_TYPE
145 );
146
147 --=============================================================================
148 -- PROCEDURE NAME:
149 -- split_trx_by_taxreg_number
150 -- TYPE:
151 -- PUBLIC
152 --
153 -- DESCRIPTION:
154 -- split trx by first party registration number
155 -- PARAMETERS:
156 -- p_gta_trx in AR_GTA_TRX_UTIL.trx_rec_type
157 -- x_trx_tbl out AR_Gta_Trx_Util.trx_tbl_type
158 -- HISTORY:
159 -- 10-Sep-2005 : Jim.Zheng Create
160 --=============================================================================
161 PROCEDURE split_trx_by_taxreg_number
162 (p_gta_trx IN AR_GTA_TRX_UTIL.trx_rec_type
163 ,x_trx_tbl OUT NOCOPY AR_Gta_Trx_Util.trx_tbl_type
164 );
165
166 --=============================================================================
167 -- PROCEDURE NAME:
168 -- split_trx_by_rate
169 -- TYPE:
170 -- PUBLIC
171 --
172 -- DESCRIPTION:
173 -- split trx by tax rate
174 -- PARAMETERS:
175 -- p_gta_trx in AR_GTA_TRX_UTIL.trx_tbl_type
176 -- x_trx_tbl out AR_Gta_Trx_Util.trx_tbl_type
177 -- HISTORY:
178 -- 10-Sep-2005 : Jim.Zheng Create
179 --=============================================================================
180 PROCEDURE split_trx_by_rate
181 (p_gta_tbl IN AR_GTA_TRX_UTIL.trx_tbl_type
182 ,x_trx_tbl OUT NOCOPY AR_Gta_Trx_Util.trx_tbl_type
183 );
184
185 --=============================================================================
186 -- PROCEDURE NAME:
187 -- get_trx_type
188 -- TYPE:
189 -- PUBLIC
190 --
191 -- DESCRIPTION:
192 -- get trx type by trx id
193 -- PARAMETERS:
194 -- p_org_id IN NUMBER
195 -- p_gta_trx in AR_GTA_TRX_UTIL.trx_tbl_type
196 -- x_trx_type out ra_cust_trx_types_all.type%TYPE
197 -- HISTORY:
198 -- 10-Sep-2005 : Jim.Zheng Create
199 --=============================================================================
200 PROCEDURE get_trx_type
201 (p_org_id IN NUMBER
202 , p_gta_trx IN AR_Gta_Trx_Util.trx_rec_type
203 , x_trx_type OUT NOCOPY ra_cust_trx_types_all.type%TYPE
204 );
205
206 --=============================================================================
207 -- PROCEDURE NAME:
208 -- judge_cm_limit
209 -- TYPE:
210 -- PUBLIC
211 --
212 -- DESCRIPTION:
213 -- Judge wether the CM exceed the max line and max amount
214 -- PARAMETERS:
215 -- p_gta_trx in AR_GTA_TRX_UTIL.trx_tbl_type
216 -- p_org_id in number
217 -- x_result out BOOLEAN
218 -- HISTORY:
219 -- 10-Sep-2005 : Jim.Zheng Create
220 -- 23-Jan-2009 Yao Zhang Changed for bug 7758496
221 --=============================================================================
222 PROCEDURE judge_cm_limit
223 (p_gta_trx IN AR_Gta_Trx_Util.trx_rec_type
224 , p_org_id IN NUMBER
225 , p_transfer_id IN NUMBER --yao zhang changed for bug 7758496
226 , x_result OUT NOCOPY BOOLEAN
227 );
228
229 --=============================================================================
230 -- PROCEDURE NAME:
231 -- judge_cm_limit
232 -- TYPE:
233 -- PUBLIC
234 --
235 -- DESCRIPTION:
236 -- get max line and max amount by fp registration number
237 -- PARAMETERS:
238 -- p_gta_trx in AR_GTA_TRX_UTIL.trx_tbl_type
239 -- p_org_id in number
240 -- x_max_amount in number
241 -- x_max_line in number
242 -- HISTORY:
243 -- 10-Sep-2005 : Jim.Zheng Create
244 --=============================================================================
245 PROCEDURE get_max_amount_line
246 (p_gta_trx IN AR_Gta_Trx_Util.trx_rec_type
247 , p_org_id IN NUMBER
248 , x_max_amount OUT NOCOPY NUMBER
249 , x_max_line OUT NOCOPY NUMBER
250 );
251
252 --=============================================================================
253 -- PROCEDURE NAME:
254 -- fileter_credit_memo
255 -- TYPE:
256 -- PUBLIC
257 --
258 -- DESCRIPTION:
259 -- filter credit memo which amount and lines number exceeded.
260 -- PARAMETERS:
261 -- p_org_id in number
262 -- p_gta_trx_tbl in ar_gta_trx_util.trx_tbl_type
263 -- x_gta_trx_tbl out nocopy ar_gta_trx_util.trx_tbl_type
264 --
265 -- HISTORY:
266 -- 10-Sep-2005 : Jim.Zheng Create
267 -- 23-Jan-2009 Yao Zhang Changed for bug 7758496
268 --=============================================================================
269 PROCEDURE filter_credit_memo
270 (p_org_id IN NUMBER
271 , p_transfer_id IN NUMBER--yao zhang changed for bug 7758496
272 , p_gta_trx_tbl IN ar_gta_trx_util.trx_tbl_type
273 , x_gta_Trx_tbl OUT NOCOPY ar_gta_trx_util.trx_tbl_type
274 );
275
276
277 G_MODULE_PREFIX VARCHAR2(50) := 'ar.plsql.AR_GTA_SPLIT_TRX_PROC';
278
279 END AR_GTA_SPLIT_TRX_PROC;