[Home] [Help]
PACKAGE: APPS.AP_MATCHING_PKG
Source
1 PACKAGE AP_MATCHING_PKG AS
2 /*$Header: apmatchs.pls 120.13.12010000.2 2009/02/12 11:56:56 mayyalas ship $*/
3
4 TYPE r_dist_info IS RECORD
5 (po_distribution_id PO_DISTRIBUTIONS.po_distribution_id%TYPE, --Index Column
6 invoice_distribution_id AP_INVOICE_DISTRIBUTIONS.invoice_distribution_id%TYPE,
7 quantity_invoiced AP_INVOICE_DISTRIBUTIONS.quantity_invoiced%TYPE,
8 amount AP_INVOICE_DISTRIBUTIONS.amount%TYPE,
9 base_amount AP_INVOICE_DISTRIBUTIONS.base_amount%TYPE,
10 rounding_amt AP_INVOICE_DISTRIBUTIONS.rounding_amt%TYPE,
11 unit_price AP_INVOICE_DISTRIBUTIONS.unit_price%TYPE,
12 dist_ccid AP_INVOICE_DISTRIBUTIONS.dist_code_combination_id%TYPE,
13 po_ccid PO_DISTRIBUTIONS.code_combination_id%TYPE,
14 accrue_on_receipt_flag PO_DISTRIBUTIONS.accrue_on_receipt_flag%TYPE,
15 project_id PO_DISTRIBUTIONS.project_id%TYPE,
16 task_id PO_DISTRIBUTIONS.task_id%TYPE,
17 award_id PO_DISTRIBUTIONS.award_id%TYPE DEFAULT NULL,
18 expenditure_type PO_DISTRIBUTIONS.expenditure_type%TYPE,
19 expenditure_item_date PO_DISTRIBUTIONS.expenditure_item_date%TYPE,
20 expenditure_organization_id PO_DISTRIBUTIONS.expenditure_organization_id%TYPE,
21 pa_quantity AP_INVOICE_DISTRIBUTIONS.pa_quantity%TYPE,
22 awt_group_id AP_INVOICE_DISTRIBUTIONS.awt_group_id%TYPE,
23 pay_awt_group_id AP_INVOICE_DISTRIBUTIONS.pay_awt_group_id%TYPE); --bug8222382
24
25 TYPE dist_tab_type IS TABLE OF r_dist_info INDEX BY BINARY_INTEGER;
26
27
28 TYPE r_corr_dist_info IS RECORD
29 (po_distribution_id PO_DISTRIBUTIONS.po_distribution_id%TYPE, --Index Column
30 invoice_distribution_id AP_INVOICE_DISTRIBUTIONS.invoice_distribution_id%TYPE,
31 corrected_inv_dist_id AP_INVOICE_DISTRIBUTIONS.invoice_distribution_id%TYPE,
32 corrected_quantity AP_INVOICE_DISTRIBUTIONS.corrected_quantity%TYPE,
33 amount AP_INVOICE_DISTRIBUTIONS.amount%TYPE,
34 base_amount AP_INVOICE_DISTRIBUTIONS.base_amount%TYPE,
35 rounding_amt AP_INVOICE_DISTRIBUTIONS.rounding_amt%TYPE,
36 unit_price AP_INVOICE_DISTRIBUTIONS.unit_price%TYPE,
37 pa_quantity AP_INVOICE_DISTRIBUTIONS.pa_quantity%TYPE,
38 dist_ccid AP_INVOICE_DISTRIBUTIONS.dist_code_combination_id%TYPE);
39
40
41 TYPE corr_dist_tab_type IS TABLE OF r_corr_dist_info INDEX BY BINARY_INTEGER;
42
43
44 TYPE r_shipment_info_rec IS RECORD
45 (po_header_id PO_HEADERS.po_header_id%TYPE,
46 po_line_id PO_LINES.po_line_id%TYPE,
47 po_release_id PO_RELEASES.po_release_id%TYPE,
48 po_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE, --Index Column
49 rcv_transaction_id RCV_TRANSACTIONS.transaction_id%TYPE,
50 uom AP_INVOICE_LINES.unit_meas_lookup_code%TYPE,
51 unit_price AP_INVOICE_LINES.unit_price%TYPE,
52 line_number AP_INVOICE_LINES.line_number%TYPE,
53 quantity_invoiced AP_INVOICE_LINES.quantity_invoiced%TYPE,
54 amount AP_INVOICE_LINES.amount%TYPE,
55 base_amount AP_INVOICE_LINES.base_amount%TYPE,
56 rounding_amt AP_INVOICE_LINES.rounding_amt%TYPE,
57 inventory_item_id AP_INVOICE_LINES.inventory_item_id%TYPE,
58 item_description AP_INVOICE_LINES.item_description%TYPE,
59 asset_category_id AP_INVOICE_LINES.asset_category_id%TYPE,
60 -- Removed for bug 4277744
61 -- ussgl_transaction_code AP_INVOICE_LINES.ussgl_transaction_code%TYPE,
62 type_1099 AP_INVOICE_LINES.type_1099%TYPE,
63 attribute_category AP_INVOICE_LINES.attribute_category%TYPE,
64 attribute1 AP_INVOICE_LINES.attribute1%TYPE,
65 attribute2 AP_INVOICE_LINES.attribute2%TYPE,
66 attribute3 AP_INVOICE_LINES.attribute3%TYPE,
67 attribute4 AP_INVOICE_LINES.attribute4%TYPE,
68 attribute5 AP_INVOICE_LINES.attribute5%TYPE,
69 attribute6 AP_INVOICE_LINES.attribute6%TYPE,
70 attribute7 AP_INVOICE_LINES.attribute7%TYPE,
71 attribute8 AP_INVOICE_LINES.attribute8%TYPE,
72 attribute9 AP_INVOICE_LINES.attribute9%TYPE,
73 attribute10 AP_INVOICE_LINES.attribute10%TYPE,
74 attribute11 AP_INVOICE_LINES.attribute11%TYPE,
75 attribute12 AP_INVOICE_LINES.attribute12%TYPE,
76 attribute13 AP_INVOICE_LINES.attribute13%TYPE,
77 attribute14 AP_INVOICE_LINES.attribute14%TYPE,
78 attribute15 AP_INVOICE_LINES.attribute15%TYPE,
79 --ETAX: Invwkb
80 ship_to_location_id AP_INVOICE_LINES.ship_to_location_id%TYPE,
81 primary_intended_use AP_INVOICE_LINES.primary_intended_use%TYPE,
82 product_fisc_classification AP_INVOICE_LINES.product_fisc_classification%TYPE,
83 product_type AP_INVOICE_LINES.product_type%TYPE,
84 product_category AP_INVOICE_LINES.product_category%TYPE,
85 user_defined_fisc_class AP_INVOICE_LINES.user_defined_fisc_class%TYPE,
86 matching_basis PO_LINE_LOCATIONS.matching_basis%TYPE,
87 retained_amount AP_INVOICE_LINES.retained_amount%TYPE,
88 assessable_value AP_INVOICE_LINES.assessable_value%TYPE,
89 tax_classification_code AP_INVOICE_LINES.tax_classification_code%TYPE
90 );
91
92 -- Bug 5125441
93 -- Added matching basis and retained amount to r_shipment_info_rec
94
95 TYPE t_shipment_table IS TABLE of r_shipment_info_rec index by BINARY_INTEGER;
96
97 PROCEDURE Base_Credit_PO_Match(
98 X_match_mode IN VARCHAR2,
99 X_invoice_id IN NUMBER,
100 X_invoice_line_number IN NUMBER,
101 X_Po_Line_Location_id IN NUMBER,
102 X_Dist_Tab IN OUT NOCOPY DIST_TAB_TYPE,
103 X_amount IN NUMBER,
104 X_quantity IN NUMBER,
105 X_unit_price IN NUMBER,
106 X_uom_lookup_code IN VARCHAR2,
107 X_final_match_flag IN VARCHAR2,
108 X_overbill_flag IN VARCHAR2,
109 X_freight_cost_factor_id IN NUMBER DEFAULT NULL,
110 X_freight_amount IN NUMBER,
111 X_freight_description IN VARCHAR2,
112 X_misc_cost_factor_id IN NUMBER DEFAULT NULL,
113 X_misc_amount IN NUMBER,
114 X_misc_description IN VARCHAR2,
115 X_retained_amount IN NUMBER DEFAULT NULL,
116 X_calling_sequence IN VARCHAR2) ;
117
118 PROCEDURE Price_Quantity_Correct_Inv_PO(
119 X_Invoice_Id IN NUMBER,
120 X_Invoice_Line_Number IN NUMBER,
121 X_Corrected_Invoice_Id IN NUMBER,
122 X_Corrected_Line_Number IN NUMBER,
123 X_Correction_Type IN VARCHAR2,
124 X_Match_Mode IN VARCHAR2,
125 X_Correction_Quantity IN NUMBER,
126 X_Correction_Amount IN NUMBER,
127 X_Correction_Price IN NUMBER,
128 X_Po_Line_Location_Id IN NUMBER,
129 X_Corr_Dist_Tab IN OUT NOCOPY CORR_DIST_TAB_TYPE,
130 X_Final_Match_Flag IN VARCHAR2,
131 X_Uom_Lookup_Code IN VARCHAR2,
132 X_Retained_Amount IN NUMBER DEFAULT NULL,
133 X_Calling_Sequence IN VARCHAR2);
134
135 PROCEDURE Quick_Match_Line_Generation(
136 x_invoice_id IN NUMBER,
137 x_po_header_id IN NUMBER,
138 x_match_option IN VARCHAR2,
139 x_invoice_amount IN NUMBER,
140 x_calling_sequence IN VARCHAR2);
141
142 -- Bug 5465722. Building Prepay Proper Account as per Federal Functionality.
143 -- Only Natural Account will be overlayed
144 PROCEDURE Build_Prepay_Account(P_base_ccid IN NUMBER
145 ,P_overlay_ccid IN NUMBER
146 ,P_accounting_date IN DATE
147 ,P_result_ccid OUT NOCOPY NUMBER
148 ,P_Reason_Unbuilt_Flex OUT NOCOPY VARCHAR2
149 ,P_calling_sequence IN VARCHAR2);
150
151
152 END AP_MATCHING_PKG;