DBA Data[Home] [Help]

PACKAGE BODY: APPS.POS_WINDOW_SV

Source


1 PACKAGE BODY POS_WINDOW_SV AS
2 /* $Header: POSWNDWB.pls 115.3 1999/11/30 12:19:46 pkm ship   $ */
3 
4   /* DialogBox
5    * ---------
6    */
7   PROCEDURE DialogBox IS
8     l_script_name VARCHAR2(240);
9   BEGIN
10 
11     l_script_name := owa_util.get_cgi_env('SCRIPT_NAME');
12 
13     htp.htmlOpen;
14     htp.linkRel('STYLESHEET', '/OA_HTML/US/POSSTYLE.css');
15 
16     htp.headOpen;
17 
18     htp.p('<script src="/OA_HTML/POSWUTIL.js"></script>');
19 
20     htp.p('<SCRIPT>
21            document.write("<title>" +
22            top.getTop().FND_MESSAGES["ICX_POS_BTN_CANCEL"] + "</title>")
23            </SCRIPT>');
24 
25     js.scriptOpen;
26 
27     htp.p('
28 
29   function drawMe(doc)
30   {
31 
32     var htmlString = "<html>" +
33                      "<LINK REL=STYLESHEET HREF=/OA_HTML/US/POSSTYLE.css TYPE=text/css>" +
34                      "<body bgcolor=#cccccc><center>" +
35                      "<table width=100% height=100%>" +
36                      "<tr><td width=20% align=center valign=center>" +
37                         "<img src=/OA_MEDIA/FNDIWARN.gif>" +
38                      "</td><td valign=center><font class=datablack>" +
39                           top.getTop().FND_MESSAGES[''ICX_POS_CANCEL_WARN''] +
40                      "</font></td></tr></table></body></html>" ;
41     doc.write(htmlString);
42     doc.close();
43   }
44 
45     ');
46 
47     js.scriptClose;
48 
49     htp.headClose;
50 
51     htp.p('<frameset cols="3,*,3" border=0>');
52     htp.p('   <frame
53 		src=/OA_HTML/US/POSBLBOR.htm
54 		name=borderLeft
55 		marginwidth=0
56 		scrolling=no>');
57     htp.p('   <frameset rows="15,*,7,45" border=0 >');
58     htp.p('      <frame
59                   src=/OA_HTML/US/POSDLTOP.htm
60         	  name=alert_cancel_top
61         	  marginwidth=0
62        		  scrolling=no>');
63     htp.p('      <frame
64         	  src="javascript:top.drawMe(document);"
65         	  name=alert_cancel_content
66         	  marginwidth=6
67 		  marginheight=2
68        		  scrolling=auto>');
69 
70     -- lower banner with curved edge
71     htp.p('      <frame src="/OA_HTML/US/POSLWBAN.htm"');
72     htp.p('       name=lowerbanner');
73     htp.p('       marginwidth=0');
74     htp.p('       marginheight=2');
75     htp.p('       frameborder=no');
76     htp.p('       scrolling=no>');
77 
78 
79     htp.p('	  <frame src="' || l_script_name ||
80           '/pos_window_sv.buildbuttons?p_button1Name=ICX_POS_DISCARD&p_button1Function=discard()&p_button2Name=&p_button2Function=&p_button3Name=ICX_POS_CONTINUE_WORKING&p_button3Function=continueWork(top)"');
81 
82     htp.p('	name=alert_cancel_bottom');
83     htp.p('     marginwidth=0');
84     htp.p('     scrolling=no>');
85     htp.p('   </frameset>');
86 
87     htp.p('   <frame
88 	       src=/OA_HTML/US/POSBLBOR.htm
89 	       name=borderRight
90 	       marginwidth=0
91 	       marginheight=0
92 	       scrolling=no>');
93 
94     htp.p('</frameset>');
95 
96     htp.htmlClose;
97 
98   END DialogBox;
99 
100 
101   /* BuildButtons
102    * ------------
103    */
104   PROCEDURE BuildButtons(p_button1Name VARCHAR2, p_button1Function VARCHAR2,
105                          p_button2Name VARCHAR2, p_button2Function VARCHAR2,
106                          p_button3Name VARCHAR2, p_button3Function VARCHAR2)
107   IS
108   BEGIN
109 
110     htp.htmlOpen;
111     htp.linkRel('STYLESHEET', '/OA_HTML/US/POSSTYLE.css');
112 
113     htp.headOpen;
114     htp.headClose;
115     htp.bodyOpen(NULL, 'bgcolor=#336699');
116 /*
117     htp.p('
118       <table width=100% cellpadding=0 cellspacing=0 border=0>
119       <tr bgcolor=#cccccc>
120       <td><img src=/OA_MEDIA/FNDCTBL.gif></td>
121       <td width=100%><img src=/OA_MEDIA/FNDPXG5.gif></td>
122       <td><img src=/OA_MEDIA/FNDCTBR.gif></td>
123       </tr>
124       </table>');
125 */
126     htp.p('
127       <table width=100% bgcolor=#336699 cellpadding=0 cellspacing=0 border=0>
128       <tr><td height=3><img src=/OA_MEDIA/FNDPX3.gif></td></tr>
129       <TR>
130       <TD align=right>');
131 
132     -- This is a button table containing 3 buttons.
133     -- The first row defines the edges and tops
134     htp.p('
135       <table cellpadding=0 cellspacing=0 border=0>
136       <tr>
137       <!-- left hand button, round left side and square right side-->
138       <td rowspan=5><img src=/OA_MEDIA/FNDBRNDL.gif></td>
139       <td bgcolor=#333333><img src=/OA_MEDIA/FNDPX3.gif></td>
140       <td rowspan=5><img src=/OA_MEDIA/FNDBSQRR.gif></td>');
141 
142     htp.p('<!-- standard spacer between square button images-->
143            <td width=2 rowspan=5></td>');
144 
145     IF (p_button2Name is NOT NULL) THEN
146       htp.p('
147          <!-- middle button with squared ends on both left and right-->
148          <td rowspan=5><img src=/OA_MEDIA/FNDBSQRL.gif></td>
149          <td bgcolor=#333333><img src=/OA_MEDIA/FNDPX3.gif></td>
150          <td rowspan=5><img src=/OA_MEDIA/FNDBSQRR.gif></td>
151          <!-- standard spacer between square button images-->
152          <td width=2 rowspan=5></td>');
153     ELSE
154       htp.p('
155          <!-- middle button with squared ends on both left and right-->
156          <td rowspan=5></td>
157          <td></td>
158          <td rowspan=5></td>
159          <!-- standard spacer between square button images-->
160          <td width=2 rowspan=5></td>');
161     END IF;
162 
163     htp.p('
164       <!-- right hand button, square left side and round right side-->
165       <td rowspan=5><img src=/OA_MEDIA/FNDBSQRL.gif></td>
166       <td bgcolor=#333333><img src=/OA_MEDIA/FNDPX3.gif></td>
167       <td rowspan=5><img src=/OA_MEDIA/FNDBRNDR.gif></td>
168       <td width=10 rowspan=5></td>
169       </tr>
170       <tr>');
171 
172     htp.p('<!-- one cell of this type required for every button -->');
173     htp.p('<td bgcolor=#ffffff><img src=/OA_MEDIA/FNDPX6.gif></td>');
174     IF (p_button2Name is NOT NULL) THEN
175       htp.p('<td bgcolor=#ffffff><img src=/OA_MEDIA/FNDPX6.gif></td>');
176     ELSE
177       htp.p('<td></td>');
178     END IF;
179     htp.p('<td bgcolor=#ffffff><img src=/OA_MEDIA/FNDPX6.gif></td>');
180     htp.p('</tr>');
181     htp.p('<tr>');
182 
183     htp.p('<!-- Text and links for each button are listed here-->');
184     htp.p('<td bgcolor=#cccccc height=20 nowrap>');
185     htp.p('<a href="javascript:top.getTop().' || p_button1Function || ';">');
186     htp.p('<font class=button>');
187     htp.p('<SCRIPT>');
188     htp.p('document.write(window.top.getTop().FND_MESSAGES["' ||
189           p_button1Name || '"])');
190     htp.p('</SCRIPT></font></td>');
191 
192 
193     IF (p_button2Name is NOT NULL) THEN
194       htp.p('<td bgcolor=#cccccc height=20 nowrap>');
195       htp.p('<a href="javascript:top.getTop().' || p_button2Function || ';">');
196       htp.p('<font class=button>');
197       htp.p('<SCRIPT>');
198       htp.p('document.write(window.top.getTop().FND_MESSAGES["' ||
199              p_button2Name || '"])');
200       htp.p('</SCRIPT></font></td>');
201     ELSE
202       htp.p('<td></td>');
203     END IF;
204 
205     htp.p('<td bgcolor=#cccccc height=20 nowrap>');
206     htp.p('<a href="javascript:top.getTop().' || p_button3Function || ';">');
207     htp.p('<font class=button>');
208     htp.p('<SCRIPT>');
209     htp.p('document.write(window.top.getTop().FND_MESSAGES["' ||
210           p_button3Name || '"])');
211     htp.p('</SCRIPT></font></td>');
212 
213     htp.p('
214       </tr>
215       <tr>');
216 
217     htp.p('<!-- one cell of this type required for every button -->');
218     htp.p('<td bgcolor=#666666><img src=/OA_MEDIA/FNDPX3.gif></td>');
219     IF (p_button2Name is NOT NULL) THEN
220       htp.p('<td bgcolor=#666666><img src=/OA_MEDIA/FNDPX3.gif></td>');
221     ELSE
222       htp.p('<td></td>');
223     END IF;
224     htp.p('<td bgcolor=#666666><img src=/OA_MEDIA/FNDPX3.gif></td>');
225     htp.p('</tr>');
226 
227     htp.p('<tr>');
228     htp.p('<!-- one cell of this type required for every button -->');
229     htp.p('<td bgcolor=#333333><img src=/OA_MEDIA/FNDPX3.gif></td>');
230     IF (p_button2Name is NOT NULL) THEN
231       htp.p('<td bgcolor=#333333><img src=/OA_MEDIA/FNDPX3.gif></td>');
232     ELSE
233       htp.p('<td></td>');
234     END IF;
235     htp.p('<td bgcolor=#333333><img src=/OA_MEDIA/FNDPX3.gif></td>');
236     htp.p('</tr>');
237 
238     htp.p('</table>');
239 
240     htp.p('
241       </td>
242       </tr>
243       <TR><td height=30><img src=/OA_MEDIA/FNDPX3.gif></td></TR>
244       </table>
245       </body>
246       </html>
247       ');
248 
249   END BuildButtons;
250 
251 
252 
253 
254   /* ModalWindow
255    * -----------
256    */
257   PROCEDURE ModalWindow(p_asn_line_id VARCHAR2,
258                         p_asn_line_split_id VARCHAR2,
259                         p_quantity VARCHAR2,
260                         p_unit_of_measure VARCHAR2) IS
261      l_language    VARCHAR2(5);
262      l_script_name VARCHAR2(240);
263      l_org_id      NUMBER;
264      l_user_id     NUMBER;
265      l_session_id  NUMBER;
266      l_responsibility_id NUMBER;
267   BEGIN
268 
269 
270      IF NOT icx_sec.validatesession THEN
271        RETURN;
272      END IF;
273 
274      l_org_id := icx_sec.getID(icx_sec.PV_ORG_ID);
275      l_language := icx_sec.getID(icx_sec.PV_LANGUAGE_CODE);
276      l_script_name := owa_util.get_cgi_env('SCRIPT_NAME');
277      l_user_id := icx_sec.getID(icx_sec.PV_WEB_USER_ID);
278      l_session_id := icx_sec.getID(icx_sec.PV_SESSION_ID);
279      l_responsibility_id := icx_sec.getID(icx_sec.PV_RESPONSIBILITY_ID);
280 
281      fnd_client_info.set_org_context(l_org_id);
282 
283      htp.htmlOpen;
284      htp.linkRel('STYLESHEET', '/OA_HTML/US/POSSTYLE.css');
285 
286      htp.headOpen;
287 
288      htp.p('<script src="/OA_HTML/POSWUTIL.js"></script>');
289 
290      htp.p('<SCRIPT>
291            document.write("<title>" +
292            top.getTop().FND_MESSAGES["ICX_POS_ASN_SHIPMENT_DETAILS"] + "</title>")
293            </SCRIPT>');
294 
295      js.scriptOpen;
296 
297      js.scriptClose;
298 
299      htp.headClose;
300 
301      htp.p('<frameset cols="3,*,3" border=0 framespacing=0>');
302 
303        -- blue border frame
304        htp.p('<frame src="/OA_HTML/US/POSBLBOR.htm"
305                      name=borderLeft
306                      marginwidth=0
307                      frameborder=no
308                      scrolling=no>');
309 
310        -- new frameset
311        htp.p('<frameset rows="3,50,10,*,8,40" border=0 framespacing=0>');
312 
313          -- blue border frame
317          htp.p('       frameborder=no');
314          htp.p('<frame src="/OA_HTML/US/POSBLBOR.htm"');
315          htp.p('       name=borderTop');
316          htp.p('       marginwidth=0');
318          htp.p('       scrolling=no>');
319 
320          -- title bar and logo
321          htp.p('<frame src="' || l_script_name || '/pos_upper_banner_sv.ModalWindowTitle?p_title=ICX_POS_ASN_SHIPMENT_DETAILS"');
322          htp.p('       name=titlebar');
323          htp.p('       marginwidth=0');
324          htp.p('       frameborder=no');
325          htp.p('       scrolling=no>');
326 
327          -- upper banner with the curved edge
328          htp.p('<frame src="/OA_HTML/US/POSUPBAN.htm"');
329          --htp.p('<frame src="' || l_script_name || '/pos_upper_banner_sv.PaintUpperBanner"');
330          htp.p('       name=upperbanner');
331          htp.p('       marginwidth=0');
332          htp.p('       frameborder=no');
333          htp.p('       scrolling=no>');
334 
335 
336          -- content frame
337          htp.p('<frame src="' || l_script_name ||
338                  '/pos_asn_details_s.show_details?p_asn_line_id=' ||
339                  p_asn_line_id ||
340                  '&p_asn_line_split_id=' ||
341                  p_asn_line_split_id ||
342                  '&p_quantity=' ||
343                  p_quantity ||
344                  '&p_unit_of_measure=' ||
345                  p_unit_of_measure || '"');
346          htp.p('       name=content');
347          htp.p('       marginwidth=3');
348          htp.p('       frameborder=no');
349          htp.p('       scrolling=auto>');
350 
351          -- lower banner with curved edge
352          htp.p('<frame src="/OA_HTML/US/POSLWBAN.htm"');
353          --htp.p('<frame src="' || l_script_name || '/pos_lower_banner_sv.PaintLowerBanner"');
354          htp.p('       name=lowerbanner');
355          htp.p('       marginwidth=0');
356          htp.p('       marginheight=2');
357          htp.p('       frameborder=no');
358          htp.p('       scrolling=no>');
359 
360          -- lower button frame
361          htp.p('<frame src="' || l_script_name ||
362                '/pos_window_sv.buildbuttons?p_button1Name=ICX_POS_BTN_OK&p_button1Function=acceptShipmentDetails(top)&p_button2Name=&p_button2Function=&p_button3Name=ICX_POS_BTN_CANCEL&p_button3Function=cancelShipmentDetails(top)"');
363          htp.p('       name=controlregion');
364          htp.p('       marginwidth=0');
365          htp.p('       frameborder=no');
366          htp.p('       scrolling=no>');
367 
368        htp.p('</frameset>');
369 
370        -- blue border frame
371        htp.p('<frame src="/OA_HTML/US/POSBLBOR.htm"
372                      name=borderRight
373                      marginwidth=0
374                      frameborder=no
375                      scrolling=no>');
376 
377      htp.p('</frameset>');
378 
379 
380     htp.htmlClose;
381 
382   END ModalWindow;
383 
384 
385 END POS_WINDOW_SV;