<%
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');
errors += checkNum(formname, 'pesoinv', 'Peso');
errors += checkText(formname, 'crp1inv', 'Lista 1');
errors += checkNum(formname, 'crp1inv', 'Lista 1');
errors += checkText(formname, 'crp2inv', 'Lista 2');
errors += checkNum(formname, 'crp2inv', 'Lista 2');
checkThisForm(formname, submitbutton, errors);
}
//-->
</script>
</head>
<BODY>
<!--#INCLUDE FILE="BARRA.asp"-->
<div class="normalw" style="position:absolute; top:1px">
<center>
<!--#include file="empresa.asp"--><br>
<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:60px; left:1">
<b>Agregar un Producto:</b>
</div>
<div class="normal" style="position:absolute; top:80px; left:1">
<Form action="Invnew.asp" name="Invnew" method='post'>
<Table border=0 cellspacing=0 cellpadding=1 class="normal">
<tr>
<td Class="normal">Clave:</td><td colspan=5><input type="text" class="normalb" name="Cveinv" size=25 onChange="javascript:this.value=this.value.toUpperCase();"></td>
</tr>
<tr>
<td Class="normal">Descripcion:</td><td colspan=3><input type="text" class="normalb" name="NomInv" size=73 onChange="javascript:this.value=this.value.toUpperCase();"></td>
</td>
<td Class="normal">Unidad:</td>
<td>
<%
dim rs5, sql5
set rs5 = server.CreateObject("ADODB.Recordset")
Sql5 ="select * from Unidades"
rs5.Open SQL5, cn1
'Move to the first record in the recordset
response.write "<SELECT NAME=Udminv class=normalb>"
while not rs5.EOF
response.write "<OPTION value='" & rs5("desuni") & "'>" & rs5("desuni") & "</option>"
rs5.MoveNext
wend
response.write "</select>"
%>
</td>
</tr>
<tr>
<td Class="normal">Description:</td><td colspan=3><input type="text" class="normalb" name="nomiinv" size=73 onChange="javascript:this.value=this.value.toUpperCase();"></td>
</td>
<td Class="normal">Unit:</td>
<td>
<%
set rs5 = server.CreateObject("ADODB.Recordset")
Sql5 ="select * from Unidades"
rs5.Open SQL5, cn1
'Move to the first record in the recordset
response.write "<SELECT NAME=Udmiinv class=normalb>"
while not rs5.EOF
response.write "<OPTION value='" & rs5("dinuni") & "'>" & rs5("dinuni") & "</option>"
rs5.MoveNext
wend
response.write "</select>"
%>
</td>
</tr>
<tr>
<td Class="normal">Linea:</td>
<td>
<%
set rs5 = server.CreateObject("ADODB.Recordset")
Sql5 ="select * from Lineas"
rs5.Open SQL5, cn1
'Move to the first record in the recordset
response.write "<SELECT NAME=lininv class=normalb>"
while not rs5.EOF
response.write "<OPTION value='" & rs5("clalin") & "'>" & rs5("deslin") & "</option>"
rs5.MoveNext
wend
response.write "</select>"
%>
</td>
<td Class="normal">Sublinea:</td>
<td colspan=3>
<%
set rs5 = server.CreateObject("ADODB.Recordset")
Sql5 ="select * from Sublineas"
rs5.Open SQL5, cn1
'Move to the first record in the recordset
response.write "<SELECT NAME=slininv class=normalb>"
while not rs5.EOF
response.write "<OPTION value='" & rs5("clasli") & "'>" & rs5("dessli") & "</option>"
rs5.MoveNext
wend
response.write "</select>"
%>
</td>
</tr>
<tr>
<td Class="normal">Precio 1:</td><td><input type="text" class="normalb" name="Plainv" value=0.00 size=7 onChange="javascript:this.value=this.value.toUpperCase();"></td>
<td Class="normal">Precio 2:</td><td><input type="text" class="normalb" name="Plbinv" value=0.00 size=7 onChange="javascript:this.value=this.value.toUpperCase();"></td>
<td Class="normal">Precio 3:</td><td><input type="text" class="normalb" name="Plcinv" value=0.00 size=7 onChange="javascript:this.value=this.value.toUpperCase();"></td>
</tr>
<tr>
<td Class="normal">Moneda:</td>
<td colspan=5>
<%
set rs5 = server.CreateObject("ADODB.Recordset")
Sql5 ="select * from Monedas"
rs5.Open SQL5, cn1
'Move to the first record in the recordset
response.write "<SELECT NAME=mplinv class=normalb>"
while not rs5.EOF
response.write "<OPTION value='" & rs5("cladiv") & "'>" & rs5("desdiv") & "</option>"
rs5.MoveNext
wend
response.write "</select>"
%>
</td>
</tr>
<tr>
<td Class="normal">Minimo:</td><td><input type="text" class="normalb" name="smininv" value=0.00 size=7 onChange="javascript:this.value=this.value.toUpperCase();"></td>
<td Class="normal">Maximo:</td><td><input type="text" class="normalb" name="smaxinv" value=0.00 size=7 onChange="javascript:this.value=this.value.toUpperCase();"></td>
<td Class="normal">Punto de Reorden:</td><td><input type="text" class="normalb" name="preoinv" value=0.00 size=7 onChange="javascript:this.value=this.value.toUpperCase();"></td>
</tr>
<tr>
<td Class="normal">Peso:</td><td colspan=5><input type="text" class="normalb" name="pesoinv" value=0.00 size=7 onChange="javascript:this.value=this.value.toUpperCase();"></td>
</tr>
<tr>
<td Class="normal">Proveedor 1:</td>
<td colspan=3>
<%
set rs5 = server.CreateObject("ADODB.Recordset")
Sql5 ="select * from Proveedores"
rs5.Open SQL5, cn1
'Move to the first record in the recordset
response.write "<SELECT NAME=prv1inv class=normalb>"
while not rs5.EOF
response.write "<OPTION value='" & rs5("cveprv") & "'>" & rs5("nomprv") & "</option>"
rs5.MoveNext
wend
response.write "</select>"
%>
</td>
<td Class="normal">Costo reposicion:</td><td><input type="text" class="normalb" name="crp1inv" value=0.00 size=7 onChange="javascript:this.value=this.value.toUpperCase();"></td>
</tr>
</td>
<td Class="normal">Tpo. entrega:</td><td><input type="text" class="normalb" name="tep1inv" value=0 size=7 onChange="javascript:this.value=this.value.toUpperCase();"></td>
</tr>
<tr>
<td Class="normal">Proveedor 2:</td>
<td colspan=3>
<%
set rs5 = server.CreateObject("ADODB.Recordset")
Sql5 ="select * from Proveedores"
rs5.Open SQL5, cn1
'Move to the first record in the recordset
response.write "<SELECT NAME=prv2inv class=normalb>"
while not rs5.EOF
response.write "<OPTION value='" & rs5("cveprv") & "'>" & rs5("nomprv") & "</option>"
rs5.MoveNext
wend
response.write "</select>"
%>
</td>
<td Class="normal">Costo reposicion:</td><td><input type="text" class="normalb" name="crp2inv" value=0.00 size=7 onChange="javascript:this.value=this.value.toUpperCase();"></td>
</tr>
</td>
<td Class="normal">Tpo. entrega:</td><td><input type="text" class="normalb" name="tep2inv" value=0 size=7 onChange="javascript:this.value=this.value.toUpperCase();"></td>
<td Class="normal">TIPO:</td>
<td Class="normal">
<hr>
<input type="radio" name="Tipo" value=0 checked>Producto
<input type="radio" name="Tipo" value=1>Servicio
<hr>
</td>
</tr>
<tr>
<td Class="normal">Imagen:</td><td colspan=5><input type="text" class="normalb" name="imainv" value=nd.jpg size=20 onChange="javascript:this.value=this.value.toUpperCase();"></td>
</tr>
<tr>
<td Class="normal">Observaciones:</td>
<td colspan=7><textarea class="normalb" name=obsinv cols="70" rows="4" onChange="javascript:this.value=this.value.toUpperCase();"></textarea></td>
</tr>
<tr>
<td colspan=8><center><input type="button" class="normalb" name="Submit" value="Aceptar" onClick="check('Invnew', this.name);"></td>
</tr>
</table>
</form>
</div>
</body>
</html>
<%
End Sub
'Add the chosen course to the cart
Call AddUsuario()
'Display contents of electronic shopping cart
Call DisplayUsuario()
%>