<%
Option Explicit
%>
<%
Session.LCID = 2058
%>
<!--#include file="User.asp"-->
<!--#include file="general.asp"-->
<html>
<head>
<title>Grupo MIM</title>
<link rel=stylesheet href="vista.css">
<script type="text/javascript" src="validacion.js"></script>
<script type="text/javascript">
<!--
function check(formname, submitbutton) {
var errors = '';
errors += checkText(formname, 'Cveinv', 'Codigo');
errors += checkText(formname, 'Nominv', 'Descripcion');
errors += checkText(formname, 'plainv', 'Precio 1');
errors += checkNum(formname, 'plainv', 'Precio 1');
errors += checkText(formname, 'plbinv', 'Precio 2');
errors += checkNum(formname, 'plbinv', 'Precio 2');
errors += checkText(formname, 'plcinv', 'Precio 3');
errors += checkNum(formname, 'plcinv', 'Precio 3');
errors += checkText(formname, 'smininv', 'Minimo');
errors += checkNum(formname, 'smininv', 'Minimo');
errors += checkText(formname, 'smaxinv', 'Maximo');
errors += checkNum(formname, 'smaxinv', 'Maximo');
errors += checkText(formname, 'pesoinv', 'Peso');
checkThisForm(formname, submitbutton, errors);
}
//-->
</script>
</head>
<BODY>
<!--#INCLUDE FILE="BARRA.asp"-->
<div class="normalw" style="position:absolute; top:1px">
<center>
<!--#include file="empresa.asp"-->
<hr>
</center>
</div>
<div class="normalw" style="position:absolute; top:1px;">
Bienvenido: <%= nombre %>. <br>
Hora Actual: <%= time %>
</div>
<div class="normalw" style="position:absolute; top:34px; left:1">
<!--#include file="mpro.asp"-->
</div>
<div class="normal" style="position:absolute; top:70px; left:15">
<%
dim rs11, sql11
Dim Rs12, Sql12, Rs13, Sql13, Rs14, Sql14, rs15, Sql15, rs16, Sql16, Rs17, Sql17, Rs18, Sql18
dim Codigo
Codigo= Cstr(Request("codigo"))
set rs11 = server.CreateObject("ADODB.Recordset")
sql11 = "select * from inventarios, lineas, sublineas, monedas " &_
"where cveinv = '"& Codigo &"' and lininv=clalin and Slininv = Clasli and mplinv=cladiv;"
rs11.open sql11,cn1,1,2
%>
<center>
<b>Modificaciones al Cliente: <%Response.Write rs11("nominv")%><br>
</center>
<Form action="Invup.asp" name="Invup" method='post'>
<hr>
<TABLE border=0 cellspacing=0 cellpadding=0 class="normal">
<tr>
<td class="normal" width=100px>Clave:</td>
<td class="normal" width=400px><input type=text class=normalb value="<%Response.Write rs11("cveinv")%>" name="Cveinv" size=14 onChange="javascript:this.value=this.value.toUpperCase();" readonly></td>
</tr>
<tr>
<td class="normal" width=100px>Descripcion:</td>
<td class="normal" width=400px><input type=text class=normalb value="<%Response.Write rs11("nominv")%>" name="Nominv" size=80 onChange="javascript:this.value=this.value.toUpperCase();"></td>
</tr>
<tr>
<td class="normal" width=100px>Unidad:</td>
<td class="normal" width=400px>
<%
set rs12 = server.CreateObject("ADODB.Recordset")
Sql12 ="select * from unidades"
Rs12.Open SQL12, cn1
'Move to the first record in the recordset
response.write "<SELECT NAME=udminv class=normalb>"
response.write "<option value='" & rs11("udminv") & "' Selected>" & rs11("udminv")
while not rs12.EOF
response.write "<OPTION value='" & rs12("desuni") & "'>" & rs12("desuni") & "</option>"
rs12.MoveNext
wend
response.write "</select>"
%>
</td>
</tr>
<tr>
<td class="normal" width=100px>Description:</td>
<td class="normal" width=400px><input type=text class=normalb value="<%Response.Write rs11("nomiinv")%>" name="Nomiinv" size=80 onChange="javascript:this.value=this.value.toUpperCase();"></td>
</tr>
<tr>
<td class="normal" width=100px>UdmIng:</td>
<td class="normal" width=400px>
<%
set rs13 = server.CreateObject("ADODB.Recordset")
Sql13 ="select * from unidades"
rs13.Open SQL13, cn1
'Move to the first record in the recordset
response.write "<SELECT NAME=udmiinv class=normalb>"
response.write "<option value='" & rs11("udmiinv") & "' Selected>" & rs11("udmiinv")
while not rs13.EOF
response.write "<OPTION value='" & rs13("dinuni") & "'>" & rs13("dinuni") & "</option>"
rs13.MoveNext
wend
response.write "</select>"
%>
</td>
</tr>
<tr>
<td class="normal" width=100px>Linea:</td>
<td class="normal" width=400px>
<%
set rs14 = server.CreateObject("ADODB.Recordset")
Sql14 ="select * from lineas"
rs14.Open SQL14, cn1
'Move to the first record in the recordset
response.write "<SELECT NAME=lininv class=normalb>"
response.write "<option value='" & rs11("lininv") & "' Selected>" & rs11("deslin")
while not rs14.EOF
response.write "<OPTION value='" & rs14("clalin") & "'>" & rs14("deslin") & "</option>"
rs14.MoveNext
wend
response.write "</select>"
%>
</td>
</tr>
<tr>
<td class="normal" width=100px>Sublinea:</td>
<td class="normal" width=400px>
<%
set rs15 = server.CreateObject("ADODB.Recordset")
Sql15 ="select * from sublineas"
rs15.Open SQL15, cn1
'Move to the first record in the recordset
response.write "<SELECT NAME=slininv class=normalb>"
response.write "<option value='" & rs11("slininv") & "' Selected>" & rs11("dessli")
while not rs15.EOF
response.write "<OPTION value='" & rs15("clasli") & "'>" & rs15("dessli") & "</option>"
rs15.MoveNext
wend
response.write "</select>"
%>
</td>
</tr>
<tr>
<td class="normal" width=100px>Factor Compra:</td>
<td class="normal" width=400px><input type=text class=normalb value="<%Response.Write rs11("facpinv")%>" name="facpinv" size=7 onChange="javascript:this.value=this.value.toUpperCase();"></td>
</tr>
<tr>
<td class="normal" width=100px>Precio 1:</td>
<td class="normal" width=400px><input type=text class=normalb value="<%Response.Write Formatnumber(rs11("plainv"))%>" name="plainv" size=7 onChange="javascript:this.value=this.value.toUpperCase();"></td>
</tr>
<tr>
<td class="normal" width=100px>Precio 2:</td>
<td class="normal" width=400px><input type=text class=normalb value="<%Response.Write Formatnumber(rs11("plbinv"))%>" name="plbinv" size=7 onChange="javascript:this.value=this.value.toUpperCase();"></td>
</tr>
<tr>
<td class="normal" width=100px>Precio 3:</td>
<td class="normal" width=400px><input type=text class=normalb value="<%Response.Write Formatnumber(rs11("plcinv"))%>" name="plcinv" size=7 onChange="javascript:this.value=this.value.toUpperCase();"></td>
</tr>
<tr>
<td class="normal" width=100px>Moneda:</td>
<td class="normal" width=400px>
<%
set rs16 = server.CreateObject("ADODB.Recordset")
Sql16 ="select * from monedas"
rs16.Open SQL16, cn1
'Move to the first record in the recordset
response.write "<SELECT NAME=mplinv class=normalb>"
response.write "<option value='" & rs11("mplinv") & "' Selected>" & rs11("desdiv")
while not rs16.EOF
response.write "<OPTION value='" & rs16("cladiv") & "'>" & rs16("desdiv") & "</option>"
rs16.MoveNext
wend
response.write "</select>"
%>
</td>
</tr>
<tr>
<td class="normal" width=100px>Minimo:</td>
<td class="normal" width=400px><input type=text class=normalb value="<%Response.Write Formatnumber(rs11("smininv"))%>" name="smininv" size=7 onChange="javascript:this.value=this.value.toUpperCase();"></td>
</tr>
<tr>
<td class="normal" width=100px>Maximo:</td>
<td class="normal" width=400px><input type=text class=normalb value="<%Response.Write Formatnumber(rs11("smaxinv"))%>" name="smaxinv" size=7 onChange="javascript:this.value=this.value.toUpperCase();"></td>
</tr>
<tr>
<td class="normal" width=100px>Peso (Kgs):</td>
<td class="normal" width=400px><input type=text class=normalb value="<%Response.Write Formatnumber(rs11("pesoinv"))%>" name="pesoinv" size=7 onChange="javascript:this.value=this.value.toUpperCase();"></td>
</tr>
<tr>
<td class="normal" width=100px>Proveedor 1:</td>
<td class="normal" width=400px>
<%
set Rs17 = server.CreateObject("ADODB.Recordset")
Sql17 ="select cveprv, nomprv from proveedores"
Rs17.Open Sql17, cn1
'Move to the first record in the recordset
response.write "<SELECT NAME=prv1inv class=normalb>"
response.write "<option value='" & rs11("prv1inv") & "' Selected>" & rs11("prv1inv")
while not Rs17.EOF
response.write "<OPTION value='" & Rs17("cveprv") & "'>" & Rs17("nomprv") & "</option>"
Rs17.MoveNext
wend
response.write "</select>"
%>
</td>
</tr>
<tr>
<td class="normal" width=100px>Costo Rep.:</td>
<td class="normal" width=400px><input type=text class=normalb value="<%= rs11("crp1inv")%>" name="crp1inv" size=7 onChange="javascript:this.value=this.value.toUpperCase();"></td>
</tr>
<tr>
<td class="normal" width=100px>Tpo. Entrega:</td>
<td class="normal" width=400px><input type=text class=normalb value="<%Response.Write Formatnumber(rs11("tep1inv"))%>" name="tep1inv" size=7 onChange="javascript:this.value=this.value.toUpperCase();"></td>
</tr>
<tr>
<td class="normal" width=100px>Proveedor 2:</td>
<td class="normal" width=400px>
<%
set rs18 = server.CreateObject("ADODB.Recordset")
Sql18 ="select * from proveedores"
rs18.Open SQL18, cn1
dim rs6, sql6
set rs6 = server.CreateObject("ADODB.Recordset")
Sql6 ="select * from proveedores;"
rs6.Open SQL6, cn1
'Move to the first record in the recordset
response.write "<SELECT NAME=prv2inv class=normalb>"
response.write "<option value='" & rs11("prv2inv") & "' Selected>" & rs11("prv1inv")
while not rs18.EOF
response.write "<OPTION value='" & rs18("cveprv") & "'>" & rs18("nomprv") & "</option>"
rs18.MoveNext
wend
response.write "</select>"
%>
</td>
</tr>
<tr>
<td class="normal" width=100px>Costo Rep.:</td>
<td class="normal" width=400px><input type=text class=normalb value="<%Response.Write Formatnumber(rs11("crp2inv"))%>" name="crp2inv" size=7 onChange="javascript:this.value=this.value.toUpperCase();"></td>
</tr>
<tr>
<td class="normal" width=100px>Tpo. Entrega:</td>
<td class="normal" width=400px><input type=text class=normalb value="<%Response.Write Formatnumber(rs11("tep2inv"))%>" name="tep2inv" size=7 onChange="javascript:this.value=this.value.toUpperCase();"></td>
</tr>
<tr>
<td class="normal" width=100px>Status:</td>
<td class="normal" width=400px><input type=text class=normalb value="<%Response.Write rs11("stainv")%>" name="stainv" size=1 onChange="javascript:this.value=this.value.toUpperCase();"></td>
</tr>
<tr>
<td class="normal" width=100px>Tipo:</td>
<td class="normal" width=400px>
<%
Dim Tactual
If rs11("Tipinv") = 0 then
Tactual = "Producto"
else if rs11("Tipinv") = 1 then
Tactual = "Servicio"
End If
End If
%>
<select name="Tipo">
<optgroup label="Seleccionado:">
<option value="<%= rs11("tipinv") %>"><%= Tactual %></option>
</optgroup>
<optgroup label="Cambiar Por">
<option value="0">Producto</option>
<option value="1">Servicio</option>
</optgroup>
</select>
</td>
</tr>
<tr>
<td class="normal" width=100px>Imagen:</td>
<td class="normal" width=400px><input type=text class=normalb value="<%Response.Write rs11("imainv")%>" name="imainv" size=25 onChange="javascript:this.value=this.value.toUpperCase();"></td>
</tr>
<tr>
<td class="normal" width=100px>Observaciones:</td>
<td colspan=7><textarea class="normalb" name=obsinv cols="70" rows="4" onChange="javascript:this.value=this.value.toUpperCase();"><%Response.Write rs11("Obsinv")%></textarea></td>
</tr>
<tr>
<td colspan=2><center><input type="button" class="normalb" name="Submit" value="Aceptar" onClick="check('Invup', this.name);"></td>
</tr>
</table>
</center>
</div>
</body>
</html>
<%
End Sub
'Add the chosen course to the cart
Call AddUsuario()
'Display contents of electronic shopping cart
Call DisplayUsuario()
%>