<%
Option Explicit
Session.LCID = 2058
'***** SI NO HA INICIADO SESION ***
If Session("Mybussiness") = "" then
Response.redirect("default.asp")
Else
Session.Timeout = 1200
'******* EN CASO DE ERROR ****
Err.Clear
On Error Resume Next
'*** REMPLAZA
Function Sanea(Texto)
Sanea = Replace(Texto, "'", "''")
End Function
%>
<!DOCTYPE html>
<HTML>
<HEAD>
<meta charset="ISO-8859-1" />
<TITLE>SISTEMA MIM <%= Session("Mybussiness") %> USUARIO: <%= Session("MyName") %></TITLE>
<link href="css/Modulos.css" rel="stylesheet" />
<link href="css/Buscador.css" rel="stylesheet" />
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
// End -->
</script>
</HEAD>
<BODY>
<%
'***** Variables a la base de datos ****
Dim Cn1
Dim Rs11, Rs12, Rs13, Rs14
Dim Sql11, Sql12, Sql13, Sql14
Dim Provee
Provee = Ucase(Request("Provee"))
'***** Conexion a la Base de Datos
Set Cn1 = Server.CreateObject( "ADODB.Connection" )
Cn1.Open "DRIVER={SQL Server};SERVER=172.17.0.5;UID="& Session("MyName") &";PWD="& Session("MyPass") &";Database="& Session("Mybussiness") &""
'***** Conexion A la Tabla Empresa ****
Set Rs11 = Server.CreateObject("ADODB.Recordset")
Sql11="Select * from Empresa;"
Rs11.Open Sql11,Cn1,1,2
%>
<SECTION Class="HeaderGes">
<div Id="DivHeadGes">
<%= Rs11("Nombre") %><br>
<%= Rs11("Direccion") %>, <%= Rs11("colonia") %><br>
<%= Rs11("Poblacion") %>
</div>
</SECTION>
<SECTION>
<!--#include file="Crecm.asp"-->
</SECTION>
<SECTION>
<center>
<br>
<B>***** AGREGAR UNA RECEPCION *****</B>
<BR><BR>
<Form action="Recetip.asp" method="post" name="Recetip" id="PedidnoNuevo">
<Table Class="Pedido">
<Tr>
<Td>Proveedor:</Td>
<Td Colspan="2">
<input tabindex="1" type="text" placeholder="Clave Proveedor" Title="Clave Proveedor" name="Provee" id="Provee" value="<%= Provee %>" onChange="javascript:this.value=this.value.toUpperCase();" readonly required/>
<a href="BrePrv.asp" Title="Buscar Un Proveedor">
<img src="icon/buscarC.png" height="30px">
</a>
</Td>
</Tr>
<Tr>
<Td>Moneda:</Td>
<Td Colspan="2">
<%
'****** TABLA DE MONEDAS ****
Set Rs12 = Server.CreateObject("ADODB.Recordset")
Sql12="Select Cladiv, Desdiv, Tcadiv from Monedas;"
Rs12.Open Sql12,Cn1,1,2
If Rs12.EOF Then
Else
%>
<SELECT NAME="Mone" tabindex="3">
<%
Do While Not Rs12.EOF
%>
<OPTION value="<%= Rs12("Cladiv") %>"> <%= Rs12("Desdiv") %> </Option>
<%
Rs12.Movenext
Loop
%>
</Select>
<%
End If
%>
</Td>
</Tr>
<Tr>
<Td>Esquema IVA:</Td>
<Td Colspan="2">
<%
'****** TABLA DE ESQUEMA DE IVA. ****
Set Rs14 = Server.CreateObject("ADODB.Recordset")
Sql14="Select Regiva, Iva, Retencion " &_
"From ESQUEMAIVA " &_
"where Regiva = 1 " &_
"Order by Regiva Asc;"
Rs14.Open Sql14,Cn1,1,2
If Rs14.EOF Then
Else
%>
<SELECT NAME="IvaCot" tabindex="5">
<%
Do While Not Rs14.EOF
%>
<OPTION value="<%= Rs14("Regiva") %>"> <%= Rs14("Iva") %> - <%= Rs14("Retencion") %> </Option>
<%
Rs14.Movenext
Loop
%>
</Select>
<%
End If
%>
</Td>
</Tr>
<Tr>
<Td>Referencia:</Td>
<Td Colspan="2">
<input tabindex="5" type="text" placeholder="Referencia" Title="Referencia" name="Refe" id="Refe" value="" Size="5px" required/>
</Td>
</Tr>
<Tr>
<Td>Valor Flete:</Td>
<Td Colspan="2">
<input tabindex="6" type="text" placeholder="Valor Flete" Title="Valor Flete" name="vFlete" id="vFlete" value="0" Size="5px" style="Text-Align:Right;" required/>
</Td>
</Tr>
<Tr>
<Td>Valor Factura:</Td>
<Td Colspan="2">
<input tabindex="7" type="text" placeholder="Valor Factura" Title="Valor Factura" name="vfactura" id="vfactura" value="0" Size="5px" style="Text-Align:Right;" required/>
</Td>
</Tr>
<Tr>
<Td>Embarque directo:</Td>
<Td>
<Input Type="radio" Name="Edirecto" Value="0" Checked> No
</Td>
<Td>
<Input Type="radio" Name="Edirecto" Value="1"> Si
</Td>
</Tr>
<Tr>
<Td>Fecha Recibo documento:</Td>
<Td Colspan="2">
<input tabindex="7" type="text" placeholder="Fecha Doc" Title="Fecha Doc" name="FechaDoc" id="FechaDoc" value="<%= DATE() %>" Size="7px" style="Text-Align:Right;" required/>
</Td>
</Tr>
<Tr>
<Td align="center" Colspan="3"><button tabindex="3" type="submit" name="Grabar" id="BuscarCli"/>Grabar</button></Td>
<Tr>
</Table>
</SECTION>
<%
If Err.Number <> 0 Then
%>
<br><br>
Número de Error: <%= Err.Number %><BR>
Descripción: <%= Err.Description %><BR>
Origen: <%= Err.Source %><BR>
Linea: <%= Err.Line %><BR>
<br>
<%
Else
'****** FIN DE LOS ERRORES ***
End If
%>
</BODY>
</HTML>
<%
'FIN DE SESION
End If
%>