Subversion Repositories DevTools

Rev

Rev 64 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 64 Rev 66
Line 1... Line 1...
1
<%@LANGUAGE="VBSCRIPT"%>
1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
2
<%
3
'=====================================================
3
'=====================================================
4
'|                                                   |
4
'|                                                   |
5
'|			          Bom_Home			 			 |
5
'|                   Bom_Home                        |
6
'|                                                   |
6
'|                                                   |
7
'=====================================================
7
'=====================================================
8
%>
8
%>
9
<%
9
<%
10
Option explicit
10
Option explicit
11
Response.Expires = 0
11
Response.Expires = 0
-
 
12
Response.buffer = True
12
%>
13
%>
13
<%
14
<%
14
'To enable the script timeout to 10 mins
15
'To enable the script timeout to 10 mins
15
Server.ScriptTimeout=600
16
Server.ScriptTimeout=600
16
%>
17
%>
Line 24... Line 25...
24
%>
25
%>
25
<!--#include file="_access_control_general.asp"-->
26
<!--#include file="_access_control_general.asp"-->
26
<%
27
<%
27
'------------ VARIABLE DEFINITION -------------
28
'------------ VARIABLE DEFINITION -------------
28
Dim rsQry
29
Dim rsQry
29
Dim aProductList
-
 
30
Dim parProd_id_select
30
Dim parProd_id_select
31
Dim parShowall
31
Dim parShowall
32
Dim numOfRows
32
 
33
Dim rowNum, Numrow, maxnumOfRows
-
 
34
Dim objFormCollector
33
Dim objFormCollector
35
Dim objFormComponent
34
Dim objFormComponent
36
Dim sMessage
-
 
37
Dim ProdId, PkgId, OldProdId, OsId
-
 
38
Dim ChangeType
-
 
39
Dim IsPatch
-
 
40
Dim rsTemp
35
Dim rsTemp
41
Dim PkgVersion, CurrentPkgVersion, IsDisplay, Comments
-
 
42
'------------ CONSTANTS DECLARATION -----------
36
'------------ CONSTANTS DECLARATION -----------
43
Const LIMG_UPDATED = "<img src='icons/i_updated.gif' width='11' height='11' hspace='2' vspace='2' border='0' align='absmiddle' title='Updated'>"
37
Const LIMG_UPDATED = "<img src='icons/i_updated.gif' width='11' height='11' hspace='2' vspace='2' border='0' align='absmiddle' title='Updated'>"
44
Const LIMG_ADDED = "<img src='icons/i_added.gif' width='11' height='11' border='0' hspace='2' vspace='2' align='absmiddle' title='Added'>"
38
Const LIMG_ADDED = "<img src='icons/i_added.gif' width='11' height='11' border='0' hspace='2' vspace='2' align='absmiddle' title='Added'>"
45
Const LIMG_REMOVED = "<img src='icons/i_removed.gif' width='11' height='11' border='0' hspace='2' vspace='2' align='absmiddle' title='Removed'>"
39
Const LIMG_REMOVED = "<img src='icons/i_removed.gif' width='11' height='11' border='0' hspace='2' vspace='2' align='absmiddle' title='Removed'>"
46
Const LIMG_NOTE_NEW = "<img src='icons/i_note_new.gif' width='18' height='18' border='0' align='absmiddle'>"
40
Const LIMG_NOTE_NEW = "<img src='icons/i_note_new.gif' width='18' height='18' border='0' align='absmiddle'>"
Line 51... Line 45...
51
'------------ CONDITIONS ----------------------
45
'------------ CONDITIONS ----------------------
52
'----------------------------------------------
46
'----------------------------------------------
53
%>
47
%>
54
<%
48
<%
55
'--------------------------------------------------------------------------------------------------------------------------
49
'--------------------------------------------------------------------------------------------------------------------------
-
 
50
'Extract the parts of the version string into seperate variables
-
 
51
Sub GetMajorMinorPatch( ByVal versionString, ByRef Major, ByRef Minor, ByRef Patch)
-
 
52
 
-
 
53
   Dim pos
-
 
54
 
-
 
55
   ' Find the first occurence of the dot in package version A
-
 
56
   pos = InStr(versionString, ".")
-
 
57
   If pos <> 0 Then
-
 
58
      ' Extract the Major Version for A
-
 
59
      Major = Mid(versionString, 1, pos - 1)
-
 
60
      ' Delete the Major Version Value from the string to get the minor and patch version
-
 
61
      versionString = Mid(versionString, pos + 1, Len(versionString))
-
 
62
      ' Find the second occurence of the dot in package version A
-
 
63
      pos = InStr(versionString, ".")
-
 
64
      ' Extract the Minor Version for A
-
 
65
      If pos <> 0 Then
-
 
66
         Minor = Mid(versionString, 1, pos - 1)
-
 
67
         ' Delete the Minor Version value from the string to get the patch version
-
 
68
         versionString = Mid(versionString, pos + 1, Len(versionString))
-
 
69
         ' Find the last occurence of the dot in package version A
-
 
70
         pos = InStr(versionString, ".")
-
 
71
         If pos <> 0 Then
-
 
72
            ' Extract the Patch Version for A
-
 
73
            Patch = Mid(versionString, 1, pos - 1)
-
 
74
         End If
-
 
75
      End If
-
 
76
   End If
-
 
77
 
-
 
78
End Sub
-
 
79
'--------------------------------------------------------------------------------------------------------------------------
-
 
80
Sub AdjustPatch(ByRef PatchA, ByRef PatchB)
-
 
81
   If NOT isNull(PatchA) AND NOT isNull(PatchB) Then
-
 
82
      If isNumeric(PatchA) AND isNumeric(PatchB) Then
-
 
83
         If CLng(PatchA) < 1000 Then
-
 
84
            PatchA = CLng(PatchA) * 1000
-
 
85
         End If
-
 
86
         If CLng(PatchB) < 1000 Then
-
 
87
            PatchB = CLng(PatchB) * 1000
-
 
88
         End If
-
 
89
      End If
-
 
90
   End If
-
 
91
End Sub
-
 
92
'--------------------------------------------------------------------------------------------------------------------------
-
 
93
' Return True if verA is same or newer than verB, else return false
-
 
94
' If for some reason verA cannot be compared to verB, return the defaultReturn value as specified.
-
 
95
' This might happen if for example one of the version inputs was null due to one BOM not containing the package
-
 
96
' that another BOM did contain.
-
 
97
Function Is_VerA_SameOrNewerThan_VerB(ByVal verA, ByVal verB, defaultReturn)
-
 
98
 
-
 
99
   ' Process the version numbers to see what the difference is
-
 
100
   Dim MajorA, MajorB, MinorA, MinorB, PatchA, PatchB
-
 
101
 
-
 
102
   MajorA = NULL
-
 
103
   MajorB = NULL
-
 
104
   MinorA = NULL
-
 
105
   MinorB = NULL
-
 
106
   PatchA = NULL
-
 
107
   PatchB = NULL
-
 
108
 
-
 
109
   Is_VerA_SameOrNewerThan_VerB = defaultReturn
-
 
110
 
-
 
111
   Call GetMajorMinorPatch(verA, MajorA, MinorA, PatchA)
-
 
112
 
-
 
113
   Call GetMajorMinorPatch(verB, MajorB, MinorB, PatchB)
-
 
114
 
-
 
115
   Call AdjustPatch(PatchA, PatchB)
-
 
116
 
-
 
117
   If MajorA = MajorB Then
-
 
118
      If MinorA = MinorB Then
-
 
119
         If IsNumeric(PatchA) AND IsNumeric(PatchB) Then
-
 
120
 
-
 
121
            If CDbl(PatchB) > CDbl(PatchA) Then
-
 
122
               Is_VerA_SameOrNewerThan_VerB = False
-
 
123
            Else
-
 
124
               Is_VerA_SameOrNewerThan_VerB = True
-
 
125
            End If
-
 
126
         End If
-
 
127
      Else
-
 
128
         If IsNumeric(MinorA) AND IsNumeric(MinorB) Then
-
 
129
            If CInt(MinorB) > CInt(MinorA) Then
-
 
130
               Is_VerA_SameOrNewerThan_VerB = False
-
 
131
            Else
-
 
132
               Is_VerA_SameOrNewerThan_VerB = True
-
 
133
            End If
-
 
134
         End If
-
 
135
      End If
-
 
136
   Else
-
 
137
      If IsNumeric(MajorA) AND IsNumeric(MajorB) Then
-
 
138
         If CInt(MajorB) > CInt(MajorA) Then
-
 
139
            Is_VerA_SameOrNewerThan_VerB = False
-
 
140
         Else
-
 
141
            Is_VerA_SameOrNewerThan_VerB = True
-
 
142
         End If
-
 
143
      End If
-
 
144
   End If
-
 
145
 
-
 
146
End Function
-
 
147
'--------------------------------------------------------------------------------------------------------------------------
-
 
148
' Get the product ID, package version, and comments for a specifed package ID in a specified BOM
-
 
149
' The specified BOM is always going to be the production BOM, although the actual query used is general. Only
-
 
150
' the name of the oracle query parameter (PRODUCTION_BOM) implies that the BOM is expected to be the production BOM.
-
 
151
Function GetProductIDandVersionInBOM(bom_id, pkg_id, ByRef prod_id, ByRef pkg_version, ByRef comments)
-
 
152
   Dim rsQry
-
 
153
 
-
 
154
   OraDatabase.Parameters.Remove "PRODUCTION_BOM"
-
 
155
   OraDatabase.Parameters.Remove "PKG_ID"
-
 
156
   OraDatabase.Parameters.Add    "PRODUCTION_BOM", bom_id, ORAPARM_INPUT, ORATYPE_NUMBER
-
 
157
   OraDatabase.Parameters.Add    "PKG_ID",         pkg_id, ORAPARM_INPUT, ORATYPE_NUMBER
-
 
158
 
-
 
159
   Set rsQry = OraDatabase.DbCreateDynaset(GetQuery("ProdVersion.sql"), ORADYN_DEFAULT)
-
 
160
 
-
 
161
   If rsQry.RecordCount > 0 Then
-
 
162
      prod_id     = rsQry("prod_id")
-
 
163
      pkg_version = rsQry("pkg_version")
-
 
164
      comments    = rsQry("comments")
-
 
165
 
-
 
166
      GetProductIDandVersionInBOM = True
-
 
167
   Else
-
 
168
      ' must set these to NULL so that Is_VerA_SameOrNewerThan_VerB() doesn't do anything
-
 
169
      prod_id     = NULL
-
 
170
      pkg_version = NULL
-
 
171
      comments    = NULL
-
 
172
 
-
 
173
      GetProductIDandVersionInBOM = False
-
 
174
   End If
-
 
175
 
-
 
176
   rsQry.Close()
-
 
177
   Set rsQry = Nothing
-
 
178
 
-
 
179
   OraDatabase.Parameters.Remove "PRODUCTION_BOM"
-
 
180
   OraDatabase.Parameters.Remove "PKG_ID"
-
 
181
End Function
-
 
182
'--------------------------------------------------------------------------------------------------------------------------
-
 
183
' This function returns True if for any package that is in both the comparison and production BOMs, the version in the
-
 
