Rev 66 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<%@LANGUAGE="VBSCRIPT"%><%'====================================================='| |'| Bom_Home |'| |'=====================================================%><%Option explicitResponse.Expires = 0Response.buffer = True%><%'To enable the script timeout to 10 minsServer.ScriptTimeout=600%><!--#include file="common/globals.asp"--><!--#include file="common/config.asp"--><!--#include file="common/common_subs.asp"--><!--#include file="common/_bom_common.asp"--><!--#include file="controls/ERGFormComponent/classFormComponent.asp"--><%'------------ ACCESS CONTROL ------------------%><!--#include file="_access_control_general.asp"--><%'------------ VARIABLE DEFINITION -------------Dim rsQryDim parProd_id_selectDim parShowallDim objFormCollectorDim objFormComponentDim rsTemp'------------ CONSTANTS DECLARATION -----------Const LIMG_UPDATED = "<img src='icons/i_updated.gif' width='11' height='11' hspace='2' vspace='2' border='0' align='absmiddle' title='Updated'>"Const LIMG_ADDED = "<img src='icons/i_added.gif' width='11' height='11' border='0' hspace='2' vspace='2' align='absmiddle' title='Added'>"Const LIMG_REMOVED = "<img src='icons/i_removed.gif' width='11' height='11' border='0' hspace='2' vspace='2' align='absmiddle' title='Removed'>"Const LIMG_NOTE_NEW = "<img src='icons/i_note_new.gif' width='18' height='18' border='0' align='absmiddle'>"Const LIMG_NOTE_EDIT = "<img src='icons/i_note_edit.gif' width='18' height='18' border='0' align='absmiddle'>"'------------ VARIABLE INIT -------------------Set objFormCollector = CreateObject("Scripting.Dictionary")Set objFormComponent = New FormComponent'------------ CONDITIONS ----------------------'----------------------------------------------%><%'--------------------------------------------------------------------------------------------------------------------------'Extract the parts of the version string into seperate variablesSub GetMajorMinorPatch( ByVal versionString, ByRef Major, ByRef Minor, ByRef Patch)Dim pos' Find the first occurence of the dot in package version Apos = InStr(versionString, ".")If pos <> 0 Then' Extract the Major Version for AMajor = Mid(versionString, 1, pos - 1)' Delete the Major Version Value from the string to get the minor and patch versionversionString = Mid(versionString, pos + 1, Len(versionString))' Find the second occurence of the dot in package version Apos = InStr(versionString, ".")' Extract the Minor Version for AIf pos <> 0 ThenMinor = Mid(versionString, 1, pos - 1)' Delete the Minor Version value from the string to get the patch versionversionString = Mid(versionString, pos + 1, Len(versionString))' Find the last occurence of the dot in package version Apos = InStr(versionString, ".")If pos <> 0 Then' Extract the Patch Version for APatch = Mid(versionString, 1, pos - 1)End IfEnd IfEnd IfEnd Sub'--------------------------------------------------------------------------------------------------------------------------Sub AdjustPatch(ByRef PatchA, ByRef PatchB)If NOT isNull(PatchA) AND NOT isNull(PatchB) ThenIf isNumeric(PatchA) AND isNumeric(PatchB) ThenIf CLng(PatchA) < 1000 ThenPatchA = CLng(PatchA) * 1000End IfIf CLng(PatchB) < 1000 ThenPatchB = CLng(PatchB) * 1000End IfEnd IfEnd IfEnd Sub'--------------------------------------------------------------------------------------------------------------------------' Return True if verA is same or newer than verB, else return false' If for some reason verA cannot be compared to verB, return the defaultReturn value as specified.' This might happen if for example one of the version inputs was null due to one BOM not containing the package' that another BOM did contain.Function Is_VerA_SameOrNewerThan_VerB(ByVal verA, ByVal verB, defaultReturn)' Process the version numbers to see what the difference isDim MajorA, MajorB, MinorA, MinorB, PatchA, PatchBMajorA = NULLMajorB = NULLMinorA = NULLMinorB = NULLPatchA = NULLPatchB = NULLIs_VerA_SameOrNewerThan_VerB = defaultReturnCall GetMajorMinorPatch(verA, MajorA, MinorA, PatchA)Call GetMajorMinorPatch(verB, MajorB, MinorB, PatchB)Call AdjustPatch(PatchA, PatchB)If MajorA = MajorB ThenIf MinorA = MinorB ThenIf IsNumeric(PatchA) AND IsNumeric(PatchB) ThenIf CDbl(PatchB) > CDbl(PatchA) ThenIs_VerA_SameOrNewerThan_VerB = FalseElseIs_VerA_SameOrNewerThan_VerB = TrueEnd IfEnd IfElseIf IsNumeric(MinorA) AND IsNumeric(MinorB) ThenIf CInt(MinorB) > CInt(MinorA) ThenIs_VerA_SameOrNewerThan_VerB = FalseElseIs_VerA_SameOrNewerThan_VerB = TrueEnd IfEnd IfEnd IfElseIf IsNumeric(MajorA) AND IsNumeric(MajorB) ThenIf CInt(MajorB) > CInt(MajorA) ThenIs_VerA_SameOrNewerThan_VerB = FalseElseIs_VerA_SameOrNewerThan_VerB = TrueEnd IfEnd IfEnd IfEnd Function'--------------------------------------------------------------------------------------------------------------------------' Get the product ID, package version, and comments for a specifed package ID in a specified BOM' The specified BOM is always going to be the production BOM, although the actual query used is general. Only' the name of the oracle query parameter (PRODUCTION_BOM) implies that the BOM is expected to be the production BOM.Function GetProductIDandVersionInBOM(bom_id, pkg_id, ByRef prod_id, ByRef pkg_version, ByRef comments)Dim rsQryOraDatabase.Parameters.Remove "PRODUCTION_BOM"OraDatabase.Parameters.Remove "PKG_ID"OraDatabase.Parameters.Add "PRODUCTION_BOM", bom_id, ORAPARM_INPUT, ORATYPE_NUMBEROraDatabase.Parameters.Add "PKG_ID", pkg_id, ORAPARM_INPUT, ORATYPE_NUMBERSet rsQry = OraDatabase.DbCreateDynaset(GetQuery("ProdVersion.sql"), ORADYN_DEFAULT)If rsQry.RecordCount > 0 Thenprod_id = rsQry("prod_id")pkg_version = rsQry("pkg_version")comments = rsQry("comments")GetProductIDandVersionInBOM = TrueElse' must set these to NULL so that Is_VerA_SameOrNewerThan_VerB() doesn't do anythingprod_id = NULLpkg_version = NULLcomments = NULLGetProductIDandVersionInBOM = FalseEnd IfrsQry.Close()Set rsQry = NothingOraDatabase.Parameters.Remove "PRODUCTION_BOM"OraDatabase.Parameters.Remove "PKG_ID"End Function'--------------------------------------------------------------------------------------------------------------------------' This function returns True if for any package that is in both the comparison and production BOMs, the version in the' comparison BOM is the same or newer than that in the production BOMFunction CheckProduction (ProductionBOM, ComparisonBOM)Dim PkgIdInComparisonBOMDim PkgVersionInComparisonBOMDim ProdIdInProductionBOMDim PkgVersionInProductionBOMDim CommentsCheckProduction = False 'Setting it initially to be falseOraDatabase.Parameters.Remove "PRODUCTION_BOM"OraDatabase.Parameters.Add "PRODUCTION_BOM", ProductionBOM, ORAPARM_INPUT, ORATYPE_NUMBEROraDatabase.Parameters.Add "CURRENT_BOM", ComparisonBOM, ORAPARM_INPUT, ORATYPE_NUMBERSet rsTemp = OraDatabase.DbCreateDynaset( GetQuery ("BomCheck.sql"), ORADYN_DEFAULT )OraDatabase.Parameters.Remove "CURRENT_BOM"' iterate through packagesWhile (NOT rsTemp.BOF) AND (NOT rsTemp.EOF) AND (CheckProduction = False)PkgIdInComparisonBOM = rsTemp("pkg_id")PkgVersionInComparisonBOM = rsTemp("pkg_version")' Get the version of this product that is currently in the production BOMIf (GetProductIDandVersionInBOM( ProductionBOM, PkgIdInComparisonBOM, ProdIdInProductionBOM, PkgVersionInProductionBOM, Comments ) = True) Then'check to see if the comparison BOM has the same or newer versionCheckProduction = Is_VerA_SameOrNewerThan_VerB( PkgVersionInComparisonBOM, PkgVersionInProductionBOM, False )End IfrsTemp.MoveNext()WEndOraDatabase.Parameters.Remove "PRODUCTION_BOM"rsTemp.Close()Set rsTemp = NothingEnd Function'--------------------------------------------------------------------------------------------------------------------------Function AddTrailingZeros(byval n, byval count)if len(n) >= count thenAddTrailingZeros = nexit functionend ifdim c, s, ic = count - len(n)for i = 1 to cs = s & "0"nexts = cstr(n) & sAddTrailingZeros = sEnd function'--------------------------------------------------------------------------------------------------------------Sub GetProductList ( nBom_id, nComparedBomId, outProductList, Flag )Dim rsQry, showAll'' Use SHOWALL parameter is BOM has old bom'showAll = "Y"'If nBom_id <> nComparedBomId Then' showAll = parShowall'End IfOraDatabase.Parameters.Add "BOM_ID", nBom_id, ORAPARM_INPUT, ORATYPE_NUMBEROraDatabase.Parameters.Add "COMPARE_BOM_ID", nComparedBomId, ORAPARM_INPUT, ORATYPE_NUMBEROraDatabase.Parameters.Add "CURRENT_BOM", dbPARbom_id, ORAPARM_INPUT, ORATYPE_NUMBERIf Flag = TRUE ThenSet rsQry = OraDatabase.DbCreateDynaset( GetQuery ("BomCompare.sql"), ORADYN_DEFAULT )ElseSet rsQry = OraDatabase.DbCreateDynaset( GetQuery ("BomCompare_BaseConfig.sql"), ORADYN_DEFAULT )End IfIf rsQry.RecordCount > 0 ThenoutProductList = rsQry.GetRows()ElseoutProductList = NULLEnd IfOraDatabase.Parameters.Remove "COMPARE_BOM_ID"OraDatabase.Parameters.Remove "BOM_ID"OraDatabase.Parameters.Remove "CURRENT_BOM"End Sub'--------------------------------------------------------------------------------------------------------------------------Sub GetFormDetails ( nBom_id, ByRef outobjDetails )Call GetBomDetails ( nBom_id, outobjDetails )outobjDetails.Item("root_version") = GetRootVersion ( outobjDetails.Item("bom_version") )'-- Set compare_bom_idIf Request("compare_bom_id") <> "" ThenoutobjDetails.Item("compare_bom_id") = Request("compare_bom_id")ElseoutobjDetails.Item("compare_bom_id") = outobjDetails.Item("parent_bom_id")End IfEnd Sub'--------------------------------------------------------------------------------------------------------------Function GetBomTreeList ()Dim rsQryOraDatabase.Parameters.Add "BRANCH_ID", objFormCollector.Item("rtag_id_fk"), ORAPARM_INPUT, ORATYPE_NUMBEROraDatabase.Parameters.Add "BOM_ID", objFormCollector.Item("bom_id"), ORAPARM_INPUT, ORATYPE_NUMBEROraDatabase.Parameters.Add "BOM_NAME", objFormCollector.Item("bom_name"), ORAPARM_INPUT, ORATYPE_NUMBERIf objFormCollector.Item("rtag_id_fk") = 542 Then'This is because SFO uses Front Office and Back OfficeSet rsQry = OraDatabase.DbCreateDynaset( GetQuery ("ProductionTreeComboSFO.sql"), ORADYN_DEFAULT )ElseSet rsQry = OraDatabase.DbCreateDynaset( GetQuery ("ProductionTreeCombo.sql"), ORADYN_DEFAULT )End IfIf rsQry.RecordCount > 0 ThenGetBomTreeList = rsQry.GetRows()ElseGetBomTreeList = NULLEnd IfOraDatabase.Parameters.Remove "BRANCH_ID"OraDatabase.Parameters.Remove "BOM_NAME"OraDatabase.Parameters.Remove "BOM_ID"rsQry.CloseSet rsQry = NothingEnd Function'--------------------------------------------------------------------------------------------------------------Function GetCompareBomDetails ( nBomId )Dim rsQryOraDatabase.Parameters.Add "BOM_ID", nBomId, ORAPARM_INPUT, ORATYPE_NUMBERSet rsQry = OraDatabase.DbCreateDynaset( GetQuery ("BomLocationDetails.sql"), ORADYN_DEFAULT )If rsQry.RecordCount > 0 ThenGetCompareBomDetails = rsQry("proj_name") &" / "& rsQry("branch_name") &" / "& rsQry("bom_name") &" "& rsQry("bom_version") &"."& rsQry("bom_lifecycle")ElseGetCompareBomDetails = NULLEnd IfOraDatabase.Parameters.Remove "BOM_ID"rsQry.CloseSet rsQry = NothingEnd Function'--------------------------------------------------------------------------------------------------------------%><%'------------ RUN BEFORE PAGE RENDER ----------objPMod.PersistInQryString ( Array("compare_bom_id") )Call GetFormDetails ( dbPARbom_id, objFormCollector )'----------------------------------------------%><html><head><title>Production Manager</title><meta HTTP-EQUIV="Pragma" CONTENT="no-cache"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link href="scripts/deployment_manager.css" rel="stylesheet" type="text/css"><script language="JavaScript" src="scripts/common.js"></script><script language="JavaScript" src="scripts/remote_scripting.js"></script><script language="JavaScript" type="text/javascript"><!--function RequestProductLocation( paramString, rowId ){var requestURL;// Product is changes, hence can be found in current bomrequestURL = 'RequestBomDiffProductLocation.asp';// Show divToggleDisplay( 'PRODUCT_'+ rowId, 'IMG_EXPAND_PRODUCT_' + rowId, 'IMG_COLLAPSE_PRODUCT_' + rowId );// Set ajax divnameajaxdivname = 'PRODUCT_'+ rowId;if ( MM_findObj( ajaxdivname ).innerHTML == '<%=enumLOADING%>'){//Append the name to search for to the requestURLvar url = requestURL + paramString;//Create the xmlHttp object to use in the request//stateChangeHandler will fire when the state has changed, i.e. data is received back// This is non-blocking (asynchronous)xmlHttp = GetXmlHttpObject(stateChangeHandler);//Send the xmlHttp get to the specified urlxmlHttp_Get(xmlHttp, url);}}function RequestProductNotes( paramString, rowId ){var requestURL;// Product is changes, hence can be found in current bomrequestURL = 'RequestProductNotes.asp';// Show divToggleDisplay( 'PRODNOTES_'+ rowId, 'IMG_EXPAND_PRODNOTES_' + rowId, 'IMG_COLLAPSE_PRODNOTES_' + rowId );// Set ajax divnameajaxdivname = 'PRODNOTES_'+ rowId;if ( MM_findObj( ajaxdivname ).innerHTML == '<%=enumLOADING%>'){//Append the name to search for to the requestURLvar url = requestURL + paramString;//Create the xmlHttp object to use in the request//stateChangeHandler will fire when the state has changed, i.e. data is received back// This is non-blocking (asynchronous)xmlHttp = GetXmlHttpObject(stateChangeHandler);//Send the xmlHttp get to the specified urlxmlHttp_Get(xmlHttp, url);}}function RequestPatches( paramString, rowId ){var requestURL;// Product is changes, hence can be found in current bomrequestURL = 'RequestBomDiffPatches.asp';// Show divToggleDisplay( 'PRODUCT_'+ rowId, 'IMG_EXPAND_PRODUCT_' + rowId, 'IMG_COLLAPSE_PRODUCT_' + rowId );// Set ajax divnameajaxdivname = 'PRODUCT_'+ rowId;if ( MM_findObj( ajaxdivname ).innerHTML == '<%=enumLOADING%>'){//Append the name to search for to the requestURLvar url = requestURL + paramString;//Create the xmlHttp object to use in the request//stateChangeHandler will fire when the state has changed, i.e. data is received back// This is non-blocking (asynchronous)xmlHttp = GetXmlHttpObject(stateChangeHandler);//Send the xmlHttp get to the specified urlxmlHttp_Get(xmlHttp, url);}}//--></script></head><body leftmargin="0" topmargin="0"><!-- HEADER ++++++++++++++++ --><!--#include file="_header.asp"--><!-- +++++++++++++++++++++++ --><!-- MAIN MENU + CRUMBS ++++++++++++++++ --><!--#include file="_main_menu.asp"--><!-- +++++++++++++++++++++++++++++++++++++ --><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="1%" valign="top" background="images/bg_bage_0.gif"><!-- NODE BROWSER ++++++++++++++++++++++ --><!--#include file="_bom_browser.asp"--><!-- END OF NODE BROWSER +++++++++++++++ --></td><td width="1" background="images/bg_bage_1.gif"><img src="images/spacer.gif" width="1" height="600"></td><td width="100%" valign="top" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td valign="top" background="images/bg_green.gif"></td><td align="right" valign="bottom" background="images/bg_green.gif" class="body_txtw"><%Call RenderTitleWithoutVersion( objBomCollector )%></td><td background="images/bg_green.gif"><img src="images/spacer.gif" width="10" height="20"></td></tr><tr><td width="1%" valign="top" background="images/bg_green.gif"></td><td width="100%" valign="bottom" background="images/bg_green.gif"><!-- TAB CONTROLS ++++++++++++++++++++++ --><!--#include file="_tabs_definition.asp"--><%Set objTabControl = New TabControlobjTabControl.TemplateDoc = ReadFile( Server.MapPath("controls/ERGTabStyleWinXP/tab_style.html") ) ' Supply tab style definitionobjTabControl.TabStyle = "StyleWinXP"objTabControl.AddTabDefnition ( arrBomTabDef )objTabControl.Render ()%><!-- END OF TAB CONTROLS +++++++++++++++ --></td><td width="1%" background="images/bg_green.gif"><img src="images/spacer.gif" width="10" height="35"></td></tr><tr><td background="images/bg_bage_0.gif"><img src="images/spacer.gif" width="30" height="10"></td><td background="images/bg_bage_0.gif"><!-- BUTTONS CONTROL +++++++++++++++++++ --><%'-- Define Action buttons on this tabaTabBtnsDef = Array("abtnAddPatches")Call LoadTabActionButtons ( aTabBtnsDef, objBtnControl )' -- Tell control if buttons need to be readonly actionsobjBtnControl.IsReadonlyAction = objBomCollector.Item("is_readonly")' -- Render ButtonsCall objBtnControl.Render ( aTabBtnsDef )%><!-- +++++++++++++++++++++++++++++++++++ --></td><td background="images/bg_green.gif"><img src="images/p_bar_corrner.gif" width="17" height="42"></td></tr><tr><td> </td><td> </td><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></tr></table><!-- PRODUCT REJECTED ------------------------------------------------------------------------------------------ --><%If objBomCollector.Item ("is_rejected") = enumDB_YES Then%><table width="100%" border="0" cellspacing="10" cellpadding="0"><tr><td><%OraDatabase.Parameters.Add "ENTITY_ID", dbPARbom_id, ORAPARM_INPUT, ORATYPE_NUMBEROraDatabase.Parameters.Add "ENUM_ENTITY_TYPE", "enumENTITY_TYPE_BOM", ORAPARM_INPUT, ORATYPE_VARCHAR2Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("RejectionTrail.sql"), ORADYN_DEFAULT )Dim sMessagesMessage = "<table width='100%' border='0' cellspacing='3' cellpadding='0'>"sMessage = sMessage &"<tr>"sMessage = sMessage &"<td width='100%' class='body_txt'><b>BOM is REJECTED!</b><br><br><br></td>"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>"sMessage = sMessage &"</tr>"While (NOT rsQry.BOF) AND (NOT rsQry.EOF)sMessage = sMessage & "<tr><td colspan='2' background='images/bg_table_border.gif'><img src='images/spacer.gif' width='1' height='1'></td></tr>"sMessage = sMessage &"<tr>"sMessage = sMessage &"<td class='body_txt'>"If rsQry("is_rejected") = enumDB_YES ThensMessage = sMessage &"BOM is REJECTED!<br>"ElsesMessage = sMessage &"BOM is Accepted!<br>"End IfsMessage = sMessage & objFormater.TextToHTML( rsQry("comments") ) &"<br><SPAN class='body_smltxtg'>"& rsQry("creator") &"</SPAN></td>"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>"sMessage = sMessage &"</tr>"rsQry.MoveNextWEndrsQry.ClosesMessage = sMessage &"</table>"Call Messenger ( sMessage, "bi_rejected.gif", "100%" )Response.write "<br>"OraDatabase.Parameters.Remove "ENTITY_ID"OraDatabase.Parameters.Remove "ENUM_ENTITY_TYPE"%></td></tr></table><%End If%><!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --><table width="100%" border="0" cellspacing="10" cellpadding="0"><tr><td width="1"><img src="images/spacer.gif" width="1" height="1"></td><td width="100%"><img src="images/spacer.gif" width="1" height="1"></td></tr><!-- BOM Comments +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --><%If (objBomCollector.Item("bom_comments") <> "") Then%><tr><td align="right" valign="top"><img src="icons/i_bom_properties.gif" width="30" height="30" hspace="3"></td><td valign="top" class="body_txt"><SPAN class="body_colb">BOM Comments</SPAN><hr width="100%" size="1px" noshade color="#808080"><SPAN class="body_txt"><%= objFormater.TextToHTML( objBomCollector.Item("bom_comments") )%></SPAN><br><br><br><br></td></tr><%End If%><!-- COMPARE BOM +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --><tr><td align="right" valign="top"><img src="icons/i_bom_diff.gif" width="37" height="33" hspace="3"></td><td valign="top" class="body_txt"><%'-- FROM START --------------------------------------------------------------------------------------------------------------objFormComponent.FormName = "OldVersion"objFormComponent.Action = SCRIPT_NAMEobjFormComponent.Method = "get"Call objFormComponent.FormStart()Dim numOfBomRowsDim rowNumBomIf (NOT IsNull(GetBomTreeList())) ThennumOfBomRows = UBound( GetBomTreeList(), 2 )ElsenumOfBomRows = -1End IfFor rowNumBom = 0 To numOfBomRowsDim thisBomIdDim nextBomIdthisBomId = GetBomTreeList()( 0, rowNumBom )If rowNumBom = numOfBomRows ThennextBomId = 0ElsenextBomId = GetBomTreeList()( 0, rowNumBom + 1 )End IfCall GetFormDetails ( thisBomId, objBomCollector )%><SPAN class="body_colb"><br><%= objFormater.TextToHTML( objBomCollector.Item("bom_comments") )%><br><br></SPAN><SPAN class="body_colb">Products/Patches Introduced in <%Call RenderTitle( objBomCollector )%> but not yet deployed in Production BOM<br></SPAN><%If InStr(APP_ROOT, "DEPLOYMAN_WWW") > 0 Then%><a href="downloads\<%Call RenderTitleWithoutBold( objBomCollector )%>.pdf" class="body_link" target="_blank"><b>Click here to Download PDF</b></a><%Else%><a href="../deployment_manager/pdf\<%Call RenderTitleWithoutBold( objBomCollector )%>.pdf" class="body_link" target="_blank"><b>Click here to Download PDF</b></a><%End If%><hr width="100%" size="1px" noshade color="#808080"><table width="100%" border="0" cellspacing="2" cellpadding="0"><tr><td width="20%" background="images/bg_table_border.gif"><table width="100%" border="0" cellspacing="1" cellpadding="2"><tr><td align="left" nowrap background="images/bg_table_col.gif" class="body_col">Product</td></tr></table></td><td width="20%" nowrap align="left" background="images/bg_table_col.gif" class="body_col">Version</td><td width="60%" nowrap align="left" background="images/bg_table_col.gif" class="body_col">Reason For This Version</td><td width="60%" nowrap align="left" background="images/bg_table_col.gif" class="body_col">Approval</td></tr><%If NOT CheckProduction( Request("bom_id"), thisBomId) Then%><tr><td colspan="4" class="body_txtr"><b>Found Matching BOM or Older Versions...Exiting Comparison</b></td></tr><%Exit ForEnd IfDim aProductListCall GetProductList ( thisBomId, nextBomId, aProductList, TRUE )If NOT IsNull( aProductList ) Then' Variable used to prevent multiple entries being rendered for the same packageDim LastPkgIdLastPkgId = -1Dim numOfProdRowsDim rowNumProdnumOfProdRows = UBound( aProductList, 2 )' Iterate through the list of productsFor rowNumProd = 0 To numOfProdRowsResponse.FlushDim thisProdIdDim thisPkgNameDim thisPkgVersionDim thisIsPatchDim thisIsRejectedDim thisPkgId'Extract values into named variables to make code more readable where the values are used later onthisProdId = aProductList( 0, rowNumProd )thisPkgName = aProductList( 1, rowNumProd )thisPkgVersion = aProductList( 2, rowNumProd )thisIsPatch = aProductList( 3, rowNumProd )thisIsRejected = aProductList( 4, rowNumProd )thisPkgId = aProductList( 5, rowNumProd )' Get the version of this product that is currently in the production BOMDim ProdIdInProductionBOMDim PkgVersionInProductionBOMDim CommentsCall GetProductIDandVersionInBOM( dbPARbom_id, thisPkgId, ProdIdInProductionBOM, PkgVersionInProductionBOM, Comments )' We want to figure out if we have to display this product. We only want to do so if the version of it is the' same or newer than that currently in the production BOMDim IsDisplayIsDisplay = TrueIf IsNull(thisIsPatch) ThenIsDisplay = Is_VerA_SameOrNewerThan_VerB( thisPkgVersion, PkgVersionInProductionBOM, IsDisplay )End IfIf IsDisplay ThenSet rsTemp = OraDatabase.DbCreateDynaset("SELECT * FROM PACKAGE_VERSIONS PV, PRODUCT_DETAILS PD WHERE PD.PROD_ID(+) = PV.PV_ID AND PV.PV_ID ="&thisProdId, ORADYN_DEFAULT )%><%If IsNull(thisIsPatch) ThenIf CDbl(LastPkgId) <> CDbl(thisPkgId) Then%><tr><td nowrap valign="top"><SPAN id="IMG_EXPAND_PRODUCT_<%=thisBomId%>_<%=thisProdId%>" name="IMG_EXPAND_PRODUCT_<%=thisBomId%>_<%=thisProdId%>" style="display:block;"><a href="javascript:;" class="menu_link" onClick="RequestProductLocation('?new_version=<%=thisPkgVersion%>&new_prod_id=<%=thisProdId%>&prod_id=<%=ProdIdInProductionBOM%>&bom_id=<%=dbPARbom_id%>&compare_bom_id=<%=thisBomId%>&pkg_id=<%=thisPkgId%>&change_type=', '<%=thisBomId%>_<%=thisProdId%>');"><%=LIMG_EXPAND & GetProductIcon( rsTemp ) & thisPkgName%></a></SPAN><SPAN id="IMG_COLLAPSE_PRODUCT_<%=thisBomId%>_<%=thisProdId%>" name="IMG_COLLAPSE_PRODUCT_<%=thisBomId%>_<%=thisProdId%>" style="display:none;"><a href="javascript:;" class="menu_link" onClick="ToggleDisplay( 'PRODUCT_<%=thisBomId%>_<%=thisProdId%>', 'IMG_EXPAND_PRODUCT_<%=thisBomId%>_<%=thisProdId%>', 'IMG_COLLAPSE_PRODUCT_<%=thisBomId%>_<%=thisProdId%>');"><%=LIMG_COLLAPSE & GetProductIcon( thisIsRejected ) & thisPkgName%></a></SPAN></td><td nowrap class="body_row" valign="top"><%=thisPkgVersion%> </td><td class="body_rowlite"><%=rsTemp("comments")%> <!-- <a href="download_version.asp?prod_id=<%=thisProdId%>&bom_id=<%=Request("bom_id")%>&os_id=" class="body_link">Download</a> --></td><%Dim rsForm, Tester, ManagerTester = FalseManager = FalseIf objAccessControl.IsActive("ApprovedByManager") ThenManager = TrueElseIf objAccessControl.IsActive("ApprovedByTester") ThenTester = TrueEnd IfSet rsForm = OraDatabase.DbCreateDynaset("SELECT * FROM RELEASE_AUTHORISATION WHERE PV_ID="&thisProdId&" AND BOM_ID="&Request("bom_id"), ORADYN_DEFAULT)%><%If rsForm.RecordCount = 0 Then%><%If Tester Then%><td class="body_rowlite"><a href="_wform_approval.asp?pv_id=<%=thisProdId%>&bom_id=<%=Request("bom_id")%>" onClick="popup = window.open('_wform_approval.asp?pv_id=<%=thisProdId%>&bom_id=<%=Request("bom_id")%>', 'Approval Form', 'height=220,width=600,scrollbars=yes,resizable=yes'); return false" target="_blank" style="text-decoration:none" class="body_txtr">Accept/Reject</a></td><%ElseIf Manager Then%><td class="body_txto">Awaiting Tester</td><%Else%><td class="body_txto"></td><%End If%><%ElseIf IsNull(rsForm("is_official")) Then%><%If NOT IsNull(rsForm("tester_id")) And Tester Then %><td class="body_txto">Awaiting Manager</td><%ElseIf NOT IsNull(rsForm("tester_id")) And Manager Then%><td class="body_rowlite"><a href="_wform_approval.asp?pv_id=<%=thisProdId%>&bom_id=<%=Request("bom_id")%>" onClick="popup = window.open('_wform_approval.asp?pv_id=<%=thisProdId%>&bom_id=<%=Request("bom_id")%>', 'Approval Form', 'height=440,width=600,scrollbars=yes,resizable=yes'); return false" target="_blank" style="text-decoration:none" class="body_txtr">Accept</a></td><%Else%><td class="body_rowlite"></td><%End If%><%Else%><td class="body_txtg">Accepted</td><%End IfrsForm.Close()Set rsForm = nothing%></tr><tr><td nowrap valign="top" class="body_row" colspan="3"><DIV id="PRODUCT_<%=thisBomId%>_<%=thisProdId%>" name="PRODUCT_<%=thisBomId%>_<%=thisProdId%>" style="display:none;"><%=enumLOADING%></DIV></td></tr><%If rowNumProd <> numOfProdRows Then%><tr><td colspan="4" background="images/bg_table_border.gif"><img src="images/spacer.gif" width="1" height="1"></td></tr><%End If%><%End If%><%ElseIf CDbl(LastPkgId) <> CDbl(thisPkgId) Then%><tr><%If rowNumBom <> numOfBomRows Then%><td nowrap valign="top"><SPAN id="IMG_EXPAND_PRODUCT_<%=thisBomId%>_<%=thisProdId & thisIsPatch%>" name="IMG_EXPAND_PRODUCT_<%=thisBomId%>_<%=thisProdId & thisIsPatch%>" style="display:block;"><a href="javascript:;" class="menu_link" onClick="RequestPatches('?pkg_id=<%=thisPkgId%>&bom_id=<%=thisBomId%>&compare_bom_id=<%=nextBomId%>¤t_bom_id=<%=dbPARbom_id%>', '<%=thisBomId%>_<%=thisProdId & thisIsPatch%>');"><%=LIMG_EXPAND & GetProductIcon( rsTemp ) & thisPkgName%></a></SPAN><SPAN id="IMG_COLLAPSE_PRODUCT_<%=thisBomId%>_<%=thisProdId & thisIsPatch%>" name="IMG_COLLAPSE_PRODUCT_<%=thisBomId%>_<%=thisProdId & thisIsPatch%>" style="display:none;"><a href="javascript:;" class="menu_link" onClick="ToggleDisplay( 'PRODUCT_<%=thisBomId%>_<%=thisProdId & thisIsPatch%>', 'IMG_EXPAND_PRODUCT_<%=thisBomId%>_<%=thisProdId & thisIsPatch%>', 'IMG_COLLAPSE_PRODUCT_<%=thisBomId%>_<%=thisProdId & thisIsPatch%>');"><%=LIMG_COLLAPSE & GetProductIcon( rsTemp ) & thisPkgName%></a></SPAN></td><%Else%><td nowrap valign="top"><SPAN id="IMG_EXPAND_PRODUCT_<%=thisBomId%>_<%=thisProdId & thisIsPatch%>" name="IMG_EXPAND_PRODUCT_<%=thisBomId%>_<%=thisProdId & thisIsPatch%>" style="display:block;"><a href="javascript:;" class="menu_link" onClick="RequestPatches('?pkg_id=<%=thisPkgId%>&bom_id=<%=thisBomId%>&compare_bom_id=<%=thisBomId%>¤t_bom_id=<%=dbPARbom_id%>', '<%=thisBomId%>_<%=thisProdId & thisIsPatch%>');"><%=LIMG_EXPAND & GetProductIcon( rsTemp ) & thisPkgName%></a></SPAN><SPAN id="IMG_COLLAPSE_PRODUCT_<%=thisBomId%>_<%=thisProdId & thisIsPatch%>" name="IMG_COLLAPSE_PRODUCT_<%=thisBomId%>_<%=thisProdId & thisIsPatch%>" style="display:none;"><a href="javascript:;" class="menu_link" onClick="ToggleDisplay( 'PRODUCT_<%=thisBomId%>_<%=thisProdId & thisIsPatch%>', 'IMG_EXPAND_PRODUCT_<%=thisBomId%>_<%=thisProdId & thisIsPatch%>', 'IMG_COLLAPSE_PRODUCT_<%=thisBomId%>_<%=thisProdId & thisIsPatch%>');"><%=LIMG_COLLAPSE & GetProductIcon( rsTemp ) & thisPkgName%></a></SPAN></td><%End If%><td nowrap class="body_row" valign="top"></td><td class="body_rowlite"></td></tr><tr><td nowrap valign="top" class="body_row" colspan="3"><DIV id="PRODUCT_<%=thisBomId%>_<%=thisProdId & thisIsPatch%>" name="PRODUCT_<%=thisBomId%>_<%=thisProdId & thisIsPatch%>" style="display:none;"><%=enumLOADING%></DIV></td></tr><%If rowNumProd <> numOfProdRows Then%><tr><td colspan="4" background="images/bg_table_border.gif"><img src="images/spacer.gif" width="1" height="1"></td></tr><%End If%><%LastPkgId = CDbl(thisPkgId)End If' -------- END GROUP ------------------------End If%><%rsTemp.Close()Set rsTemp = nothingEnd IfNext 'For Next Loop EndElse%><tr><td colspan="4" class="body_txtr"><b>No Changes Detected In Comparison</b></td></tr><%End If%><tr><td colspan="4" background="images/bg_table_border.gif"><table width="100%" border="0" cellspacing="1" cellpadding="2"><tr><td nowrap background="images/bg_table_col.gif"><img src="images/spacer.gif" width="1" height="1"></td></tr></table></td></tr></table><br><%Response.FlushNextCall objFormComponent.FormEnd()'-- FROM END ----------------------------------------------------------------------------------------------------------------%></td></tr></table></td><td width="1%" valign="top" background="images/bg_favourits.gif"><%If Request.Cookies( enumCOOKIE_NAME )( "user_bar" ) <> "hide" Then%><%End If%></td></tr><tr><td background="images/bg_bage_0a.gif"><img src="images/spacer.gif" width="1" height="15"></td><td background="images/bg_bage_1.gif"><img src="images/spacer.gif" width="1" height="1"></td><td bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="1"></td><td bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="1"></td></tr><tr><td bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="20"></td><td bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="1"></td><td bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="1"></td><td bgcolor="#FFFFFF"> </td></tr></table><!-- FOOTER ++++++++++++++++ --><!--#include file="_footer.asp"--><!-- +++++++++++++++++++++++ --></body></html><%'------------ RUN AFTER PAGE RENDER -----------Set objPMod = NothingSet objCrumbs = NothingSet objTabControl = Nothing'----------------------------------------------%><!--#include file="common/globals_destructor.asp"-->