DBA Data[Home] [Help]

PACKAGE: APPS.PO_SIGNATURE_PVT

Source


1 PACKAGE PO_SIGNATURE_PVT AUTHID CURRENT_USER AS
2 /* $Header: POXVSIGS.pls 120.8 2011/03/31 19:13:54 rarajar ship $ */
3 
4   --  Sets the attributes required for the Process
5   PROCEDURE Set_Startup_Values (itemtype        IN VARCHAR2,
6                                 itemkey         IN VARCHAR2,
7                                 actid           IN NUMBER,
8                                 funcmode        IN VARCHAR2,
9                                 resultout       OUT NOCOPY VARCHAR2);
10 
11 
12   --  Sets the Notification Message body of the Signature Notifications for Supplier/Buyer
13   PROCEDURE get_signature_notfn_body (document_id    IN VARCHAR2,
14                                       display_type   IN VARCHAR2,
15                                       document       IN OUT NOCOPY CLOB,
16                                       document_type  IN OUT NOCOPY VARCHAR2);
17 
18   --  Calls the eRecord APIs to store the eRecord
19   PROCEDURE create_erecord (itemtype        IN VARCHAR2,
20                             itemkey         IN VARCHAR2,
21                             actid           IN NUMBER,
22                             funcmode        IN VARCHAR2,
23                             resultout       OUT NOCOPY VARCHAR2);
24 
25  --  Updates relevant PO tables based on the Supplier and Buyers signature response
26   PROCEDURE post_signature(itemtype	    IN  VARCHAR2,
27                            itemkey  	IN  VARCHAR2,
28                            actid	    IN  NUMBER,
29                            funcmode	    IN  VARCHAR2,
30                            resultout    OUT NOCOPY VARCHAR2);
31 
32   --  Sets the supplier response attribute to ACCEPTED
33   PROCEDURE set_accepted_supplier_response(itemtype	  IN  VARCHAR2,
34                                            itemkey    IN  VARCHAR2,
35                                            actid	  IN  NUMBER,
36                                            funcmode	  IN  VARCHAR2,
37                                            resultout  OUT NOCOPY VARCHAR2);
38 
39 
40   --  Sets the supplier response attribute to REJECTED
41   PROCEDURE set_rejected_supplier_response(itemtype	 IN  VARCHAR2,
42                                            itemkey   IN  VARCHAR2,
43                                            actid	 IN  NUMBER,
44                                            funcmode	 IN  VARCHAR2,
45                                            resultout OUT NOCOPY VARCHAR2);
46 
47   --  Sets the buyer notification body when supplier rejected the document
48   PROCEDURE get_buyer_info_notfn_body (document_id      IN VARCHAR2,
49                                        display_type     IN VARCHAR2,
50                                        document         IN OUT NOCOPY CLOB,
51                                        document_type    IN OUT NOCOPY VARCHAR2);
52 
53   --  Sets the buyer response attribute to ACCEPTED
54   PROCEDURE set_accepted_buyer_response(itemtype	IN  VARCHAR2,
55                                         itemkey  	IN  VARCHAR2,
56                                         actid	    IN  NUMBER,
57                                         funcmode	IN  VARCHAR2,
58                                         resultout   OUT NOCOPY VARCHAR2);
59 
60   --  Sets the supplier notification body when buyer accepted/rejected the document
61   PROCEDURE get_supplier_info_notfn_body (document_id    IN VARCHAR2,
62                                           display_type   IN VARCHAR2,
63                                           document       IN OUT NOCOPY CLOB,
64                                           document_type  IN OUT NOCOPY VARCHAR2);
65 
66   --  Sets the buyer response attribute to REJECTED
67   PROCEDURE set_rejected_buyer_response(itemtype	IN  VARCHAR2,
68                                         itemkey  	IN  VARCHAR2,
69                                         actid	    IN  NUMBER,
70                                         funcmode	IN  VARCHAR2,
71                                         resultout   OUT NOCOPY VARCHAR2);
72 
73   --  Checks if the document requires Signature
74   PROCEDURE Is_Signature_Required(itemtype        IN VARCHAR2,
75                                   itemkey         IN VARCHAR2,
76                                   actid           IN NUMBER,
77                                   funcmode        IN VARCHAR2,
78                                   resultout       OUT NOCOPY VARCHAR2);
79 
80   -- CLM Apprvl --checks if the document has been signed
81   PROCEDURE has_doc_been_signed(itemtype        IN VARCHAR2,
82                                itemkey         IN VARCHAR2,
83                                actid           IN NUMBER,
84                                funcmode        IN VARCHAR2,
85                                resultout       OUT NOCOPY VARCHAR2);
86 -- CLM Apprvl -- gets the acceptance mdoe specified in the document
87   PROCEDURE get_acceptance_mode(itemtype         IN   VARCHAR2,
88 							 itemkey          IN   VARCHAR2,
89 							 actid           IN NUMBER,
90                              funcmode        IN VARCHAR2,
91                              resultout       OUT NOCOPY VARCHAR2
92 							);
93 
94   -- <BUG 3607009 START>
95   --  Checks if the document requires Signature
96   FUNCTION is_signature_required ( p_itemtype      IN   VARCHAR2
97                                  , p_itemkey       IN   VARCHAR2
98                                  ) RETURN BOOLEAN;
99   -- <BUG 3607009 END>
100 
101   -- Checks if the document was ever Signed
102   FUNCTION Was_Signature_Required(p_document_id IN NUMBER) return BOOLEAN;
103 
104   --  Sets the Supplier Notification Id attribute of the Signature Notification
105   PROCEDURE Set_Supplier_Notification_Id(itemtype        IN VARCHAR2,
106                                          itemkey         IN VARCHAR2,
107                                          actid           IN NUMBER,
108                                          funcmode        IN VARCHAR2,
109                                          resultout       OUT NOCOPY VARCHAR2);
110 
111   --  Sets the Buyer Notification Id attribute of the Signature Notification
112   PROCEDURE Set_Buyer_Notification_Id(itemtype        IN VARCHAR2,
113                                       itemkey         IN VARCHAR2,
114                                       actid           IN NUMBER,
115                                       funcmode        IN VARCHAR2,
116                                       resultout       OUT NOCOPY VARCHAR2);
117 
118   --  Bug 11068447 Sets the KO Notification Id attribute of the Signature Notification
119   PROCEDURE Set_KO_Notification_Id(itemtype        IN VARCHAR2,
120                                       itemkey         IN VARCHAR2,
121                                       actid           IN NUMBER,
122                                       funcmode        IN VARCHAR2,
123                                       resultout       OUT NOCOPY VARCHAR2);
124 
125   --  Updates the PO tables
126   PROCEDURE Update_Po_Details(p_po_header_id        IN NUMBER,
127                               p_status              IN VARCHAR2,
128                               p_action_code         IN VARCHAR2,
129                               p_object_type_code    IN VARCHAR2,
130                               p_object_subtype_code IN VARCHAR2,
131                               p_employee_id         IN NUMBER,
132                               p_revision_num        IN NUMBER);
133 
134    -- CLM Apprvl - Overloaded the procedure update_po_details that has an additional parameter p_draft_id
135   PROCEDURE Update_Po_Details(p_po_header_id        IN NUMBER,
136 							  p_draft_id			IN NUMBER,
137                               p_status              IN VARCHAR2,
138                               p_action_code         IN VARCHAR2,
139                               p_object_type_code    IN VARCHAR2,
140                               p_object_subtype_code IN VARCHAR2,
141                               p_employee_id         IN NUMBER,
142                               p_revision_num        IN NUMBER);
143 
144   -- To create Item key for the Document Signature Process
145   PROCEDURE Get_Item_Key(p_po_header_id  IN  NUMBER,
146                          p_revision_num  IN  NUMBER,
147                          p_document_type IN  VARCHAR2,
148                          x_itemkey       OUT NOCOPY VARCHAR2,
149                          x_result        OUT NOCOPY VARCHAR2);
150 
151   -- Returns item key of the active Document Signature Process
152   PROCEDURE Find_Item_Key(p_po_header_id  IN  NUMBER,
153                           p_revision_num  IN  NUMBER,
154                           p_document_type IN  VARCHAR2,
155                           x_itemkey       OUT NOCOPY VARCHAR2,
156                           x_result        OUT NOCOPY VARCHAR2);
157 
158   -- To Abort Document Signature Process after Signatures are completed
159   PROCEDURE Abort_Doc_Sign_Process(p_itemkey IN  VARCHAR2,
160                                    x_result  OUT NOCOPY VARCHAR2);
161 
162   -- To complete the blocked activities in PO Approval workflow
163   PROCEDURE Complete_Block_Activities(p_itemkey IN  VARCHAR2,
164                                       p_status  IN  VARCHAR2,
165                                       x_result  OUT NOCOPY VARCHAR2);
166 
167   -- To get the last signed document revision number
168   PROCEDURE Get_Last_Signed_Revision(p_po_header_id        IN NUMBER,
169                                      p_revision_num        IN NUMBER,
170                                      x_signed_revision_num OUT NOCOPY NUMBER,
171                                      x_signed_records      OUT NOCOPY VARCHAR2,
172                                      x_return_status       OUT NOCOPY VARCHAR2);
173 
174   -- To find out if the eRecord exists for the document revision
175   PROCEDURE Does_Erecord_Exist(p_po_header_id      IN  NUMBER,
176                                p_revision_num      IN  NUMBER,
177                                x_erecord_exist     OUT NOCOPY VARCHAR2,
178                                x_pending_signature OUT NOCOPY VARCHAR2);
179 
180   -- When signatures are complete updates the relevant tables
181   PROCEDURE Post_Forms_Commit( p_po_header_id           IN  NUMBER,
182                                p_revision_num           IN  NUMBER,
183                                x_result                 OUT NOCOPY VARCHAR2,
184                                x_error_msg              OUT NOCOPY VARCHAR2,
185                                x_msg_data               OUT NOCOPY VARCHAR2);
186 
187 --  Checks if there are more than one signature records exist in the
188 --  PO_ACCEPTANCES table
189   PROCEDURE Check_For_Multiple_Entries( p_po_header_id           IN  NUMBER,
190                                         p_revision_num           IN  NUMBER,
191                                         x_result                 OUT NOCOPY VARCHAR2,
192                                         x_error_msg              OUT NOCOPY VARCHAR2);
193 
194 
195   -- <BUG 3751927 START>
196   --  Gets rejection type of a document version from action history
197   --  and acceptences.  See package body for more info.
198 PROCEDURE get_rejection_type (  p_po_header_id      IN   NUMBER
199                               , p_revision_num      IN   NUMBER
200                               , x_buyer_rejected    OUT NOCOPY VARCHAR2
201                               , x_supplier_rejected OUT NOCOPY VARCHAR2
202                             );
203   -- <BUG 3751927 END>
204 --<Bug#5013783 Start>
205 PROCEDURE if_was_sign_reqd_set_acc_flag(p_document_id         IN NUMBER,
206                                         x_if_acc_flag_updated OUT NOCOPY VARCHAR2);
207 --<Bug#5013783 End>
208 
209 -- Bug 5216351
210 PROCEDURE if_rev_and_signed_set_acc_flag (
211             p_document_id         IN NUMBER,
212             p_old_revision_num    IN NUMBER,
213             x_if_acc_flag_updated OUT NOCOPY VARCHAR2);
214 
215 -- CLM KO signature ER
216 PROCEDURE is_ko_signature_required(itemtype        IN VARCHAR2,
217                                   itemkey         IN VARCHAR2,
218                                   actid           IN NUMBER,
219                                   funcmode        IN VARCHAR2,
220                                   resultout       OUT NOCOPY VARCHAR2);
221 
222 PROCEDURE set_accepted_ko_response(itemtype	IN  VARCHAR2,
223                                       itemkey  	IN  VARCHAR2,
224                                       actid	    IN  NUMBER,
225                                       funcmode	IN  VARCHAR2,
226                                       resultout OUT NOCOPY VARCHAR2);
227 
228 PROCEDURE set_rejected_ko_response(itemtype	IN  VARCHAR2,
229                                       itemkey  	IN  VARCHAR2,
230                                       actid	    IN  NUMBER,
231                                       funcmode	IN  VARCHAR2,
232                                       resultout OUT NOCOPY VARCHAR2);
233 
234 PROCEDURE Check_Warrant_for_KO(itemtype        IN VARCHAR2,
235                                   itemkey         IN VARCHAR2,
236                                   actid           IN NUMBER,
237                                   funcmode        IN VARCHAR2,
238                                   resultout       OUT NOCOPY VARCHAR2);
239 END PO_SIGNATURE_PVT;
240