| 62 |
rsolanki |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
2 |
<%
|
|
|
3 |
'=====================================================
|
|
|
4 |
'| |
|
| 64 |
jtweddle |
5 |
'| wFormApproval |
|
| 62 |
rsolanki |
6 |
'| |
|
|
|
7 |
'=====================================================
|
|
|
8 |
%>
|
|
|
9 |
<%
|
|
|
10 |
Option explicit
|
|
|
11 |
Response.Expires = 0
|
|
|
12 |
%>
|
|
|
13 |
<!--#include file="common/globals.asp"-->
|
|
|
14 |
<!--#include file="common/config.asp"-->
|
|
|
15 |
<!--#include file="common/common_subs.asp"-->
|
|
|
16 |
<!--#include file="common/_popup_window_common.asp"-->
|
|
|
17 |
<!--#include file="common/formating.asp"-->
|
|
|
18 |
<%
|
|
|
19 |
'------------ ACCESS CONTROL ------------------
|
|
|
20 |
%>
|
|
|
21 |
<!--#include file="_access_control_general.asp"-->
|
|
|
22 |
<%
|
|
|
23 |
'------------ VARIABLE DEFINITION -------------
|
|
|
24 |
Dim objFormCollector
|
|
|
25 |
Dim aRs
|
|
|
26 |
Dim MoreLink
|
|
|
27 |
Dim parFilter_on
|
|
|
28 |
Dim ForceDropdown
|
|
|
29 |
Dim rsQry
|
|
|
30 |
'------------ CONSTANTS DECLARATION -----------
|
|
|
31 |
'------------ VARIABLE INIT -------------------
|
|
|
32 |
parProd_id = Request("pv_id")
|
|
|
33 |
|
|
|
34 |
parBom_id = Request("bom_id")
|
|
|
35 |
|
|
|
36 |
|
|
|
37 |
Set objFormCollector = CreateObject("Scripting.Dictionary")
|
|
|
38 |
'------------ CONDITIONS ----------------------
|
|
|
39 |
'----------------------------------------------
|
|
|
40 |
%>
|
|
|
41 |
<%
|
|
|
42 |
'--------------------------------------------------------------------------------------------------------------------------
|
|
|
43 |
Sub GetFormDetails ( parProd_id, parBom_id, ByRef outobjDetails )
|
|
|
44 |
Dim rsQry, query
|
|
|
45 |
|
|
|
46 |
If parProd_id <> "" Then
|
|
|
47 |
|
|
|
48 |
Set rsQry = OraDatabase.DbCreateDynaset( "select * from packages pkg, package_versions pv where pv.pkg_id = pkg.pkg_id and pv.pv_id="&parProd_id, ORADYN_DEFAULT )
|
|
|
49 |
|
|
|
50 |
If rsQry.RecordCount > 0 Then
|
|
|
51 |
outobjDetails.Item ("pkg_version") = rsQry("pkg_version")
|
|
|
52 |
outobjDetails.Item ("pkg_name") = rsQry("pkg_name")
|
|
|
53 |
|
|
|
54 |
Else
|
|
|
55 |
Err.Raise 8, "Sub GetFormDetails", "Empty record set returned. nProd_id="& parProd_id
|
|
|
56 |
|
|
|
57 |
End If
|
|
|
58 |
|
|
|
59 |
|
|
|
60 |
rsQry.Close
|
|
|
61 |
Set rsQry = Nothing
|
|
|
62 |
|
|
|
63 |
End If
|
|
|
64 |
|
|
|
65 |
|
|
|
66 |
|
|
|
67 |
End Sub
|
|
|
68 |
'--------------------------------------------------------------------------------------------------------------------------
|
|
|
69 |
'--------------------------------------------------------------------------------------------------------------------------
|
|
|
70 |
Sub TesterApproval ()
|
|
|
71 |
On Error Resume Next
|
|
|
72 |
|
|
|
73 |
Set rsQry = OraDatabase.DbCreateDynaset("SELECT * FROM PACKAGE_VERSIONS WHERE PV_ID="&Request("pv_id"), ORADYN_DEFAULT)
|
|
|
74 |
|
|
|
75 |
OraDatabase.Parameters.Add "PV_ID", Request("pv_id"), ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
76 |
OraDatabase.Parameters.Add "PKG_ID", rsQry("pkg_id"), ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
77 |
OraDatabase.Parameters.Add "BOM_ID", parBom_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
78 |
OraDatabase.Parameters.Add "TESTER_ID", objAccessControl.UserId, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
79 |
OraDatabase.Parameters.Add "TESTER_COMMENTS", Request("tester_comments"), ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
80 |
|
| 64 |
jtweddle |
81 |
If Request("approval") = "R" Then
|
|
|
82 |
OraDatabase.Parameters.Add "COMMENT", "Version: "&rsQry("pkg_version")&" - Rejected By Tester" , ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
83 |
|
|
|
84 |
objEH.TryORA ( OraSession )
|
|
|
85 |
OraDatabase.ExecuteSQL _
|
|
|
86 |
"BEGIN pk_Production.Reject_Product ( :PV_ID, :TESTER_ID, :TESTER_COMMENTS ); END;"
|
|
|
87 |
objEH.CatchORA ( OraSession )
|
|
|
88 |
|
|
|
89 |
Else
|
|
|
90 |
OraDatabase.Parameters.Add "COMMENT", "Version: "&rsQry("pkg_version")&" - Approved By Tester" , ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
91 |
End If
|
|
|
92 |
|
| 62 |
rsolanki |
93 |
objEH.TryORA ( OraSession )
|
|
|
94 |
|
|
|
95 |
OraDatabase.ExecuteSQL _
|
|
|
96 |
"BEGIN pk_Production.Release_Authorisation_Tester ( :PV_ID, :BOM_ID, :TESTER_ID, :TESTER_COMMENTS ); END;"
|
|
|
97 |
|
|
|
98 |
objEH.CatchORA ( OraSession )
|
|
|
99 |
|
|
|
100 |
objEH.TryORA ( OraSession )
|
|
|
101 |
|
|
|
102 |
OraDatabase.ExecuteSQL _
|
|
|
103 |
"BEGIN pk_Production.Log_Pkg_Trail ( :PKG_ID, :COMMENT, :TESTER_ID ); END;"
|
|
|
104 |
|
|
|
105 |
objEH.CatchORA ( OraSession )
|
|
|
106 |
|
|
|
107 |
|
|
|
108 |
OraDatabase.Parameters.Remove "PV_ID"
|
|
|
109 |
OraDatabase.Parameters.Remove "PKG_ID"
|
|
|
110 |
OraDatabase.Parameters.Remove "BOM_ID"
|
|
|
111 |
OraDatabase.Parameters.Remove "TESTER_ID"
|
|
|
112 |
OraDatabase.Parameters.Remove "TESTER_COMMENTS"
|
|
|
113 |
OraDatabase.Parameters.Remove "COMMENT"
|
| 64 |
jtweddle |
114 |
|
| 62 |
rsolanki |
115 |
|
|
|
116 |
rsQry.Close()
|
|
|
117 |
Set rsQry = nothing
|
|
|
118 |
|
|
|
119 |
End Sub
|
|
|
120 |
'--------------------------------------------------------------------------------------------------------------------------
|
|
|
121 |
Sub ManagerApproval ()
|
|
|
122 |
On Error Resume Next
|
|
|
123 |
|
|
|
124 |
Set rsQry = OraDatabase.DbCreateDynaset("SELECT * FROM PACKAGE_VERSIONS WHERE PV_ID="&Request("pv_id"), ORADYN_DEFAULT)
|
|
|
125 |
|
|
|
126 |
OraDatabase.Parameters.Add "PV_ID", Request("pv_id"), ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
127 |
OraDatabase.Parameters.Add "PKG_ID", rsQry("pkg_id"), ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
128 |
OraDatabase.Parameters.Add "BOM_ID", parBom_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
129 |
OraDatabase.Parameters.Add "MANAGER_ID", objAccessControl.UserId, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
130 |
OraDatabase.Parameters.Add "MANAGER_COMMENTS", Request("manager_comments"), ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
131 |
OraDatabase.Parameters.Add "COMMENT", "Version: "&rsQry("pkg_version")&" - Approved By Manager" , ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
132 |
|
|
|
133 |
|
|
|
134 |
objEH.TryORA ( OraSession )
|
|
|
135 |
|
|
|
136 |
OraDatabase.ExecuteSQL _
|
|
|
137 |
"BEGIN pk_Production.Release_Authorisation_Manager ( :PV_ID, :BOM_ID, :MANAGER_ID, :MANAGER_COMMENTS ); END;"
|
|
|
138 |
|
|
|
139 |
objEH.CatchORA ( OraSession )
|
|
|
140 |
|
|
|
141 |
objEH.TryORA ( OraSession )
|
|
|
142 |
|
|
|
143 |
OraDatabase.ExecuteSQL _
|
|
|
144 |
"BEGIN pk_Production.Log_Pkg_Trail ( :PKG_ID, :COMMENT, :MANAGER_ID ); END;"
|
|
|
145 |
|
|
|
146 |
objEH.CatchORA ( OraSession )
|
|
|
147 |
|
|
|
148 |
|
|
|
149 |
OraDatabase.Parameters.Remove "PV_ID"
|
|
|
150 |
OraDatabase.Parameters.Remove "PKG_ID"
|
|
|
151 |
OraDatabase.Parameters.Remove "BOM_ID"
|
|
|
152 |
OraDatabase.Parameters.Remove "MANAGER_ID"
|
|
|
153 |
OraDatabase.Parameters.Remove "MANAGER_COMMENTS"
|
|
|
154 |
|
|
|
155 |
rsQry.Close()
|
|
|
156 |
Set rsQry = nothing
|
|
|
157 |
|
|
|
158 |
End Sub
|
|
|
159 |
'--------------------------------------------------------------------------------------------------------------------------
|
|
|
160 |
%>
|
|
|
161 |
<%
|
|
|
162 |
'------------ RUN BEFORE PAGE RENDER ----------
|
|
|
163 |
'objPMod.PersistInQryString ( Array("base_env_id") )
|
|
|
164 |
|
|
|
165 |
' --- Get Form details from DB ---
|
|
|
166 |
Call GetFormDetails ( parProd_id, parBom_id, objFormCollector )
|
|
|
167 |
|
|
|
168 |
' --- Load Validation Rules ---
|
|
|
169 |
'Call objForm.LoadValidationRules ( Array("product_comments"), OraDatabase ) ' Load Validation Rules
|
|
|
170 |
|
|
|
171 |
' --- Enter Form Validation Rule Changes here... ----
|
|
|
172 |
'----------------------------------------------------
|
|
|
173 |
|
|
|
174 |
If Request("btn") = "Submit" Then
|
|
|
175 |
If objAccessControl.IsActive("ApprovedByTester") Then
|
|
|
176 |
Call TesterApproval()
|
|
|
177 |
ElseIf objAccessControl.IsActive("ApprovedByManager") Then
|
|
|
178 |
Call ManagerApproval()
|
|
|
179 |
End If
|
|
|
180 |
|
|
|
181 |
If objEH.Finally Then
|
|
|
182 |
Call OpenInParentWindow ( "bom_home.asp?bom_id="&parBom_id )
|
|
|
183 |
Call CloseWindow()
|
|
|
184 |
End If
|
|
|
185 |
|
|
|
186 |
End If
|
|
|
187 |
'----------------------------------------------
|
|
|
188 |
%>
|
|
|
189 |
<html>
|
|
|
190 |
<head>
|
|
|
191 |
<title>Production Manager</title>
|
|
|
192 |
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
|
|
193 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
|
194 |
<link href="scripts/deployment_manager.css" rel="stylesheet" type="text/css">
|
|
|
195 |
<script language="JavaScript" src="scripts/common.js"></script>
|
|
|
196 |
</head>
|
|
|
197 |
|
|
|
198 |
<body background="images/bg_bage_0.gif" leftmargin="0" topmargin="0" onLoad="self.focus();">
|
|
|
199 |
<table width="100%" border="0" cellspacing="0" cellpadding="10">
|
|
|
200 |
<tr>
|
|
|
201 |
<td bgcolor="#FFFFFF" class="body_txt"><span class="body_h1"><img src="icons/i_linkarrow_black.gif" width="11" height="11" align="absmiddle"> Software Release Authorisation Form For <%=objFormCollector.Item("pkg_name")%> <%=objFormCollector.Item("pkg_version")%></span> <br>
|
|
|
202 |
</td>
|
|
|
203 |
</tr>
|
|
|
204 |
|
|
|
205 |
<%
|
|
|
206 |
If objAccessControl.IsActive("ApprovedByTester") Then
|
|
|
207 |
'-- FROM START ---------------------------------------------------------------------------------------------------------
|
|
|
208 |
objFormComponent.FormName = "FormName"
|
|
|
209 |
objFormComponent.Action = SCRIPT_NAME
|
|
|
210 |
objFormComponent.OnSubmit = "ShowProgress();"
|
|
|
211 |
Call objFormComponent.FormStart()
|
|
|
212 |
%>
|
|
|
213 |
<tr>
|
|
|
214 |
<td background="images/bg_login.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
215 |
<tr>
|
|
|
216 |
<td><%=ProgressBar%></td>
|
|
|
217 |
<td align="right"><input name="btn" type="submit" class="form_btn" value="Submit">
|
|
|
218 |
<input name="btn" type="reset" class="form_btn" value="Cancel" onClick="self.close();"></td>
|
|
|
219 |
</tr>
|
|
|
220 |
</table></td>
|
|
|
221 |
</tr>
|
|
|
222 |
<tr>
|
|
|
223 |
<td><table width="100%" border="0" cellspacing="2" cellpadding="0">
|
|
|
224 |
<!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
225 |
<tr>
|
|
|
226 |
<td colspan="3" align="left" class="form_iname"><strong class="body_ttl3">Release Tested By <%=objAccessControl.FullName%> (Regional Tester) On <%= FormatDateTime(Date, 0) %> </strong></td>
|
| 64 |
jtweddle |
227 |
</tr>
|
|
|
228 |
<tr>
|
|
|
229 |
<td align="left" class="form_iname">Decision</td>
|
|
|
230 |
<td colspan="3" align="left" class="form_iname">
|
|
|
231 |
<input name="approval" type="radio" value="A" checked>Accept
|
|
|
232 |
<input name="approval" type="radio" value="R">Reject
|
|
|
233 |
</td>
|
|
|
234 |
</tr>
|
|
|
235 |
|
| 62 |
rsolanki |
236 |
|
|
|
237 |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
238 |
<tr>
|
|
|
239 |
<td valign="top" nowrap class="form_iname">Comments</td>
|
|
|
240 |
<td valign="top"><%=objFormComponent.TextArea ("tester_comments", NULL, 5, 80, "class='form_ivalue'" )%></td>
|
|
|
241 |
<td valign="top">
|
|
|
242 |
</td>
|
|
|
243 |
</tr>
|
|
|
244 |
<tr>
|
|
|
245 |
<td width="10%" class="form_iname"> </td>
|
|
|
246 |
<td width="1%"> </td>
|
|
|
247 |
<td width="90%" class="body_ttl3"></td>
|
|
|
248 |
</tr>
|
|
|
249 |
</table></td>
|
|
|
250 |
</tr>
|
|
|
251 |
<%=objPMod.ComposeHiddenTags()%>
|
|
|
252 |
|
|
|
253 |
<input type="hidden" name="pv_id" value="<%=parProd_id%>">
|
|
|
254 |
<input type="hidden" name="action" value="true">
|
|
|
255 |
<%
|
|
|
256 |
Call objFormComponent.FormEnd()
|
|
|
257 |
'-- FROM END ----------------------------------------------------------------------------------------------------------------
|
|
|
258 |
Else
|
|
|
259 |
|
|
|
260 |
'-- FROM START ---------------------------------------------------------------------------------------------------------
|
|
|
261 |
objFormComponent.FormName = "FormName"
|
|
|
262 |
objFormComponent.Action = SCRIPT_NAME
|
|
|
263 |
objFormComponent.OnSubmit = "ShowProgress();"
|
|
|
264 |
Call objFormComponent.FormStart()
|
|
|
265 |
%>
|
|
|
266 |
<tr>
|
|
|
267 |
<td background="images/bg_login.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
268 |
<tr>
|
|
|
269 |
<td><%=ProgressBar%></td>
|
|
|
270 |
<td align="right"><input name="btn" type="submit" class="form_btn" value="Submit">
|
|
|
271 |
<input name="btn" type="reset" class="form_btn" value="Cancel" onClick="self.close();"></td>
|
|
|
272 |
</tr>
|
|
|
273 |
</table></td>
|
|
|
274 |
</tr>
|
|
|
275 |
<tr>
|
|
|
276 |
<td><table width="100%" border="0" cellspacing="2" cellpadding="0">
|
|
|
277 |
<!-- Release Tested by A Regional Tester +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
278 |
<%
|
|
|
279 |
Dim rsTemp
|
|
|
280 |
|
|
|
281 |
Set rsTemp = OraDatabase.DbCreateDynaset("SELECT * FROM RELEASE_AUTHORISATION, USERS WHERE PV_ID="&parProd_id&" AND BOM_ID="&parBom_id&" AND USERS.USER_ID = RELEASE_AUTHORISATION.TESTER_ID", ORADYN_DEFAULT)
|
|
|
282 |
|
|
|
283 |
%>
|
|
|
284 |
|
|
|
285 |
<tr>
|
|
|
286 |
<td colspan="3" align="left" class="form_iname"><strong class="body_ttl3">Release Tested By <%=rsTemp("full_name")%> (Regional Tester) On <%= rsTemp("tester_datestamp") %> </strong></td>
|
| 64 |
jtweddle |
287 |
</tr>
|
| 62 |
rsolanki |
288 |
|
|
|
289 |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
290 |
<tr>
|
|
|
291 |
<td valign="top" nowrap class="form_iname">Comments</td>
|
|
|
292 |
<td valign="top"><%=objFormComponent.TextArea ("tester_comments", rsTemp("tester_comments"), 5, 80, "class='form_ivalue' readonly" )%></td>
|
|
|
293 |
<td valign="top">
|
|
|
294 |
</td>
|
|
|
295 |
</tr>
|
|
|
296 |
<%
|
|
|
297 |
rsTemp.Close()
|
|
|
298 |
Set rsTemp = nothing
|
|
|
299 |
%>
|
|
|
300 |
<tr>
|
|
|
301 |
<td width="10%" class="form_iname"> </td>
|
|
|
302 |
<td width="1%"> </td>
|
|
|
303 |
<td width="90%" class="body_ttl3"></td>
|
|
|
304 |
</tr>
|
|
|
305 |
<!-- Release Tested By Regional Manager+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
306 |
<tr>
|
|
|
307 |
<td colspan="3" align="left" class="form_iname"><strong class="body_ttl3">Release Authorised By <%=objAccessControl.FullName%> (Regional Manager) On <%= FormatDateTime(Date, 0) %> </strong></td>
|
| 64 |
jtweddle |
308 |
</tr>
|
| 62 |
rsolanki |
309 |
|
|
|
310 |
|
|
|
311 |
<tr>
|
|
|
312 |
<td valign="top" nowrap class="form_iname">Comments</td>
|
|
|
313 |
<td valign="top"><%=objFormComponent.TextArea ("manager_comments", NULL, 5, 80, "class='form_ivalue'" )%></td>
|
|
|
314 |
<td valign="top">
|
|
|
315 |
</td>
|
|
|
316 |
</tr>
|
|
|
317 |
<tr>
|
|
|
318 |
<td width="10%" class="form_iname"> </td>
|
|
|
319 |
<td width="1%"> </td>
|
|
|
320 |
<td width="90%" class="body_ttl3"></td>
|
|
|
321 |
</tr>
|
|
|
322 |
</table></td>
|
|
|
323 |
</tr>
|
|
|
324 |
<%=objPMod.ComposeHiddenTags()%>
|
|
|
325 |
|
|
|
326 |
<input type="hidden" name="pv_id" value="<%=parProd_id%>">
|
|
|
327 |
<input type="hidden" name="action" value="true">
|
|
|
328 |
<%
|
|
|
329 |
Call objFormComponent.FormEnd()
|
|
|
330 |
End If
|
|
|
331 |
%>
|
|
|
332 |
|
|
|
333 |
</table>
|
|
|
334 |
|
|
|
335 |
</body>
|
|
|
336 |
</html>
|
|
|
337 |
<%
|
|
|
338 |
'------------ RUN AFTER PAGE RENDER -----------
|
|
|
339 |
Set objFormCollector = Nothing
|
|
|
340 |
'----------------------------------------------
|
|
|
341 |
%><!--#include file="common/globals_destructor.asp"-->
|