Subversion Repositories DevTools

Rev

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

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