184
' comparison BOM is the same or newer than that in the production BOM
56
Function CheckProduction (ProductionBOM, ComparisonBOM)
185
Function CheckProduction (ProductionBOM, ComparisonBOM)
57
 
186
 
58
	CheckProduction = False 'Setting it initially to be false
-
 
59
	
-
 
60
	OraDatabase.Parameters.Remove	"PRODUCTION_BOM"
-
 
61
	OraDatabase.Parameters.Add "PRODUCTION_BOM", 	 	 ProductionBOM,		 ORAPARM_INPUT, ORATYPE_NUMBER
-
 
62
	OraDatabase.Parameters.Add "CURRENT_BOM", ComparisonBOM, ORAPARM_INPUT, ORATYPE_NUMBER
-
 
63
	
-
 
64
	Set rsTemp = OraDatabase.DbCreateDynaset( GetQuery ("BomCheck.sql"), ORADYN_DEFAULT )
-
 
65
	
-
 
66
	While (NOT rsTemp.BOF) AND (NOT rsTemp.EOF)
-
 
67
		PkgId = rsTemp("pkg_id")
187
   Dim PkgIdInComparisonBOM
68
		PkgVersion = rsTemp("pkg_version")
188
   Dim PkgVersionInComparisonBOM
69
 
189
 
70
		
-
 
71
		
-
 
72
		
-
 
73
		OraDatabase.Parameters.Add "PKG_ID", PkgId, ORAPARM_INPUT, ORATYPE_NUMBER
-
 
74
			
-
 
75
		Set rsQry = OraDatabase.DbCreateDynaset(GetQuery("ProdVersion.sql"), ORADYN_DEFAULT)
-
 
76
				
-
 
77
		CurrentPkgVersion = rsQry("pkg_version")
-
 
78
		
-
 
79
		
-
 
80
		
-
 
81
		Dim MajorA, MajorB, MinorA, MinorB, PatchA, PatchB, pos
-
 
82
				MajorA = NULL
-
 
83
				MajorB = NULL
-
 
84
				MinorA = NULL
-
 
85
				MinorB = NULL
-
 
86
				PatchA = NULL
-
 
87
				PatchB = NULL
-
 
88
				
-
 
89
		' Find the first occurence of the dot in package version A
-
 
90
				pos = InStr(PkgVersion, ".")
-
 
91
				If pos <> 0 Then
-
 
92
					' Extract the Major Version for A
-
 
93
					MajorA = Mid(PkgVersion, 1, pos - 1)
-
 
94
					' Delete the Major Version Value from the string to get the minor and patch version
-
 
95
					PkgVersion = Mid(PkgVersion, pos + 1, Len(PkgVersion))
-
 
96
					' Find the second occurence of the dot in package version A
-
 
97
					pos = InStr(PkgVersion, ".")
-
 
98
					' Extract the Minor Version for A
-
 
99
					If pos <> 0 Then
-
 
100
						MinorA = Mid(PkgVersion, 1, pos - 1)
-
 
101
						' Delete the Minor Version value from the string to get the patch version
-
 
102
						PkgVersion = Mid(PkgVersion, pos + 1, Len(PkgVersion))
-
 
103
						' Find the last occurence of the dot in package version A
-
 
104
						pos = InStr(PkgVersion, ".")
-
 
105
						If pos <> 0 Then
-
 
106
							' Extract the Patch Version for A
-
 
107
							PatchA = Mid(PkgVersion, 1, pos - 1)
-
 
108
						End If	
-
 
109
					End If	
-
 
110
				End If	
-
 
111
							
-
 
112
				' Find the first occurence of the dot in package version B
-
 
113
				pos = InStr(CurrentPkgVersion, ".")
-
 
114
				If pos <> 0 Then
-
 
115
					' Extract the Major Version for B
-
 
116
					MajorB = Mid(CurrentPkgVersion, 1, pos - 1)
-
 
117
					' Delete the Major Version Value from the string to get the minor and patch version
-
 
118
					CurrentPkgVersion = Mid(CurrentPkgVersion, pos + 1, Len(CurrentPkgVersion))
-
 
119
					' Find the second occurence of the dot in package version B
-
 
120
					pos = InStr(CurrentPkgVersion, ".")
-
 
121
					' Extract the Minor Version for B
-
 
122
					If pos <> 0 Then
-
 
123
						MinorB = Mid(CurrentPkgVersion, 1, pos - 1)
-
 
124
						' Delete the Minor Version value from the string to get the patch version
-
 
125
						CurrentPkgVersion = Mid(CurrentPkgVersion, pos + 1, Len(CurrentPkgVersion))
-
 
126
						' Find the last occurence of the dot in package version B
-
 
127
						pos = InStr(CurrentPkgVersion, ".")
-
 
128
							If pos <> 0 Then
-
 
129
							' Extract the Patch Version for B
-
 
130
							PatchB = Mid(CurrentPkgVersion, 1, pos - 1)
-
 
131
						End If
-
 
132
					End If
-
 
133
				End If
-
 
134
				
-
 
135
				If NOT isNull(PatchA) AND NOT isNull(PatchB) Then
-
 
136
					If isNumeric(PatchA) AND isNumeric(PatchB) Then
-
 
137
						If CLng(PatchA) < 1000 Then
-
 
138
							PatchA = CLng(PatchA) * 1000 
-
 
139
						End If
-
 
140
						If CLng(PatchB) < 1000 Then
-
 
141
							PatchB = CLng(PatchB) * 1000
-
 
142
						End If	
-
 
143
					End If	
-
 
144
				End If 
-
 
145
				
-
 
146
				If MajorA = MajorB Then
-
 
147
					If MinorA = MinorB Then
-
 
148
						If IsNumeric(PatchA) AND IsNumeric(PatchB) Then
-
 
149
							
-
 
150
							If CDbl(PatchB) > CDbl(PatchA) Then
-
 
151
							Else										
-
 
152
								CheckProduction = True
190
   Dim ProdIdInProductionBOM
153
							End If
-
 
154
						End If
-
 
155
					Else
-
 
156
						If IsNumeric(MinorA) AND IsNumeric(MinorB) Then
-
 
157
							If CInt(MinorB) > CInt(MinorA) Then
-
 
158
							Else
-
 
159
								CheckProduction = True								
-
 
160
							End If									
-
 
161
						End If
-
 
162
					End If
-
 
163
				Else
-
 
164
					If IsNumeric(MajorA) AND IsNumeric(MajorB) Then
-
 
165
						If 	CInt(MajorB) > CInt(MajorA) Then
-
 
166
						Else
-
 
167
							CheckProduction = True
191
   Dim PkgVersionInProductionBOM
168
						End If	
192
   Dim Comments
169
					End If
-
 
170
				End If		
-
 
171
	
-
 
172
 
-
 
173
 
193
 
174
		rsQry.Close()
-
 
175
		Set rsQry = Nothing
194
   CheckProduction = False 'Setting it initially to be false
176
 
195
 
177
		OraDatabase.Parameters.Remove "PKG_ID"		
196
   OraDatabase.Parameters.Remove "PRODUCTION_BOM"
178
	
-
 
179
	rsTemp.MoveNext()
-
 
180
	Wend
-
 
181
	
-
 
182
	OraDatabase.Parameters.Remove "CURRENT_BOM"
197
   OraDatabase.Parameters.Add    "PRODUCTION_BOM", ProductionBOM, ORAPARM_INPUT, ORATYPE_NUMBER
183
	OraDatabase.Parameters.Remove "PRODUCTION_BOM"
198
   OraDatabase.Parameters.Add    "CURRENT_BOM",    ComparisonBOM, ORAPARM_INPUT, ORATYPE_NUMBER
184
	
-
 
185
	
-
 
186
	rsTemp.Close()
-
 
187
	Set	rsTemp = Nothing
-
 
188
 
199
 
-
 
200
   Set rsTemp = OraDatabase.DbCreateDynaset( GetQuery ("BomCheck.sql"), ORADYN_DEFAULT )
189
 
201
 
-
 
202
   OraDatabase.Parameters.Remove "CURRENT_BOM"
-
 
203
 
-
 
204
   ' iterate through packages
-
 
205
   While (NOT rsTemp.BOF) AND (NOT rsTemp.EOF) AND (CheckProduction = False)
-
 
206
 
-
 
207
      PkgIdInComparisonBOM      = rsTemp("pkg_id")
-
 
208
      PkgVersionInComparisonBOM = rsTemp("pkg_version")
-
 
209
 
-
 
210
      ' Get the version of this product that is currently in the production BOM
-
 
211
      If (GetProductIDandVersionInBOM( ProductionBOM, PkgIdInComparisonBOM, ProdIdInProductionBOM, PkgVersionInProductionBOM, Comments ) = True) Then
-
 
212
         'check to see if the comparison BOM has the same or newer version
-
 
213
         CheckProduction = Is_VerA_SameOrNewerThan_VerB( PkgVersionInComparisonBOM, PkgVersionInProductionBOM, False )
-
 
214
      End If
-
 
215
 
-
 
216
      rsTemp.MoveNext()
-
 
217
   WEnd
-
 
218
 
-
 
219
   OraDatabase.Parameters.Remove "PRODUCTION_BOM"
-
 
220
 
-
 
221
   rsTemp.Close()
-
 
222
   Set rsTemp = Nothing
190
End Function
223
End Function
191
'--------------------------------------------------------------------------------------------------------------------------
224
'--------------------------------------------------------------------------------------------------------------------------
192
Function AddTrailingZeros(byval n, byval count)
225
Function AddTrailingZeros(byval n, byval count)
193
	if len(n) >= count then
226
   if len(n) >= count then
194
		AddTrailingZeros = n
227
      AddTrailingZeros = n
195
		exit function
228
      exit function
196
	end if
229
   end if
197
 
230
 
198
	dim c, s, i
231
   dim c, s, i
199
	c = count - len(n)
232
   c = count - len(n)
200
 
233
 
201
	for i = 1 to c
234
   for i = 1 to c
202
		s = s & "0"
235
      s = s & "0"
203
	next
236
   next
204
	s = cstr(n) & s
237
   s = cstr(n) & s
205
 
238
 
206
	AddTrailingZeros = s
239
   AddTrailingZeros = s
207
End function
240
End function
208
'--------------------------------------------------------------------------------------------------------------
241
'--------------------------------------------------------------------------------------------------------------
209
Sub GetProductList ( nBom_id, nComparedBomId, outProductList, Flag )
242
Sub GetProductList ( nBom_id, nComparedBomId, outProductList, Flag )
210
	Dim rsQry, query, showAll
243
   Dim rsQry, showAll
211
	
244
 
212
	'' Use SHOWALL parameter is BOM has old bom
245
   '' Use SHOWALL parameter is BOM has old bom
213
	'showAll = "Y"
246
   'showAll = "Y"
214
	'If nBom_id <> nComparedBomId Then
247
   'If nBom_id <> nComparedBomId Then
215
	'	showAll = parShowall
248
   '   showAll = parShowall
216
	'End If
249
   'End If
217
	OraDatabase.Parameters.Add "BOM_ID", 	 	 nBom_id,		 ORAPARM_INPUT, ORATYPE_NUMBER 
