DBA Data[Home] [Help]

PACKAGE: APPS.AP_WEB_RECEIPT_MANAGEMENT_UTIL

Source


1 PACKAGE AP_WEB_RECEIPT_MANAGEMENT_UTIL AUTHID CURRENT_USER AS
2 /* $Header: apwrmuts.pls 120.4 2011/07/18 12:47:14 dsadipir ship $ */
3 /*=======================================================================+
4  |  Declare PUBLIC Data Types and Variables
5  +=======================================================================*/
6 
7 
8  C_EVENT_WAIVE_RECEIPTS        CONSTANT VARCHAR2(100) := 'WAIVE_RECEIPTS';
9  C_EVENT_WAIVE_COMPLETE        CONSTANT VARCHAR2(100) := 'WAIVE_COMPLETE';
10  C_EVENT_RECEIVE_RECEIPTS      CONSTANT VARCHAR2(100) := 'RECEIVE_RECEIPTS';
11  C_EVENT_RECEIPTS_NOT_RECEIVED CONSTANT VARCHAR2(100) := 'RECEIPTS_NOT_RECEIVED';
12  C_EVENT_RECEIPTS_IN_TRANSIT   CONSTANT VARCHAR2(100) := 'RECEIPTS_IN_TRANSIT';
13  C_EVENT_REQUEST_INFO          CONSTANT VARCHAR2(100) := 'REQUEST_INFO';
14  C_EVENT_REJECT                CONSTANT VARCHAR2(100) := 'REJECT';
15  C_EVENT_MR_SHORTPAY           CONSTANT VARCHAR2(100) := 'RECEIPT_MISSING_SHORTPAY';
16  C_EVENT_MIR_SHORTPAY           CONSTANT VARCHAR2(100) := 'RECEIPT_MISSING_IMG_SHORTPAY';
17  C_EVENT_MBR_SHORTPAY           CONSTANT VARCHAR2(100) := 'RECEIPT_MISSING_BOTH_SHORTPAY';
18  C_EVENT_PV_SHORTPAY           CONSTANT VARCHAR2(100) := 'POLICY_VIOLATION_SHORTPAY';
19  C_EVENT_SHORTPAY              CONSTANT VARCHAR2(100) := 'SHORTPAY';
20  C_EVENT_RELEASE_HOLD          CONSTANT VARCHAR2(100) := 'RELEASE_HOLD';
21  C_EVENT_COMPLETE_AUDIT        CONSTANT VARCHAR2(100) := 'COMPLETE_AUDIT';
22  C_EVENT_NONE                  CONSTANT VARCHAR2(100) := 'NONE';
23 
24 
25  C_STATUS_IN_TRANSIT   CONSTANT VARCHAR2(30) := 'IN_TRANSIT';
26  C_STATUS_MISSING      CONSTANT VARCHAR2(30) := 'MISSING';
27  C_STATUS_NOT_REQUIRED CONSTANT VARCHAR2(30) := 'NOT_REQUIRED';
28  C_STATUS_OVERDUE      CONSTANT VARCHAR2(30) := 'OVERDUE';
29  C_STATUS_RESOLUTN     CONSTANT VARCHAR2(30) := 'RESOLUTN';
30  C_STATUS_RECEIVED     CONSTANT VARCHAR2(30) := 'RECEIVED';
31  C_STATUS_REQUIRED     CONSTANT VARCHAR2(30) := 'REQUIRED';
32  C_STATUS_WAIVED       CONSTANT VARCHAR2(30) := 'WAIVED';
33 
34 
35 /*========================================================================
36  | PUBLIC FUNCTION get_receipt_status
37  |
38  | DESCRIPTION
39  |   This function returns the receipt status for a expense report. If no
40  |   event is passed in as parameter, then the status deducted from the
41  |   current status and values on line columns. If an event is passed in
42  |   then it is also taken into consideration when deducting the receipt
43  |   status.
44  |
45  |   Note if this logic is called from BC4J, then the changes on the page
46  |   need to be posted in order for this function to be able to see them.
47  |   To do that, call this function from the OAViewObjectImpl.beforeCommit.
48  |
49  | CALLED FROM PROCEDURES/FUNCTIONS (local to this package body)
50  |   Called from BC4J and workflow logic.
51  |
52  | CALLS PROCEDURES/FUNCTIONS (local to this package body)
53  |
54  | RETURNS
55  |   Receipt status as VARCHAR2.
56  |
57  | PARAMETERS
58  |  p_report_header_id IN Expense report identifier
59  |  p_event           IN event taken on the report one of the following:
60  |                         C_EVENT_WAIVE_RECEIPTS
61  |                         C_EVENT_WAIVE_COMPLETE
62  |                         C_EVENT_RECEIVE_RECEIPTS
63  |                         C_EVENT_RECEIPTS_NOT_RECEIVED
64  |                         C_EVENT_RECEIPTS_IN_TRANSIT
65  |                         C_EVENT_MR_SHORTPAY
66  |                         C_EVENT_PV_SHORTPAY
67  |                         C_EVENT_SHORTPAY
68  |                         C_EVENT_NONE
69  |                         C_EVENT_REJECT
70  |                         C_EVENT_REQUEST_INFO
71  |                         C_EVENT_RELEASE_HOLD
72  |                         C_EVENT_COMPLETE_AUDIT
73  |                        The value is defaulted to C_EVENT_NONE
74  |
75  | MODIFICATION HISTORY
76  | Date                  Author            Description of Changes
77  | 16-Aug-2004           J Rautiainen      Created
78  |
79  *=======================================================================*/
80 FUNCTION get_receipt_status(p_report_header_id IN NUMBER,
81                             p_event           IN VARCHAR2 DEFAULT C_EVENT_NONE) RETURN VARCHAR2;
82 
83 /*========================================================================
84  | PUBLIC PROCEDURE handle_event
85  |
86  | DESCRIPTION
87  |   This procedure handles a receipt management related event.
88  |
89  |   Note if this logic is called from BC4J, then the changes on the page
90  |   need to be posted in order for this function to be able to see them.
91  |   To do that, call this function from the OAViewObjectImpl.beforeCommit.
92  |
93  | CALLED FROM PROCEDURES/FUNCTIONS (local to this package body)
94  |   Called from BC4J and workflow logic.
95  |
96  | CALLS PROCEDURES/FUNCTIONS (local to this package body)
97  |
98  | RETURNS
99  |   Receipt status as VARCHAR2.
100  |
101  | PARAMETERS
102  |  p_report_header_id IN Expense report identifier
103  |  p_event           IN event taken on the report one of the following:
104  |                         C_EVENT_WAIVE_RECEIPTS
105  |                         C_EVENT_WAIVE_COMPLETE
106  |                         C_EVENT_RECEIVE_RECEIPTS
107  |                         C_EVENT_RECEIPTS_NOT_RECEIVED
108  |                         C_EVENT_MR_SHORTPAY
109  |                         C_EVENT_PV_SHORTPAY
110  |                         C_EVENT_SHORTPAY
111  |                         C_EVENT_REJECT
112  |                         C_EVENT_REQUEST_INFO
113  |                         C_EVENT_RELEASE_HOLD
114  |                         C_EVENT_COMPLETE_AUDIT
115  |
116  | MODIFICATION HISTORY
117  | Date                  Author            Description of Changes
118  | 16-Aug-2004           J Rautiainen      Created
119  |
120  *=======================================================================*/
121 PROCEDURE handle_event(p_report_header_id IN NUMBER,
122                        p_event           IN VARCHAR2);
123 
124 /*========================================================================
125  | PUBLIC FUNCTION is_shortpaid_report
126  |
127  | DESCRIPTION
128  |   This function detects whether a report is a shortpaid report.
129  |
130  | CALLED FROM PROCEDURES/FUNCTIONS (local to this package body)
131  |   Called from BC4J and workflow logic.
132  |
133  | CALLS PROCEDURES/FUNCTIONS (local to this package body)
134  |
135  | RETURNS
136  |   Y or N depending whether the report is shortpaid of the particualr type.
137  |
138  | PARAMETERS
139  |  p_report_header_id IN Expense report identifier
140  |  p_shortpay_type    IN type of the shortpay:
141  |                         AP_WEB_RECEIPTS_WF.C_NO_RECEIPTS_SHORTPAY_PROCESS
142  |                         AP_WEB_RECEIPTS_WF.C_POLICY_VIOLATION_PROCESS
143  |
144  | MODIFICATION HISTORY
145  | Date                  Author            Description of Changes
146  | 31-Dec-2004           J Rautiainen      Created
147  |
148  *=======================================================================*/
149 FUNCTION is_shortpaid_report(p_report_header_id IN NUMBER,
150                              p_shortpay_type    IN VARCHAR2) RETURN VARCHAR2;
151 
152 PROCEDURE AbortShortPayProcess(p_report_header_id IN NUMBER);
153 
154 FUNCTION IsShortpay(p_report_header_id IN NUMBER,
155 		    p_shortpay_type    IN VARCHAR2) RETURN VARCHAR2;
156 
157 PROCEDURE CompleteShortpay(p_report_header_id IN NUMBER,
158 			   p_activity         IN VARCHAR2,
159 			   p_result           IN VARCHAR2);
160 
161 END AP_WEB_RECEIPT_MANAGEMENT_UTIL;