DBA Data[Home] [Help]

PACKAGE: APPS.PON_PRINTING_PKG

Source


1 PACKAGE PON_PRINTING_PKG as
2 /* $Header: PONPRNS.pls 120.9 2007/05/09 18:43:50 jingche ship $ */
3 
4 ----------------------------------------------------------------
5 -- Creates a xml file for the auction id and returns          --
6 -- it as a clob                                               --
7 ----------------------------------------------------------------
8   FUNCTION generate_auction_xml(p_auction_header_id          IN NUMBER,
9                                 p_client_time_zone           IN VARCHAR2,
10                                 p_server_time_zone           IN VARCHAR2,
11                                 p_date_format                IN VARCHAR2,
12                                 p_trading_partner_id         IN NUMBER,
13                                 p_trading_partner_name       IN VARCHAR2,
14                                 p_vendor_site_id             IN NUMBER,
15                                 p_user_view_type             IN VARCHAR2,
16                                 p_printing_warning_flag      IN VARCHAR2  DEFAULT 'N',
17                                 p_neg_printed_with_contracts IN VARCHAR2  DEFAULT 'N',
18                                 p_requested_supplier_id      IN NUMBER,
19                                 p_requested_supplier_name    IN VARCHAR2,
20 				p_trading_partner_contact_id IN NUMBER)
21   RETURN CLOB;
22 
23 -------------------------------------------------------------------------------
24 -- If p_bid_number > 0 , Creates a xml file for the bid number and returns   --
25 -- it as a clob. If p_bid_number <= 0, creates a xml file for the auction id --
26 -------------------------------------------------------------------------------
27   FUNCTION generate_auction_xml(p_auction_header_id          IN NUMBER,
28                                 p_client_time_zone           IN VARCHAR2,
29                                 p_server_time_zone           IN VARCHAR2,
30                                 p_date_format                IN VARCHAR2,
31                                 p_trading_partner_id         IN NUMBER,
32                                 p_trading_partner_name       IN VARCHAR2,
33                                 p_vendor_site_id             IN NUMBER,
34                                 p_user_view_type             IN VARCHAR2,
35                                 p_printing_warning_flag      IN VARCHAR2  DEFAULT 'N',
36                                 p_neg_printed_with_contracts IN VARCHAR2  DEFAULT 'N',
37                                 p_requested_supplier_id      IN NUMBER,
38                                 p_requested_supplier_name    IN VARCHAR2,
39 				p_trading_partner_contact_id IN NUMBER,
40                                 p_bid_number                 IN NUMBER,
41                                 p_user_id                    IN NUMBER)
42   RETURN CLOB;
43 
44 --  Overloaded version of the above procedure without trading_partner_contact_id
45 --  Kept here for backward compatibility - can be removed once all the dependent
46 --  changes are done.
47 
48   FUNCTION generate_auction_xml(p_auction_header_id          IN NUMBER,
49                                 p_client_time_zone           IN VARCHAR2,
50                                 p_server_time_zone           IN VARCHAR2,
51                                 p_date_format                IN VARCHAR2,
52                                 p_trading_partner_id         IN NUMBER,
53                                 p_trading_partner_name       IN VARCHAR2,
54                                 p_vendor_site_id             IN NUMBER,
55                                 p_user_view_type             IN VARCHAR2,
56                                 p_printing_warning_flag      IN VARCHAR2  DEFAULT 'N',
57                                 p_neg_printed_with_contracts IN VARCHAR2  DEFAULT 'N',
58                                 p_requested_supplier_id      IN NUMBER,
59                                 p_requested_supplier_name    IN VARCHAR2)
60   RETURN CLOB;
61 ----------------------------------------------------------------
62 -- Gets the message after substituting the token values       --
63 ----------------------------------------------------------------
64 FUNCTION GET_MESSAGES(p_message_name in VARCHAR2,
65                       p_token_name in VARCHAR2,
66                       p_token_value in VARCHAR2) return VARCHAR2;
67 
68 ----------------------------------------------------------------
69 -- Returns the corresponding value of the message name after  --
70 -- substituting it with the the two token                   --
71 ----------------------------------------------------------------
72   FUNCTION GET_MESSAGES(p_message_name in VARCHAR2,
73                         p_token_name1 in VARCHAR2,
74                         p_token_value1 in VARCHAR2,
75                         p_token_name2 in VARCHAR2,
76                         p_token_value2 in VARCHAR2) return VARCHAR2;
77 
78 ----------------------------------------------------------------
79 -- Returns the corresponding value of the message name after  --
80 -- substituting it with the the three token                   --
81 ----------------------------------------------------------------
82   FUNCTION GET_MESSAGES(p_message_name in VARCHAR2,
83                         p_token_name1 in VARCHAR2,
84                         p_token_value1 in VARCHAR2,
85                         p_token_name2 in VARCHAR2,
86                         p_token_value2 in VARCHAR2,
87                         p_token_name3 in VARCHAR2,
88                         p_token_value3 in VARCHAR2) return VARCHAR2;
89 
90 ----------------------------------------------------------------
91 -- Returns the corresponding value of the mesage name after   --
92 -- substituting it with the token. The message name is formed --
93 -- by joining the message name and message suffix parameters  --
94 ----------------------------------------------------------------
95 FUNCTION GET_MESSAGES(p_message_name in VARCHAR2,
96                         p_message_suffix in VARCHAR2,
97                         p_token_name in VARCHAR2,
98                         p_token_value in VARCHAR2) return VARCHAR2;
99 
100 ----------------------------------------------------------------
101 -- Adds the suffix to the message to generate the  document   --
102 -- specific messages name                                     --
103 ----------------------------------------------------------------
104 FUNCTION GET_DOCUMENT_MESSAGE_NAME(p_message_name in VARCHAR2,
105                                    p_message_suffix in VARCHAR2) return VARCHAR2;
106 
107 ----------------------------------------------------------------
108 -- Returns Y if XDO is installed                              --
109 ----------------------------------------------------------------
110 
111 FUNCTION is_xdo_installed RETURN VARCHAR2;
112 
113 ---------------------------------------------------------------
114 -- Returns the rate to be displayed                           --
115 ----------------------------------------------------------------
116 FUNCTION GET_DISPLAY_RATE(p_rate_dsp in NUMBER,
117 	                        p_rate_type in VARCHAR2,
118                           p_rate_date in DATE,
119                           p_auction_currency_code in VARCHAR2,
120                           p_bid_currency_code in VARCHAR2) return VARCHAR2;
121 
122 -----------------------------------------------------------------
123 -- Returns the email of the user. Creating this method instead --
124 -- of an outer join as in hz contact points table same email   --
125 -- record with active status of type MAILHTML existed. This was--
126 -- leading 2 records for all the queries.                      --
127 -----------------------------------------------------------------
128 FUNCTION GET_USER_EMAIL(p_user_party_id in NUMBER) return VARCHAR2;
129 
130 ----------------------------------------------------------------
131 -- Formats the number based passed. If the number does not    --
132 -- decimal part then the decimal separator will not be        --
133 -- displayed. If the number is less that 0 then 0 will        --
134 -- be displayed before the decimal separator                  --
135 ----------------------------------------------------------------
136 FUNCTION FORMAT_NUMBER(p_number in NUMBER) return VARCHAR2;
137 
138  ----------------------------------------------------------------
139   -- Formats the number which is a varchar.                 --
140   ----------------------------------------------------------------
141 FUNCTION FORMAT_NUMBER_STRING(p_value in VARCHAR2) return VARCHAR2;
142 ----------------------------------------------------------------
143 -- Formats the price passed based on the format passed.       --
144 -- If the price does have a decimal part then the decimal     --
145 -- separator will not be displayed. If the price is less      --
146 -- that 0 then 0 will be displayed before the decimal         --
147 -- separator                                                  --
148 ----------------------------------------------------------------
149 FUNCTION FORMAT_PRICE(p_price in NUMBER,
150                       p_format_mask in VARCHAR2,
151                       p_precision IN NUMBER)
152                       return VARCHAR2;
153 
154   ----------------------------------------------------------------
155 	-- Formats the response value of the attributes         --
156   ----------------------------------------------------------------
157   FUNCTION PRINT_ATTRIBUTE_RESPONSE_VALUE(
158                                         p_value in VARCHAR2,
159                                         p_datatype in VARCHAR2,
160                                         p_client_time_zone in VARCHAR2,
161                                         p_server_time_zone in VARCHAR2,
162                                         p_date_format in VARCHAR2,
163                                         p_attribute_sequence_number in NUMBER
164                                         )
165                                         RETURN VARCHAR2;
166 ----------------------------------------------------------------
167 -- Formats the target value of the attributes                 --
168 ----------------------------------------------------------------
169 FUNCTION PRINT_ATTRIBUTE_TARGET_VALUE(p_show_target_value  in VARCHAR2,
170                                       p_value in VARCHAR2,
171                                       p_datatype in VARCHAR2,
172                                       p_sequence_number in VARCHAR2,
173                                       p_client_time_zone in VARCHAR2,
174                                       p_server_time_zone in VARCHAR2,
175                                       p_date_format in VARCHAR2,
176                                       p_user_view_type IN VARCHAR2) RETURN VARCHAR2;
177 
178   ----------------------------------------------------------------
179   -- Retunrs the range / value of a for an attribute along with --
180   -- the score. The score will be displayed only if             --
181   -- p_show_bidder_scores is 'Y'                                --
182   ----------------------------------------------------------------
183 FUNCTION GET_ACCEPTABLE_VALUE(p_show_bidder_scores  in VARCHAR2,
184                               p_attribute_sequence_number NUMBER,
185                               p_score_data_type  in VARCHAR2,
186                               p_from_range  in VARCHAR2,
187                               p_to_range  in VARCHAR2,
188                               p_value  in VARCHAR2,
189                               p_score  in VARCHAR2,
190                               p_client_time_zone in VARCHAR2,
191                               p_server_time_zone in VARCHAR2,
192                               p_date_format in VARCHAR2,
193                               p_user_view_score IN VARCHAR2) RETURN VARCHAR2;
194 
195  -----------------------------------------------------------------
196  -- For Bug 4373655
197  -- Returns the carrier name based on the carrier code and      --
198  -- inventory org id corresponding to the org_id passed a       --
199  -- parameter                                                   --
200  -----------------------------------------------------------------
201  FUNCTION GET_CARRIER_DESCRIPTION(p_org_id in NUMBER,
202                                   p_carrier_code in VARCHAR2)
203                                   return VARCHAR2;
204 
205 ----------------------------------------------------------------
206 -- Calculate Response Total for supplier view.                --
207 ----------------------------------------------------------------
208 FUNCTION get_supplier_bid_total
209              (p_auction_header_id    IN NUMBER,
210               p_bid_number           IN NUMBER,
211               p_buyer_bid_total           IN NUMBER,
212               p_outcome              IN pon_auction_headers_all.contract_type%TYPE,
213               p_doctype_group_name   IN VARCHAR2,
214               p_bid_status           IN VARCHAR2
215               ) RETURN NUMBER;
216 
217 ----------------------------------------------------------------------
218 -- Returns whether the buyer has price visibility in scoring team   --
219 ----------------------------------------------------------------------
220  FUNCTION is_price_visible( p_auction_header_id          IN NUMBER,
221                              p_user_id             IN NUMBER
222                            ) RETURN VARCHAR2;
223 END PON_PRINTING_PKG;
224