250
   OraDatabase.Parameters.Add "BOM_ID",         nBom_id,        ORAPARM_INPUT, ORATYPE_NUMBER
218
	OraDatabase.Parameters.Add "COMPARE_BOM_ID", nComparedBomId, ORAPARM_INPUT, ORATYPE_NUMBER 
251
   OraDatabase.Parameters.Add "COMPARE_BOM_ID", nComparedBomId, ORAPARM_INPUT, ORATYPE_NUMBER
219
	OraDatabase.Parameters.Add "CURRENT_BOM", dbPARbom_id, ORAPARM_INPUT, ORATYPE_NUMBER
252
   OraDatabase.Parameters.Add "CURRENT_BOM",    dbPARbom_id,    ORAPARM_INPUT, ORATYPE_NUMBER
220
 
253
 
221
	If Flag = TRUE Then
254
   If Flag = TRUE Then
222
		Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("BomCompare.sql"), ORADYN_DEFAULT )
255
      Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("BomCompare.sql"), ORADYN_DEFAULT )
223
	Else
256
   Else
224
		Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("BomCompare_BaseConfig.sql"), ORADYN_DEFAULT )
257
      Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("BomCompare_BaseConfig.sql"), ORADYN_DEFAULT )
225
	End If
258
   End If
226
	
259
 
227
	If rsQry.RecordCount > 0 Then
260
   If rsQry.RecordCount > 0 Then
228
		outProductList = rsQry.GetRows()
261
      outProductList = rsQry.GetRows()
229
	Else
262
   Else
230
		outProductList = NULL
263
      outProductList = NULL
231
	End If
264
   End If
232
	
-
 
233
	
265
 
234
	OraDatabase.Parameters.Remove "COMPARE_BOM_ID"
266
   OraDatabase.Parameters.Remove "COMPARE_BOM_ID"
235
	OraDatabase.Parameters.Remove "BOM_ID"
267
   OraDatabase.Parameters.Remove "BOM_ID"
236
	OraDatabase.Parameters.Remove "CURRENT_BOM"
268
   OraDatabase.Parameters.Remove "CURRENT_BOM"
237
End Sub
269
End Sub
238
'--------------------------------------------------------------------------------------------------------------------------
270
'--------------------------------------------------------------------------------------------------------------------------
239
Sub GetFormDetails ( nBom_id, ByRef outobjDetails )
271
Sub GetFormDetails ( nBom_id, ByRef outobjDetails )
240
	
272
 
241
	Call GetBomDetails ( nBom_id, outobjDetails )
273
   Call GetBomDetails ( nBom_id, outobjDetails )
242
	
274
 
243
	outobjDetails.Item("root_version") = GetRootVersion ( outobjDetails.Item("bom_version") )
275
   outobjDetails.Item("root_version") = GetRootVersion ( outobjDetails.Item("bom_version") )
244
	
276
 
245
	'-- Set compare_bom_id 
277
   '-- Set compare_bom_id
246
	If Request("compare_bom_id") <> "" Then
278
   If Request("compare_bom_id") <> "" Then
247
		outobjDetails.Item("compare_bom_id") =  Request("compare_bom_id")
279
      outobjDetails.Item("compare_bom_id") =  Request("compare_bom_id")
248
	Else
280
   Else
249
		outobjDetails.Item("compare_bom_id") = outobjDetails.Item("parent_bom_id")
281
      outobjDetails.Item("compare_bom_id") = outobjDetails.Item("parent_bom_id")
250
	End If
282
   End If
251
	
283
 
252
End Sub
284
End Sub
253
'--------------------------------------------------------------------------------------------------------------
285
'--------------------------------------------------------------------------------------------------------------
254
Function GetBomTreeList ()
286
Function GetBomTreeList ()
255
	Dim rsQry, query
287
   Dim rsQry
256
	
288
 
257
	OraDatabase.Parameters.Add "BRANCH_ID", 	objFormCollector.Item("rtag_id_fk"),	ORAPARM_INPUT, ORATYPE_NUMBER 
289
   OraDatabase.Parameters.Add "BRANCH_ID", objFormCollector.Item("rtag_id_fk"), ORAPARM_INPUT, ORATYPE_NUMBER
258
	OraDatabase.Parameters.Add "BOM_ID", 	objFormCollector.Item("bom_id"),	ORAPARM_INPUT, ORATYPE_NUMBER 
290
   OraDatabase.Parameters.Add "BOM_ID",    objFormCollector.Item("bom_id"),     ORAPARM_INPUT, ORATYPE_NUMBER
259
	OraDatabase.Parameters.Add "BOM_NAME", 	objFormCollector.Item("bom_name"),	ORAPARM_INPUT, ORATYPE_NUMBER 
291
   OraDatabase.Parameters.Add "BOM_NAME",  objFormCollector.Item("bom_name"),   ORAPARM_INPUT, ORATYPE_NUMBER
260
	
292
 
261
	If objFormCollector.Item("rtag_id_fk") = 542 Then'This is because SFO uses Front Office and Back Office
293
   If objFormCollector.Item("rtag_id_fk") = 542 Then'This is because SFO uses Front Office and Back Office
262
		Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("ProductionTreeComboSFO.sql"), ORADYN_DEFAULT )
294
      Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("ProductionTreeComboSFO.sql"), ORADYN_DEFAULT )
263
	Else
295
   Else
264
		Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("ProductionTreeCombo.sql"), ORADYN_DEFAULT )
296
      Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("ProductionTreeCombo.sql"), ORADYN_DEFAULT )
265
	End If
297
   End If
266
	
298
 
267
	If rsQry.RecordCount > 0 Then
299
   If rsQry.RecordCount > 0 Then
268
		GetBomTreeList = rsQry.GetRows()
300
      GetBomTreeList = rsQry.GetRows()
269
		
301
 
270
	Else
302
   Else
271
		GetBomTreeList = NULL
303
      GetBomTreeList = NULL
272
		
304
 
273
	End If
305
   End If
274
	
-
 
275
 
306
 
276
	OraDatabase.Parameters.Remove "BRANCH_ID"
307
   OraDatabase.Parameters.Remove "BRANCH_ID"
277
	OraDatabase.Parameters.Remove "BOM_NAME"
308
   OraDatabase.Parameters.Remove "BOM_NAME"
278
	OraDatabase.Parameters.Remove "BOM_ID"
309
   OraDatabase.Parameters.Remove "BOM_ID"
279
	
310
 
280
	rsQry.Close
311
   rsQry.Close
281
	Set rsQry = Nothing
312
   Set rsQry = Nothing
282
End Function
313
End Function
283
 
314
 
284
'--------------------------------------------------------------------------------------------------------------
315
'--------------------------------------------------------------------------------------------------------------
285
Function GetCompareBomDetails ( nBomId )
316
Function GetCompareBomDetails ( nBomId )
286
	Dim rsQry, query
317
   Dim rsQry
287
	OraDatabase.Parameters.Add "BOM_ID", 	nBomId,	ORAPARM_INPUT, ORATYPE_NUMBER 
318
   OraDatabase.Parameters.Add "BOM_ID",    nBomId,   ORAPARM_INPUT, ORATYPE_NUMBER
288
	
319
 
289
	Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("BomLocationDetails.sql"), ORADYN_DEFAULT )
320
   Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("BomLocationDetails.sql"), ORADYN_DEFAULT )
290
	
321
 
291
	If rsQry.RecordCount > 0 Then
322
   If rsQry.RecordCount > 0 Then
292
		GetCompareBomDetails = rsQry("proj_name") &"&nbsp;/&nbsp;"& rsQry("branch_name") &"&nbsp;/&nbsp;"& rsQry("bom_name") &"&nbsp;"& rsQry("bom_version") &"."& rsQry("bom_lifecycle")
323
      GetCompareBomDetails = rsQry("proj_name") &"&nbsp;/&nbsp;"& rsQry("branch_name") &"&nbsp;/&nbsp;"& rsQry("bom_name") &"&nbsp;"& rsQry("bom_version") &"."& rsQry("bom_lifecycle")
293
		
324
 
294
	Else
325
   Else
295
		GetCompareBomDetails = NULL
326
      GetCompareBomDetails = NULL
296
		
327
 
297
	End If
328
   End If
298
	
329
 
299
	OraDatabase.Parameters.Remove "BOM_ID"
330
   OraDatabase.Parameters.Remove "BOM_ID"
300
	
331
 
301
	rsQry.Close
332
   rsQry.Close
302
	Set rsQry = Nothing
333
   Set rsQry = Nothing
303
End Function
334
End Function
304
'--------------------------------------------------------------------------------------------------------------
335
'--------------------------------------------------------------------------------------------------------------
305
%>
336
%>
306
<%
337
<%
307
'------------ RUN BEFORE PAGE RENDER ----------
338
'------------ RUN BEFORE PAGE RENDER ----------
Line 320... Line 351...
320
<script language="JavaScript" src="scripts/remote_scripting.js"></script>
351
<script language="JavaScript" src="scripts/remote_scripting.js"></script>
321
<script language="JavaScript" type="text/javascript">
352
<script language="JavaScript" type="text/javascript">
322
<!--
353
<!--
323
 
354
 
324
function RequestProductLocation( paramString, rowId ){
355
function RequestProductLocation( paramString, rowId ){
325
	var requestURL;
356
   var requestURL;
326
	
357
 
327
	// Product is changes, hence can be found in current bom
358
   // Product is changes, hence can be found in current bom
328
	requestURL = 'RequestBomDiffProductLocation.asp';
359
   requestURL = 'RequestBomDiffProductLocation.asp';
329
	
360
 
330
 
361
 
331
	// Show div
362
   // Show div
332
	ToggleDisplay( 'PRODUCT_'+ rowId, 'IMG_EXPAND_PRODUCT_' + rowId, 'IMG_COLLAPSE_PRODUCT_' + rowId );
363
   ToggleDisplay( 'PRODUCT_'+ rowId, 'IMG_EXPAND_PRODUCT_' + rowId, 'IMG_COLLAPSE_PRODUCT_' + rowId );
333
	
364
 
334
	// Set ajax divname
365
   // Set ajax divname
335
	ajaxdivname = 'PRODUCT_'+ rowId;
366
   ajaxdivname = 'PRODUCT_'+ rowId;
336
	
367
 
337
	if ( MM_findObj( ajaxdivname ).innerHTML == '<%=enumLOADING%>') 
368
   if ( MM_findObj( ajaxdivname ).innerHTML == '<%=enumLOADING%>')
338
	{
369
   {
339
	
370
 
340
		//Append the name to search for to the requestURL
371
      //Append the name to search for to the requestURL
341
		var url = requestURL + paramString;
372
      var url = requestURL + paramString;
342
		
373
 
343
		//Create the xmlHttp object to use in the request
374
      //Create the xmlHttp object to use in the request
344
		//stateChangeHandler will fire when the state has changed, i.e. data is received back
375
      //stateChangeHandler will fire when the state has changed, i.e. data is received back
345
		// This is non-blocking (asynchronous)
376
      // This is non-blocking (asynchronous)
346
		xmlHttp = GetXmlHttpObject(stateChangeHandler);
377
      xmlHttp = GetXmlHttpObject(stateChangeHandler);
347
		
378
 
348
		//Send the xmlHttp get to the specified url
379
      //Send the xmlHttp get to the specified url
349
		xmlHttp_Get(xmlHttp, url);
380
      xmlHttp_Get(xmlHttp, url);
350
		
381
 
351
	}
382
   }
352
	
383
 
353
	
384
 
354
}
385
}
355
 
