DBA Data[Home] [Help]

PACKAGE: APPS.PO_COMMUNICATION_PVT

Source


1 PACKAGE PO_COMMUNICATION_PVT AS
2 /* $Header: POXVCOMS.pls 120.13 2008/03/04 07:29:15 lgoyal ship $ */
3 
4  /*=======================================================================+
5  | FILENAME
6  |   POXVCOMS.pls
7  |
8  | DESCRIPTION
9  |   PL/SQL spec for package:  PO_COMMUNICATION_PVT
10  |
11  | NOTES
12  *=====================================================================*/
13 
14 /* FPJ PO COMMUNICATION PROJECT */
15 /*******************************************************************
16   PROCEDURE NAME: PO_NEW_COMMUNICATION()
17 
18  DESCRIPTION   :This function will be called from the workflow process to Verify
19  whether the user is using the PO New Communication Method or not
20 
21  Referenced by :
22  parameters    :
23 
24   CHANGE History: Created    VSANJAY
25 *******************************************************************/
26 
27  procedure PO_NEW_COMMUNICATION(itemtype        in varchar2,
28                                      itemkey         in varchar2,
29                                      actid           in number,
30                                      funcmode        in varchar2,
31                                      resultout       out NOCOPY varchar2 );
32 
33 /*******************************************************************
34   PROCEDURE NAME: GENERATE_PDF()
35 
36   Description : This function will be called from the workflow process to genera
37 te the pdf document. It launches the concurrent program "Dispatch Purchase Order
38 ".
39 
40  Referenced by :
41  parameters    :
42 
43   CHANGE History: Created     VSANJAY
44 *******************************************************************/
45 
46 procedure GENERATE_PDF(itemtype        in varchar2,
47                                      itemkey         in varchar2,
48                                      actid           in number,
49                                      funcmode        in varchar2,
50                                      resultout       out NOCOPY varchar2 );
51 
52 /*******************************************************************
53   PROCEDURE NAME: Delete_PDF_Attachments()
54 
55   Description : This function will be called from the workflow process to delete
56  the pdf's from the fnd_attachment tables.
57 
58  Referenced by :
59  parameters    :
60 
61   CHANGE History: Created     VSANJAY
62 *******************************************************************/
63 
64 PROCEDURE Delete_PDF_Attachments (itemtype IN VARCHAR2,
65                                            itemkey  IN VARCHAR2,
66                                            actid    IN NUMBER,
67                                            funcmode IN VARCHAR2,
68                                            resultout   OUT NOCOPY VARCHAR2);
69 
70 /*******************************************************************
71   PROCEDURE NAME: PO_PDF_EXISTS()
72 
73   Description : This function will be called from the workflow process to Verify
74   whether PDF exists for the Current Document
75 
76  Referenced by :
77  parameters    :
78 
79   CHANGE History: Created     VSANJAY
80 *******************************************************************/
81 
82  procedure PO_PDF_EXISTS(itemtype        in varchar2,
83                                      itemkey         in varchar2,
84                                      actid           in number,
85                                      funcmode        in varchar2,
86                                      resultout       out NOCOPY varchar2 );
87 
88 /*******************************************************************
89   PROCEDURE NAME: Start_Email_WF_Process()
90 
91  DESCRIPTION   : This function will be called from the workflow process to the
92 email to the supplier with PDF as an attachment
93  Referenced by :
94  parameters    :
95 
96   CHANGE History: Created     VSANJAY
97 *******************************************************************/
98 
99 procedure Start_Email_WF_Process(p_document_id           NUMBER,
100                                  p_revision_num          NUMBER,
101                                  p_document_type         VARCHAR2,
102                                  p_document_subtype      VARCHAR2,
103                                  p_email_address         VARCHAR2,
104                                  p_language_code         VARCHAR2,
105                                  p_store_flag            VARCHAR2,
106                                  p_with_terms            VARCHAR2 );
107 
108 
109 /*******************************************************************
110   PROCEDURE NAME: GENERATE_PDF_BUYER()
111 
112   Description : This function will be called from the workflow process to genera
113 te the pdf document without T's and C's in buyers language . It launches the concurrent program "Dispatch Purchase Order".
114 
115  Referenced by :
116  parameters    :
117 
118   CHANGE History: Created     VSANJAY
119 *******************************************************************/
120 
121 procedure GENERATE_PDF_BUYER(itemtype        in varchar2,
122                                      itemkey         in varchar2,
123                                      actid           in number,
124                                      funcmode        in varchar2,
125                                      resultout       out NOCOPY varchar2 );
126 
127 /*******************************************************************
128   PROCEDURE NAME: GENERATE_PDF_SUPP()
129 
130   Description : This function will be called from the workflow process to genera
131 te the pdf document without T's and C's in suppliers  language . It launches the concurrent program "Dispatch Purchase Order".
132 
133  Referenced by :
134  parameters    :
135 
136   CHANGE History: Created     VSANJAY
137 *******************************************************************/
138 
139 procedure GENERATE_PDF_SUPP(itemtype        in varchar2,
140                                      itemkey         in varchar2,
141                                      actid           in number,
142                                      funcmode        in varchar2,
143                                      resultout       out NOCOPY varchar2 );
144 
145 /*******************************************************************
146   PROCEDURE NAME: GENERATE_PDF_EMAIL_PROCESS()
147 
148   Description : This function will be called from the email po pdf workflow process to generate the pdf document . It launches the concurrent program "Dispatch Purchase Order".
149 
150  Referenced by :
151  parameters    :
152 
153   CHANGE History: Created     VSANJAY
154 *******************************************************************/
155 
156 procedure GENERATE_PDF_EMAIL_PROCESS(itemtype        in varchar2,
157                                      itemkey         in varchar2,
158                                      actid           in number,
159                                      funcmode        in varchar2,
160                                      resultout       out NOCOPY varchar2 );
161 
162 /*******************************************************************
163   PROCEDURE NAME: LAUNCH_COMMUNICATE()
164 
165   Description : This function will launch the concurrent request which is requested
166   from the communicate window
167 
168 
169  Referenced by :
170  parameters    :
171 
172   CHANGE History: Created     VSANJAY
173 *******************************************************************/
174 
175 
176 procedure  launch_communicate(p_mode in varchar2,
177 			     p_document_id in number ,
178 			     p_revision_number in number,
179                              p_document_type in varchar2,
180                              p_authorization_status in varchar2,
181                              p_language_code in varchar2,
182                              p_fax_enable in varchar2,
183                              p_fax_num in varchar2,
184                              p_with_terms in varchar2,
185                              p_print_flag in  varchar2,
186                              p_store_flag in varchar2,
187                              p_request_id out NOCOPY number);
188 
189 /*******************************************************************
190   PROCEDURE NAME:  COMMUNICATE()
191 
192   Description : This function will launch the concurrent request which is requested
193   from the communicate window
194 
195 
196  Referenced by :
197  parameters    :
198 
199   CHANGE History: Created     VSANJAY
200 *******************************************************************/
201 
202 
203 procedure   Communicate(p_authorization_status in varchar2,
204  	                p_with_terms in varchar2,
205 			p_language_code in varchar2,
206 			p_mode     in varchar2,
207 			p_document_id in number ,
208 			p_revision_number in number,
209 		        p_document_type in varchar2,
210 		        p_fax_number in varchar2,
211                         p_email_address in varchar2,
212                         p_request_id out NOCOPY number);
213 
214 function  po_communication_profile RETURN VARCHAR2;
215 function IS_PON_PRINTING_ENABLED RETURN VARCHAR2;
216 function USER_HAS_ACCESS_TC RETURN VARCHAR2;
217 /*******************************************************************
218   <PO Attachment Support 11i.11> Changed the name of the procedure
219       to Store_Blob because it will now be used for creating Blob
220       locator for Zip file also, not just PDF
221   PROCEDURE NAME:  Store_Blob()
222 
223   Description : This method will store the generated Blob in the repository
224                 PO_HEAD or PO_REL
225 
226  Referenced by :
227  parameters    :
228 
229   CHANGE History: Created     VSANJAY
230 *******************************************************************/
231 procedure Store_Blob(p_document_id number ,
232                     p_revision_number number ,
233                     p_document_type varchar2,
234                     p_file_name varchar2,
235                     p_blob_type varchar2, --<PO Attachment Support 11i.11>
236                     x_media_id  out nocopy number);
237 
238 /*******************************************************************
239   PROCEDURE NAME:  pdf_attach_app
240 
241   Description : This function will retrieve the pdf document
242   from the fnd attachments table
243 
244   Referenced by :
245   parameters    :
246 
247   CHANGE History: Created     VSANJAY
248 *******************************************************************/
249 
250 
251 procedure pdf_attach_app(document_id   in varchar2,
252                           content_type  in varchar2,
253                           document      in out nocopy blob,
254                           document_type in out nocopy varchar2);
255 
256 /*******************************************************************
257   PROCEDURE NAME:  pdf_attach_supp
258 
259   Description : This function will retrieve the pdf document
260   from the fnd attachments table
261 
262   Referenced by :
263   parameters    :
264 
265   CHANGE History: Created     VSANJAY
266 *******************************************************************/
267 
268 
269 procedure pdf_attach_supp(document_id   in varchar2,
270                           content_type  in varchar2,
271                           document      in out nocopy blob,
272                           document_type in out nocopy varchar2);
273 
274 /*******************************************************************
275   PROCEDURE NAME:  pdf_attach
276 
277   Description : This function will retrieve the pdf document
278   from the fnd attachments table
279 
280   Referenced by :
281   parameters    :
282 
283   CHANGE History: Created     VSANJAY
284 *******************************************************************/
285 
286 procedure pdf_attach(document_id   in varchar2,
287                           content_type  in varchar2,
288                           document      in out nocopy blob,
289                           document_type in out nocopy varchar2);
290 
291 
292 -- <Start Word Integration 11.5.10+>
293 /*******************************************************************
294   PROCEDURE NAME:  okc_doc_attach
295 
296   Description : This function will retrieve the attached contract
297   document from the contracts repository (fnd_attachments table)
298 
299   Referenced by :
300   parameters    :
301 
302   CHANGE History: Created     SPANGULU
303 *******************************************************************/
304 
305 PROCEDURE okc_doc_attach(document_id    in     varchar2,
306                          content_type   in     varchar2,
307                          document       in out nocopy blob,
308                          document_type  in out nocopy varchar2);
309 
310 -- <End Word Integration 11.5.10+>
311 
312 
313 
314 -------------------------------------------------------------------------------
315 --Start of Comments
316 --Name: zip_attach
317 --Pre-reqs:
318 --  Zip file should be generated correctly and stored in the database
319 --Modifies:
320 --  None.
321 --Locks:
322 --  None.
323 --Function:
324 --  Queries the Zip Blob for specified document and returns it as a blob
325 --  to attach to the workflow notification
326 --Parameters:
327 --  Follows workflow standatd API specification for documents
328 --IN:
329 --document_id
330 --  A string the uniquely identifies the document to be attached
331 --content_type
332 --  For PL/SQL Blob documents, the values is ''
333 --IN OUT:
334 --document
335 --  Outbound Lob locator for the Blob to be attached
336 --document_type
337 --  String buffer that contains the content type of outbound Blob
338 --Notes:
339 --  Added as a part of <PO Attachment Support 11i.11>
340 --End of Comments
341 -------------------------------------------------------------------------------
342 PROCEDURE zip_attach(document_id      in     varchar2,
343                      content_type     in     varchar2,
344                      document         in out nocopy blob,
345                      document_type    in out nocopy varchar2);
346 
347 -------------------------------------------------------------------------------
348 --Start of Comments
349 --Name: set_zip_error_code
350 --Pre-reqs:
351 --  None.
352 --Modifies:
353 --  Workflow Attribute zip_error_code
354 --Locks:
355 --  None.
356 --Function:
357 --  Sets the workflow attribute zip_error_code to the value passed in
358 --Parameters:
359 --IN:
360 --p_itemtype
361 --  String that identifies the workflow process
362 --p_itemkey
363 --  Uniquely identifies the current instance of the workflow process
364 --p_zip_error_code
365 --  Value to which the workflow attribute zip_error_code should be
366 --  set to. Possible values can be OVERSIZED, DUPLICATE_FILENAME
367 --  and UNEXPECTED (values of lookup type POAPPRV_ZIP_ERROR_CODE)
368 --Notes:
369 --  Added as a part of <PO Attachment Support 11i.11>
370 --End of Comments
371 -------------------------------------------------------------------------------
372 PROCEDURE set_zip_error_code (p_itemtype       IN VARCHAR2,
373                               p_itemkey        IN VARCHAR2,
374                               p_zip_error_code IN VARCHAR2);
375 
376 -------------------------------------------------------------------------------
377 --Start of Comments
378 --Name: get_zip_error_code
379 --Pre-reqs:
380 --  None.
381 --Modifies:
382 --  None.
383 --Locks:
384 --  None.
385 --Function:
386 --  Returns the value of workflow attribute ZIP_ERROR_CODE
387 --Parameters:
388 --  Follows standard workflow API specification
389 --IN:
390 --itemtype
391 --  String that identifies the workflow process
392 --itemkey
393 --  Uniquely identifies the current instance of the workflow process
394 --actid
398 --OUT:
395 --  The ID number of the activity from which this procedure is callled
396 --funcmode
397 --  The execution mode of the activity
399 --resultout
400 --  Holds the value of the workflow attribute zip_error_code. Possible
401 --  values can be OVERSIZED, DUPLICATE_FILENAME and UNEXPECTED
402 --  (values of lookup type POAPPRV_ZIP_ERROR_CODE)
403 --Notes:
404 --  Added as a part of <PO Attachment Support 11i.11>
405 --End of Comments
406 -------------------------------------------------------------------------------
407 PROCEDURE get_zip_error_code (itemtype IN VARCHAR2,
408                               itemkey  IN VARCHAR2,
409                               actid    IN NUMBER,
410                               funcmode IN VARCHAR2,
411                               resultout   OUT NOCOPY VARCHAR2);
412 
413 -------------------------------------------------------------------------------
414 --Start of Comments
415 --Name: get_max_zip_size
416 --Pre-reqs:
417 --  Column max_attachment_size should exist in table po_system_parameters_all
418 --  Org context should be set correctly to enable querying from org striped
419 --  view po_system_parameters
420 --Modifies:
421 --  None.
422 --Locks:
423 --  None.
424 --Function:
425 --  Queries the value of 'Maximum Attachment Size' which is the maximum
426 --  allowed size of the Zip file.
427 --Parameters:
428 --IN:
429 --itemtype
430 --  String that identifies the workflow process
431 --itemkey
432 --  Uniquely identifies the current instance of the workflow process
433 --Returns:
434 --  For functions:
435 --    Returns the values of 'Maximum Attachment Size' in Purchasing Options
436 --    Setup form. This is the maximum allowed size of the Zip file.
437 --Notes:
438 --  Added as a part of <PO Attachment Support 11i.11>
439 --  A value of 0 means Zip Attachments are not supported
440 --End of Comments
441 -------------------------------------------------------------------------------
442 FUNCTION get_max_zip_size (p_itemtype IN VARCHAR2,
443                            p_itemkey  IN VARCHAR2) RETURN NUMBER;
444 
445 -------------------------------------------------------------------------------
446 --Start of Comments
447 --Name: check_for_attachments
448 --Pre-reqs:
449 --  None.
450 --Modifies:
451 --  None.
452 --Locks:
453 --  None.
454 --Function:
455 --  Checks if any attachments of category 'To Supplier' and type 'File'
456 --  exist for the current PO/Release
457 --Parameters:
458 --IN:
459 --p_document_type
460 --  Document Type, can be PO, PA or RELEASE
461 --p_document_id
462 --  po_header_id for PO, PA and po_release_id for RELEASE
463 --Returns:
464 --  For functions:
465 --    Returns 'Y' if any attachments of category 'To Supplier' and type 'File'
466 --    exist for the current PO/Release
467 --Notes:
468 --  Added as a part of <PO Attachment Support 11i.11>
469 --  Exception handling for this light weight function is left to the calling
470 --  code. This is because the exception handling will be different in
471 --  different calls
472 --End of Comments
473 -------------------------------------------------------------------------------
474 FUNCTION check_for_attachments(p_document_type IN VARCHAR2,
475                                p_document_id      IN NUMBER) RETURN VARCHAR2;
476 
477 
478 /*******************************************************************
479   FUNCTION NAME:  POXMLGEN
480 
481   Description : This function will generate the XML for a Document
482 
483   Referenced by :
484   parameters    :
485 
486   CHANGE History: Created    MANRAM
487 *******************************************************************/
488 
489 function POXMLGEN(      p_api_version           in      NUMBER,
490                         p_document_id           in      NUMBER,
491                         p_revision_num          in      NUMBER,
492                         p_document_type         in      VARCHAR2,
493                         p_document_subtype      in      VARCHAR2,
494                         p_test_flag             in      VARCHAR2,
495                         p_which_tables          in      VARCHAR2,
496                         p_with_terms            in      VARCHAR2 --Bug#3583910
497                         -- Bug 3690810. Removed file.encoding parameter
498 ) return clob ;
499 
500 /**************************************************************************************
501   FUNCTION NAME :  GET_DROP_SHIP_DETAILS
502 
503   Description   : This function retreives drop ship details for given line location id
504   by calling OE_DROP_SHIP_GRP.GET_ORDER_LINE_INFO procedure.
505 
506   Referenced by :
507 
508   parameters    : p_location_id of type number as IN parameter
509 
510   CHANGE History: Created    MANRAM
511 *************************************************************************************/
512 
513 function GET_DROP_SHIP_DETAILS(p_location_id in number) return number ;
514 
515 
516 /*******************************************************************
517   The following functions returns the global variables that are
518   populated by GET_DROP_SHIP_DETAILS function
519 *******************************************************************/
520 function getShipContPhone return VARCHAR2;
521 --bug#3438608 added three function getTownOrCity
525 --po_communication_pvt.g_postal_code
522 --getPostalCode and getStateOrProvince
523 --to return the values in global variables
524 --po_communication_pvt.g_town_or_city
526 --and po_communication_pvt.g_state_or_province.
527 
528 function getTownOrCity return Varchar2;
529 function getStateOrProvince return Varchar2;
530 function getPostalCode return Varchar2;
531 --bug#3438608
532 function getShipContEmail return VARCHAR2;
533 function getDeliverContPhone return VARCHAR2;
534 function getDeliverContEmail return VARCHAR2;
535 function getShipContName return VARCHAR2;
536 function getDeliverContName return VARCHAR2;
537 function getShipCustName return VARCHAR2;
538 function getShipCustLocation return VARCHAR2;
539 function getDeliverCustName return VARCHAR2;
540 function getDeliverCustLocation return VARCHAR2 ;
541 function getShipContactfax	return VARCHAR2;
542 function getDeliverContactName	return VARCHAR2;
543 function getDeliverContactFax	return VARCHAR2;
544 function getShippingMethod	return VARCHAR2;
545 function getShippingInstructions return VARCHAR2;
546 function getPackingInstructions	return VARCHAR2;
547 function getCustomerProductDesc	return VARCHAR2;
548 function getCustomerPoNumber	return VARCHAR2;
549 function getCustomerPoLineNum	return VARCHAR2;
550 function getCustomerPoShipmentNum	return VARCHAR2;
551 /*******************************************************************
552 	End of functions that returns drop ship details
553 ********************************************************************/
554 
555 
556 function getDocumentId RETURN NUMBER ;
557 
558 function getRevisionNum RETURN NUMBER;
559 
560 function getVendorId RETURN NUMBER;
561 
562 function getCoverMessage RETURN VARCHAR2;
563 
564 function getAmendmentMessage RETURN VARCHAR2;
565 
566 function getTimezone RETURN VARCHAR2;
567 
568 function getTestFlag RETURN VARCHAR2;
569 function getReleaseHeaderId RETURN VARCHAR2 ;
570 
571 /*******************************************************************************
572   FUNCTION NAME :  GETLOCATIONINFO
573 
574   Description   : This function retreives address details(like ship to, bill to)
575   for a given location id  by calling PO_HR_LOCATION.GET_ADDRESS procedure and
576   populates the retrieved values into global variables
577 
578   Referenced by :
579   parameters    : p_location_id of type number as IN parameter
580 
581   CHANGE History: Created    MANRAM
582 ********************************************************************************/
583 function getLocationInfo(p_location_id in number) return NUMBER;
584 
585 
586 /*******************************************************************
587   The following functions returns the global variables that are
588   populated by GETLOCATIONINFO function
589 *******************************************************************/
590 
591 function getAddressLine1 return varchar2;
592 function getAddressLine2 return varchar2;
593 function getAddressLine3 return varchar2;
594 --Bug 4504228 function getPhone return varchar2;
595 /*Bug 4504228 Buyer contact phone and buyer email were not shown
596  in PDF Output. Adding procedure getEmail() and
597  changing the specification of getPhone()*/
598 function getPhone(p_agent_id in number) return varchar2;
599 function getEmail  return varchar2;
600 function getFax return varchar2;
601 function getLocationName return varchar2;
602 function getTerritoryShortName return varchar2;
603 function getAddressInfo return varchar2;
604 /*******************************************************************
605 	End of functions that returns address details
606 ********************************************************************/
607 
608 
609 
610 /*******************************************************************************
611   FUNCTION NAME :  GETOPERATIONINFO
612 
613   Description   : This function retreives Operation Unit address details
614   for  given  organization id  and  populates the retrieved values into
615   global variables
616 
617   Referenced by :
618   parameters    : p_org_id of type number as IN parameter
619 
620   CHANGE History: Created    MANRAM
621 ********************************************************************************/
622 function getOperationInfo(p_org_id in NUMBER) return varchar2;
623 
624 
625 /*******************************************************************
626   The following functions returns the Operation Unint address
627   variables that are   populated by GETOPERATIONINFO function
628 *******************************************************************/
629 function getOUAddressLine1 return varchar2;
630 function getOUAddressLine2 return varchar2;
631 function getOUAddressLine3 return varchar2;
632 function getOUTownCity return varchar2;
633 function getOURegion2 return varchar2;
634 function getOUPostalCode return varchar2;
635 /*******************************************************************
636 	End of functions that returns operation unit address details
640 function getAgreementLineNumber return VARCHAR2;
637 ********************************************************************/
638 
639 function getSegmentNum(p_header_id in NUMBER) return VARCHAR2;
641 function getQuoteNumber	return VARCHAR2;
642 function getAgreementFlag return VARCHAR2;
643 
644 function getAgreementLineNumber(p_line_id in NUMBER) return NUMBER;
645 
646 function getArcBuyerAgentID(p_header_id in NUMBER) return NUMBER;
647 function getArcBuyerFName return VARCHAR2;
648 function getArcBuyerLName return VARCHAR2;
649 function getArcBuyerTitle return VARCHAR2;
650 
651 function getRelArcBuyerAgentID(p_release_id in NUMBER) return NUMBER;
652 
653 function getVendorAddressLine1(p_vendor_site_id in NUMBER) return VARCHAR2;
654 function getVendorAddressLine2 return VARCHAR2;
655 function getVendorAddressLine3 return VARCHAR2;
656 function getVendorCityStateZipInfo return VARCHAR2;
657 function getVendorCountry return VARCHAR2;
658 
659 function getJob(p_job_id in NUMBER) return VARCHAR2;
660 
661 function getDocumentType return VARCHAR2;
662 
663 function getFormatMask return VARCHAR2;
664 
665 function getLegalEntityName return VARCHAR2;
666 
667 function IsDocumentSigned(p_header_id number) return  varchar2;
668 
669 function getPDFFileName(p_document_type varchar2,
670 			p_terms varchar2,
671 			p_orgid number,
672 			p_document_id varchar2,
673 			p_revision_num number,
674 			p_language_code varchar2) return varchar2;
675 
676 -- <Start Word Integration 11.5.10+>
677 
678 function getRTFFileName(p_document_type varchar2,
679 			p_terms varchar2,
680 			p_orgid number,
681 			p_document_id varchar2,
682 			p_revision_num number,
683 			p_language_code varchar2) return varchar2;
684 
685 -- <End Word Integration 11.5.10+>
686 
687 
688 -------------------------------------------------------------------------------
689 --Start of Comments
690 --Name: getZipFileName
691 --Pre-reqs:
692 --  None.
693 --Modifies:
694 --  None.
695 --Locks:
696 --  None.
697 --Function:
698 --  Returns the name of the Zip file for current PO
699 --Parameters:
700 --  p_org_id of type number as IN parameter
701 --Returns:
702 --  For functions:
703 --    Returns the name of the Zip file for the PO
704 --Notes:
705 --  Added as a part of <PO Attachment Support 11i.11>
706 --  History
707 --    Bug# 5240634 Changed the signature to take in a org_id
708 --
709 --    The function used to construct the zip file name using
710 --    document type, orgid, document id and revision num as
711 --    p_document_type||'_'||p_orgid||'_'||l_document_number||'_'||p_revision_num||'.zip';
712 --    This was changed as per ECO Bug #43877577
713 --End of Comments
714 -------------------------------------------------------------------------------
715 FUNCTION getZIPFileName(p_org_id in number) RETURN varchar2 ;
716 
717 /* Function to retru Address line 4 value*/
718 --bug:346361
719 function getAddressLine4 return varchar2;
720 
721 /* Function to retrun vendor Address line 4 value*/
722 --bug:346361
723 function getVendorAddressLine4 return VARCHAR2;
724 
725 
726 /*******************************************************************************
727   FUNCTION NAME :  getLegalEntityDetails
728 
729   Description   : This function retreives Legal Entity address details
730   for  given  inventory organization id  and  populates the retrieved values into
731   global variables
732 
733   Referenced by :
734   parameters    : p_org_id of type number as IN parameter
735 
736   CHANGE History: Created    MANRAM
737 ********************************************************************************/
738 function getLegalEntityDetails(p_org_id in NUMBER) return varchar2;
739 
740 /*******************************************************************
741   The following functions returns Legal Entity address
742   variables that are   populated by getLegalEntityDetails function
743 *******************************************************************/
744 
745 function getLEAddressLine1 return varchar2;
746 function getLEAddressLine2 return varchar2;
747 function getLEAddressLine3 return varchar2;
748 function getLECountry return varchar2;
749 function getLETownOrCity return varchar2;
750 function getLEPostalCode return varchar2;
751 function getLEStateOrProvince return varchar2;
752 /*******************************************************************
753 	End of functions that returns operation unit address details
754 ********************************************************************/
755 
756 -- <Complex Work R12 Start>
757 -- Begin Functions Related To Complex Work Procurement
758 
759 FUNCTION getIsComplexWorkPO RETURN VARCHAR2;
760 
761 -- End Functions Related To Complex Work Procurement
762 -- <Complex Work R12 End>
763 
764 /*
765 	Function returns distinct count of shipment level ship to from header level ship to. This count is
766 	used in XSL to identify what to display in ship to address at header and shipment level
767 */
768 function getDistinctShipmentCount return number;
769 
770 /*
771 	Function to retrieve cancel date for Standard, Blanket and Contract PO's
772 */
773 function getPOCancelDate(p_po_header_id in NUMBER) return date;
774 
775 
779 function getOUCountry return varchar2 ;
776 /*	Function retuns the Operation Unit country value that
777 	retreived in getOperationInfo function.
778 */
780 
781 
782 /*******************************************************************************
783   FUNCTION NAME :  getCanceledAmount
784 
785   Description   : This function retreives Canceled Line amount and Total
786   line amount for given line id. Returns canceled_amount and populates
787   g_line_org_amount global variable with original line amount
788 
789   Referenced by :
790   parameters    : p_po_line_id of type number as IN parameter
791 		  p_po_revision_num of type number as IN parameter
792 		  p_po_header_id of type number as IN parameter
793 
794   CHANGE History: Created    MANRAM
795 ********************************************************************************/
796 function getCanceledAmount(p_po_line_id IN NUMBER,
797 			   p_po_revision_num IN NUMBER,
798 			   p_po_header_id IN NUMBER) return varchar2 ;
799 
800 
801 function getLineOriginalAmount return number;
802 
803 /*Bug#3583910 return the global variable g_with_terms */
804 function getWithTerms return varchar2;
805 
806 
807 /*******************************************************************************
808   bug#3630737.
809   PROCEDURE NAME : getOUDocumentDetails
810 
811   Description   :  This procedure is called from the PoGenerateDocument.java
812   file. This procedure retrieves and returns OperatingUnitName, Draft message
813   from and document name.
814 
815   Referenced by : PoGenerateDocument.java
816    CHANGE History: Created    MANRAM
817 ********************************************************************************/
818 
819 PROCEDURE getOUDocumentDetails(p_documentID IN NUMBER,
820                                x_pendingSignatureFlag OUT NOCOPY VARCHAR2,
821 			       x_documentName OUT NOCOPY VARCHAR2,
822 			       x_organizationName OUT NOCOPY VARCHAR2,
823 			       x_draft OUT NOCOPY VARCHAR2) ;
824 
825 /*********************************************************************************
826 bug#3630737.
827 Returns concatinated message of DocumentType, po number and revision number
828 **********************************************************************************/
829 function getDocumentName return VARCHAR2;
830 
831 /*********************************************************************************
832 bug#3771735.
833 Returns the DocumentTypeCode stored in the global variable g_documentTypeCode
834 **********************************************************************************/
835 function getDocumentTypeCode return VARCHAR2;
836 
837 /**************************************************************************
838 Bug 4026592
839 Returns whether contract source is attached document.
840 Stored in the global variable g_is_contract_attached_doc
841 ***************************************************************************/
842 FUNCTION getIsContractAttachedDoc return VARCHAR2;
843 
844 /*********************************************************************************
845 11i10+ Contract ER TC Sup Lang
846 Procedure to generate pdf with terms in suppliers language
847 **********************************************************************************/
848 PROCEDURE GENERATE_PDF_SUPP_TC (itemtype IN VARCHAR2,
849                                 itemkey  IN VARCHAR2,
850                                 actid    IN NUMBER,
851                                 funcmode IN VARCHAR2,
852                                 resultout   OUT NOCOPY VARCHAR2);
853 
854 /*********************************************************************************
855 bug#AMIT.
856 Returns the Inventory Org Id stored in FINANCIALS_SYSTEM_PARAMETERS
857 **********************************************************************************/
858 FUNCTION getInventoryOrgId return NUMBER;
859 -- Added for bug 6692126
860 FUNCTION get_preparer_profile (p_document_id    NUMBER,
861                                p_document_type  VARCHAR2,
862                                p_profile_option VARCHAR2) RETURN VARCHAR2;
863 
864 
865 /********************************************************************************
866  Bug5213932 Converts long text into clob and returns clob.
867 ********************************************************************************/
868 FUNCTION get_clob(p_row_id IN ROWID) RETURN CLOB;
869 
870 /*Bug4568471/6829381 Introduced two new functions*/
871 FUNCTION get_oneTime_loc(p_location_id NUMBER) RETURN  VARCHAR2;
872 FUNCTION get_oneTime_address(p_line_location_id NUMBER) RETURN CLOB;
873 /*Bug4568471/6829381*/
874 
875 end  PO_COMMUNICATION_PVT;