1 PACKAGE AP_MATCH_UTILITIES_PUB AUTHID CURRENT_USER AS
2 /* $Header: aprmtuts.pls 120.0 2006/08/22 08:42:25 mswamina noship $ */
3
4 /*=============================================================================
5 | PUBLIC FUNCTION Check_Unvalidated_Invoices
6 |
7 | DESCRIPTION
8 | The function will Return 'TRUE' if there are unvalidated payables
9 | documents matched to a Purchase Order based on the input parameters.
10 |
11 | USAGE
12 | p_invoice_type and p_po_header_id are required parameters.
13 | Call this function, when the user unreserves funds for the PO.
14 | Unreserve from PO Header, pass p_po_line_id, p_line_location_id, p_po_distribution_id AS NULL
15 | Unreserve from PO Line, pass p_line_location_id and p_po_distribution_id AS NULL
16 | Unreserve from PO Shipment, pass p_po_distribution_id AS NULL
17 | Unreserve from PO Distribution, pass all parameters.
18 |
19 | This function can also be used to prevent 'Final Close' of a PO if there are unvalidated
20 | invoices matched to it.
21 |
22 | Parameter p_invoice_id
23 | ----------------------
24 | A special case during matching, is when a user indicates that it is a 'Final Match'. During
25 | invoice validation, Payables invokes po_actions.close_po() to 'Final Close' the PO.
26 |
27 | When po_actions.close_po() is invoked as a result of 'Final Match', pass p_invoice_id
28 | to skip the check for the invoice doing the final match. Otherwise, we will not be
29 | able to final match or close the PO.
30 |
31 | RETURNS
32 | TRUE if there are unvalidated invoices, credit or debit memos.
33 |
34 | PARAMETERS
35 | p_invoice_type IN Required parameter. Values: 'INVOICE' or 'CREDIT'
36 | p_po_header_id IN Required parameter. PO Header Identifier.
37 | p_po_line_id IN PO Line Identifier
38 | p_line_location_id IN PO Shipment Identifier
39 | p_po_distribution_id IN PO Distribution Identifier
40 | p_invoice_id IN Invoice Identifier
41 | p_calling_sequence IN Calling module (package_name.procedure or block_name.field_name)
42 |
43 | MODIFICATION HISTORY
44 | Date Author Description of Changes
45 |
46 *=============================================================================*/
47
48 FUNCTION Check_Unvalidated_Invoices(p_invoice_type IN VARCHAR2 DEFAULT 'BOTH',
49 p_po_header_id IN NUMBER,
50 p_po_release_id IN NUMBER DEFAULT NULL,
51 p_po_line_id IN NUMBER DEFAULT NULL,
52 p_line_location_id IN NUMBER DEFAULT NULL,
53 p_po_distribution_id IN NUMBER DEFAULT NULL,
54 p_invoice_id IN NUMBER DEFAULT NULL,
55 p_calling_sequence IN VARCHAR2) RETURN BOOLEAN;
56
57 END AP_MATCH_UTILITIES_PUB;
58