386
 
356
function RequestProductNotes( paramString, rowId ){
387
function RequestProductNotes( paramString, rowId ){
357
	var requestURL; 
388
   var requestURL;
358
	
389
 
359
	// Product is changes, hence can be found in current bom
390
   // Product is changes, hence can be found in current bom
360
	requestURL = 'RequestProductNotes.asp';
391
   requestURL = 'RequestProductNotes.asp';
361
	
392
 
362
 
393
 
363
	// Show div
394
   // Show div
364
	ToggleDisplay( 'PROD_'+ rowId, 'IMG_EXPAND_PROD_' + rowId, 'IMG_COLLAPSE_PROD_' + rowId );
395
   ToggleDisplay( 'PRODNOTES_'+ rowId, 'IMG_EXPAND_PRODNOTES_' + rowId, 'IMG_COLLAPSE_PRODNOTES_' + rowId );
365
	
396
 
366
	// Set ajax divname
397
   // Set ajax divname
367
	ajaxdivname = 'PROD_'+ rowId;
398
   ajaxdivname = 'PRODNOTES_'+ rowId;
368
	
399
 
369
	if ( MM_findObj( ajaxdivname ).innerHTML == '<%=enumLOADING%>') 
400
   if ( MM_findObj( ajaxdivname ).innerHTML == '<%=enumLOADING%>')
370
	{
401
   {
371
	
402
 
372
		//Append the name to search for to the requestURL
403
      //Append the name to search for to the requestURL
373
		var url = requestURL + paramString;
404
      var url = requestURL + paramString;
374
		
405
 
375
		//Create the xmlHttp object to use in the request
406
      //Create the xmlHttp object to use in the request
376
		//stateChangeHandler will fire when the state has changed, i.e. data is received back
407
      //stateChangeHandler will fire when the state has changed, i.e. data is received back
377
		// This is non-blocking (asynchronous)
408
      // This is non-blocking (asynchronous)
378
		xmlHttp = GetXmlHttpObject(stateChangeHandler);
409
      xmlHttp = GetXmlHttpObject(stateChangeHandler);
379
		
410
 
380
		//Send the xmlHttp get to the specified url
411
      //Send the xmlHttp get to the specified url
381
		xmlHttp_Get(xmlHttp, url);
412
      xmlHttp_Get(xmlHttp, url);
382
		
413
 
383
	}
414
   }
384
}
415
}
385
	
416
 
386
function RequestPatches( paramString, rowId ){
417
function RequestPatches( paramString, rowId ){
387
	var requestURL; 
418
   var requestURL;
388
	
419
 
389
	// Product is changes, hence can be found in current bom
420
   // Product is changes, hence can be found in current bom
390
	requestURL = 'RequestBomDiffPatches.asp';
421
   requestURL = 'RequestBomDiffPatches.asp';
391
	
422
 
392
 
423
 
393
	// Show div
424
   // Show div
394
	ToggleDisplay( 'PRODUCT_'+ rowId, 'IMG_EXPAND_PRODUCT_' + rowId, 'IMG_COLLAPSE_PRODUCT_' + rowId );
425
   ToggleDisplay( 'PRODUCT_'+ rowId, 'IMG_EXPAND_PRODUCT_' + rowId, 'IMG_COLLAPSE_PRODUCT_' + rowId );
395
	
426
 
396
	// Set ajax divname
427
   // Set ajax divname
397
	ajaxdivname = 'PRODUCT_'+ rowId;
428
   ajaxdivname = 'PRODUCT_'+ rowId;
398
	
429
 
399
	if ( MM_findObj( ajaxdivname ).innerHTML == '<%=enumLOADING%>') 
430
   if ( MM_findObj( ajaxdivname ).innerHTML == '<%=enumLOADING%>')
400
	{
431
   {
401
	
432
 
402
		//Append the name to search for to the requestURL
433
      //Append the name to search for to the requestURL
403
		var url = requestURL + paramString;
434
      var url = requestURL + paramString;
404
		
435
 
405
		//Create the xmlHttp object to use in the request
436
      //Create the xmlHttp object to use in the request
406
		//stateChangeHandler will fire when the state has changed, i.e. data is received back
437
      //stateChangeHandler will fire when the state has changed, i.e. data is received back
407
		// This is non-blocking (asynchronous)
438
      // This is non-blocking (asynchronous)
408
		xmlHttp = GetXmlHttpObject(stateChangeHandler);
439
      xmlHttp = GetXmlHttpObject(stateChangeHandler);
409
		
440
 
410
		//Send the xmlHttp get to the specified url
441
      //Send the xmlHttp get to the specified url
411
		xmlHttp_Get(xmlHttp, url);
442
      xmlHttp_Get(xmlHttp, url);
412
		
443
 
413
	}	
444
   }
414
	
445
 
415
}
446
}
416
 
447
 
417
 
448
 
418
 
449
 
419
 
450
 
Line 426... Line 457...
426
<!-- +++++++++++++++++++++++ -->
457
<!-- +++++++++++++++++++++++ -->
427
<!-- MAIN MENU  +  CRUMBS ++++++++++++++++ -->
458
<!-- MAIN MENU  +  CRUMBS ++++++++++++++++ -->
428
<!--#include file="_main_menu.asp"-->
459
<!--#include file="_main_menu.asp"-->
429
<!-- +++++++++++++++++++++++++++++++++++++ -->
460
<!-- +++++++++++++++++++++++++++++++++++++ -->
430
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
461
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
431
  <tr>
462
   <tr>
432
    <td width="1%" valign="top" background="images/bg_bage_0.gif">
463
      <td width="1%" valign="top" background="images/bg_bage_0.gif">
433
	<!-- NODE BROWSER ++++++++++++++++++++++ -->
464
         <!-- NODE BROWSER ++++++++++++++++++++++ -->
434
	<!--#include file="_bom_browser.asp"-->
465
         <!--#include file="_bom_browser.asp"-->
435
	<!-- END OF NODE BROWSER +++++++++++++++ -->
466
         <!-- END OF NODE BROWSER +++++++++++++++ -->
436
	</td>
467
      </td>
437
    <td width="1" background="images/bg_bage_1.gif"><img src="images/spacer.gif" width="1" height="600"></td>
468
      <td width="1" background="images/bg_bage_1.gif"><img src="images/spacer.gif" width="1" height="600"></td>
438
    <td width="100%" valign="top" bgcolor="#FFFFFF">
469
      <td width="100%" valign="top" bgcolor="#FFFFFF">
439
	<table width="100%"  border="0" cellspacing="0" cellpadding="0">
470
         <table width="100%"  border="0" cellspacing="0" cellpadding="0">
440
	  <tr>
471
            <tr>
441
        <td valign="top" background="images/bg_green.gif"></td>
472
               <td valign="top" background="images/bg_green.gif"></td>
442
        <td align="right" valign="bottom" background="images/bg_green.gif" class="body_txtw"><%Call RenderTitleWithoutVersion( objBomCollector )%></td>
473
               <td align="right" valign="bottom" background="images/bg_green.gif" class="body_txtw"><%Call RenderTitleWithoutVersion( objBomCollector )%></td>
443
        <td background="images/bg_green.gif"><img src="images/spacer.gif" width="10" height="20"></td>
474
               <td background="images/bg_green.gif"><img src="images/spacer.gif" width="10" height="20"></td>
444
      </tr>
475
            </tr>
445
      <tr>
476
            <tr>
446
        <td width="1%" valign="top" background="images/bg_green.gif"></td>
477
               <td width="1%" valign="top" background="images/bg_green.gif"></td>
447
        <td width="100%" valign="bottom" background="images/bg_green.gif">
478
               <td width="100%" valign="bottom" background="images/bg_green.gif">
448
		<!-- TAB CONTROLS ++++++++++++++++++++++ -->
479
                  <!-- TAB CONTROLS ++++++++++++++++++++++ -->
449
		<!--#include file="_tabs_definition.asp"-->
480
                  <!--#include file="_tabs_definition.asp"-->
450
		<%
481
                  <%
451
		Set objTabControl = New TabControl
482
                  Set objTabControl = New TabControl
452
		objTabControl.TemplateDoc = ReadFile( Server.MapPath("controls/ERGTabStyleWinXP/tab_style.html") ) ' Supply tab style definition
483
                  objTabControl.TemplateDoc = ReadFile( Server.MapPath("controls/ERGTabStyleWinXP/tab_style.html") ) ' Supply tab style definition
453
		objTabControl.TabStyle = "StyleWinXP"
484
                  objTabControl.TabStyle = "StyleWinXP"
454
		objTabControl.AddTabDefnition ( arrBomTabDef )
485
                  objTabControl.AddTabDefnition ( arrBomTabDef )
455
		objTabControl.Render ()
486
                  objTabControl.Render ()
456
		%>
487
                  %>
457
		<!-- END OF TAB CONTROLS +++++++++++++++ -->
488
                  <!-- END OF TAB CONTROLS +++++++++++++++ -->
458
		</td>
489
               </td>
459
        <td width="1%" background="images/bg_green.gif"><img src="images/spacer.gif" width="10" height="35"></td>
490
               <td width="1%" background="images/bg_green.gif"><img src="images/spacer.gif" width="10" height="35"></td>
460
        </tr>
491
            </tr>
461
      <tr>
492
            <tr>
462
        <td background="images/bg_bage_0.gif"><img src="images/spacer.gif" width="30" height="10"></td>
493
               <td background="images/bg_bage_0.gif"><img src="images/spacer.gif" width="30" height="10"></td>
463
        <td background="images/bg_bage_0.gif">
494
               <td background="images/bg_bage_0.gif">
464
		<!-- BUTTONS CONTROL +++++++++++++++++++ -->
495
                  <!-- BUTTONS CONTROL +++++++++++++++++++ -->
465
		<%
496
                  <%
466
		'-- Define Action buttons on this tab
497
                  '-- Define Action buttons on this tab
467
		aTabBtnsDef = Array("abtnAddPatches")
498
                  aTabBtnsDef = Array("abtnAddPatches")
468
		
499
 
469
		Call LoadTabActionButtons ( aTabBtnsDef, objBtnControl )
500
                  Call LoadTabActionButtons ( aTabBtnsDef, objBtnControl )
470
		
501
 
471
		' -- Tell control if buttons need to be readonly actions 
502
                  ' -- Tell control if buttons need to be readonly actions
472
		objBtnControl.IsReadonlyAction = objBomCollector.Item("is_readonly")
503
                  objBtnControl.IsReadonlyAction = objBomCollector.Item("is_readonly")
473
		
504
 
474
		' -- Render Buttons
505
                  ' -- Render Buttons
475
		Call objBtnControl.Render  ( aTabBtnsDef )
506
                  Call objBtnControl.Render  ( aTabBtnsDef )
476
		%>
507
                  %>
477
		<!-- +++++++++++++++++++++++++++++++++++ -->
