1 PACKAGE RCV_INVOICE_MATCHING_SV AUTHID CURRENT_USER AS
2 /* $Header: RCVITRMS.pls 115.3 2003/07/24 22:25:31 sumboh ship $*/
3
4 /*===========================================================================
5 PACKAGE NAME: RCV_INVOICE_MATCHING_SV
6
7 DESCRIPTION:
8
9 CLIENT/SERVER: Server
10
11 LIBRARY NAME
12
13 OWNER:
14
15 PROCEDURE NAMES: get_quantities()
16 get_delivered_quantity()
17 ===========================================================================*/
18
19 /*===========================================================================
20 PROCEDURE NAME: get_quantities()
21
22 DESCRIPTION:
23 This procedure will accept a RECEIVE or MATCH transaction id and return
24 different quantities in PO and transaction UOM.
25
26 USAGE:
27
28 PARAMETERS: top_transaction_id IN
29 Transaction ID of the receive or match transaction
30 ordered_po_qty IN OUT NOCOPY
31 Ordered quantity of the PO shipment in PO UOM
32 received_po_qty IN OUT NOCOPY
33 Received/Matched quantity of the shipment in PO UOM
34 corrected_po_qty IN OUT NOCOPY
35 Correction of the received quantity in PO UOM
36 delivered_po_qty IN OUT NOCOPY
37 Delivered quantity of the shipment after adjustment in PO UOM
38 rtv_po_qty IN OUT NOCOPY
39 Return-to-vendor quantity after adjustment in PO UOM
40 billed_po_qty IN OUT NOCOPY
41 Billed (invoiced) quantity in PO UOM
42 accepted_po_qty IN OUT NOCOPY
43 Inspection accepted quantity of the shipment after adjustment
44 in PO UOM
45 rejected_po_qty IN OUT NOCOPY
46 Inspection rejected quantity of the shipment after adjustment
47 in PO UOM
48 ordered_txn_qty IN OUT NOCOPY
49 Ordered quantity of the PO shipment in transaction UOM
50 received_txn_qty IN OUT NOCOPY
51 Received/Matched quantity of the shipment in transaction UOM
52 corrected_txn_qty IN OUT NOCOPY
53 Correction of the received quantity in transaction UOM
54 delivered_txn_qty IN OUT NOCOPY
55 Delivered quantity of the shipment after adjustment in transaction UOM
56 rtv_txn_qty IN OUT NOCOPY
57 Return-to-vendor quantity after adjustment in transaction UOM
58 billed_txn_qty IN OUT NOCOPY
59 Billed (invoiced) quantity in transaction UOM
60 accepted_txn_qty IN OUT NOCOPY
61 Inspection accepted quantity of the shipment after adjustment
62 in transaction UOM
63 rejected_txn_qty IN OUT NOCOPY
64 Inspection rejected quantity of the shipment after adjustment
65 in transaction UOM
66
67
68 DESIGN REFERENCES: Generic
69
70 ALGORITHM:
71
72 NOTES:
73
74 OPEN ISSUES:
75
76 CLOSED ISSUES:
77
78 CHANGE HISTORY:
79 14-Dec-98 David Chan Created
80 ===========================================================================*/
81 PROCEDURE get_quantities ( top_transaction_id IN NUMBER,
82 ordered_po_qty IN OUT NOCOPY NUMBER,
83 cancelled_po_qty IN OUT NOCOPY NUMBER,
84 received_po_qty IN OUT NOCOPY NUMBER,
85 corrected_po_qty IN OUT NOCOPY NUMBER,
86 delivered_po_qty IN OUT NOCOPY NUMBER,
87 rtv_po_qty IN OUT NOCOPY NUMBER,
88 billed_po_qty IN OUT NOCOPY NUMBER,
89 accepted_po_qty IN OUT NOCOPY NUMBER,
90 rejected_po_qty IN OUT NOCOPY NUMBER,
91 ordered_txn_qty IN OUT NOCOPY NUMBER,
92 cancelled_txn_qty IN OUT NOCOPY NUMBER,
93 received_txn_qty IN OUT NOCOPY NUMBER,
94 corrected_txn_qty IN OUT NOCOPY NUMBER,
95 delivered_txn_qty IN OUT NOCOPY NUMBER,
96 rtv_txn_qty IN OUT NOCOPY NUMBER,
97 billed_txn_qty IN OUT NOCOPY NUMBER,
98 accepted_txn_qty IN OUT NOCOPY NUMBER,
99 rejected_txn_qty IN OUT NOCOPY NUMBER);
100
101 /*===========================================================================
102 PROCEDURE NAME: get_delivered_quantity()
103
104 DESCRIPTION:
105 This procedure will accept a RECEIVE or MATCH transaction id and po
106 distribution id, then return the delivered quantity and other
107 related quantities in PO and transaction UOM
108 USAGE:
109
110 PARAMETERS: rcv_transaction_id IN
111 Transaction ID of the receive or match transaction
112 p_distribution_id IN
113 PO distribution ID of the distribution
114 ordered_po_qty IN OUT NOCOPY
115 Ordered quantity of the PO distribution in PO UOM
116 delivered_po_qty IN OUT NOCOPY
117 Delivered quantity of the PO distribution and shipment
118 in PO UOM
119 returned_po_qty
120 Return-to-receiving quantity after adjustment in
121 PO UOM
122 corrected_po_qty IN OUT NOCOPY
123 Correction of the delivered quantity PO UOM
124 ordered_txn_qty IN OUT NOCOPY
125 Ordered quantity of the PO distribution in transaction UOM
126 delivered_txn_qty IN OUT NOCOPY
127 Delivered quantity of the PO distribution and shipment
128 in transaction UOM
129 returned_txn_qty
130 Return-to-receiving quantity after adjustment in
131 transaction UOM
132 corrected_txn_qty IN OUT NOCOPY
133 Correction of the delivered quantity in transaction UOM
134
135
136 DESIGN REFERENCES: Generic
137
138 ALGORITHM:
139
140 NOTES:
141
142 OPEN ISSUES:
143
144 CLOSED ISSUES:
145
146 CHANGE HISTORY:
147 14-Dec-98 David Chan Created
148 ===========================================================================*/
149 PROCEDURE get_delivered_quantity( rcv_transaction_id IN NUMBER,
150 p_distribution_id IN NUMBER,
151 ordered_po_qty IN OUT NOCOPY NUMBER,
152 cancelled_po_qty IN OUT NOCOPY NUMBER,
153 delivered_po_qty IN OUT NOCOPY NUMBER,
154 returned_po_qty IN OUT NOCOPY NUMBER,
155 corrected_po_qty IN OUT NOCOPY NUMBER,
156 ordered_txn_qty IN OUT NOCOPY NUMBER,
157 cancelled_txn_qty IN OUT NOCOPY NUMBER,
158 delivered_txn_qty IN OUT NOCOPY NUMBER,
159 returned_txn_qty IN OUT NOCOPY NUMBER,
160 corrected_txn_qty IN OUT NOCOPY NUMBER);
161
162 PROCEDURE Get_ReceiveAmount
163 ( p_api_version IN NUMBER,
164 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
165 x_return_status OUT NOCOPY VARCHAR2,
166 x_msg_count OUT NOCOPY NUMBER,
167 x_msg_data OUT NOCOPY VARCHAR2,
168 p_receive_transaction_id IN NUMBER, -- RECEIVE Transaction id
169 x_billed_amt OUT NOCOPY NUMBER, -- rcv_transactions.amount_billed
170 x_received_amt OUT NOCOPY NUMBER, -- amount from rcv transactions table for the corresponding RECEIVE transaction
171 x_delivered_amt OUT NOCOPY NUMBER, -- amount from rcv transactions table for the corresponding DELIVER transaction
172 x_corrected_amt OUT NOCOPY NUMBER -- amount from rcv transactions table for the corresponding CORRECT transaction
173 );
174
175 PROCEDURE Get_DeliverAmount
176 ( p_api_version IN NUMBER,
177 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
178 x_return_status OUT NOCOPY VARCHAR2,
179 x_msg_count OUT NOCOPY NUMBER,
180 x_msg_data OUT NOCOPY VARCHAR2,
181 p_receive_transaction_id IN NUMBER, -- Transaction id of the root RECEIVE transaction
182 p_po_distribution_id IN NUMBER,
183 x_delivered_amt OUT NOCOPY NUMBER, -- amount from rcv transactions table for the child DELIVER transactions
184 x_corrected_amt OUT NOCOPY NUMBER -- amount from rcv transactions table for the corresponding CORRECT transaction
185 );
186
187 END RCV_INVOICE_MATCHING_SV;