[Home] [Help]
PACKAGE: APPS.AP_RETRO_PRICING_PKG
Source
1 PACKAGE AP_RETRO_PRICING_PKG AS
2 /* $Header: apretros.pls 120.7.12010000.1 2008/07/28 06:04:38 appldev ship $ */
3 TYPE id_list_type IS TABLE OF NUMBER INDEX BY BINARY_INTEGER; --Bug6328827
4 TYPE vendor_num_list_type IS TABLE OF VARCHAR2(30) INDEX BY BINARY_INTEGER;
5 TYPE vendor_name_list_type IS TABLE OF VARCHAR2(240) INDEX BY BINARY_INTEGER;
6 TYPE po_number_list_type IS TABLE OF VARCHAR2(20) INDEX BY BINARY_INTEGER;
7
8
9 TYPE instruction_lines_rec_type IS RECORD(
10 invoice_id AP_INVOICE_LINES_INTERFACE.invoice_id%TYPE,
11 invoice_line_id AP_INVOICE_LINES_INTERFACE.invoice_line_id%TYPE,
12 po_line_location_id AP_INVOICE_LINES_INTERFACE.po_line_location_id%TYPE,
13 accounting_date AP_INVOICE_LINES_INTERFACE.accounting_date%TYPE,
14 unit_price AP_INVOICE_LINES_INTERFACE.unit_price%TYPE,
15 requester_id AP_INVOICE_LINES_INTERFACE.requester_id%TYPE,
16 description AP_INVOICE_LINES_INTERFACE.description%TYPE,
17 award_id AP_INVOICE_LINES_INTERFACE.award_id%TYPE,
18 created_by AP_INVOICE_LINES_INTERFACE.created_by%TYPE);
19
20 TYPE instruction_lines_list_type IS TABLE OF instruction_lines_rec_type
21 INDEX by BINARY_INTEGER;
22
23 TYPE invoice_rec_type IS RECORD (
24 invoice_id AP_INVOICES_ALL.invoice_id%TYPE,
25 vendor_id AP_INVOICES_ALL.vendor_id%TYPE,
26 invoice_num AP_INVOICES_ALL.invoice_num%TYPE,
27 set_of_books_id AP_INVOICES_ALL.set_of_books_id%TYPE,
28 invoice_currency_code AP_INVOICES_ALL.invoice_currency_code%TYPE,
29 payment_currency_code AP_INVOICES_ALL.payment_currency_code%TYPE,
30 payment_cross_rate AP_INVOICES_ALL.payment_cross_rate%TYPE,
31 invoice_amount AP_INVOICES_ALL.invoice_amount%TYPE,
32 vendor_site_id AP_INVOICES_ALL.vendor_site_id%TYPE,
33 invoice_date AP_INVOICES_ALL.invoice_date%TYPE,
34 source AP_INVOICES_ALL.source%TYPE,
35 invoice_type_lookup_code AP_INVOICES_ALL.invoice_type_lookup_code%TYPE,
36 description AP_INVOICES_ALL.description%TYPE,
37 amount_applicable_to_discount AP_INVOICES_ALL.amount_applicable_to_discount%TYPE,
38 terms_id AP_INVOICES_ALL.terms_id%TYPE,
39 terms_date AP_INVOICES_ALL.terms_date%TYPE,
40 payment_method_code AP_INVOICES_ALL.payment_method_code%TYPE, --4552701
41 pay_group_lookup_code AP_INVOICES_ALL.pay_group_lookup_code%TYPE,
42 accts_pay_code_combination_id AP_INVOICES_ALL.accts_pay_code_combination_id%TYPE,
43 payment_status_flag AP_INVOICES_ALL.payment_status_flag%TYPE,
44 creation_date AP_INVOICES_ALL.creation_date%TYPE,
45 created_by AP_INVOICES_ALL.created_by%TYPE,
46 base_amount AP_INVOICES_ALL.base_amount%TYPE,
47 exclusive_payment_flag AP_INVOICES_ALL.exclusive_payment_flag%TYPE,
48 goods_received_date AP_INVOICES_ALL.goods_received_date%TYPE,
49 invoice_received_date AP_INVOICES_ALL.invoice_received_date%TYPE,
50 exchange_rate AP_INVOICES_ALL.exchange_rate%TYPE,
51 exchange_rate_type AP_INVOICES_ALL.exchange_rate_type%TYPE,
52 exchange_date AP_INVOICES_ALL.exchange_date%TYPE,
53 attribute1 AP_INVOICES_ALL.attribute1%TYPE,
54 attribute2 AP_INVOICES_ALL.attribute2%TYPE,
55 attribute3 AP_INVOICES_ALL.attribute3%TYPE,
56 attribute4 AP_INVOICES_ALL.attribute4%TYPE,
57 attribute5 AP_INVOICES_ALL.attribute5%TYPE,
58 attribute6 AP_INVOICES_ALL.attribute6%TYPE,
59 attribute7 AP_INVOICES_ALL.attribute7%TYPE,
60 attribute8 AP_INVOICES_ALL.attribute8%TYPE,
61 attribute9 AP_INVOICES_ALL.attribute9%TYPE,
62 attribute10 AP_INVOICES_ALL.attribute10%TYPE,
63 attribute11 AP_INVOICES_ALL.attribute11%TYPE,
64 attribute12 AP_INVOICES_ALL.attribute12%TYPE,
65 attribute13 AP_INVOICES_ALL.attribute13%TYPE,
66 attribute14 AP_INVOICES_ALL.attribute14%TYPE,
67 attribute15 AP_INVOICES_ALL.attribute15%TYPE,
68 attribute_category AP_INVOICES_ALL.attribute_category%TYPE,
69 -- Removed references to USSGL for bug 4277744
70 -- ussgl_transaction_code AP_INVOICES_ALL.ussgl_transaction_code%TYPE,
71 -- ussgl_trx_code_context AP_INVOICES_ALL.ussgl_trx_code_context%TYPE,
72 project_id AP_INVOICES_ALL.project_id%TYPE,
73 task_id AP_INVOICES_ALL.task_id%TYPE,
74 expenditure_type AP_INVOICES_ALL.expenditure_type%TYPE,
75 expenditure_item_date AP_INVOICES_ALL.expenditure_item_date%TYPE,
76 expenditure_organization_id AP_INVOICES_ALL.expenditure_organization_id%TYPE,
77 pa_default_dist_ccid AP_INVOICES_ALL.pa_default_dist_ccid%TYPE,
78 awt_flag AP_INVOICES_ALL.awt_flag%TYPE,
79 awt_group_id AP_INVOICES_ALL.awt_group_id%TYPE,
80 pay_awt_group_id AP_INVOICES_ALL.pay_awt_group_id%TYPE,--bug6817107
81 org_id AP_INVOICES_ALL.org_id%TYPE,
82 award_id AP_INVOICES_ALL.award_id%TYPE,
83 approval_ready_flag AP_INVOICES_ALL.approval_ready_flag%TYPE,
84 wfapproval_status AP_INVOICES_ALL.wfapproval_status%TYPE,
85 requester_id AP_INVOICES_ALL.requester_id%TYPE,
86 global_attribute_category AP_INVOICES_ALL.global_attribute_category%TYPE,
87 global_attribute1 AP_INVOICES_ALL.global_attribute1%TYPE,
88 global_attribute2 AP_INVOICES_ALL.global_attribute2%TYPE,
89 global_attribute3 AP_INVOICES_ALL.global_attribute3%TYPE,
90 global_attribute4 AP_INVOICES_ALL.global_attribute4%TYPE,
91 global_attribute5 AP_INVOICES_ALL.global_attribute5%TYPE,
92 global_attribute6 AP_INVOICES_ALL.global_attribute6%TYPE,
93 global_attribute7 AP_INVOICES_ALL.global_attribute7%TYPE,
94 global_attribute8 AP_INVOICES_ALL.global_attribute8%TYPE,
95 global_attribute9 AP_INVOICES_ALL.global_attribute9%TYPE,
96 global_attribute10 AP_INVOICES_ALL.global_attribute10%TYPE,
97 global_attribute11 AP_INVOICES_ALL.global_attribute11%TYPE,
98 global_attribute12 AP_INVOICES_ALL.global_attribute12%TYPE,
99 global_attribute13 AP_INVOICES_ALL.global_attribute13%TYPE,
100 global_attribute14 AP_INVOICES_ALL.global_attribute14%TYPE,
101 global_attribute15 AP_INVOICES_ALL.global_attribute15%TYPE,
102 global_attribute16 AP_INVOICES_ALL.global_attribute16%TYPE,
103 global_attribute17 AP_INVOICES_ALL.global_attribute17%TYPE,
104 global_attribute18 AP_INVOICES_ALL.global_attribute18%TYPE,
105 global_attribute19 AP_INVOICES_ALL.global_attribute19%TYPE,
106 global_attribute20 AP_INVOICES_ALL.global_attribute20%TYPE,
107 instruction_id NUMBER(15),
108 instr_status_flag VARCHAR2(1),
109 batch_id NUMBER(15),
110 doc_sequence_id AP_INVOICES_ALL.doc_sequence_id%TYPE,
111 doc_sequence_value AP_INVOICES_ALL.doc_sequence_value%TYPE,
112 doc_category_code AP_INVOICES_ALL.doc_category_code%TYPE,
113 APPLICATION_ID number(15),
114 BANK_CHARGE_BEARER varchar2(30),
115 DELIVERY_CHANNEL_CODE varchar2(30),
116 DISC_IS_INV_LESS_TAX_FLAG varchar2(1),
117 DOCUMENT_SUB_TYPE VARCHAR2(150),
118 EXCLUDE_FREIGHT_FROM_DISCOUNT VARCHAR2(1),
119 EXTERNAL_BANK_ACCOUNT_ID NUMBER(15),
120 GL_DATE DATE,
121 LEGAL_ENTITY_ID NUMBER(15),
122 NET_OF_RETAINAGE_FLAG VARCHAR2(1),
123 PARTY_ID NUMBER(15),
124 PARTY_SITE_ID NUMBER(15),
125 PAYMENT_CROSS_RATE_DATE DATE,
126 PAYMENT_CROSS_RATE_TYPE VARCHAR2(30),
127 PAYMENT_FUNCTION VARCHAR2(30),
128 PAYMENT_REASON_CODE VARCHAR2(30),
129 PAYMENT_REASON_COMMENTS VARCHAR2(240),
130 PAY_CURR_INVOICE_AMOUNT NUMBER,
131 PAY_PROC_TRXN_TYPE_CODE VARCHAR2(30),
132 PORT_OF_ENTRY_CODE VARCHAR2(30),
133 POSTING_STATUS VARCHAR2(15),
134 PO_HEADER_ID NUMBER(15),
135 PRODUCT_TABLE VARCHAR2(30),
136 PROJECT_ACCOUNTING_CONTEXT VARCHAR2(30),
137 QUICK_PO_HEADER_ID NUMBER(15),
138 REFERENCE_1 VARCHAR2(30),
139 REFERENCE_2 VARCHAR2(30),
140 REFERENCE_KEY1 VARCHAR2(150),
141 REFERENCE_KEY2 VARCHAR2(150),
142 REFERENCE_KEY3 VARCHAR2(150),
143 REFERENCE_KEY4 VARCHAR2(150),
144 REFERENCE_KEY5 VARCHAR2(150),
145 REMITTANCE_MESSAGE1 VARCHAR2(150),
146 REMITTANCE_MESSAGE2 VARCHAR2(150),
147 REMITTANCE_MESSAGE3 VARCHAR2(150),
148 SETTLEMENT_PRIORITY VARCHAR2(30),
149 SUPPLIER_TAX_EXCHANGE_RATE NUMBER,
150 SUPPLIER_TAX_INVOICE_DATE DATE,
151 SUPPLIER_TAX_INVOICE_NUMBER VARCHAR2(150),
152 TAXATION_COUNTRY VARCHAR2(30),
153 TAX_INVOICE_INTERNAL_SEQ VARCHAR2(15),
154 TAX_INVOICE_RECORDING_DATE DATE,
155 TAX_RELATED_INVOICE_ID NUMBER,
156 TRX_BUSINESS_CATEGORY VARCHAR2(240),
157 UNIQUE_REMITTANCE_IDENTIFIER VARCHAR2(30),
158 URI_CHECK_DIGIT VARCHAR2(2),
159 USER_DEFINED_FISC_CLASS VARCHAR2(240));
160
161 TYPE invoice_header_list_type IS TABLE OF invoice_rec_type
162 INDEX BY BINARY_INTEGER;
163
164 TYPE invoice_lines_rec_type IS RECORD(
165 invoice_id AP_INVOICE_LINES_ALL.invoice_id%TYPE,
166 line_number AP_INVOICE_LINES_ALL.line_number%TYPE,
167 line_type_lookup_code AP_INVOICE_LINES_ALL.line_type_lookup_code%TYPE,
168 requester_id AP_INVOICE_LINES_ALL.requester_id%TYPE,
169 description AP_INVOICE_LINES_ALL.description%TYPE,
170 line_source AP_INVOICE_LINES_ALL.line_source%TYPE,
171 org_id AP_INVOICE_LINES_ALL.org_id%TYPE,
172 inventory_item_id AP_INVOICE_LINES_ALL.inventory_item_id%TYPE,
173 item_description AP_INVOICE_LINES_ALL.item_description%TYPE,
174 serial_number AP_INVOICE_LINES_ALL.serial_number%TYPE,
175 manufacturer AP_INVOICE_LINES_ALL.manufacturer%TYPE,
176 model_number AP_INVOICE_LINES_ALL.model_number%TYPE,
177 generate_dists AP_INVOICE_LINES_ALL.generate_dists%TYPE,
178 match_type AP_INVOICE_LINES_ALL.match_type%TYPE,
179 default_dist_ccid AP_INVOICE_LINES_ALL.default_dist_ccid%TYPE,
180 prorate_across_all_items AP_INVOICE_LINES_ALL.prorate_across_all_items%TYPE,
181 accounting_date AP_INVOICE_LINES_ALL.accounting_date%TYPE,
182 period_name AP_INVOICE_LINES_ALL.period_name%TYPE,
183 deferred_acctg_flag AP_INVOICE_LINES_ALL.deferred_acctg_flag%TYPE,
184 set_of_books_id AP_INVOICE_LINES_ALL.set_of_books_id%TYPE,
185 amount AP_INVOICE_LINES_ALL.amount%TYPE,
186 base_amount AP_INVOICE_LINES_ALL.base_amount%TYPE,
187 rounding_amt AP_INVOICE_LINES_ALL.rounding_amt%TYPE,
188 quantity_invoiced AP_INVOICE_LINES_ALL.quantity_invoiced%TYPE,
189 unit_meas_lookup_code AP_INVOICE_LINES_ALL.unit_meas_lookup_code%TYPE,
190 unit_price AP_INVOICE_LINES_ALL.unit_price%TYPE,
191 -- Removed references to USSGL for bug 4277744
192 -- ussgl_transaction_code AP_INVOICE_LINES_ALL.ussgl_transaction_code%TYPE,
193 discarded_flag AP_INVOICE_LINES_ALL.discarded_flag%TYPE,
194 cancelled_flag AP_INVOICE_LINES_ALL.cancelled_flag%TYPE,
195 income_tax_region AP_INVOICE_LINES_ALL.income_tax_region%TYPE,
196 type_1099 AP_INVOICE_LINES_ALL.type_1099%TYPE,
197 corrected_inv_id AP_INVOICE_LINES_ALL.corrected_inv_id%TYPE,
198 corrected_line_number AP_INVOICE_LINES_ALL.corrected_line_number%TYPE,
199 po_header_id AP_INVOICE_LINES_ALL.po_header_id%TYPE,
200 po_line_id AP_INVOICE_LINES_ALL.po_line_id%TYPE,
201 po_release_id AP_INVOICE_LINES_ALL.po_release_id%TYPE,
202 po_line_location_id AP_INVOICE_LINES_ALL.po_line_location_id%TYPE,
203 po_distribution_id AP_INVOICE_LINES_ALL.po_distribution_id%TYPE,
204 rcv_transaction_id AP_INVOICE_LINES_ALL.rcv_transaction_id%TYPE,
205 final_match_flag AP_INVOICE_LINES_ALL.final_match_flag%TYPE,
206 assets_tracking_flag AP_INVOICE_LINES_ALL.assets_tracking_flag%TYPE,
207 asset_book_type_code AP_INVOICE_LINES_ALL.asset_book_type_code%TYPE,
208 asset_category_id AP_INVOICE_LINES_ALL.asset_category_id%TYPE,
209 project_id AP_INVOICE_LINES_ALL.project_id%TYPE,
210 task_id AP_INVOICE_LINES_ALL.task_id%TYPE,
211 expenditure_type AP_INVOICE_LINES_ALL.expenditure_type%TYPE,
212 expenditure_item_date AP_INVOICE_LINES_ALL.expenditure_item_date%TYPE,
213 expenditure_organization_id AP_INVOICE_LINES_ALL.expenditure_organization_id%TYPE,
214 award_id AP_INVOICE_LINES_ALL.award_id%TYPE,
215 awt_group_id AP_INVOICE_LINES_ALL.awt_group_id%TYPE,
216 pay_awt_group_id AP_INVOICE_LINES_ALL.pay_awt_group_id%TYPE,--bug6817107
217 receipt_verified_flag AP_INVOICE_LINES_ALL.receipt_verified_flag%TYPE,
218 receipt_required_flag AP_INVOICE_LINES_ALL.receipt_required_flag%TYPE,
219 receipt_missing_flag AP_INVOICE_LINES_ALL.receipt_missing_flag%TYPE,
220 justification AP_INVOICE_LINES_ALL.justification%TYPE,
221 expense_group AP_INVOICE_LINES_ALL.expense_group%TYPE,
222 start_expense_date AP_INVOICE_LINES_ALL.start_expense_date%TYPE,
223 end_expense_date AP_INVOICE_LINES_ALL.end_expense_date%TYPE,
224 receipt_currency_code AP_INVOICE_LINES_ALL.receipt_currency_code%TYPE,
225 receipt_conversion_rate AP_INVOICE_LINES_ALL.receipt_conversion_rate%TYPE,
226 receipt_currency_amount AP_INVOICE_LINES_ALL.receipt_conversion_rate%TYPE,
227 daily_amount AP_INVOICE_LINES_ALL.daily_amount%TYPE,
228 web_parameter_id AP_INVOICE_LINES_ALL.web_parameter_id%TYPE,
229 adjustment_reason AP_INVOICE_LINES_ALL.adjustment_reason%TYPE,
230 merchant_document_number AP_INVOICE_LINES_ALL.merchant_document_number%TYPE,
231 merchant_name AP_INVOICE_LINES_ALL.merchant_name%TYPE,
232 merchant_reference AP_INVOICE_LINES_ALL.merchant_reference%TYPE,
233 merchant_tax_reg_number AP_INVOICE_LINES_ALL.merchant_tax_reg_number%TYPE,
234 merchant_taxpayer_id AP_INVOICE_LINES_ALL.merchant_taxpayer_id%TYPE,
235 country_of_supply AP_INVOICE_LINES_ALL.country_of_supply%TYPE,
236 credit_card_trx_id AP_INVOICE_LINES_ALL.credit_card_trx_id%TYPE,
237 company_prepaid_invoice_id AP_INVOICE_LINES_ALL.company_prepaid_invoice_id%TYPE,
238 cc_reversal_flag AP_INVOICE_LINES_ALL.cc_reversal_flag%TYPE,
239 creation_date AP_INVOICE_LINES_ALL.creation_date%TYPE,
240 created_by AP_INVOICE_LINES_ALL.created_by%TYPE,
241 attribute_category AP_INVOICE_LINES_ALL.attribute_category%TYPE,
242 attribute1 AP_INVOICE_LINES_ALL.attribute1%TYPE,
243 attribute2 AP_INVOICE_LINES_ALL.attribute2%TYPE,
244 attribute3 AP_INVOICE_LINES_ALL.attribute3%TYPE,
245 attribute4 AP_INVOICE_LINES_ALL.attribute4%TYPE,
246 attribute5 AP_INVOICE_LINES_ALL.attribute5%TYPE,
247 attribute6 AP_INVOICE_LINES_ALL.attribute6%TYPE,
248 attribute7 AP_INVOICE_LINES_ALL.attribute7%TYPE,
249 attribute8 AP_INVOICE_LINES_ALL.attribute8%TYPE,
250 attribute9 AP_INVOICE_LINES_ALL.attribute9%TYPE,
251 attribute10 AP_INVOICE_LINES_ALL.attribute10%TYPE,
252 attribute11 AP_INVOICE_LINES_ALL.attribute11%TYPE,
253 attribute12 AP_INVOICE_LINES_ALL.attribute12%TYPE,
254 attribute13 AP_INVOICE_LINES_ALL.attribute13%TYPE,
255 attribute14 AP_INVOICE_LINES_ALL.attribute14%TYPE,
256 attribute15 AP_INVOICE_LINES_ALL.attribute15%TYPE,
257 global_attribute_category AP_INVOICE_LINES_ALL.global_attribute_category%TYPE,
258 global_attribute1 AP_INVOICE_LINES_ALL.global_attribute1%TYPE,
259 global_attribute2 AP_INVOICE_LINES_ALL.global_attribute2%TYPE,
260 global_attribute3 AP_INVOICE_LINES_ALL.global_attribute3%TYPE,
261 global_attribute4 AP_INVOICE_LINES_ALL.global_attribute4%TYPE,
262 global_attribute5 AP_INVOICE_LINES_ALL.global_attribute5%TYPE,
263 global_attribute6 AP_INVOICE_LINES_ALL.global_attribute6%TYPE,
264 global_attribute7 AP_INVOICE_LINES_ALL.global_attribute7%TYPE,
265 global_attribute8 AP_INVOICE_LINES_ALL.global_attribute8%TYPE,
266 global_attribute9 AP_INVOICE_LINES_ALL.global_attribute9%TYPE,
267 global_attribute10 AP_INVOICE_LINES_ALL.global_attribute10%TYPE,
268 global_attribute11 AP_INVOICE_LINES_ALL.global_attribute11%TYPE,
269 global_attribute12 AP_INVOICE_LINES_ALL.global_attribute12%TYPE,
270 global_attribute13 AP_INVOICE_LINES_ALL.global_attribute13%TYPE,
271 global_attribute14 AP_INVOICE_LINES_ALL.global_attribute14%TYPE,
272 global_attribute15 AP_INVOICE_LINES_ALL.global_attribute15%TYPE,
273 global_attribute16 AP_INVOICE_LINES_ALL.global_attribute16%TYPE,
274 global_attribute17 AP_INVOICE_LINES_ALL.global_attribute17%TYPE,
275 global_attribute18 AP_INVOICE_LINES_ALL.global_attribute18%TYPE,
276 global_attribute19 AP_INVOICE_LINES_ALL.global_attribute19%TYPE,
277 global_attribute20 AP_INVOICE_LINES_ALL.global_attribute20%TYPE,
278 primary_intended_use AP_INVOICE_LINES_ALL.primary_intended_use%TYPE,
279 ship_to_location_id AP_INVOICE_LINES_ALL.ship_to_location_id%TYPE,
280 product_type AP_INVOICE_LINES_ALL.product_type%TYPE,
281 product_category AP_INVOICE_LINES_ALL.product_category%TYPE,
282 product_fisc_classification AP_INVOICE_LINES_ALL.product_fisc_classification%TYPE,
283 user_defined_fisc_class AP_INVOICE_LINES_ALL.user_defined_fisc_class%TYPE,
284 trx_business_category AP_INVOICE_LINES_ALL.trx_business_category%TYPE,
285 summary_tax_line_id AP_INVOICE_LINES_ALL.summary_tax_line_id%TYPE,
286 tax_regime_code AP_INVOICE_LINES_ALL.tax_regime_code%TYPE,
287 tax AP_INVOICE_LINES_ALL.tax%TYPE,
288 tax_jurisdiction_code AP_INVOICE_LINES_ALL.tax_jurisdiction_code%TYPE,
289 tax_status_code AP_INVOICE_LINES_ALL.tax_status_code%TYPE,
290 tax_rate_id AP_INVOICE_LINES_ALL.tax_rate_id%TYPE,
291 tax_rate_code AP_INVOICE_LINES_ALL.tax_rate_code%TYPE,
292 tax_rate AP_INVOICE_LINES_ALL.tax_rate%TYPE,
293 wfapproval_status AP_INVOICE_LINES_ALL.wfapproval_status%TYPE,
294 pa_quantity AP_INVOICE_LINES_ALL.pa_quantity%TYPE,
295 instruction_id NUMBER(15),
296 adj_type VARCHAR2(3),
297 cost_factor_id AP_INVOICE_LINES_ALL.cost_factor_id%TYPE,
298 TAX_CLASSIFICATION_CODE VARCHAR2(30),
299 SOURCE_APPLICATION_ID NUMBER,
300 SOURCE_EVENT_CLASS_CODE VARCHAR2(30),
301 SOURCE_ENTITY_CODE VARCHAR2(30),
302 SOURCE_TRX_ID NUMBER,
303 SOURCE_LINE_ID NUMBER,
304 SOURCE_TRX_LEVEL_TYPE VARCHAR2(30),
305 PA_CC_AR_INVOICE_ID NUMBER(15),
306 PA_CC_AR_INVOICE_LINE_NUM NUMBER,
307 PA_CC_PROCESSED_CODE VARCHAR2(1),
308 REFERENCE_1 VARCHAR2(30),
309 REFERENCE_2 VARCHAR2(30),
310 DEF_ACCTG_START_DATE DATE,
311 DEF_ACCTG_END_DATE DATE,
312 DEF_ACCTG_NUMBER_OF_PERIODS NUMBER,
313 DEF_ACCTG_PERIOD_TYPE VARCHAR2(30),
314 REFERENCE_KEY5 VARCHAR2(150),
315 PURCHASING_CATEGORY_ID NUMBER(15),
316 LINE_GROUP_NUMBER NUMBER,
317 WARRANTY_NUMBER VARCHAR2(15),
318 REFERENCE_KEY3 VARCHAR2(150),
319 REFERENCE_KEY4 VARCHAR2(150),
320 APPLICATION_ID NUMBER(15),
321 PRODUCT_TABLE VARCHAR2(30),
322 REFERENCE_KEY1 VARCHAR2(150),
323 REFERENCE_KEY2 VARCHAR2(150),
324 RCV_SHIPMENT_LINE_ID NUMBER(22));
325
326 TYPE invoice_lines_list_type IS TABLE OF invoice_lines_rec_type
327 INDEX BY BINARY_INTEGER;
328
329 TYPE invoice_dists_rec_type IS RECORD (
330 accounting_date AP_INVOICE_DISTRIBUTIONS_ALL.accounting_date%TYPE,
331 accrual_posted_flag AP_INVOICE_DISTRIBUTIONS_ALL.accrual_posted_flag%TYPE,
332 amount AP_INVOICE_DISTRIBUTIONS_ALL.amount%TYPE,
333 asset_book_type_code AP_INVOICE_DISTRIBUTIONS_ALL.asset_book_type_code%TYPE,
334 asset_category_id AP_INVOICE_DISTRIBUTIONS_ALL.asset_category_id%TYPE,
335 assets_addition_flag AP_INVOICE_DISTRIBUTIONS_ALL.assets_addition_flag%TYPE,
336 assets_tracking_flag AP_INVOICE_DISTRIBUTIONS_ALL.assets_tracking_flag%TYPE,
337 attribute_category AP_INVOICE_DISTRIBUTIONS_ALL.attribute_category%TYPE,
338 attribute1 AP_INVOICE_DISTRIBUTIONS_ALL.attribute1%TYPE,
339 attribute10 AP_INVOICE_DISTRIBUTIONS_ALL.attribute10%TYPE,
340 attribute11 AP_INVOICE_DISTRIBUTIONS_ALL.attribute11%TYPE,
341 attribute12 AP_INVOICE_DISTRIBUTIONS_ALL.attribute12%TYPE,
342 attribute13 AP_INVOICE_DISTRIBUTIONS_ALL.attribute13%TYPE,
343 attribute14 AP_INVOICE_DISTRIBUTIONS_ALL.attribute14%TYPE,
344 attribute15 AP_INVOICE_DISTRIBUTIONS_ALL.attribute15%TYPE,
345 attribute2 AP_INVOICE_DISTRIBUTIONS_ALL.attribute2%TYPE,
346 attribute3 AP_INVOICE_DISTRIBUTIONS_ALL.attribute3%TYPE,
347 attribute4 AP_INVOICE_DISTRIBUTIONS_ALL.attribute4%TYPE,
348 attribute5 AP_INVOICE_DISTRIBUTIONS_ALL.attribute5%TYPE,
349 attribute6 AP_INVOICE_DISTRIBUTIONS_ALL.attribute6%TYPE,
350 attribute7 AP_INVOICE_DISTRIBUTIONS_ALL.attribute7%TYPE,
351 attribute8 AP_INVOICE_DISTRIBUTIONS_ALL.attribute8%TYPE,
352 attribute9 AP_INVOICE_DISTRIBUTIONS_ALL.attribute9%TYPE,
353 award_id AP_INVOICE_DISTRIBUTIONS_ALL.award_id%TYPE,
354 awt_flag AP_INVOICE_DISTRIBUTIONS_ALL.awt_flag%TYPE,
355 awt_group_id AP_INVOICE_DISTRIBUTIONS_ALL.awt_group_id%TYPE,
356 awt_tax_rate_id AP_INVOICE_DISTRIBUTIONS_ALL.awt_tax_rate_id%TYPE,
357 base_amount AP_INVOICE_DISTRIBUTIONS_ALL.base_amount%TYPE,
358 batch_id AP_INVOICE_DISTRIBUTIONS_ALL.batch_id%TYPE,
359 cancellation_flag AP_INVOICE_DISTRIBUTIONS_ALL.cancellation_flag%TYPE,
360 cash_posted_flag AP_INVOICE_DISTRIBUTIONS_ALL.cash_posted_flag%TYPE,
361 corrected_invoice_dist_id AP_INVOICE_DISTRIBUTIONS_ALL.corrected_invoice_dist_id%TYPE,
362 corrected_quantity AP_INVOICE_DISTRIBUTIONS_ALL.corrected_quantity%TYPE,
363 country_of_supply AP_INVOICE_DISTRIBUTIONS_ALL.country_of_supply%TYPE,
364 created_by AP_INVOICE_DISTRIBUTIONS_ALL.created_by%TYPE,
365 description AP_INVOICE_DISTRIBUTIONS_ALL.description%TYPE,
366 dist_code_combination_id AP_INVOICE_DISTRIBUTIONS_ALL.dist_code_combination_id%TYPE,
367 dist_match_type AP_INVOICE_DISTRIBUTIONS_ALL.dist_match_type%TYPE,
368 distribution_class AP_INVOICE_DISTRIBUTIONS_ALL.distribution_class%TYPE,
369 distribution_line_number AP_INVOICE_DISTRIBUTIONS_ALL.distribution_line_number%TYPE,
370 encumbered_flag AP_INVOICE_DISTRIBUTIONS_ALL.encumbered_flag%TYPE,
371 expenditure_item_date AP_INVOICE_DISTRIBUTIONS_ALL.expenditure_item_date%TYPE,
372 expenditure_organization_id AP_INVOICE_DISTRIBUTIONS_ALL.expenditure_organization_id%TYPE,
373 expenditure_type AP_INVOICE_DISTRIBUTIONS_ALL.expenditure_type%TYPE,
374 final_match_flag AP_INVOICE_DISTRIBUTIONS_ALL.final_match_flag%TYPE,
375 global_attribute_category AP_INVOICE_DISTRIBUTIONS_ALL.global_attribute_category%TYPE,
376 global_attribute1 AP_INVOICE_DISTRIBUTIONS_ALL.global_attribute1%TYPE,
377 global_attribute10 AP_INVOICE_DISTRIBUTIONS_ALL.global_attribute10%TYPE,
378 global_attribute11 AP_INVOICE_DISTRIBUTIONS_ALL.global_attribute11%TYPE,
379 global_attribute12 AP_INVOICE_DISTRIBUTIONS_ALL.global_attribute12%TYPE,
380 global_attribute13 AP_INVOICE_DISTRIBUTIONS_ALL.global_attribute13%TYPE,
381 global_attribute14 AP_INVOICE_DISTRIBUTIONS_ALL.global_attribute14%TYPE,
382 global_attribute15 AP_INVOICE_DISTRIBUTIONS_ALL.global_attribute15%TYPE,
383 global_attribute16 AP_INVOICE_DISTRIBUTIONS_ALL.global_attribute16%TYPE,
384 global_attribute17 AP_INVOICE_DISTRIBUTIONS_ALL.global_attribute17%TYPE,
385 global_attribute18 AP_INVOICE_DISTRIBUTIONS_ALL.global_attribute18%TYPE,
386 global_attribute19 AP_INVOICE_DISTRIBUTIONS_ALL.global_attribute19%TYPE,
387 global_attribute2 AP_INVOICE_DISTRIBUTIONS_ALL.global_attribute2%TYPE,
388 global_attribute20 AP_INVOICE_DISTRIBUTIONS_ALL.global_attribute20%TYPE,
389 global_attribute3 AP_INVOICE_DISTRIBUTIONS_ALL.global_attribute3%TYPE,
390 global_attribute4 AP_INVOICE_DISTRIBUTIONS_ALL.global_attribute4%TYPE,
391 global_attribute5 AP_INVOICE_DISTRIBUTIONS_ALL.global_attribute5%TYPE,
392 global_attribute6 AP_INVOICE_DISTRIBUTIONS_ALL.global_attribute6%TYPE,
393 global_attribute7 AP_INVOICE_DISTRIBUTIONS_ALL.global_attribute7%TYPE,
394 global_attribute8 AP_INVOICE_DISTRIBUTIONS_ALL.global_attribute8%TYPE,
395 global_attribute9 AP_INVOICE_DISTRIBUTIONS_ALL.global_attribute9%TYPE,
396 income_tax_region AP_INVOICE_DISTRIBUTIONS_ALL.income_tax_region%TYPE,
397 inventory_transfer_status AP_INVOICE_DISTRIBUTIONS_ALL.inventory_transfer_status%TYPE,
398 invoice_distribution_id AP_INVOICE_DISTRIBUTIONS_ALL.invoice_distribution_id%TYPE,
399 invoice_id AP_INVOICE_DISTRIBUTIONS_ALL.invoice_id%TYPE,
400 invoice_line_number AP_INVOICE_DISTRIBUTIONS_ALL.invoice_line_number%TYPE,
401 line_type_lookup_code AP_INVOICE_DISTRIBUTIONS_ALL.line_type_lookup_code%TYPE,
402 match_status_flag AP_INVOICE_DISTRIBUTIONS_ALL.match_status_flag%TYPE,
403 matched_uom_lookup_code AP_INVOICE_DISTRIBUTIONS_ALL.matched_uom_lookup_code%TYPE,
404 merchant_document_number AP_INVOICE_DISTRIBUTIONS_ALL.merchant_document_number%TYPE,
405 merchant_name AP_INVOICE_DISTRIBUTIONS_ALL.merchant_name%TYPE,
406 merchant_reference AP_INVOICE_DISTRIBUTIONS_ALL.merchant_reference%TYPE,
407 merchant_tax_reg_number AP_INVOICE_DISTRIBUTIONS_ALL.merchant_tax_reg_number%TYPE,
408 merchant_taxpayer_id AP_INVOICE_DISTRIBUTIONS_ALL.merchant_taxpayer_id%TYPE,
409 org_id AP_INVOICE_DISTRIBUTIONS_ALL.org_id%TYPE,
410 pa_addition_flag AP_INVOICE_DISTRIBUTIONS_ALL.pa_addition_flag%TYPE,
411 pa_quantity AP_INVOICE_DISTRIBUTIONS_ALL.pa_quantity%TYPE,
412 period_name AP_INVOICE_DISTRIBUTIONS_ALL.period_name%TYPE,
413 po_distribution_id AP_INVOICE_DISTRIBUTIONS_ALL.po_distribution_id%TYPE,
414 posted_flag AP_INVOICE_DISTRIBUTIONS_ALL.posted_flag%TYPE,
415 project_id AP_INVOICE_DISTRIBUTIONS_ALL.project_id%TYPE,
416 quantity_invoiced AP_INVOICE_DISTRIBUTIONS_ALL.quantity_invoiced%TYPE,
417 rcv_transaction_id AP_INVOICE_DISTRIBUTIONS_ALL.rcv_transaction_id%TYPE,
418 related_id AP_INVOICE_DISTRIBUTIONS_ALL.related_id%TYPE,
419 reversal_flag AP_INVOICE_DISTRIBUTIONS_ALL.reversal_flag%TYPE,
420 rounding_amt AP_INVOICE_DISTRIBUTIONS_ALL.rounding_amt%TYPE,
421 set_of_books_id AP_INVOICE_DISTRIBUTIONS_ALL.set_of_books_id%TYPE,
422 task_id AP_INVOICE_DISTRIBUTIONS_ALL.task_id%TYPE,
423 type_1099 AP_INVOICE_DISTRIBUTIONS_ALL.type_1099%TYPE,
424 unit_price AP_INVOICE_DISTRIBUTIONS_ALL.unit_price%TYPE,
425 -- Removed references to USSGL for bug 4277744
426 -- ussgl_transaction_code AP_INVOICE_DISTRIBUTIONS_ALL.ussgl_transaction_code%TYPE,
427 instruction_id NUMBER(15),
428 charge_applicable_to_dist_id AP_INVOICE_DISTRIBUTIONS_ALL.charge_applicable_to_dist_id%TYPE,
429 INTENDED_USE VARCHAR2(30),
430 WITHHOLDING_TAX_CODE_ID NUMBER(15),
431 PROJECT_ACCOUNTING_CONTEXT VARCHAR2(30),
432 REQ_DISTRIBUTION_ID NUMBER(15),
433 REFERENCE_1 VARCHAR2(30),
434 REFERENCE_2 VARCHAR2(30),
435 LINE_GROUP_NUMBER NUMBER,
436 PA_CC_AR_INVOICE_ID NUMBER(15),
437 PA_CC_AR_INVOICE_LINE_NUM NUMBER,
438 PA_CC_PROCESSED_CODE VARCHAR2(1),
439 pay_awt_group_id AP_INVOICE_DISTRIBUTIONS_ALL.pay_awt_group_id%TYPE); --bug6817107
440
441 TYPE invoice_dists_list_type IS TABLE OF invoice_dists_rec_type
442 INDEX BY BINARY_INTEGER;
443
444
445 /*=============================================================================
446 | FUNCTION - Create_Instructions()
447 |
448 | DESCRIPTION
449 | Main Public procedure for the CADIP called from before report trigger
450 | of APXCADIP. The parameters to the program can limit the process to a
451 | single supplier, site, PO, or release.This program overloads the Invoice
452 | Interface with Instructions. CADIP then initiates the Payables Open
453 | Interface Import program for the instruction records in the interface
454 | using the GROUP_ID(Gateway Batch) as a program parameter. If the
455 | instructions are rejected then CADIP can be resubmitted. Open Interface
456 | Import on resubmission runs for all Instruction rejections(GROUP_ID
457 | is NULL).
458 |
459 | PARAMETERS
460 | p_org_id - Org Id of the PO User
461 | p_po_user_id - PO's User Id
462 | p_vendor_id - Vendor Id: Concurrent program parameter
463 | p_vendor_site_id - Vendor Site Id: Concurrent program parameter
464 | p_po_header_id - Valid PO's Header Id: Concurrent program parameter
465 | p_po_release_id - Valid PO Release Id: Concurrent program parameter
466 | P_calling_sequence - Calling sequence
467 |
468 | MODIFICATION HISTORY
469 | Date Author Description of Change
470 | 29-JUL-2003 dgulraja Creation
471 |
472 *============================================================================*/
473 FUNCTION Create_Instructions (
474 p_vendor_id IN NUMBER,
475 p_vendor_site_id IN NUMBER,
476 p_po_header_id IN NUMBER,
477 p_po_release_id IN NUMBER,
478 p_po_user_id IN NUMBER,
479 p_resubmit_flag IN VARCHAR2,
480 errbuf OUT NOCOPY VARCHAR2,
481 retcode OUT NOCOPY NUMBER,
482 p_import_conc_request_id OUT NOCOPY NUMBER,
483 p_calling_sequence IN VARCHAR2) RETURN BOOLEAN;
484
485
486 /*=============================================================================
487 | FUNCTION - Import_Retroprice_Adjustments()
488 |
489 | DESCRIPTION
490 | Main Public procedure called from the Payables Open Interface Import
491 | Program ("import") which treats the records in the interface tables
492 | as "invoice instructions" rather than each record as an individual
493 | invoice. For recods with source='PPA' the program makes all necessary
494 | adjustments to original invoices and will create the new adjustment
495 | documents in Global Temp Tables.This program will then leverage the
496 | the import validations for the new adjustment docs in the temp tables.
497 | For every instruction the control will return to the Import Program
498 | resulting in Instruction with the status of PROCESSED or REJECTED.
499 | PROCESSED Instructions results in adjustment correction being made
500 | to the original Invoices alongwith the creation of PPA Documents.
501 |
502 |
503 | IN-PARAMETERS
504 | p_instruction_rec -- Record in the AP_INVOICE_INTERFACE with source=PPA
505 | p_base_currency_code
506 | p_multi_currency_flag
507 | p_set_of_books_id
508 | p_default_exchange_rate_type
509 | p_make_rate_mandatory_flag
510 | p_gl_date_from_get_info
511 | p_gl_date_from_receipt_flag
512 | p_positive_price_tolerance
513 | p_pa_installed
514 | p_qty_tolerance
515 | p_max_qty_ord_tolerance
516 | p_base_min_acct_unit
517 | p_base_precision
518 | p_chart_of_accounts_id
519 | p_freight_code_combination_id
520 | p_purch_encumbrance_flag
521 | p_calc_user_xrate
522 | p_default_last_updated_by
523 | p_default_last_update_login
524 | p_instr_status_flag -- status of the Instruction
525 | p_invoices_count --OUT Count of PPA Invoices Created
526 | p_invoices_total --OUT PPA Invoice Total --to be updated in the Inv Batch
527 | p_invoices_base_amt_total --OUT PPA Invoice Total
528 | P_calling_sequence - Calling Sequence
529 |
530 | MODIFICATION HISTORY
531 | Date Author Description of Change
532 | 29-JUL-2003 dgulraja Creation
533 |
534 *============================================================================*/
535 FUNCTION Import_Retroprice_Adjustments(
536 p_instruction_rec IN AP_IMPORT_INVOICES_PKG.r_invoice_info_rec,
537 p_base_currency_code IN VARCHAR2,
538 p_multi_currency_flag IN VARCHAR2,
539 p_set_of_books_id IN NUMBER,
540 p_default_exchange_rate_type IN VARCHAR2,
541 p_make_rate_mandatory_flag IN VARCHAR2,
542 p_gl_date_from_get_info IN DATE,
543 p_gl_date_from_receipt_flag IN VARCHAR2,
544 p_positive_price_tolerance IN NUMBER,
545 p_pa_installed IN VARCHAR2,
546 p_qty_tolerance IN NUMBER,
547 p_max_qty_ord_tolerance IN NUMBER,
548 p_base_min_acct_unit IN NUMBER,
549 p_base_precision IN NUMBER,
550 p_chart_of_accounts_id IN NUMBER,
551 p_freight_code_combination_id IN NUMBER,
552 p_purch_encumbrance_flag IN VARCHAR2,
553 p_calc_user_xrate IN VARCHAR2,
554 p_default_last_updated_by IN NUMBER,
555 p_default_last_update_login IN NUMBER,
556 p_instr_status_flag OUT NOCOPY VARCHAR2,
557 p_invoices_count OUT NOCOPY NUMBER,
558 p_invoices_total OUT NOCOPY NUMBER,
559 P_calling_sequence IN VARCHAR2) RETURN BOOLEAN;
560
561 END AP_RETRO_PRICING_PKG;