508
                  <!-- +++++++++++++++++++++++++++++++++++ -->
478
		</td>
509
               </td>
479
        <td background="images/bg_green.gif"><img src="images/p_bar_corrner.gif" width="17" height="42"></td>
510
               <td background="images/bg_green.gif"><img src="images/p_bar_corrner.gif" width="17" height="42"></td>
480
        </tr>
511
            </tr>
481
      <tr>
512
            <tr>
482
        <td>&nbsp;</td>
513
               <td>&nbsp;</td>
483
        <td>&nbsp;</td>
514
               <td>&nbsp;</td>
484
        <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>
515
               <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>
485
        </tr>
516
            </tr>
486
    </table>
517
         </table>
487
	
518
 
488
<!-- PRODUCT REJECTED ------------------------------------------------------------------------------------------ -->	
519
         <!-- PRODUCT REJECTED ------------------------------------------------------------------------------------------ -->
489
	<%If objBomCollector.Item ("is_rejected") = enumDB_YES Then%>
520
         <%If objBomCollector.Item ("is_rejected") = enumDB_YES Then%>
490
	<table width="100%"  border="0" cellspacing="10" cellpadding="0">
521
            <table width="100%"  border="0" cellspacing="10" cellpadding="0">
491
      <tr>
522
               <tr>
492
        <td>
523
                  <td>
493
		<%
524
                     <%
494
			OraDatabase.Parameters.Add "ENTITY_ID", 		dbPARbom_id,	ORAPARM_INPUT, ORATYPE_NUMBER
525
                     OraDatabase.Parameters.Add "ENTITY_ID",        dbPARbom_id,           ORAPARM_INPUT, ORATYPE_NUMBER
495
			OraDatabase.Parameters.Add "ENUM_ENTITY_TYPE", 	"enumENTITY_TYPE_BOM",	ORAPARM_INPUT, ORATYPE_VARCHAR2
526
                     OraDatabase.Parameters.Add "ENUM_ENTITY_TYPE", "enumENTITY_TYPE_BOM", ORAPARM_INPUT, ORATYPE_VARCHAR2
496
			
527
 
497
			Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("RejectionTrail.sql"), ORADYN_DEFAULT )
528
                     Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("RejectionTrail.sql"), ORADYN_DEFAULT )
498
			
529
 
499
			
530
                     Dim sMessage
500
			sMessage = "<table width='100%'  border='0' cellspacing='3' cellpadding='0'>"
531
                     sMessage = "<table width='100%'  border='0' cellspacing='3' cellpadding='0'>"
501
			sMessage = sMessage &"<tr>"
532
                     sMessage = sMessage &"<tr>"
502
			sMessage = sMessage &"<td width='100%' class='body_txt'><b>BOM is REJECTED!</b><br><br><br></td>"
533
                     sMessage = sMessage &"<td width='100%' class='body_txt'><b>BOM is REJECTED!</b><br><br><br></td>"
503
			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>"
534
                     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>"
504
			sMessage = sMessage &"</tr>"
535
                     sMessage = sMessage &"</tr>"
505
			
536
 
506
			While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
537
                     While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
507
				sMessage = sMessage & "<tr><td colspan='2' background='images/bg_table_border.gif'><img src='images/spacer.gif' width='1' height='1'></td></tr>"
538
                        sMessage = sMessage & "<tr><td colspan='2' background='images/bg_table_border.gif'><img src='images/spacer.gif' width='1' height='1'></td></tr>"
508
				sMessage = sMessage &"<tr>"
539
                        sMessage = sMessage &"<tr>"
509
				sMessage = sMessage &"<td class='body_txt'>"
540
                        sMessage = sMessage &"<td class='body_txt'>"
510
				If rsQry("is_rejected") = enumDB_YES Then
541
                        If rsQry("is_rejected") = enumDB_YES Then
511
					sMessage = sMessage &"BOM is REJECTED!<br>"
542
                           sMessage = sMessage &"BOM is REJECTED!<br>"
512
				Else
543
                        Else
513
					sMessage = sMessage &"BOM is Accepted!<br>"
544
                           sMessage = sMessage &"BOM is Accepted!<br>"
514
				End If
545
                        End If
515
				sMessage = sMessage & objFormater.TextToHTML( rsQry("comments") ) &"<br><SPAN class='body_smltxtg'>"& rsQry("creator") &"</SPAN></td>"
546
                        sMessage = sMessage & objFormater.TextToHTML( rsQry("comments") ) &"<br><SPAN class='body_smltxtg'>"& rsQry("creator") &"</SPAN></td>"
516
				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>"
547
                        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>"
517
				sMessage = sMessage &"</tr>"
548
                        sMessage = sMessage &"</tr>"
518
				
549
 
519
				rsQry.MoveNext
550
                        rsQry.MoveNext
520
			WEnd
551
                     WEnd
521
			rsQry.Close
552
                     rsQry.Close
522
			
553
 
523
			sMessage = sMessage &"</table>"
554
                     sMessage = sMessage &"</table>"
524
			
555
 
525
			Call Messenger ( sMessage, "bi_rejected.gif", "100%" )
556
                     Call Messenger ( sMessage, "bi_rejected.gif", "100%" )
526
			
557
 
527
			Response.write "<br>"
558
                     Response.write "<br>"
528
			
559
 
529
			
560
 
530
			OraDatabase.Parameters.Remove "ENTITY_ID"
561
                     OraDatabase.Parameters.Remove "ENTITY_ID"
531
			OraDatabase.Parameters.Remove "ENUM_ENTITY_TYPE"
562
                     OraDatabase.Parameters.Remove "ENUM_ENTITY_TYPE"
532
		%>
563
                     %>
533
		
564
                  </td>
534
		</td>
565
               </tr>
535
        </tr>
566
            </table>
536
    </table>
567
         <%End If%>
537
	<%End If%>	
568
         <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
538
<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->	
569
 
539
 
570
         <table width="100%"  border="0" cellspacing="10" cellpadding="0">
540
	
571
 
541
	<table width="100%"  border="0" cellspacing="10" cellpadding="0">
572
            <tr>
542
 
573
               <td width="1"><img src="images/spacer.gif" width="1" height="1"></td>
543
	  <tr>
574
               <td width="100%"><img src="images/spacer.gif" width="1" height="1"></td>
544
        <td width="1"><img src="images/spacer.gif" width="1" height="1"></td>
575
            </tr>
545
        <td width="100%"><img src="images/spacer.gif" width="1" height="1"></td>
576
 
546
      </tr>
577
            <!-- BOM Comments +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
547
	  
578
            <%If (objBomCollector.Item("bom_comments") <> "") Then%>
548
	  <!-- BOM Comments +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
579
               <tr>
549
	  <%If (objBomCollector.Item("bom_comments") <> "") Then%>
580
                  <td align="right" valign="top"><img src="icons/i_bom_properties.gif" width="30" height="30" hspace="3"></td>
550
      <tr>
581
                  <td valign="top" class="body_txt">
551
        <td align="right" valign="top"><img src="icons/i_bom_properties.gif" width="30" height="30" hspace="3"></td>
582
                     <SPAN class="body_colb">BOM Comments</SPAN>
552
        <td valign="top" class="body_txt">
583
                     <hr width="100%" size="1px" noshade color="#808080">
553
		
584
                     <SPAN class="body_txt"><%= objFormater.TextToHTML( objBomCollector.Item("bom_comments") )%></SPAN><br><br><br><br>
554
		
585
                  </td>
555
			<SPAN class="body_colb">BOM Comments</SPAN>
586
               </tr>
556
			<hr width="100%" size="1px" noshade color="#808080">
587
            <%End If%>
557
			<SPAN class="body_txt"><%= objFormater.TextToHTML( objBomCollector.Item("bom_comments") )%></SPAN><br><br><br><br>
588
 
558
        </td>
589
            <!-- COMPARE BOM +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
559
      </tr>
590
            <tr>
560
	  <%End If%>
591
               <td align="right" valign="top"><img src="icons/i_bom_diff.gif" width="37" height="33" hspace="3"></td>
561
	  
592
               <td valign="top" class="body_txt">
562
	  
593
                  <%
563
	  <!-- COMPARE BOM +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
594
                  '-- FROM START --------------------------------------------------------------------------------------------------------------
564
      <tr>
595
                  objFormComponent.FormName = "OldVersion"
565
        <td align="right" valign="top"><img src="icons/i_bom_diff.gif" width="37" height="33" hspace="3"></td>
596
                  objFormComponent.Action = SCRIPT_NAME
566
        <td valign="top" class="body_txt">
597
                  objFormComponent.Method = "get"
567
		
598
                  Call objFormComponent.FormStart()
568
		<%
599
 
569
		'-- FROM START --------------------------------------------------------------------------------------------------------------
600
                  Dim numOfBomRows
570
		objFormComponent.FormName = "OldVersion"
601
                  Dim rowNumBom
571
		objFormComponent.Action = SCRIPT_NAME
602
 
572
		objFormComponent.Method = "get"
603
                  If (NOT IsNull(GetBomTreeList())) Then
573
		Call objFormComponent.FormStart()
604
                     numOfBomRows = UBound( GetBomTreeList(), 2 )
574
 
605
                  Else
575
		If (NOT IsNull(GetBomTreeList())) Then
606
                     numOfBomRows = -1
576
		   numOfRows = UBound( GetBomTreeList(), 2 )
607
                  End If
577
		Else
608
 
578
		   numOfRows = -1
609
                  For rowNumBom = 0 To numOfBomRows
579
		End If
610
                     Dim thisBomId
580
		maxnumOfRows	=	numOfRows
611
                     Dim nextBomId
581
		For  Numrow = 0 To numOfRows 
612
                     thisBomId = GetBomTreeList()( 0, rowNumBom )
582
		Call GetFormDetails ( (GetBomTreeList()( 0, Numrow  )), objBomCollector )
613
                     If rowNumBom = numOfBomRows Then
583
		%> 	
614
                        nextBomId = 0
584
		<SPAN class="body_colb"><br><%= objFormater.TextToHTML( objBomCollector.Item("bom_comments") )%><br><br></SPAN>
615
                     Else
585
		<SPAN class="body_colb">Products/Patches Introduced in <%Call RenderTitle( objBomCollector )%> but not yet deployed in Production BOM<br></SPAN>
616
                        nextBomId = GetBomTreeList()( 0, rowNumBom + 1 )
586
		<a href="pdf\<%Call RenderTitleWithoutBold( objBomCollector )%>.pdf" class="body_link" target="_blank"><b>Click here to Download PDF</b></a>
617
                     End If
587
            <hr width="100%" size="1px" noshade color="#808080">		
618
 
588
		<table width="100%"  border="0" cellspacing="2" cellpadding="0">
619
                     Call GetFormDetails ( thisBomId, objBomCollector )
589
          <tr>
620
                     %>
590
		  	
621
                     <SPAN class="body_colb"><br><%= objFormater.TextToHTML( objBomCollector.Item("bom_comments") )%><br><br></SPAN>
591
		  	<td width="20%" background="images/bg_table_border.gif"><table width="100%"  border="0" cellspacing="1" cellpadding="2">
