1 PACKAGE PO_AP_INVOICE_MATCH_GRP AUTHID CURRENT_USER AS
2 /* $Header: POXAPINS.pls 120.2 2005/07/20 16:17:08 arusingh noship $*/
3
4 --<Complex Work R12 START>
5 -------------------------------------------------------------------------
6 --Pre-reqs:
7 -- N/A
8 --Function:
9 -- Updates values on the PO line location and distribution due to AP
10 -- activity (billing, prepayments, recoupment, retainage, etc)
11 --Parameters:
12 --IN:
13 --p_api_version
14 -- Apps API Std - To control correct version in use
15 --IN OUT:
16 --p_line_loc_changes_rec
17 -- An object of PO_AP_LINE_LOC_REC_TYPE
18 --p_dist_changes_rec
19 -- An object of PO_AP_DIST_REC_TYPE
20 --OUT:
21 --x_return_status
22 -- Apps API param. Value is VARCHAR2(1)
23 -- FND_API.G_RET_STS_SUCCESS if update succeeds
24 -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
25 --x_msg_data
26 -- Contains the error details in the case of UNEXP_ERROR or ERROR
27 -------------------------------------------------------------------------
28 PROCEDURE update_document_ap_values(
29 p_api_version IN NUMBER
30 , p_line_loc_changes_rec IN OUT NOCOPY PO_AP_LINE_LOC_REC_TYPE
31 , p_dist_changes_rec IN OUT NOCOPY PO_AP_DIST_REC_TYPE
32 , x_return_status OUT NOCOPY VARCHAR2
33 , x_msg_data OUT NOCOPY VARCHAR2
34 );
35
36
37 ---------------------------------------------------------------------------
38 --Pre-reqs:
39 -- All line locations must belong to the same PO document
40 --Function:
41 -- Calculate how much to retain against particular line locations, based
42 -- on the contract terms specified on the PO.
43 --Parameters:
44 --IN:
45 --p_api_version
46 -- Apps API Std - To control correct version in use
47 --p_line_location_id_tbl
48 -- Table of ids from the set of {existing POLL.line_location}
49 -- All ids must belong to the same PO document
50 --p_line_loc_match_amt_tbl
51 -- Each tbl entry corresponds to 1 entry (w/ same index) in
52 -- p_line_location_id_tbl. It passes in the amount being matched against
53 -- each line location in this trxn
54 -- The amount must be passed in using the PO currency
55 --OUT:
56 --x_return_status
57 -- Apps API Std param. Value is VARCHAR2(1)
58 -- FND_API.G_RET_STS_SUCCESS if calculation succeeds
59 -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
60 --x_msg_data
61 -- Contains the error details in the case of UNEXP_ERROR or ERROR
62 --x_amount_to_retain_tbl
63 -- Each tbl entry corresponds to 1 entry (with same index) in
64 -- p_line_location_id_tbl. It returns the calculated amount to retain
65 -- against each line location
66 -------------------------------------------------------------------------
67 PROCEDURE get_amount_to_retain(
68 p_api_version IN NUMBER
69 , p_line_location_id_tbl IN po_tbl_number
70 , p_line_loc_match_amt_tbl IN po_tbl_number
71 , x_return_status OUT NOCOPY VARCHAR2
72 , x_msg_data OUT NOCOPY VARCHAR2
73 , x_amount_to_retain_tbl OUT NOCOPY po_tbl_number
74 );
75 --<Complex Work R12 END>
76
77
78
79 ---------------------------------------------------------------------------------------
80 --Start of Comments
81 --Name: get_po_ship_amounts
82 --
83 --Function: This procedure provides AP with ordered and cancelled amounts on the PO
84 -- shipments for amount matching purposes
85 --
86 --End of Comments
87 ----------------------------------------------------------------------------------------
88
89 PROCEDURE get_po_ship_amounts (p_api_version IN NUMBER,
90 p_receive_transaction_id IN RCV_TRANSACTIONS.transaction_id%TYPE,
91 x_ship_amt_ordered OUT NOCOPY PO_LINE_LOCATIONS_ALL.amount%TYPE,
92 x_ship_amt_cancelled OUT NOCOPY PO_LINE_LOCATIONS_ALL.amount_cancelled%TYPE,
93 x_ret_status OUT NOCOPY VARCHAR2,
94 x_msg_count OUT NOCOPY NUMBER,
95 x_msg_data OUT NOCOPY VARCHAR2);
96
97
98 ---------------------------------------------------------------------------------------
99 --Start of Comments
100 --Name: get_po_dist_amounts
101 --
102 --Function: This procedure provides AP with ordered and cancelled amounts on the PO
103 -- distributions for amount matching purposes
104 --
105 --End of Comments
106 ----------------------------------------------------------------------------------------
107
108 PROCEDURE get_po_dist_amounts (p_api_version IN NUMBER,
109 p_po_distribution_id IN PO_DISTRIBUTIONS_ALL.po_distribution_id%TYPE,
110 x_dist_amt_ordered OUT NOCOPY PO_DISTRIBUTIONS_ALL.amount_ordered%TYPE,
111 x_dist_amt_cancelled OUT NOCOPY PO_DISTRIBUTIONS_ALL.amount_cancelled%TYPE,
112 x_ret_status OUT NOCOPY VARCHAR2,
113 x_msg_count OUT NOCOPY NUMBER,
114 x_msg_data OUT NOCOPY VARCHAR2);
115
116 ---------------------------------------------------------------------------------------
117 --Start of Comments
118 --Name: update_po_ship_amounts
119 --
120 --Function: This procedure updates the amount billed on po shipments during amount matching
121 -- process
122 --
123 --End of Comments
124 ----------------------------------------------------------------------------------------
125
126 PROCEDURE update_po_ship_amounts (p_api_version IN NUMBER,
127 p_po_line_location_id IN PO_LINE_LOCATIONS_ALL.line_location_id%TYPE,
128 p_ship_amt_billed IN PO_LINE_LOCATIONS_ALL.amount_billed%TYPE,
129 x_ret_status OUT NOCOPY VARCHAR2,
130 x_msg_count OUT NOCOPY NUMBER,
131 x_msg_data OUT NOCOPY VARCHAR2);
132
133 ---------------------------------------------------------------------------------------
134 --Start of Comments
135 --Name: update_po_dist_amounts
136 --
137 --Function: This procedure updates the amount billed on po distributions during amount
138 -- matching process
139 --
140 --End of Comments
141 ----------------------------------------------------------------------------------------
142
143 PROCEDURE update_po_dist_amounts (p_api_version IN NUMBER,
144 p_po_distribution_id IN PO_DISTRIBUTIONS_ALL.po_distribution_id%TYPE,
145 p_dist_amt_billed IN PO_DISTRIBUTIONS_ALL.amount_billed%TYPE,
146 x_ret_status OUT NOCOPY VARCHAR2,
147 x_msg_count OUT NOCOPY NUMBER,
148 x_msg_data OUT NOCOPY VARCHAR2);
149
150
151 ---------------------------------------------------------------------------------------
152 --Start of Comments
153 --Name: set_final_match_flag
154 --
155 --Function: This procedure updates the final_match_flag on po line locations during
156 -- invoice final match.
157 --
158 --End of Comments
159 ---------------------------------------------------------------------------------------
160
161 PROCEDURE set_final_match_flag (p_api_version IN NUMBER ,
162 p_entity_type IN VARCHAR2 ,
163 p_entity_id_tbl IN PO_TBL_NUMBER ,
164 p_final_match_flag IN PO_LINE_LOCATIONS.FINAL_MATCH_FLAG%TYPE ,
165 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE ,
166 p_commit IN VARCHAR2 := FND_API.G_FALSE ,
167 x_ret_status OUT NOCOPY VARCHAR2 ,
168 x_msg_count OUT NOCOPY NUMBER ,
169 x_msg_data OUT NOCOPY VARCHAR2 );
170
171 END PO_AP_INVOICE_MATCH_GRP;