| 62 |
rsolanki |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
2 |
<%
|
|
|
3 |
'=====================================================
|
|
|
4 |
'| |
|
|
|
5 |
'| Bom_Comparison |
|
|
|
6 |
'| |
|
|
|
7 |
'=====================================================
|
|
|
8 |
%>
|
|
|
9 |
<%
|
|
|
10 |
Option explicit
|
|
|
11 |
Response.Expires = 0
|
|
|
12 |
%>
|
|
|
13 |
<!--#include file="common/globals.asp"-->
|
|
|
14 |
<!--#include file="common/config.asp"-->
|
|
|
15 |
<!--#include file="common/common_subs.asp"-->
|
|
|
16 |
<!--#include file="common/_bom_common.asp"-->
|
|
|
17 |
<!--#include file="controls/ERGFormComponent/classFormComponent.asp"-->
|
|
|
18 |
<%
|
|
|
19 |
'------------ ACCESS CONTROL ------------------
|
|
|
20 |
%>
|
|
|
21 |
<!--#include file="_access_control_general.asp"-->
|
|
|
22 |
<%
|
|
|
23 |
'------------ VARIABLE DEFINITION -------------
|
|
|
24 |
Dim rsQry, rsTemp
|
|
|
25 |
Dim aProductList
|
|
|
26 |
Dim parProd_id_select
|
|
|
27 |
Dim parShowall
|
|
|
28 |
Dim numOfRows
|
|
|
29 |
Dim rowNum
|
|
|
30 |
Dim objFormCollector
|
|
|
31 |
Dim objFormComponent
|
|
|
32 |
Dim sMessage
|
|
|
33 |
Dim ProdId
|
|
|
34 |
Dim ChangeType
|
|
|
35 |
Dim PkgVersion, CurrentPkgVersion, IsDisplay, Comments
|
|
|
36 |
Dim PkgId, OldProdId, OsId
|
|
|
37 |
'------------ CONSTANTS DECLARATION -----------
|
|
|
38 |
Const LIMG_UPDATED = "<img src='icons/i_updated.gif' width='11' height='11' hspace='2' vspace='2' border='0' align='absmiddle' title='Updated'>"
|
|
|
39 |
Const LIMG_ADDED = "<img src='icons/i_added.gif' width='11' height='11' border='0' hspace='2' vspace='2' align='absmiddle' title='Added'>"
|
|
|
40 |
Const LIMG_REMOVED = "<img src='icons/i_removed.gif' width='11' height='11' border='0' hspace='2' vspace='2' align='absmiddle' title='Removed'>"
|
|
|
41 |
Const LIMG_NOTE_NEW = "<img src='icons/i_note_new.gif' width='18' height='18' border='0' align='absmiddle'>"
|
|
|
42 |
Const LIMG_NOTE_EDIT = "<img src='icons/i_note_edit.gif' width='18' height='18' border='0' align='absmiddle'>"
|
|
|
43 |
'------------ VARIABLE INIT -------------------
|
|
|
44 |
parProd_id_select = Request("prod_id_select")
|
|
|
45 |
parShowall = Request("showall")
|
|
|
46 |
Set objFormCollector = CreateObject("Scripting.Dictionary")
|
|
|
47 |
Set objFormComponent = New FormComponent
|
|
|
48 |
'------------ CONDITIONS ----------------------
|
|
|
49 |
'----------------------------------------------
|
|
|
50 |
%>
|
|
|
51 |
<%
|
|
|
52 |
'--------------------------------------------------------------------------------------------------------------------------
|
|
|
53 |
Function AddTrailingZeros(byval n, byval count)
|
|
|
54 |
if len(n) >= count then
|
|
|
55 |
AddTrailingZeros = n
|
|
|
56 |
exit function
|
|
|
57 |
end if
|
|
|
58 |
|
|
|
59 |
dim c, s, i
|
|
|
60 |
c = count - len(n)
|
|
|
61 |
|
|
|
62 |
for i = 1 to c
|
|
|
63 |
s = s & "0"
|
|
|
64 |
next
|
|
|
65 |
s = cstr(n) & s
|
|
|
66 |
|
|
|
67 |
AddTrailingZeros = s
|
|
|
68 |
End function
|
|
|
69 |
'--------------------------------------------------------------------------------------------------------------
|
|
|
70 |
Sub GetProductList ( nBom_id, nComparedBomId, outProductList, Flag )
|
|
|
71 |
Dim rsQry, query, showAll
|
|
|
72 |
|
|
|
73 |
'' Use SHOWALL parameter is BOM has old bom
|
|
|
74 |
'showAll = "Y"
|
|
|
75 |
'If nBom_id <> nComparedBomId Then
|
|
|
76 |
' showAll = parShowall
|
|
|
77 |
'End If
|
|
|
78 |
|
|
|
79 |
|
|
|
80 |
OraDatabase.Parameters.Add "BOM_ID", nBom_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
81 |
OraDatabase.Parameters.Add "COMPARE_BOM_ID", nComparedBomId, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
82 |
If Flag = "Less" Then
|
|
|
83 |
Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("OrigBomCompare.sql"), ORADYN_DEFAULT )
|
|
|
84 |
Else
|
|
|
85 |
Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("SameProducts.sql"), ORADYN_DEFAULT )
|
|
|
86 |
End If
|
|
|
87 |
If rsQry.RecordCount > 0 Then
|
|
|
88 |
outProductList = rsQry.GetRows()
|
|
|
89 |
Else
|
|
|
90 |
outProductList = NULL
|
|
|
91 |
End If
|
|
|
92 |
|
|
|
93 |
|
|
|
94 |
OraDatabase.Parameters.Remove "COMPARE_BOM_ID"
|
|
|
95 |
OraDatabase.Parameters.Remove "BOM_ID"
|
|
|
96 |
End Sub
|
|
|
97 |
'--------------------------------------------------------------------------------------------------------------------------
|
|
|
98 |
Sub GetFormDetails ( nBom_id, ByRef outobjDetails )
|
|
|
99 |
|
|
|
100 |
Call GetBomDetails ( nBom_id, outobjDetails )
|
|
|
101 |
|
|
|
102 |
outobjDetails.Item("root_version") = GetRootVersion ( outobjDetails.Item("bom_version") )
|
|
|
103 |
|
|
|
104 |
'-- Set compare_bom_id
|
|
|
105 |
If Request("compare_bom_id") <> "" Then
|
|
|
106 |
outobjDetails.Item("compare_bom_id") = Request("compare_bom_id")
|
|
|
107 |
Else
|
|
|
108 |
Dim rsQry, query, GetBomTree
|
|
|
109 |
|
|
|
110 |
OraDatabase.Parameters.Add "BRANCH_ID", objFormCollector.Item("rtag_id_fk"), ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
111 |
OraDatabase.Parameters.Add "COMPARE_BOM_ID", Request("bom_id"), ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
112 |
|
|
|
113 |
Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("ProductionTreeCombo_Selected.sql"), ORADYN_DEFAULT )
|
|
|
114 |
|
|
|
115 |
If rsQry.RecordCount > 0 Then
|
|
|
116 |
'While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
|
|
|
117 |
'If IsEmpty(GetBomTreeListMax) Then
|
|
|
118 |
GetBomTree = rsQry("bom_id")
|
|
|
119 |
|
|
|
120 |
'rsQry.MoveNext
|
|
|
121 |
'Wend
|
|
|
122 |
|
|
|
123 |
Else
|
|
|
124 |
GetBomTree = NULL
|
|
|
125 |
|
|
|
126 |
End If
|
|
|
127 |
|
|
|
128 |
|
|
|
129 |
OraDatabase.Parameters.Remove "BRANCH_ID"
|
|
|
130 |
OraDatabase.Parameters.Remove "COMPARE_BOM_ID"
|
|
|
131 |
|
|
|
132 |
|
|
|
133 |
rsQry.Close
|
|
|
134 |
Set rsQry = Nothing
|
|
|
135 |
|
|
|
136 |
outobjDetails.Item("compare_bom_id") = GetBomTree
|
|
|
137 |
End If
|
|
|
138 |
|
|
|
139 |
End Sub
|
|
|
140 |
'--------------------------------------------------------------------------------------------------------------
|
|
|
141 |
Sub GetBomTreeListMax
|
|
|
142 |
Dim rsQry, query, GetBomTree
|
|
|
143 |
|
|
|
144 |
OraDatabase.Parameters.Add "BRANCH_ID", objFormCollector.Item("rtag_id_fk"), ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
145 |
OraDatabase.Parameters.Add "COMPARE_BOM_ID", Request("bom_id"), ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
146 |
|
|
|
147 |
Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("ProductionTreeCombo_Selected.sql"), ORADYN_DEFAULT )
|
|
|
148 |
|
|
|
149 |
If rsQry.RecordCount > 0 Then
|
|
|
150 |
'While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
|
|
|
151 |
'If IsEmpty(GetBomTreeListMax) Then
|
|
|
152 |
GetBomTree = rsQry("bom_id")
|
|
|
153 |
|
|
|
154 |
'rsQry.MoveNext
|
|
|
155 |
'Wend
|
|
|
156 |
|
|
|
157 |
Else
|
|
|
158 |
GetBomTree = NULL
|
|
|
159 |
|
|
|
160 |
End If
|
|
|
161 |
|
|
|
162 |
|
|
|
163 |
OraDatabase.Parameters.Remove "BRANCH_ID"
|
|
|
164 |
OraDatabase.Parameters.Remove "COMPARE_BOM_ID"
|
|
|
165 |
|
|
|
166 |
|
|
|
167 |
rsQry.Close
|
|
|
168 |
Set rsQry = Nothing
|
|
|
169 |
End Sub
|
|
|
170 |
'--------------------------------------------------------------------------------------------------------------
|
|
|
171 |
Function GetBomTreeList ()
|
|
|
172 |
Dim rsQry, query
|
|
|
173 |
|
|
|
174 |
OraDatabase.Parameters.Add "BRANCH_ID", objFormCollector.Item("rtag_id_fk"), ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
175 |
OraDatabase.Parameters.Add "COMPARE_BOM_ID", Request("compare_bom_id"), ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
176 |
Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("ProductionTreeCombo_Selected.sql"), ORADYN_DEFAULT )
|
|
|
177 |
|
|
|
178 |
If rsQry.RecordCount > 0 Then
|
|
|
179 |
GetBomTreeList = rsQry.GetRows()
|
|
|
180 |
|
|
|
181 |
Else
|
|
|
182 |
GetBomTreeList = NULL
|
|
|
183 |
|
|
|
184 |
End If
|
|
|
185 |
|
|
|
186 |
|
|
|
187 |
OraDatabase.Parameters.Remove "BRANCH_ID"
|
|
|
188 |
OraDatabase.Parameters.Remove "COMPARE_BOM_ID"
|
|
|
189 |
|
|
|
190 |
|
|
|
191 |
rsQry.Close
|
|
|
192 |
Set rsQry = Nothing
|
|
|
193 |
End Function
|
|
|
194 |
'--------------------------------------------------------------------------------------------------------------
|
|
|
195 |
Function GetCompareBomDetails ( nBomId )
|
|
|
196 |
Dim rsQry, query
|
|
|
197 |
OraDatabase.Parameters.Add "BOM_ID", nBomId, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
198 |
|
|
|
199 |
Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("BomLocationDetails.sql"), ORADYN_DEFAULT )
|
|
|
200 |
|
|
|
201 |
If rsQry.RecordCount > 0 Then
|
|
|
202 |
GetCompareBomDetails = rsQry("proj_name") &" / "& rsQry("branch_name") &" / "& rsQry("bom_name") &" "& rsQry("bom_version") &"."& rsQry("bom_lifecycle")
|
|
|
203 |
|
|
|
204 |
Else
|
| 64 |
jtweddle |
205 |
GetCompareBomDetails = NULL
|
| 62 |
rsolanki |
206 |
|
|
|
207 |
End If
|
|
|
208 |
|
|
|
209 |
OraDatabase.Parameters.Remove "BOM_ID"
|
|
|
210 |
|
|
|
211 |
rsQry.Close
|
|
|
212 |
Set rsQry = Nothing
|
|
|
213 |
End Function
|
|
|
214 |
'--------------------------------------------------------------------------------------------------------------
|
|
|
215 |
%>
|
|
|
216 |
<%
|
|
|
217 |
'------------ RUN BEFORE PAGE RENDER ----------
|
|
|
218 |
objPMod.PersistInQryString ( Array("compare_bom_id") )
|
|
|
219 |
|
|
|
220 |
Call GetFormDetails ( dbPARbom_id, objFormCollector )
|
|
|
221 |
'----------------------------------------------
|
|
|
222 |
%>
|
|
|
223 |
<html>
|
|
|
224 |
<head>
|
|
|
225 |
<title>Production Manager</title>
|
|
|
226 |
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
|
|
227 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
|
228 |
<link href="scripts/deployment_manager.css" rel="stylesheet" type="text/css">
|
|
|
229 |
<script language="JavaScript" src="scripts/common.js"></script>
|
|
|
230 |
<script language="JavaScript" src="scripts/remote_scripting.js"></script>
|
|
|
231 |
<script language="JavaScript" type="text/javascript">
|
|
|
232 |
<!--
|
|
|
233 |
|
|
|
234 |
function RequestProductLocation( paramString, rowId ){
|
|
|
235 |
var requestURL;
|
|
|
236 |
|
|
|
237 |
// Product is changes, hence can be found in current bom
|
|
|
238 |
requestURL = 'RequestBomDiffProductLocation.asp';
|
|
|
239 |
|
|
|
240 |
|
|
|
241 |
// Show div
|
|
|
242 |
ToggleDisplay( 'PRODUCT_'+ rowId, 'IMG_EXPAND_PRODUCT_' + rowId, 'IMG_COLLAPSE_PRODUCT_' + rowId );
|
|
|
243 |
|
|
|
244 |
// Set ajax divname
|
|
|
245 |
ajaxdivname = 'PRODUCT_'+ rowId;
|
|
|
246 |
|
|
|
247 |
if ( MM_findObj( ajaxdivname ).innerHTML == '<%=enumLOADING%>')
|
|
|
248 |
{
|
|
|
249 |
|
|
|
250 |
//Append the name to search for to the requestURL
|
|
|
251 |
var url = requestURL + paramString;
|
|
|
252 |
|
|
|
253 |
//Create the xmlHttp object to use in the request
|
|
|
254 |
//stateChangeHandler will fire when the state has changed, i.e. data is received back
|
|
|
255 |
// This is non-blocking (asynchronous)
|
|
|
256 |
xmlHttp = GetXmlHttpObject(stateChangeHandler);
|
|
|
257 |
|
|
|
258 |
//Send the xmlHttp get to the specified url
|
|
|
259 |
xmlHttp_Get(xmlHttp, url);
|
|
|
260 |
|
|
|
261 |
}
|
|
|
262 |
|
|
|
263 |
|
|
|
264 |
}
|
|
|
265 |
|
|
|
266 |
function MM_findObj(n, d) { //v4.0
|
|
|
267 |
var p,i,x;
|
|
|
268 |
if(!d) d=document;
|
|
|
269 |
if((p=n.indexOf("?"))>0&&parent.frames.length) {
|
|
|
270 |
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);
|
|
|
271 |
}
|
|
|
272 |
if(!(x=d[n])&&d.all) x=d.all[n];
|
|
|
273 |
for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
|
|
|
274 |
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
|
|
|
275 |
if(!x && document.getElementById) x=document.getElementById(n);
|
|
|
276 |
return x;
|
|
|
277 |
}
|
|
|
278 |
|
|
|
279 |
function DisplaySPAN(show, x) {
|
|
|
280 |
if (show) {
|
|
|
281 |
MM_findObj("spanHideDetails" + x).style.display = "block";
|
|
|
282 |
MM_findObj("spanPkgInfo" + x).style.display = "block";
|
|
|
283 |
MM_findObj("spanShowDetails" + x).style.display = "none";
|
|
|
284 |
} else {
|
|
|
285 |
MM_findObj("spanHideDetails" + x).style.display = "none";
|
|
|
286 |
MM_findObj("spanPkgInfo" + x).style.display = "none";
|
|
|
287 |
MM_findObj("spanShowDetails" + x).style.display = "block";
|
|
|
288 |
}
|
|
|
289 |
}
|
|
|
290 |
|
|
|
291 |
|
|
|
292 |
|
|
|
293 |
//-->
|
|
|
294 |
</script>
|
|
|
295 |
|
|
|
296 |
|
|
|
297 |
|
|
|
298 |
|
|
|
299 |
</head>
|
|
|
300 |
|
|
|
301 |
<body leftmargin="0" topmargin="0">
|
|
|
302 |
<!-- HEADER ++++++++++++++++ -->
|
|
|
303 |
<!--#include file="_header.asp"-->
|
|
|
304 |
<!-- +++++++++++++++++++++++ -->
|
|
|
305 |
<!-- MAIN MENU + CRUMBS ++++++++++++++++ -->
|
|
|
306 |
<!--#include file="_main_menu.asp"-->
|
|
|
307 |
<!-- +++++++++++++++++++++++++++++++++++++ -->
|
|
|
308 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
309 |
<tr>
|
|
|
310 |
<td width="1%" valign="top" background="images/bg_bage_0.gif">
|
|
|
311 |
<!-- NODE BROWSER ++++++++++++++++++++++ -->
|
|
|
312 |
<!--#include file="_bom_browser.asp"-->
|
|
|
313 |
<!-- END OF NODE BROWSER +++++++++++++++ -->
|
|
|
314 |
</td>
|
|
|
315 |
<td width="1" background="images/bg_bage_1.gif"><img src="images/spacer.gif" width="1" height="600"></td>
|
|
|
316 |
<td width="100%" valign="top" bgcolor="#FFFFFF">
|
|
|
317 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
318 |
<tr>
|
|
|
319 |
<td valign="top" background="images/bg_green.gif"></td>
|
| 64 |
jtweddle |
320 |
<td align="right" valign="bottom" background="images/bg_green.gif" class="body_txtw"><%Call RenderTitleWithoutVersion( objBomCollector )%></td>
|
| 62 |
rsolanki |
321 |
<td background="images/bg_green.gif"><img src="images/spacer.gif" width="10" height="20"></td>
|
|
|
322 |
</tr>
|
|
|
323 |
<tr>
|
|
|
324 |
<td width="1%" valign="top" background="images/bg_green.gif"></td>
|
|
|
325 |
<td width="100%" valign="bottom" background="images/bg_green.gif">
|
|
|
326 |
<!-- TAB CONTROLS ++++++++++++++++++++++ -->
|
|
|
327 |
<!--#include file="_tabs_definition.asp"-->
|
|
|
328 |
<%
|
|
|
329 |
Set objTabControl = New TabControl
|
|
|
330 |
objTabControl.TemplateDoc = ReadFile( Server.MapPath("controls/ERGTabStyleWinXP/tab_style.html") ) ' Supply tab style definition
|
|
|
331 |
objTabControl.TabStyle = "StyleWinXP"
|
|
|
332 |
objTabControl.AddTabDefnition ( arrBomTabDef )
|
|
|
333 |
objTabControl.SelectByName("BOM Comparison")
|
|
|
334 |
objTabControl.Render ()
|
|
|
335 |
%>
|
|
|
336 |
<!-- END OF TAB CONTROLS +++++++++++++++ -->
|
|
|
337 |
</td>
|
|
|
338 |
<td width="1%" background="images/bg_green.gif"><img src="images/spacer.gif" width="10" height="35"></td>
|
|
|
339 |
</tr>
|
|
|
340 |
<tr>
|
|
|
341 |
<td background="images/bg_bage_0.gif"><img src="images/spacer.gif" width="30" height="10"></td>
|
|
|
342 |
<td background="images/bg_bage_0.gif">
|
|
|
343 |
<!-- BUTTONS CONTROL +++++++++++++++++++ -->
|
|
|
344 |
|
|
|
345 |
<!-- +++++++++++++++++++++++++++++++++++ -->
|
|
|
346 |
</td>
|
|
|
347 |
<td background="images/bg_green.gif"><img src="images/p_bar_corrner.gif" width="17" height="42"></td>
|
|
|
348 |
</tr>
|
|
|
349 |
<tr>
|
|
|
350 |
<td> </td>
|
|
|
351 |
<td> </td>
|
|
|
352 |
<td valign="top"><%If Request.Cookies( enumCOOKIE_NAME )( "user_bar" ) = "hide" Then%><a href="<%=SCRIPT_NAME%>?user_bar=<%=enumDEFAULT%>&<%=objPMod.ComposeURL()%>"><img src="icons/b_left.gif" title="Maximize favourits" width="13" height="13" vspace="5" border="0"></a><%End If%></td>
|
|
|
353 |
</tr>
|
|
|
354 |
</table>
|
|
|
355 |
|
|
|
356 |
<!-- PRODUCT REJECTED ------------------------------------------------------------------------------------------ -->
|
|
|
357 |
<%If objBomCollector.Item ("is_rejected") = enumDB_YES Then%>
|
|
|
358 |
<table width="100%" border="0" cellspacing="10" cellpadding="0">
|
|
|
359 |
<tr>
|
|
|
360 |
<td>
|
|
|
361 |
<%
|
|
|
362 |
OraDatabase.Parameters.Add "ENTITY_ID", dbPARbom_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
363 |
OraDatabase.Parameters.Add "ENUM_ENTITY_TYPE", "enumENTITY_TYPE_BOM", ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
364 |
|
|
|
365 |
Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("RejectionTrail.sql"), ORADYN_DEFAULT )
|
|
|
366 |
|
|
|
367 |
|
|
|
368 |
sMessage = "<table width='100%' border='0' cellspacing='3' cellpadding='0'>"
|
|
|
369 |
sMessage = sMessage &"<tr>"
|
|
|
370 |
sMessage = sMessage &"<td width='100%' class='body_txt'><b>BOM is REJECTED!</b><br><br><br></td>"
|
|
|
371 |
sMessage = sMessage &"<td width='1%' nowrap valign='bottom' align='right'><a href='javascript:;' onClick=""MM_openBrWindow('wBomRejectNote.asp?rfile="& SCRIPT_NAME &"&"& objPMod.ComposeURL() &"','BomRejectNote','scrollbars=yes,resizable=yes,width=600,height=350');"" class='body_smllink' title='Create new note'>Create Note"& LIMG_NOTE_NEW &"</a></td>"
|
|
|
372 |
sMessage = sMessage &"</tr>"
|
|
|
373 |
|
|
|
374 |
While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
|
|
|
375 |
sMessage = sMessage & "<tr><td colspan='2' background='images/bg_table_border.gif'><img src='images/spacer.gif' width='1' height='1'></td></tr>"
|
|
|
376 |
sMessage = sMessage &"<tr>"
|
|
|
377 |
sMessage = sMessage &"<td class='body_txt'>"
|
|
|
378 |
If rsQry("is_rejected") = enumDB_YES Then
|
|
|
379 |
sMessage = sMessage &"BOM is REJECTED!<br>"
|
|
|
380 |
Else
|
|
|
381 |
sMessage = sMessage &"BOM is Accepted!<br>"
|
|
|
382 |
End If
|
|
|
383 |
sMessage = sMessage & objFormater.TextToHTML( rsQry("comments") ) &"<br><SPAN class='body_smltxtg'>"& rsQry("creator") &"</SPAN></td>"
|
|
|
384 |
sMessage = sMessage &"<td nowrap valign='bottom' align='right'><a href='javascript:;' onClick=""MM_openBrWindow('wBomRejectNote.asp?reject_seq="& rsQry("reject_seq") &"&rfile="& SCRIPT_NAME &"&"& objPMod.ComposeURL() &"','BomRejectNote','scrollbars=yes,resizable=yes,width=600,height=350');"" class='body_smllink' title='Edit note'>Edit Note"& LIMG_NOTE_EDIT &"</a></td>"
|
|
|
385 |
sMessage = sMessage &"</tr>"
|
|
|
386 |
|
|
|
387 |
rsQry.MoveNext
|
|
|
388 |
WEnd
|
|
|
389 |
rsQry.Close
|
|
|
390 |
|
|
|
391 |
sMessage = sMessage &"</table>"
|
|
|
392 |
|
|
|
393 |
Call Messenger ( sMessage, "bi_rejected.gif", "100%" )
|
|
|
394 |
|
|
|
395 |
Response.write "<br>"
|
|
|
396 |
|
|
|
397 |
|
|
|
398 |
OraDatabase.Parameters.Remove "ENTITY_ID"
|
|
|
399 |
OraDatabase.Parameters.Remove "ENUM_ENTITY_TYPE"
|
|
|
400 |
%>
|
|
|
401 |
|
|
|
402 |
</td>
|
|
|
403 |
</tr>
|
|
|
404 |
</table>
|
|
|
405 |
<%End If%>
|
|
|
406 |
<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
407 |
|
|
|
408 |
|
|
|
409 |
<table width="100%" border="0" cellspacing="10" cellpadding="0">
|
|
|
410 |
|
|
|
411 |
<tr>
|
|
|
412 |
<td width="1"><img src="images/spacer.gif" width="1" height="1"></td>
|
|
|
413 |
<td width="100%"><img src="images/spacer.gif" width="1" height="1"></td>
|
|
|
414 |
</tr>
|
|
|
415 |
|
|
|
416 |
<!-- BOM Comments +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
417 |
<%If (objBomCollector.Item("bom_comments") <> "") Then%>
|
|
|
418 |
<tr>
|
|
|
419 |
<td align="right" valign="top"><img src="icons/i_bom_properties.gif" width="30" height="30" hspace="3"></td>
|
|
|
420 |
<td valign="top" class="body_txt">
|
|
|
421 |
|
|
|
422 |
|
|
|
423 |
<SPAN class="body_colb">BOM Comments</SPAN>
|
|
|
424 |
<hr width="100%" size="1px" noshade color="#808080">
|
|
|
425 |
<SPAN class="body_txt"><%= objFormater.TextToHTML( objBomCollector.Item("bom_comments") )%></SPAN><br><br><br><br>
|
|
|
426 |
</td>
|
|
|
427 |
</tr>
|
|
|
428 |
<%End If%>
|
|
|
429 |
|
|
|
430 |
|
|
|
431 |
<!-- COMPARE BOM +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
432 |
<tr>
|
|
|
433 |
<td align="right" valign="top"><img src="icons/i_bom_diff.gif" width="37" height="33" hspace="3"></td>
|
|
|
434 |
<td valign="top" class="body_txt">
|
|
|
435 |
|
|
|
436 |
<%
|
|
|
437 |
'-- FROM START --------------------------------------------------------------------------------------------------------------
|
|
|
438 |
objFormComponent.FormName = "OldVersion"
|
|
|
439 |
objFormComponent.Action = SCRIPT_NAME
|
|
|
440 |
objFormComponent.Method = "get"
|
|
|
441 |
Call objFormComponent.FormStart()
|
|
|
442 |
%>
|
|
|
443 |
<SPAN class="body_colb"><%Call RenderTitle( objBomCollector )%><br>compared with <%= GetCompareBomDetails( objFormCollector.Item("compare_bom_id") ) %></SPAN><br>
|
|
|
444 |
<hr width="100%" size="1px" noshade color="#808080"><br>
|
|
|
445 |
|
|
|
446 |
<SPAN class="body_txt">Show changes since BOM version </SPAN>
|
|
|
447 |
<%=objFormComponent.Combo ( "compare_bom_id", GetBomTreeList(), False, "class='form_ivalue'" )%>
|
|
|
448 |
<%=objPMod.ComposeHiddenTagsWithout("compare_bom_id")%>
|
|
|
449 |
<%=objFormComponent.SubmitButton ( "Compare", "class='form_btn'" )%><br><br>
|
|
|
450 |
|
|
|
451 |
<SPAN class="body_txtr"><b>Products/Patches Existing in <%= GetCompareBomDetails( objFormCollector.Item("compare_bom_id") ) %> but not yet deployed in Production BOM</b></SPAN><br>
|
|
|
452 |
<SPAN id="spanShowDetails1" name="spanShowDetails" class="body_rowlite"><a href="javascript:;" class="body_rowlite" onClick="DisplaySPAN(true,'1');"><b>Display...</b></a><br><br></SPAN>
|
|
|
453 |
<SPAN id="spanHideDetails1" name="spanHideDetails" style="display:none;"><a href="javascript:;" class="body_rowlite" onClick="DisplaySPAN(false,'1');"><b>Hide...</b></a><br><br></SPAN>
|
|
|
454 |
|
|
|
455 |
|
|
|
456 |
|
|
|
457 |
<SPAN id="spanPkgInfo1" name="spanPkgInfo" style="display:none;">
|
|
|
458 |
<table width="100%" border="0" cellspacing="2" cellpadding="0">
|
|
|
459 |
<tr>
|
|
|
460 |
|
|
|
461 |
<td width="20%" background="images/bg_table_border.gif"><table width="100%" border="0" cellspacing="1" cellpadding="2">
|
|
|
462 |
<tr>
|
|
|
463 |
<td align="left" nowrap background="images/bg_table_col.gif" class="body_col">Product</td>
|
|
|
464 |
</tr>
|
|
|
465 |
</table></td>
|
|
|
466 |
<td width="20%" nowrap align="left" background="images/bg_table_col.gif" class="body_col">Version</td>
|
|
|
467 |
<td width="60%" nowrap align="left" background="images/bg_table_col.gif" class="body_col">Comments</td>
|
|
|
468 |
<td width="60%" nowrap align="left" background="images/bg_table_col.gif" class="body_col">Approval</td>
|
|
|
469 |
</tr>
|
|
|
470 |
<%
|
|
|
471 |
Call GetProductList ( dbPARbom_id, objFormCollector.Item("compare_bom_id"), aProductList, "Less" )
|
|
|
472 |
|
|
|
473 |
If NOT IsNull( aProductList ) Then
|
|
|
474 |
numOfRows = UBound( aProductList, 2 )
|
|
|
475 |
|
|
|
476 |
For rowNum = 0 To numOfRows
|
|
|
477 |
|
|
|
478 |
ProdId = aProductList( 0, rowNum )
|
|
|
479 |
ChangeType = aProductList( 3, rowNum )
|
|
|
480 |
PkgVersion = aProductList( 2, rowNum )
|
|
|
481 |
PkgId = aProductList( 6, rowNum )
|
|
|
482 |
If ChangeType = "A" or ChangeType = "U" Then
|
|
|
483 |
|
|
|
484 |
|
|
|
485 |
OraDatabase.Parameters.Add "PRODUCTION_BOM", dbPARbom_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
486 |
OraDatabase.Parameters.Add "PKG_ID", PkgId, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
487 |
|
|
|
488 |
Set rsQry = OraDatabase.DbCreateDynaset(GetQuery("ProdVersion.sql"), ORADYN_DEFAULT)
|
|
|
489 |
|
|
|
490 |
OldProdId = rsQry("prod_id")
|
|
|
491 |
CurrentPkgVersion = rsQry("pkg_version")
|
|
|
492 |
Comments = rsQry("comments")
|
|
|
493 |
|
|
|
494 |
OraDatabase.Parameters.Remove "PRODUCTION_BOM"
|
|
|
495 |
OraDatabase.Parameters.Remove "PKG_ID"
|
|
|
496 |
IsDisplay = True
|
|
|
497 |
|
|
|
498 |
Dim MajorA, MajorB, MinorA, MinorB, PatchA, PatchB, pos
|
|
|
499 |
MajorA = NULL
|
|
|
500 |
MajorB = NULL
|
|
|
501 |
MinorA = NULL
|
|
|
502 |
MinorB = NULL
|
|
|
503 |
PatchA = NULL
|
|
|
504 |
PatchB = NULL
|
|
|
505 |
|
|
|
506 |
' Find the first occurence of the dot in package version A
|
|
|
507 |
pos = InStr(PkgVersion, ".")
|
|
|
508 |
If pos <> 0 Then
|
|
|
509 |
' Extract the Major Version for A
|
|
|
510 |
MajorA = Mid(PkgVersion, 1, pos - 1)
|
|
|
511 |
' Delete the Major Version Value from the string to get the minor and patch version
|
|
|
512 |
PkgVersion = Mid(PkgVersion, pos + 1, Len(PkgVersion))
|
|
|
513 |
' Find the second occurence of the dot in package version A
|
|
|
514 |
pos = InStr(PkgVersion, ".")
|
|
|
515 |
' Extract the Minor Version for A
|
|
|
516 |
If pos <> 0 Then
|
|
|
517 |
MinorA = Mid(PkgVersion, 1, pos - 1)
|
|
|
518 |
' Delete the Minor Version value from the string to get the patch version
|
|
|
519 |
PkgVersion = Mid(PkgVersion, pos + 1, Len(PkgVersion))
|
|
|
520 |
' Find the last occurence of the dot in package version A
|
|
|
521 |
pos = InStr(PkgVersion, ".")
|
|
|
522 |
If pos <> 0 Then
|
|
|
523 |
' Extract the Patch Version for A
|
|
|
524 |
PatchA = Mid(PkgVersion, 1, pos - 1)
|
|
|
525 |
End If
|
|
|
526 |
End If
|
|
|
527 |
End If
|
|
|
528 |
|
|
|
529 |
' Find the first occurence of the dot in package version B
|
|
|
530 |
pos = InStr(CurrentPkgVersion, ".")
|
|
|
531 |
If pos <> 0 Then
|
|
|
532 |
' Extract the Major Version for B
|
|
|
533 |
MajorB = Mid(CurrentPkgVersion, 1, pos - 1)
|
|
|
534 |
' Delete the Major Version Value from the string to get the minor and patch version
|
|
|
535 |
CurrentPkgVersion = Mid(CurrentPkgVersion, pos + 1, Len(CurrentPkgVersion))
|
|
|
536 |
' Find the second occurence of the dot in package version B
|
|
|
537 |
pos = InStr(CurrentPkgVersion, ".")
|
|
|
538 |
' Extract the Minor Version for B
|
|
|
539 |
If pos <> 0 Then
|
|
|
540 |
MinorB = Mid(CurrentPkgVersion, 1, pos - 1)
|
|
|
541 |
' Delete the Minor Version value from the string to get the patch version
|
|
|
542 |
CurrentPkgVersion = Mid(CurrentPkgVersion, pos + 1, Len(CurrentPkgVersion))
|
|
|
543 |
' Find the last occurence of the dot in package version B
|
|
|
544 |
pos = InStr(CurrentPkgVersion, ".")
|
|
|
545 |
If pos <> 0 Then
|
|
|
546 |
' Extract the Patch Version for B
|
|
|
547 |
PatchB = Mid(CurrentPkgVersion, 1, pos - 1)
|
|
|
548 |
End If
|
|
|
549 |
End If
|
|
|
550 |
End If
|
|
|
551 |
|
|
|
552 |
If NOT isNull(PatchA) AND NOT isNull(PatchB) Then
|
|
|
553 |
If len(PatchA) < 4 Then PatchA = AddTrailingZeros(PatchA, 4)
|
|
|
554 |
If len(PatchB) < 4 Then PatchB = AddTrailingZeros(PatchB, 4)
|
|
|
555 |
End If
|
|
|
556 |
|
|
|
557 |
If MajorA = MajorB Then
|
|
|
558 |
If MinorA = MinorB Then
|
|
|
559 |
If IsNumeric(PatchA) AND IsNumeric(PatchB) Then
|
|
|
560 |
|
|
|
561 |
If CDbl(PatchB) > CDbl(PatchA) Then
|
|
|
562 |
IsDisplay = False
|
|
|
563 |
Else
|
|
|
564 |
IsDisplay = True
|
|
|
565 |
End If
|
|
|
566 |
End If
|
|
|
567 |
Else
|
|
|
568 |
If IsNumeric(MinorA) AND IsNumeric(MinorB) Then
|
|
|
569 |
If CInt(MinorB) > CInt(MinorA) Then
|
|
|
570 |
IsDisplay = False
|
|
|
571 |
Else
|
|
|
572 |
IsDisplay = True
|
|
|
573 |
End If
|
|
|
574 |
End If
|
|
|
575 |
End If
|
|
|
576 |
Else
|
|
|
577 |
If IsNumeric(MajorA) AND IsNumeric(MajorB) Then
|
|
|
578 |
If CInt(MajorB) > CInt(MajorA) Then
|
|
|
579 |
IsDisplay = False
|
|
|
580 |
Else
|
|
|
581 |
IsDisplay = True
|
|
|
582 |
End If
|
|
|
583 |
End If
|
|
|
584 |
End If
|
|
|
585 |
|
|
|
586 |
If IsDisplay Then
|
|
|
587 |
%>
|
|
|
588 |
<tr>
|
|
|
589 |
<td nowrap valign="top" class="menu_link">
|
|
|
590 |
<%
|
|
|
591 |
|
|
|
592 |
Set rsTemp = OraDatabase.DbCreateDynaset("SELECT * FROM PACKAGE_VERSIONS PV, PRODUCT_DETAILS PD WHERE PD.PROD_ID(+) = PV.PV_ID AND PV.PV_ID ="&ProdId, ORADYN_DEFAULT )
|
|
|
593 |
%>
|
|
|
594 |
<%=GetProductIcon( rsTemp ) & aProductList( 1, rowNum )%>
|
|
|
595 |
<%
|
|
|
596 |
rsTemp.Close()
|
|
|
597 |
Set rsTemp = nothing
|
|
|
598 |
%>
|
|
|
599 |
</td>
|
|
|
600 |
<td nowrap class="body_row" valign="top"><%=aProductList( 2, rowNum )%></td>
|
|
|
601 |
<td class="body_rowlite"><%=Comments%></td>
|
|
|
602 |
<%
|
|
|
603 |
Dim rsForm
|
|
|
604 |
Set rsForm = OraDatabase.DbCreateDynaset("SELECT * FROM RELEASE_AUTHORISATION WHERE PV_ID="&ProdId&" AND BOM_ID="&Request("bom_id"), ORADYN_DEFAULT)
|
|
|
605 |
|
|
|
606 |
%>
|
|
|
607 |
<%If rsForm.RecordCount = 0 Then%>
|
|
|
608 |
|
|
|
609 |
<td class="body_txtr">Awaiting Approval</td>
|
|
|
610 |
|
|
|
611 |
<%ElseIf IsNull(rsForm("is_official")) Then%>
|
|
|
612 |
|
|
|
613 |
<%If NOT IsNull(rsForm("tester_id"))Then%>
|
|
|
614 |
<td class="body_txto">Tester Approved</td>
|
|
|
615 |
<%End If%>
|
|
|
616 |
<%Else%>
|
|
|
617 |
<td class="body_txtg">Approved</td>
|
|
|
618 |
<%End If
|
|
|
619 |
|
|
|
620 |
rsForm.Close()
|
|
|
621 |
Set rsForm = nothing
|
|
|
622 |
%>
|
|
|
623 |
</tr>
|
|
|
624 |
|
|
|
625 |
<tr>
|
|
|
626 |
<td><img src="images/spacer.gif" width="1" height="1"></td>
|
|
|
627 |
<td nowrap valign="top" class="body_row" colspan="3">
|
|
|
628 |
<DIV id="PRODUCT_<%=ProdId & ChangeType%>" name="PRODUCT_<%=ProdId & ChangeType%>" style="display:none;"><%=enumLOADING%></DIV>
|
|
|
629 |
</td>
|
|
|
630 |
</tr>
|
|
|
631 |
|
|
|
632 |
<%If rowNum <> numOfRows Then%>
|
|
|
633 |
<tr>
|
|
|
634 |
<td colspan="4" background="images/bg_table_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
|
|
|
635 |
</tr>
|
|
|
636 |
<%End If%>
|
|
|
637 |
|
|
|
638 |
<%End If%>
|
|
|
639 |
<%
|
|
|
640 |
rsQry.Close()
|
|
|
641 |
Set rsQry = Nothing
|
|
|
642 |
End If
|
|
|
643 |
|
|
|
644 |
Next
|
|
|
645 |
Else%>
|
|
|
646 |
|
|
|
647 |
<tr>
|
|
|
648 |
<td colspan="4" class="body_txt">No Changes Found.</td>
|
|
|
649 |
</tr>
|
|
|
650 |
|
|
|
651 |
<%End If%>
|
|
|
652 |
</table>
|
|
|
653 |
<br>
|
|
|
654 |
<br>
|
|
|
655 |
</SPAN>
|
|
|
656 |
|
|
|
657 |
<SPAN class="body_txtr"><b>Products/Patches Existing in <%= GetCompareBomDetails( objFormCollector.Item("compare_bom_id") ) %> And Production BOM</b></SPAN><br>
|
|
|
658 |
<SPAN id="spanShowDetails2" name="spanShowDetails" class="body_rowlite"><a href="javascript:;" class="body_rowlite" onClick="DisplaySPAN(true,'2');"><b>Display...</b></a><br><br></SPAN>
|
|
|
659 |
<SPAN id="spanHideDetails2" name="spanHideDetails" style="display:none;"><a href="javascript:;" class="body_rowlite" onClick="DisplaySPAN(false,'2');"><b>Hide...</b></a><br><br></SPAN>
|
|
|
660 |
|
|
|
661 |
<SPAN id="spanPkgInfo2" name="spanPkgInfo" style="display:none;">
|
|
|
662 |
|
|
|
663 |
<table width="100%" border="0" cellspacing="2" cellpadding="0">
|
|
|
664 |
|
|
|
665 |
<tr>
|
|
|
666 |
|
|
|
667 |
<td width="20%" background="images/bg_table_border.gif"><table width="100%" border="0" cellspacing="1" cellpadding="2">
|
|
|
668 |
<tr>
|
|
|
669 |
<td align="left" nowrap background="images/bg_table_col.gif" class="body_col">Product</td>
|
|
|
670 |
</tr>
|
|
|
671 |
</table></td>
|
|
|
672 |
<td width="20%" nowrap align="left" background="images/bg_table_col.gif" class="body_col">Version</td>
|
|
|
673 |
<td width="60%" nowrap align="left" background="images/bg_table_col.gif" class="body_col"></td>
|
|
|
674 |
</tr>
|
|
|
675 |
<%
|
|
|
676 |
Call GetProductList ( dbPARbom_id, objFormCollector.Item("compare_bom_id"), aProductList, "Equal" )
|
|
|
677 |
|
|
|
678 |
If NOT IsNull( aProductList ) Then'2
|
|
|
679 |
numOfRows = UBound( aProductList, 2 )
|
|
|
680 |
|
|
|
681 |
For rowNum = 0 To numOfRows
|
|
|
682 |
|
|
|
683 |
ProdId = aProductList( 0, rowNum )
|
|
|
684 |
|
|
|
685 |
PkgVersion = aProductList( 1, rowNum )
|
|
|
686 |
PkgId = aProductList( 2, rowNum )
|
|
|
687 |
|
|
|
688 |
%>
|
|
|
689 |
<tr>
|
|
|
690 |
<td nowrap valign="top" class="menu_link">
|
|
|
691 |
<%
|
|
|
692 |
|
|
|
693 |
Set rsTemp = OraDatabase.DbCreateDynaset("SELECT * FROM PACKAGE_VERSIONS PV, PRODUCT_DETAILS PD WHERE PD.PROD_ID(+) = PV.PV_ID AND PV.PV_ID ="&ProdId, ORADYN_DEFAULT )
|
|
|
694 |
%>
|
|
|
695 |
<%=GetProductIcon( rsTemp ) & aProductList( 3, rowNum )%>
|
|
|
696 |
<%
|
|
|
697 |
rsTemp.Close()
|
|
|
698 |
Set rsTemp = nothing
|
|
|
699 |
%>
|
|
|
700 |
</td>
|
|
|
701 |
<td nowrap class="body_row" valign="top"><%=aProductList( 1, rowNum )%></td>
|
|
|
702 |
<td class="body_rowlite"></td>
|
|
|
703 |
</tr>
|
|
|
704 |
|
|
|
705 |
<tr>
|
|
|
706 |
<td><img src="images/spacer.gif" width="1" height="1"></td>
|
|
|
707 |
<td nowrap valign="top" class="body_row" colspan="3">
|
|
|
708 |
<DIV id="PRODUCT_<%=ProdId & ChangeType%>" name="PRODUCT_<%=ProdId & ChangeType%>" style="display:none;"><%=enumLOADING%></DIV>
|
|
|
709 |
</td>
|
|
|
710 |
</tr>
|
|
|
711 |
|
|
|
712 |
<%If rowNum <> numOfRows Then'1%>
|
|
|
713 |
<tr>
|
|
|
714 |
<td colspan="4" background="images/bg_table_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
|
|
|
715 |
</tr>
|
|
|
716 |
<%End If'1%>
|
|
|
717 |
|
|
|
718 |
|
|
|
719 |
<%
|
|
|
720 |
|
|
|
721 |
|
|
|
722 |
|
|
|
723 |
Next
|
|
|
724 |
Else%>
|
|
|
725 |
|
|
|
726 |
<tr>
|
|
|
727 |
<td colspan="4" class="body_txt">No Changes Found.</td>
|
|
|
728 |
</tr>
|
|
|
729 |
|
|
|
730 |
<%End If'2%>
|
|
|
731 |
</table>
|
|
|
732 |
<br>
|
|
|
733 |
<br>
|
|
|
734 |
</SPAN>
|
|
|
735 |
|
|
|
736 |
<SPAN class="body_txtr"><b>Products/Patches Existing in <%= GetCompareBomDetails( objFormCollector.Item("compare_bom_id") ) %> but Superceeded in Production BOM</b></SPAN><br>
|
|
|
737 |
<SPAN id="spanShowDetails3" name="spanShowDetails" class="body_rowlite"><a href="javascript:;" class="body_rowlite" onClick="DisplaySPAN(true,'3');"><b>Display...</b></a><br><br></SPAN>
|
|
|
738 |
<SPAN id="spanHideDetails3" name="spanHideDetails" style="display:none;"><a href="javascript:;" class="body_rowlite" onClick="DisplaySPAN(false,'3');"><b>Hide...</b></a><br><br></SPAN>
|
|
|
739 |
|
|
|
740 |
<SPAN id="spanPkgInfo3" name="spanPkgInfo" style="display:none;">
|
|
|
741 |
|
|
|
742 |
<table width="100%" border="0" cellspacing="2" cellpadding="0">
|
|
|
743 |
|
|
|
744 |
|
|
|
745 |
<tr>
|
|
|
746 |
|
|
|
747 |
<td width="20%" background="images/bg_table_border.gif"><table width="100%" border="0" cellspacing="1" cellpadding="2">
|
|
|
748 |
<tr>
|
|
|
749 |
<td align="left" nowrap background="images/bg_table_col.gif" class="body_col">Product</td>
|
|
|
750 |
</tr>
|
|
|
751 |
</table></td>
|
|
|
752 |
<td width="20%" nowrap align="left" background="images/bg_table_col.gif" class="body_col">Version</td>
|
|
|
753 |
<td width="60%" nowrap align="left" background="images/bg_table_col.gif" class="body_col"></td>
|
|
|
754 |
</tr>
|
|
|
755 |
<%
|
|
|
756 |
Call GetProductList ( dbPARbom_id, objFormCollector.Item("compare_bom_id"), aProductList, "Less" )
|
|
|
757 |
|
|
|
758 |
If NOT IsNull( aProductList ) Then
|
|
|
759 |
numOfRows = UBound( aProductList, 2 )
|
|
|
760 |
|
|
|
761 |
For rowNum = 0 To numOfRows
|
|
|
762 |
|
|
|
763 |
ProdId = aProductList( 0, rowNum )
|
|
|
764 |
ChangeType = aProductList( 3, rowNum )
|
|
|
765 |
PkgVersion = aProductList( 2, rowNum )
|
|
|
766 |
PkgId = aProductList( 6, rowNum )
|
|
|
767 |
If ChangeType = "A" or ChangeType = "U" Then
|
|
|
768 |
|
|
|
769 |
|
|
|
770 |
|
|
|
771 |
OraDatabase.Parameters.Add "PRODUCTION_BOM", dbPARbom_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
772 |
OraDatabase.Parameters.Add "PKG_ID", PkgId, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
773 |
|
|
|
774 |
Set rsQry = OraDatabase.DbCreateDynaset(GetQuery("ProdVersion.sql"), ORADYN_DEFAULT)
|
|
|
775 |
|
|
|
776 |
OldProdId = rsQry("prod_id")
|
|
|
777 |
CurrentPkgVersion = rsQry("pkg_version")
|
|
|
778 |
Comments = rsQry("comments")
|
|
|
779 |
|
|
|
780 |
OraDatabase.Parameters.Remove "PRODUCTION_BOM"
|
|
|
781 |
OraDatabase.Parameters.Remove "PKG_ID"
|
|
|
782 |
IsDisplay = True
|
|
|
783 |
|
|
|
784 |
MajorA = NULL
|
|
|
785 |
MajorB = NULL
|
|
|
786 |
MinorA = NULL
|
|
|
787 |
MinorB = NULL
|
|
|
788 |
PatchA = NULL
|
|
|
789 |
PatchB = NULL
|
|
|
790 |
|
|
|
791 |
' Find the first occurence of the dot in package version A
|
|
|
792 |
pos = InStr(PkgVersion, ".")
|
|
|
793 |
If pos <> 0 Then
|
|
|
794 |
' Extract the Major Version for A
|
|
|
795 |
MajorA = Mid(PkgVersion, 1, pos - 1)
|
|
|
796 |
' Delete the Major Version Value from the string to get the minor and patch version
|
|
|
797 |
PkgVersion = Mid(PkgVersion, pos + 1, Len(PkgVersion))
|
|
|
798 |
' Find the second occurence of the dot in package version A
|
|
|
799 |
pos = InStr(PkgVersion, ".")
|
|
|
800 |
' Extract the Minor Version for A
|
|
|
801 |
If pos <> 0 Then
|
|
|
802 |
MinorA = Mid(PkgVersion, 1, pos - 1)
|
|
|
803 |
' Delete the Minor Version value from the string to get the patch version
|
|
|
804 |
PkgVersion = Mid(PkgVersion, pos + 1, Len(PkgVersion))
|
|
|
805 |
' Find the last occurence of the dot in package version A
|
|
|
806 |
pos = InStr(PkgVersion, ".")
|
|
|
807 |
If pos <> 0 Then
|
|
|
808 |
' Extract the Patch Version for A
|
|
|
809 |
PatchA = Mid(PkgVersion, 1, pos - 1)
|
|
|
810 |
End If
|
|
|
811 |
End If
|
|
|
812 |
End If
|
|
|
813 |
|
|
|
814 |
' Find the first occurence of the dot in package version B
|
|
|
815 |
pos = InStr(CurrentPkgVersion, ".")
|
|
|
816 |
If pos <> 0 Then
|
|
|
817 |
' Extract the Major Version for B
|
|
|
818 |
MajorB = Mid(CurrentPkgVersion, 1, pos - 1)
|
|
|
819 |
' Delete the Major Version Value from the string to get the minor and patch version
|
|
|
820 |
CurrentPkgVersion = Mid(CurrentPkgVersion, pos + 1, Len(CurrentPkgVersion))
|
|
|
821 |
' Find the second occurence of the dot in package version B
|
|
|
822 |
pos = InStr(CurrentPkgVersion, ".")
|
|
|
823 |
' Extract the Minor Version for B
|
|
|
824 |
If pos <> 0 Then
|
|
|
825 |
MinorB = Mid(CurrentPkgVersion, 1, pos - 1)
|
|
|
826 |
' Delete the Minor Version value from the string to get the patch version
|
|
|
827 |
CurrentPkgVersion = Mid(CurrentPkgVersion, pos + 1, Len(CurrentPkgVersion))
|
|
|
828 |
' Find the last occurence of the dot in package version B
|
|
|
829 |
pos = InStr(CurrentPkgVersion, ".")
|
|
|
830 |
If pos <> 0 Then
|
|
|
831 |
' Extract the Patch Version for B
|
|
|
832 |
PatchB = Mid(CurrentPkgVersion, 1, pos - 1)
|
|
|
833 |
End If
|
|
|
834 |
End If
|
|
|
835 |
End If
|
|
|
836 |
|
|
|
837 |
If NOT isNull(PatchA) AND NOT isNull(PatchB) Then
|
|
|
838 |
If len(PatchA) < 4 Then PatchA = AddTrailingZeros(PatchA, 4)
|
|
|
839 |
If len(PatchB) < 4 Then PatchB = AddTrailingZeros(PatchB, 4)
|
|
|
840 |
End If
|
|
|
841 |
|
|
|
842 |
If MajorA = MajorB Then
|
|
|
843 |
If MinorA = MinorB Then
|
|
|
844 |
If IsNumeric(PatchA) AND IsNumeric(PatchB) Then
|
|
|
845 |
|
|
|
846 |
If CDbl(PatchB) > CDbl(PatchA) Then
|
|
|
847 |
IsDisplay = False
|
|
|
848 |
Else
|
|
|
849 |
IsDisplay = True
|
|
|
850 |
End If
|
|
|
851 |
End If
|
|
|
852 |
Else
|
|
|
853 |
If IsNumeric(MinorA) AND IsNumeric(MinorB) Then
|
|
|
854 |
If CInt(MinorB) > CInt(MinorA) Then
|
|
|
855 |
IsDisplay = False
|
|
|
856 |
Else
|
|
|
857 |
IsDisplay = True
|
|
|
858 |
End If
|
|
|
859 |
End If
|
|
|
860 |
End If
|
|
|
861 |
Else
|
|
|
862 |
If IsNumeric(MajorA) AND IsNumeric(MajorB) Then
|
|
|
863 |
If CInt(MajorB) > CInt(MajorA) Then
|
|
|
864 |
IsDisplay = False
|
|
|
865 |
Else
|
|
|
866 |
IsDisplay = True
|
|
|
867 |
End If
|
|
|
868 |
End If
|
|
|
869 |
End If
|
|
|
870 |
|
|
|
871 |
If NOT IsDisplay Then
|
|
|
872 |
%>
|
|
|
873 |
<tr>
|
|
|
874 |
<td nowrap valign="top" class="menu_link">
|
|
|
875 |
<%
|
|
|
876 |
|
|
|
877 |
Set rsTemp = OraDatabase.DbCreateDynaset("SELECT * FROM PACKAGE_VERSIONS PV, PRODUCT_DETAILS PD WHERE PD.PROD_ID(+) = PV.PV_ID AND PV.PV_ID ="&ProdId, ORADYN_DEFAULT )
|
|
|
878 |
%>
|
|
|
879 |
<%=GetProductIcon( rsTemp ) & aProductList( 1, rowNum )%>
|
|
|
880 |
<%
|
|
|
881 |
rsTemp.Close()
|
|
|
882 |
Set rsTemp = nothing
|
|
|
883 |
%>
|
|
|
884 |
</td>
|
|
|
885 |
<td nowrap class="body_row" valign="top"><%=aProductList( 2, rowNum )%></td>
|
|
|
886 |
<td class="body_rowlite"><%=Comments%></td>
|
|
|
887 |
</tr>
|
|
|
888 |
|
|
|
889 |
<tr>
|
|
|
890 |
<td><img src="images/spacer.gif" width="1" height="1"></td>
|
|
|
891 |
<td nowrap valign="top" class="body_row" colspan="3">
|
|
|
892 |
<DIV id="PRODUCT_<%=ProdId & ChangeType%>" name="PRODUCT_<%=ProdId & ChangeType%>" style="display:none;"><%=enumLOADING%></DIV>
|
|
|
893 |
</td>
|
|
|
894 |
</tr>
|
|
|
895 |
|
|
|
896 |
<%If rowNum <> numOfRows Then%>
|
|
|
897 |
<tr>
|
|
|
898 |
<td colspan="4" background="images/bg_table_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
|
|
|
899 |
</tr>
|
|
|
900 |
<%End If%>
|
|
|
901 |
|
|
|
902 |
<%End If%>
|
|
|
903 |
<%
|
|
|
904 |
rsQry.Close()
|
|
|
905 |
Set rsQry = Nothing
|
|
|
906 |
End If
|
|
|
907 |
|
|
|
908 |
Next
|
|
|
909 |
Else%>
|
|
|
910 |
|
|
|
911 |
<tr>
|
|
|
912 |
<td colspan="4" class="body_txt">No Changes Found.</td>
|
|
|
913 |
</tr>
|
|
|
914 |
|
|
|
915 |
<%End If%>
|
|
|
916 |
|
|
|
917 |
|
|
|
918 |
|
|
|
919 |
|
|
|
920 |
|
|
|
921 |
<tr>
|
|
|
922 |
<td colspan="4" background="images/bg_table_border.gif">
|
|
|
923 |
<table width="100%" border="0" cellspacing="1" cellpadding="2">
|
|
|
924 |
<tr>
|
|
|
925 |
<td nowrap background="images/bg_table_col.gif"><img src="images/spacer.gif" width="1" height="1"></td>
|
|
|
926 |
</tr>
|
|
|
927 |
</table>
|
|
|
928 |
</td>
|
|
|
929 |
</tr>
|
|
|
930 |
</table>
|
|
|
931 |
</SPAN>
|
|
|
932 |
<%
|
|
|
933 |
Call objFormComponent.FormEnd()
|
|
|
934 |
'-- FROM END ----------------------------------------------------------------------------------------------------------------
|
|
|
935 |
%>
|
|
|
936 |
|
|
|
937 |
</td>
|
|
|
938 |
</tr>
|
|
|
939 |
</table></td>
|
|
|
940 |
<td width="1%" valign="top" background="images/bg_favourits.gif">
|
|
|
941 |
<%If Request.Cookies( enumCOOKIE_NAME )( "user_bar" ) <> "hide" Then%>
|
|
|
942 |
|
|
|
943 |
<%End If%>
|
|
|
944 |
</td>
|
|
|
945 |
</tr>
|
|
|
946 |
<tr>
|
|
|
947 |
<td background="images/bg_bage_0a.gif"><img src="images/spacer.gif" width="1" height="15"></td>
|
|
|
948 |
<td background="images/bg_bage_1.gif"><img src="images/spacer.gif" width="1" height="1"></td>
|
|
|
949 |
<td bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="1"></td>
|
|
|
950 |
<td bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="1"></td>
|
|
|
951 |
</tr>
|
|
|
952 |
<tr>
|
|
|
953 |
<td bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="20"></td>
|
|
|
954 |
<td bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="1"></td>
|
|
|
955 |
<td bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="1"></td>
|
|
|
956 |
<td bgcolor="#FFFFFF"> </td>
|
|
|
957 |
</tr>
|
|
|
958 |
</table>
|
|
|
959 |
<!-- FOOTER ++++++++++++++++ -->
|
|
|
960 |
<!--#include file="_footer.asp"-->
|
|
|
961 |
<!-- +++++++++++++++++++++++ -->
|
|
|
962 |
</body>
|
|
|
963 |
</html>
|
|
|
964 |
<%
|
|
|
965 |
'------------ RUN AFTER PAGE RENDER -----------
|
|
|
966 |
Set objPMod = Nothing
|
|
|
967 |
Set objCrumbs = Nothing
|
|
|
968 |
Set objTabControl = Nothing
|
|
|
969 |
'----------------------------------------------
|
|
|
970 |
%><!--#include file="common/globals_destructor.asp"-->
|