622
                     <SPAN class="body_colb">Products/Patches Introduced in <%Call RenderTitle( objBomCollector )%> but not yet deployed in Production BOM<br></SPAN>
592
              <tr>
623
                     <a href="pdf\<%Call RenderTitleWithoutBold( objBomCollector )%>.pdf" class="body_link" target="_blank"><b>Click here to Download PDF</b></a>
593
                <td align="left" nowrap background="images/bg_table_col.gif" class="body_col">Product</td>
624
                     <hr width="100%" size="1px" noshade color="#808080">
594
              </tr>
625
                     <table width="100%"  border="0" cellspacing="2" cellpadding="0">
595
            </table></td>
626
                        <tr>
596
			<td width="20%" nowrap align="left" background="images/bg_table_col.gif" class="body_col">Version</td>
627
                           <td width="20%" background="images/bg_table_border.gif">
597
			<td width="60%" nowrap align="left" background="images/bg_table_col.gif" class="body_col">Reason For This Version</td>
628
                              <table width="100%"  border="0" cellspacing="1" cellpadding="2">
598
			<td width="60%" nowrap align="left" background="images/bg_table_col.gif" class="body_col">Approval</td>
629
                                 <tr>
599
          </tr>
630
                                    <td align="left" nowrap background="images/bg_table_col.gif" class="body_col">Product</td>
600
		  <%
631
                                 </tr>
601
 
632
                              </table>
602
	If NOT CheckProduction( Request("bom_id"), (GetBomTreeList()( 0, Numrow  ))) Then 
633
                           </td>
603
	%>
634
                           <td width="20%" nowrap align="left" background="images/bg_table_col.gif" class="body_col">Version</td>
604
		<tr>
635
                           <td width="60%" nowrap align="left" background="images/bg_table_col.gif" class="body_col">Reason For This Version</td>
605
		<td colspan="4" class="body_txtr"><b>Found Matching BOM or Older Versions...Exiting Comparison</b></td></tr>
636
                           <td width="60%" nowrap align="left" background="images/bg_table_col.gif" class="body_col">Approval</td>
606
	<%
637
                        </tr>
607
	Exit For
638
                        <%
608
	End If	  
639
                        If NOT CheckProduction( Request("bom_id"), thisBomId) Then
609
		If Numrow = maxnumOfRows Then
640
                           %>
610
			Call GetProductList ( (GetBomTreeList()( 0, Numrow  )), 0, aProductList, TRUE )
641
                           <tr>
611
		Else
642
                              <td colspan="4" class="body_txtr"><b>Found Matching BOM or Older Versions...Exiting Comparison</b></td>
612
			Call GetProductList ( (GetBomTreeList()( 0, Numrow  )), (GetBomTreeList()( 0, Numrow + 1 )), aProductList, TRUE )	
643
                           </tr>
613
		End	If  
644
                           <%
614
		  If NOT IsNull( aProductList ) Then
645
                           Exit For
615
		  	numOfRows = UBound( aProductList, 2 )
646
                        End If
616
		  Dim currentpkgId
647
 
617
	  	  currentpkgId = -1
648
                        Dim aProductList
618
	
649
 
619
			For rowNum = 0 To numOfRows'For Next Loop Begins
650
                        Call GetProductList ( thisBomId, nextBomId, aProductList, TRUE )
620
				
651
 
621
				ProdId = aProductList( 0, rowNum )
652
                        If NOT IsNull( aProductList ) Then
622
				PkgVersion = aProductList( 2, rowNum )
653
 
623
				'ChangeType = aProductList( 3, rowNum )
654
                           ' Variable used to prevent multiple entries being rendered for the same package
624
				IsPatch = aProductList( 3, rowNum )
655
                           Dim LastPkgId
625
				PkgId = aProductList( 5, rowNum )
656
                           LastPkgId = -1
626
				'Response.Write(PkgId)
657
 
627
				
658
                           Dim numOfProdRows
628
				OraDatabase.Parameters.Remove	"PRODUCTION_BOM"
659
                           Dim rowNumProd
629
				OraDatabase.Parameters.Add "PRODUCTION_BOM", dbPARbom_id, ORAPARM_INPUT, ORATYPE_NUMBER
660
 
630
				OraDatabase.Parameters.Add "PKG_ID", PkgId, ORAPARM_INPUT, ORATYPE_NUMBER
661
                           numOfProdRows = UBound( aProductList, 2 )
631
			
662
 
632
					Set rsQry = OraDatabase.DbCreateDynaset(GetQuery("ProdVersion.sql"), ORADYN_DEFAULT)
663
                           ' Iterate through the list of products
633
				
664
                           For rowNumProd = 0 To numOfProdRows
634
				OldProdId = rsQry("prod_id")
665
 
635
				CurrentPkgVersion = rsQry("pkg_version")
666
                              Response.Flush
636
				Comments = rsQry("comments")
667
 
637
				
668
                              Dim thisProdId
638
				OraDatabase.Parameters.Remove "CURRENT_BOM"
669
                              Dim thisPkgName
639
				OraDatabase.Parameters.Remove "PKG_ID"
670
                              Dim thisPkgVersion
640
				
671
                              Dim thisIsPatch
641
				IsDisplay = True
672
                              Dim thisIsRejected
642
				
673
                              Dim thisPkgId
643
				If IsNull(IsPatch) Then
674
 
644
				Dim MajorA, MajorB, MinorA, MinorB, PatchA, PatchB, pos
675
                              'Extract values into named variables to make code more readable where the values are used later on
645
						MajorA = NULL
676
                              thisProdId      = aProductList( 0, rowNumProd )
646
						MajorB = NULL
677
                              thisPkgName     = aProductList( 1, rowNumProd )
647
						MinorA = NULL
678
                              thisPkgVersion  = aProductList( 2, rowNumProd )
648
						MinorB = NULL
679
                              thisIsPatch     = aProductList( 3, rowNumProd )
649
						PatchA = NULL
680
                              thisIsRejected  = aProductList( 4, rowNumProd )
650
						PatchB = NULL
681
                              thisPkgId       = aProductList( 5, rowNumProd )
651
						
682
 
652
				' Find the first occurence of the dot in package version A
683
                              ' Get the version of this product that is currently in the production BOM
653
						pos = InStr(PkgVersion, ".")
684
                              Dim ProdIdInProductionBOM
654
						If pos <> 0 Then
685
                              Dim PkgVersionInProductionBOM
655
							' Extract the Major Version for A
686
                              Dim Comments
656
							MajorA = Mid(PkgVersion, 1, pos - 1)
687
                              Call GetProductIDandVersionInBOM( dbPARbom_id, thisPkgId, ProdIdInProductionBOM, PkgVersionInProductionBOM, Comments )
657
							' Delete the Major Version Value from the string to get the minor and patch version
688
 
658
							PkgVersion = Mid(PkgVersion, pos + 1, Len(PkgVersion))
689
                              ' 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
659
							' Find the second occurence of the dot in package version A
690
                              ' same or newer than that currently in the production BOM
660
							pos = InStr(PkgVersion, ".")
691
                              Dim IsDisplay
661
							' Extract the Minor Version for A
692
                              IsDisplay = True
662
							If pos <> 0 Then
693
 
663
								MinorA = Mid(PkgVersion, 1, pos - 1)
694
                              If IsNull(thisIsPatch) Then
664
								' Delete the Minor Version value from the string to get the patch version
695
                                 IsDisplay = Is_VerA_SameOrNewerThan_VerB( thisPkgVersion, PkgVersionInProductionBOM, IsDisplay )
665
								PkgVersion = Mid(PkgVersion, pos + 1, Len(PkgVersion))
696
                              End If
666
								' Find the last occurence of the dot in package version A
697
 
667
								pos = InStr(PkgVersion, ".")
698
                              If IsDisplay Then
668
								If pos <> 0 Then
699
                                 Set 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 )
669
									' Extract the Patch Version for A
700
                                 %>
670
									PatchA = Mid(PkgVersion, 1, pos - 1)
701
                                 <%If IsNull(thisIsPatch) Then
671
								End If	
702
                                    If CDbl(LastPkgId) <> CDbl(thisPkgId) Then%>
672
							End If	
703
                                       <tr>
673
						End If	
704
                                          <td nowrap valign="top">
674
									
705
                                             <SPAN id="IMG_EXPAND_PRODUCT_<%=thisBomId%>_<%=thisProdId%>" name="IMG_EXPAND_PRODUCT_<%=thisBomId%>_<%=thisProdId%>" style="display:block;">
675
						' Find the first occurence of the dot in package version B
706
                                                <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%>');">
676
						pos = InStr(CurrentPkgVersion, ".")
707
                                                   <%=LIMG_EXPAND & GetProductIcon( rsTemp ) & thisPkgName%>
677
						If pos <> 0 Then
708
                                                </a>
678
							' Extract the Major Version for B
709
                                             </SPAN>
679
							MajorB = Mid(CurrentPkgVersion, 1, pos - 1)
710
                                             <SPAN id="IMG_COLLAPSE_PRODUCT_<%=thisBomId%>_<%=thisProdId%>" name="IMG_COLLAPSE_PRODUCT_<%=thisBomId%>_<%=thisProdId%>" style="display:none;">
680
							' Delete the Major Version Value from the string to get the minor and patch version
711
                                                <a href="javascript:;" class="menu_link" onClick="ToggleDisplay( 'PRODUCT_<%=thisBomId%>_<%=thisProdId%>', 'IMG_EXPAND_PRODUCT_<%=thisBomId%>_<%=thisProdId%>', 'IMG_COLLAPSE_PRODUCT_<%=thisBomId%>_<%=thisProdId%>');">
681
							CurrentPkgVersion = Mid(CurrentPkgVersion, pos + 1, Len(CurrentPkgVersion))
712
                                                   <%=LIMG_COLLAPSE & GetProductIcon( thisIsRejected ) &  thisPkgName%>
682
							' Find the second occurence of the dot in package version B
713
                                                </a>
683
							pos = InStr(CurrentPkgVersion, ".")
714
                                             </SPAN>
684
							' Extract the Minor Version for B
715
                                          </td>
685
							If pos <> 0 Then
716
                                          <td nowrap class="body_row" valign="top"><%=thisPkgVersion%>         </td>
686
								MinorB = Mid(CurrentPkgVersion, 1, pos - 1)
717
                                          <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>
687
								' Delete the Minor Version value from the string to get the patch version
718
                                          <%
688
								CurrentPkgVersion = Mid(CurrentPkgVersion, pos + 1, Len(CurrentPkgVersion))
719
                                          Dim rsForm, Tester, Manager
689
								' Find the last occurence of the dot in package version B
720
                                          Tester = False
690
								pos = InStr(CurrentPkgVersion, ".")
721
                                          Manager = False
691
									If pos <> 0 Then
722
                                          If objAccessControl.IsActive("ApprovedByManager") Then
692
									' Extract the Patch Version for B
723
                                             Manager = True
693
									PatchB = Mid(CurrentPkgVersion, 1, pos - 1)
724
                                          ElseIf objAccessControl.IsActive("ApprovedByTester") Then
694
								End If
725
                                             Tester = True
695
							End If
726
                                          End If
696
						End If
727
 
697
						
728
                                          Set rsForm = OraDatabase.DbCreateDynaset("SELECT * FROM RELEASE_AUTHORISATION WHERE PV_ID="&thisProdId&" AND BOM_ID="&Request("bom_id"), ORADYN_DEFAULT)
698
						If NOT isNull(PatchA) AND NOT isNull(PatchB) Then
729
 
699
							If isNumeric(PatchA) AND isNumeric(PatchB) Then
730
                                          %>
700
								If CLng(PatchA) < 1000 Then
731
                                          <%If rsForm.RecordCount = 0 Then%>
701
									PatchA = CLng(PatchA) * 1000 
732
                                             <%If Tester Then%>
702
								End If
733
                                                <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>
703
								If CLng(PatchB) < 1000 Then
734
                                             <%ElseIf Manager Then%>
704
									PatchB = CLng(PatchB) * 1000
735
                                                <td class="body_txto">Awaiting Tester</td>
705
								End If	
736
                                             <%Else%>
706
							End If	
737
                                                <td class="body_txto"></td>
707
						End If 
738
                                             <%End If%>
708
						
739
                                          <%ElseIf IsNull(rsForm("is_official")) Then%>
709
						If MajorA = MajorB Then
740
                                             <%If NOT IsNull(rsForm("tester_id")) And Tester   Then %>
710
							If MinorA = MinorB Then
741
                                                <td class="body_txto">Awaiting Manager</td>
711
								If IsNumeric(PatchA) AND IsNumeric(PatchB) Then
742
                                             <%ElseIf NOT IsNull(rsForm("tester_id")) And Manager Then%>
712
									
743
                                                <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>
713
									If CDbl(PatchB) > CDbl(PatchA) Then
744
                                             <%Else%>
714
										IsDisplay = False
745
                                                <td class="body_rowlite"></td>
715
									Else										
746
                                             <%End If%>
716
										IsDisplay = True
747
                                          <%Else%>
717
									End If
748
                                             <td class="body_txtg">Accepted</td>
718
								End If
749
                                          <%End If
719
							Else
750
 
720
								If IsNumeric(MinorA) AND IsNumeric(MinorB) Then
751
                                          rsForm.Close()
721
									If CInt(MinorB) > CInt(MinorA) Then
752
                                          Set rsForm = nothing
722
										IsDisplay = False
753
                                          %>
723
									Else
754
                                       </tr>
724
										IsDisplay = True								
755
                                       <tr>
725
									End If									
756
                                          <td nowrap valign="top" class="body_row" colspan="3">
726
								End If
757
                                             <DIV id="PRODUCT_<%=thisBomId%>_<%=thisProdId%>" name="PRODUCT_<%=thisBomId%>_<%=thisProdId%>" style="display:none;"><%=enumLOADING%></DIV>
727
							End If
758
                                          </td>
728
						Else
759
                                       </tr>
729
							If IsNumeric(MajorA) AND IsNumeric(MajorB) Then
760
 
730
								If 	CInt(MajorB) > CInt(MajorA) Then
761
                                       <%If rowNumProd <> numOfProdRows Then%>
731
									IsDisplay = False
762
                                          <tr>
732
								Else
763
                                             <td colspan="4" background="images/bg_table_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
733
									IsDisplay = True
764
                                          </tr>
734
								End If	
765
                                       <%End If%>
735
							End If
766
                                    <%End If%>
736
						End If		
767
                                 <%Else
737
					End If					
768
                                    If CDbl(LastPkgId) <> CDbl(thisPkgId) Then
738
				
769
                                       %>
739
				
770
                                       <tr>
740
			'If ProdId > NewProdId Then
771
                                          <%If rowNumBom <> numOfBomRows Then%>
741
			If IsDisplay Then
772
                                             <td nowrap valign="top">
742
			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 )
773
                                                <SPAN id="IMG_EXPAND_PRODUCT_<%=thisBomId%>_<%=thisProdId & thisIsPatch%>" name="IMG_EXPAND_PRODUCT_<%=thisBomId%>_<%=thisProdId & thisIsPatch%>" style="display:block;">
743
		  %>
774
                                                   <a href="javascript:;" class="menu_link" onClick="RequestPatches('?pkg_id=<%=thisPkgId%>&bom_id=<%=thisBomId%>&compare_bom_id=<%=nextBomId%>&current_bom_id=<%=dbPARbom_id%>', '<%=thisBomId%>_<%=thisProdId & thisIsPatch%>');">
744
		  <%If IsNull(IsPatch) Then
775
                                                      <%=LIMG_EXPAND & GetProductIcon( rsTemp ) & thisPkgName%>
745
		  	If CDbl(currentpkgId) <> CDbl(pkgId) Then%>
776
                                                   </a>
746
		  <tr>
777
                                                </SPAN>
747
            <td nowrap valign="top">
778
                                                <SPAN id="IMG_COLLAPSE_PRODUCT_<%=thisBomId%>_<%=thisProdId & thisIsPatch%>" name="IMG_COLLAPSE_PRODUCT_<%=thisBomId%>_<%=thisProdId & thisIsPatch%>" style="display:none;">
748
			<SPAN id="IMG_EXPAND_PRODUCT_<%=ProdId & ChangeType%>" name="IMG_EXPAND_PRODUCT_<%=ProdId & ChangeType%>" style="display:block;"><a href="javascript:;" class="menu_link" onClick="RequestProductLocation('?new_version=<%=aProductList( 2, rowNum )%>&new_prod_id=<%=ProdId%>&prod_id=<%=OldProdId%>&bom_id=<%=dbPARbom_id%>&compare_bom_id=<%=(GetBomTreeList()( 0, Numrow  ))%>&pkg_id=<%=PkgId%>&change_type=<%=ChangeType%>', '<%=ProdId & ChangeType%>');"><%=LIMG_EXPAND & GetProductIcon( rsTemp ) &  aProductList( 1, rowNum )%></a></SPAN>
779
                                                   <a href="javascript:;" class="menu_link" onClick="ToggleDisplay( 'PRODUCT_<%=thisBomId%>_<%=thisProdId & thisIsPatch%>', 'IMG_EXPAND_PRODUCT_<%=thisBomId%>_<%=thisProdId & thisIsPatch%>', 'IMG_COLLAPSE_PRODUCT_<%=thisBomId%>_<%=thisProdId & thisIsPatch%>');">
749
			<SPAN id="IMG_COLLAPSE_PRODUCT_<%=ProdId & ChangeType%>" name="IMG_COLLAPSE_PRODUCT_<%=ProdId & ChangeType%>" style="display:none;"><a href="javascript:;" class="menu_link" onClick="ToggleDisplay( 'PRODUCT_<%=ProdId & ChangeType%>', 'IMG_EXPAND_PRODUCT_<%=ProdId & ChangeType%>', 'IMG_COLLAPSE_PRODUCT_<%=ProdId & ChangeType%>');"><%=LIMG_COLLAPSE & GetProductIcon( aProductList( 4, rowNum ) ) &  aProductList( 1, rowNum )%></a></SPAN>
780
                                                      <%=LIMG_COLLAPSE & GetProductIcon( rsTemp ) & thisPkgName%>
750
			</td>
781
                                                   </a>
751
            <td nowrap class="body_row" valign="top">
782
                                                </SPAN>
752
				<%=aProductList( 2, rowNum )%>			</td>
783
                                             </td>
753
			<td class="body_rowlite"><%=rsTemp("comments")%> <!-- <a href="download_version.asp?prod_id=<%=ProdId%>&bom_id=<%=Request("bom_id")%>&os_id=" class="body_link">Download</a> --></td>
784
                                          <%Else%>
754
			<%
785
                                             <td nowrap valign="top">
755
			Dim rsForm, Tester, Manager
786
                                                <SPAN id="IMG_EXPAND_PRODUCT_<%=thisBomId%>_<%=thisProdId & thisIsPatch%>" name="IMG_EXPAND_PRODUCT_<%=thisBomId%>_<%=thisProdId & thisIsPatch%>" style="display:block;">
756
			Tester = False
787
                                                   <a href="javascript:;" class="menu_link" onClick="RequestPatches('?pkg_id=<%=thisPkgId%>&bom_id=<%=thisBomId%>&compare_bom_id=<%=thisBomId%>&current_bom_id=<%=dbPARbom_id%>', '<%=thisBomId%>_<%=thisProdId & thisIsPatch%>');">
757
			Manager = False
788
                                                      <%=LIMG_EXPAND & GetProductIcon( rsTemp ) & thisPkgName%>
758
			If objAccessControl.IsActive("ApprovedByManager") Then
789
                                                   </a>
759
				Manager = True
790
                                                </SPAN>
760
			ElseIf objAccessControl.IsActive("ApprovedByTester") Then
791
                                                <SPAN id="IMG_COLLAPSE_PRODUCT_<%=thisBomId%>_<%=thisProdId & thisIsPatch%>" name="IMG_COLLAPSE_PRODUCT_<%=thisBomId%>_<%=thisProdId & thisIsPatch%>" style="display:none;">
761
				Tester = True
792
                                                   <a href="javascript:;" class="menu_link" onClick="ToggleDisplay( 'PRODUCT_<%=thisBomId%>_<%=thisProdId & thisIsPatch%>', 'IMG_EXPAND_PRODUCT_<%=thisBomId%>_<%=thisProdId & thisIsPatch%>', 'IMG_COLLAPSE_PRODUCT_<%=thisBomId%>_<%=thisProdId & thisIsPatch%>');">
762
			End If
793
                                                      <%=LIMG_COLLAPSE & GetProductIcon( rsTemp ) & thisPkgName%>
763
					
794
                                                   </a>
764
			
795
                                                </SPAN>
765
			Set rsForm = OraDatabase.DbCreateDynaset("SELECT * FROM RELEASE_AUTHORISATION WHERE PV_ID="&ProdId&" AND BOM_ID="&Request("bom_id"), ORADYN_DEFAULT)
796
                                             </td>
766
			
797
                                          <%End If%>
767
			%>
798
                                          <td nowrap class="body_row" valign="top"></td>
768
			<%If rsForm.RecordCount = 0 Then%>
799
                                          <td class="body_rowlite"></td>
769
				<%If Tester Then%>
800
                                       </tr>
770
					<td class="body_rowlite"><a href="_wform_approval.asp?pv_id=<%=ProdId%>&bom_id=<%=Request("bom_id")%>" onClick="popup = window.open('_wform_approval.asp?pv_id=<%=ProdId%>&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>
801
 
771
				<%ElseIf Manager Then%>
802
                                       <tr>
772
					<td class="body_txto">Awaiting Tester</td>
803
                                          <td nowrap valign="top" class="body_row" colspan="3">
773
				<%Else%>
804
                                             <DIV id="PRODUCT_<%=thisBomId%>_<%=thisProdId & thisIsPatch%>" name="PRODUCT_<%=thisBomId%>_<%=thisProdId & thisIsPatch%>" style="display:none;"><%=enumLOADING%></DIV>
774
					<td class="body_txto"></td>
805
                                          </td>
775
				<%End If%>	
806
                                       </tr>
776
			<%ElseIf IsNull(rsForm("is_official")) Then%>
807
                                       <%If rowNumProd <> numOfProdRows Then%>
777
				<%If NOT IsNull(rsForm("tester_id")) And Tester	Then %>
808
                                          <tr>
778
					<td class="body_txto">Awaiting Manager</td>
809
                                             <td colspan="4" background="images/bg_table_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
779
				<%ElseIf NOT IsNull(rsForm("tester_id")) And Manager Then%>
810
                                          </tr>
780
					<td class="body_rowlite"><a href="_wform_approval.asp?pv_id=<%=ProdId%>&bom_id=<%=Request("bom_id")%>" onClick="popup = window.open('_wform_approval.asp?pv_id=<%=ProdId%>&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>
811
                                       <%End If%>
781
				<%Else%>
812
 
782
					<td class="body_rowlite"></td>
813
                                       <%
783
				<%End If%>
814
                                       LastPkgId = CDbl(thisPkgId)
784
			<%Else%>
815
                                    End If
785
				<td class="body_txtg">Accepted</td>
816
                                 ' -------- END GROUP ------------------------
786
			<%End If
817
                                 End If%>
787
 
818
 
788
			rsForm.Close()
819
                                 <%
789
			Set rsForm = nothing
820
                                 rsTemp.Close()
790
			%>
821
                                 Set rsTemp = nothing
791
          </tr>
822
                              End If
792
		  <tr>
823
                           Next  'For Next Loop End
793
	            <td nowrap valign="top" class="body_row" colspan="3">
824
 
794
				<DIV id="PRODUCT_<%=ProdId & ChangeType%>" name="PRODUCT_<%=ProdId & ChangeType%>" style="display:none;"><%=enumLOADING%></DIV>
825
                        Else%>
795
				</td>
826
 
796
	          </tr>
827
                           <tr>
797
		  		   
828
                              <td colspan="4" class="body_txtr"><b>No Changes Detected In Comparison</b></td>
798
		  <%If rowNum <> numOfRows Then%>
829
                           </tr>
799
		  <tr>
830
                        <%End If%>
800
            <td colspan="4" background="images/bg_table_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
831
 
801
          </tr>
832
                        <tr>
802
		  <%End If%>
833
                           <td colspan="4" background="images/bg_table_border.gif">
803
		  <%End If%>
834
                              <table width="100%"  border="0" cellspacing="1" cellpadding="2">
804
		  <%Else
835
                                 <tr>
805
		  %>
836
                                    <td nowrap background="images/bg_table_col.gif"><img src="images/spacer.gif" width="1" height="1"></td>
806
	
837
                                 </tr>
807
		  <%
838
                              </table>
808
		  	  If CDbl(currentpkgId) <> CDbl(pkgId) Then
839
                           </td>
809
		  %>
840
                        </tr>
810
	  <tr>
841
                     </table>
811
		  	<%If Numrow <> maxnumOfRows Then%>
842
                     <br>
812
            <td nowrap valign="top">
843
                     <%
813
			<SPAN id="IMG_EXPAND_PRODUCT_<%=ProdId & ChangeType%>" name="IMG_EXPAND_PRODUCT_<%=ProdId & ChangeType%>" style="display:block;"><a href="javascript:;" class="menu_link" onClick="RequestPatches('?pkg_id=<%=pkgId%>&bom_id=<%=(GetBomTreeList()( 0, Numrow  ))%>&compare_bom_id=<%=(GetBomTreeList()( 0, Numrow + 1  ))%>&current_bom_id=<%=dbPARbom_id%>', '<%=ProdId & ChangeType%>');"><%=LIMG_EXPAND & GetProductIcon( rsTemp ) &  aProductList( 1, rowNum )%></a></SPAN>
844
                     Response.Flush
814
			<SPAN id="IMG_COLLAPSE_PRODUCT_<%=ProdId & ChangeType%>" name="IMG_COLLAPSE_PRODUCT_<%=ProdId & ChangeType%>" style="display:none;"><a href="javascript:;" class="menu_link" onClick="ToggleDisplay( 'PRODUCT_<%=ProdId & ChangeType%>', 'IMG_EXPAND_PRODUCT_<%=ProdId & ChangeType%>', 'IMG_COLLAPSE_PRODUCT_<%=ProdId & ChangeType%>');"><%=LIMG_COLLAPSE & GetProductIcon( rsTemp ) &  aProductList( 1, rowNum )%></a></SPAN>
845
                  Next
815
			</td>
846
                  Call objFormComponent.FormEnd()
816
			<%Else%>
847
                  '-- FROM END ----------------------------------------------------------------------------------------------------------------
817
            <td nowrap valign="top">
848
                  %>
818
			<SPAN id="IMG_EXPAND_PRODUCT_<%=ProdId & ChangeType%>" name="IMG_EXPAND_PRODUCT_<%=ProdId & ChangeType%>" style="display:block;"><a href="javascript:;" class="menu_link" onClick="RequestPatches('?pkg_id=<%=pkgId%>&bom_id=<%=(GetBomTreeList()( 0, Numrow  ))%>&compare_bom_id=<%=(GetBomTreeList()( 0, Numrow   ))%>&current_bom_id=<%=dbPARbom_id%>', '<%=ProdId & ChangeType%>');"><%=LIMG_EXPAND & GetProductIcon( rsTemp ) &  aProductList( 1, rowNum )%></a></SPAN>
849
               </td>
819
			<SPAN id="IMG_COLLAPSE_PRODUCT_<%=ProdId & ChangeType%>" name="IMG_COLLAPSE_PRODUCT_<%=ProdId & ChangeType%>" style="display:none;"><a href="javascript:;" class="menu_link" onClick="ToggleDisplay( 'PRODUCT_<%=ProdId & ChangeType%>', 'IMG_EXPAND_PRODUCT_<%=ProdId & ChangeType%>', 'IMG_COLLAPSE_PRODUCT_<%=ProdId & ChangeType%>');"><%=LIMG_COLLAPSE & GetProductIcon( rsTemp ) &  aProductList( 1, rowNum )%></a></SPAN>
850
            </tr>
820
			</td>			
851
         </table>
821
			<%End If%>
852
      </td>
822
            <td nowrap class="body_row" valign="top"></td>
853
      <td width="1%" valign="top" background="images/bg_favourits.gif">
823
			<td class="body_rowlite"></td>
854
         <%If Request.Cookies( enumCOOKIE_NAME )( "user_bar" ) <> "hide" Then%>
824
          </tr>
855
 
825
		 
856
         <%End If%>
826
		
857
      </td>
827
		  <tr>
858
   </tr>
828
	            <td nowrap valign="top" class="body_row" colspan="3">
859
   <tr>
829
				<DIV id="PRODUCT_<%=ProdId & ChangeType%>" name="PRODUCT_<%=ProdId & ChangeType%>" style="display:none;"><%=enumLOADING%></DIV>
860
      <td background="images/bg_bage_0a.gif"><img src="images/spacer.gif" width="1" height="15"></td>
830
				</td>
861
      <td background="images/bg_bage_1.gif"><img src="images/spacer.gif" width="1" height="1"></td>
831
	          </tr>
862
      <td bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="1"></td>
832
		  <%If rowNum <> numOfRows Then%>
863
      <td bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="1"></td>
833
		  <tr>
864
   </tr>
834
            <td colspan="4" background="images/bg_table_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
865
   <tr>
835
          </tr>
866
      <td bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="20"></td>
836
		  <%End If%>			  
867
      <td bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="1"></td>
837
 
868
      <td bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="1"></td>
838
      <%
869
      <td bgcolor="#FFFFFF">&nbsp;</td>
839
		  	currentpkgId = CDbl(pkgId)
870
   </tr>
840
		  End If
-
 
841
		  ' -------- END GROUP ------------------------
-
 
842
		  
-
 
843
		  
-
 
844
		  
-
 
845
		  End If%>
-
 
846
		  
-
 
847
		  <%
-
 
848
		 ' End If
-
 
849
		  rsTemp.Close()
-
 
850
		  Set rsTemp = nothing
-
 
851
		  End If
-
 
852
		  	Next'For Next Loop End
-
 
853
			
-
 
854
		  Else%>
-
 
855
		  
-
 
856
		  <tr>
-
 
857
            <td colspan="4" class="body_txtr"><b>No Changes Detected In Comparison</b></td>
-
 
858
          </tr>
-
 
859
		  <%'Exit For%>
-
 
860
		  <%End If%>	
-
 
861
		
-
 
862
	
-
 
863
		  
-
 
864
  
-
 
865
          <tr>
-
 
866
            <td colspan="4" background="images/bg_table_border.gif">
-
 
867
			 <table width="100%"  border="0" cellspacing="1" cellpadding="2">
-
 
868
              <tr>
-
 
869
                <td nowrap background="images/bg_table_col.gif"><img src="images/spacer.gif" width="1" height="1"></td>
-
 
870
              </tr>
-
 
871
             </table>
-
 
872
			</td>
-
 
873
          </tr>
-
 
874
         </table>	
-
 
875
		<br>
-
 
876
		<%
-
 
877
		
-
 
878
		Next
-
 
879
		Call objFormComponent.FormEnd()
-
 
880
		'-- FROM END ----------------------------------------------------------------------------------------------------------------
-
 
881
		%>
-
 
882
		
-
 
883
	    </td>
-
 
884
      </tr>
-
 
885
    </table></td>
-
 
886
    <td width="1%" valign="top" background="images/bg_favourits.gif">
-
 
887
	<%If Request.Cookies( enumCOOKIE_NAME )( "user_bar" ) <> "hide" Then%>
-
 
888
 
-
 
889
	<%End If%>
-
 
890
   </td>
-
 
891
  </tr>
-
 
892
  <tr>
-
 
893
    <td background="images/bg_bage_0a.gif"><img src="images/spacer.gif" width="1" height="15"></td>
-
 
894
    <td background="images/bg_bage_1.gif"><img src="images/spacer.gif" width="1" height="1"></td>
-
 
895
    <td bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="1"></td>
-
 
896
    <td bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="1"></td>
-
 
897
  </tr>
-
 
898
  <tr>
-
 
899
    <td bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="20"></td>
-
 
900
    <td bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="1"></td>
-
 
901
    <td bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="1"></td>
-
 
902
    <td bgcolor="#FFFFFF">&nbsp;</td>
-
 
903
  </tr>
-
 
904
</table>
871
</table>
905
<!-- FOOTER ++++++++++++++++ -->
872
<!-- FOOTER ++++++++++++++++ -->
906
<!--#include file="_footer.asp"-->
873
<!--#include file="_footer.asp"-->
907
<!-- +++++++++++++++++++++++ -->
874
<!-- +++++++++++++++++++++++ -->
908
</body>
875
</body>
Line 911... Line 878...
911
'------------ RUN AFTER PAGE RENDER -----------
878
'------------ RUN AFTER PAGE RENDER -----------
912
Set objPMod = Nothing
879
Set objPMod = Nothing
913
Set objCrumbs = Nothing
880
Set objCrumbs = Nothing
914
Set objTabControl = Nothing
881
Set objTabControl = Nothing
915
'----------------------------------------------
882
'----------------------------------------------
916
%><!--#include file="common/globals_destructor.asp"-->
-
 
917
883
%><!--#include file="common/globals_destructor.asp"-->
-
 
884