<%
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>
<%
Response.Expires = 0
Response.Buffer = True
'la siguiente linea escribe el encabezado... produciendo el refresh.
Response.AddHeader "Refresh", "15"
'***** Variables a la base de datos ****
Dim Cn1
Dim Rs11, Rs12, Rs13, Rs14
Dim Sql11, Sql12, Sql13, Sql14
Dim ColorFila, Msga
'***** 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>
<center>
<br>
<b>****** AUTORIZACION OC *****</b>
<br><br>
<%
'******* VARIABLES PARA EL GRUPO *****
Dim Cn20, Cn21, Cn22, Cn23, Cn24, Cn25, Cn26, Cn27, Cn28, Cn29
Dim Cn30, Cn31, Cn32, Cn33, Cn34, Cn35, Cn36, Cn37, Cn38, Cn39, Cn40,Cn41
Dim Rs20, Rs21, Rs22, Rs23, Rs24, Rs25, Rs26, Rs27, Rs28, Rs29
Dim Rs30, Rs31, Rs32, Rs33, Rs34, Rs35, Rs36, Rs37, Rs38, Rs39, Rs40,Rs41
Dim Sql20, Sql21, Sql22, Sql23, Sql24, Sql25, Sql26, Sql27, Sql28, Sql29
Dim Sql30, Sql31, Sql32, Sql33, Sql34, Sql35, Sql36, Sql37, Sql38, Sql39, Sql40,Sql41
Dim Factual
Factual = Date
'***** Conexion a la Base de Datos
Set Cn20 = Server.CreateObject( "ADODB.Connection" )
Cn20.Open "DRIVER={SQL Server};SERVER=172.17.0.5;UID="& Session("MyName") &";PWD="& Session("MyPass") &";Database=BAJIO"
Set Rs20 = server.CreateObject("ADODB.Recordset")
Sql20 = "select Numore,DIASORE,Fecore,Nomprv,Staore,STAOC " &_
"from proveedores,cordenc " &_
"Where cveprv = proore and firmad is null AND STAOC = 1 and staore < 2 and Fecauto between '"& factual &"' and '"& factual &"' " &_
"order by numore desc"
Rs20.Open Sql20,Cn20,1,2
%>
<br><br>
<b>****** BAJIO *****</b>
<br><br>
<%
If Rs20.Eof Then
Else
%>
<Table Align="center">
<Tr Class="InvResultado">
<Td>Orden</Td>
<Td>Dias de Credito</Td>
<Td>Fecha</Td>
<Td>Proveedor</Td>
<Td>Status</Td>
</Tr>
<%
Do While Not Rs20.Eof
If Rs20("DIASORE") >= 1 Then
ColorFila = "#34f334"
Msga = "SI"
Else
ColorFila = "#FF0000"
Msga = "NO"
End IF
%>
<Tr Class="InvResultado">
<Td Bgcolor="<%= ColorFila %>"><a Href="Ocfirm.asp?Numord=<%= Rs20("numore") %>&FILIAL=BAJIO" onclick="NewWindow(this.href,'<%= Rs20("numore") %>','800','600','yes');return false;"><%= Rs20("numore") %> </a></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs20("Diasore") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs20("Fecore") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs20("Nomprv") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs20("Staore") %></Td>
</Tr>
<%
Rs20.Movenext
Loop
%>
</Table>
<%
End If
%>
<%
'***** Conexion a la Base de Datos Slp ***
Set Cn41 = Server.CreateObject( "ADODB.Connection" )
Cn41.Open "DRIVER={SQL Server};SERVER=172.17.0.5;UID="& Session("MyName") &";PWD="& Session("MyPass") &";Database=SLP"
Set Rs41 = server.CreateObject("ADODB.Recordset")
Sql41 = "select Numore,DIASORE,Fecore,Nomprv,Staore,STAOC " &_
"from proveedores,cordenc " &_
"Where cveprv = proore and firmad is null AND STAOC = 1 and staore < 2 and Fecauto between '"& factual &"' and '"& factual &"' " &_
"order by numore desc"
Rs41.Open Sql41,Cn41,1,2
%>
<br><br>
<b>****** SAN LUIS *****</b>
<br><br>
<%
If Rs41.Eof Then
Else
%>
<Table Align="center">
<Tr Class="InvResultado">
<Td>Orden</Td>
<Td>Dias de Credito</Td>
<Td>Fecha</Td>
<Td>Proveedor</Td>
<Td>Status</Td>
</Tr>
<%
Do While Not Rs41.Eof
If Rs41("DIASORE") >= 1 Then
ColorFila = "#34f334"
Msga = "SI"
Else
ColorFila = "#FF0000"
Msga = "NO"
End IF
%>
<Tr Class="InvResultado">
<Td Bgcolor="<%= ColorFila %>"><a Href="Ocfirm.asp?Numord=<%= Rs41("numore") %>&FILIAL=SLP" onclick="NewWindow(this.href,'<%= Rs41("numore") %>','800','600','yes');return false;"><%= Rs41("numore") %> </a></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs41("Diasore") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs41("Fecore") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs41("Nomprv") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs41("Staore") %></Td>
</Tr>
<%
Rs41.Movenext
Loop
%>
</Table>
<%
End If
%>
<%
'***** Conexion a la Base de Datos GUADALAJARA ***
Set Cn24 = Server.CreateObject( "ADODB.Connection" )
Cn24.Open "DRIVER={SQL Server};SERVER=172.17.0.5;UID="& Session("MyName") &";PWD="& Session("MyPass") &";Database=GUADALAJARA"
Set Rs24 = server.CreateObject("ADODB.Recordset")
Sql24 = "select Numore,DIASORE,Fecore,Nomprv,Staore,STAOC " &_
"from proveedores,cordenc " &_
"Where cveprv = proore and firmad is null AND STAOC = 1 and staore < 2 and Fecauto between '"& factual &"' and '"& factual &"' " &_
"order by numore desc"
Rs24.Open Sql24,Cn24,1,2
%>
<br><br>
<b>****** GUADALAJARA *****</b>
<br><br>
<%
If Rs24.Eof Then
Else
%>
<Table Align="center">
<Tr Class="InvResultado">
<Td>Orden</Td>
<Td>Dias de Credito</Td>
<Td>Fecha</Td>
<Td>Proveedor</Td>
<Td>Status</Td>
</Tr>
<%
Do While Not Rs24.Eof
If Rs24("DIASORE") >= 1 Then
ColorFila = "#34f334"
Msga = "SI"
Else
ColorFila = "#FF0000"
Msga = "NO"
End IF
%>
<Tr Class="InvResultado">
<Td Bgcolor="<%= ColorFila %>"><a Href="Ocfirm.asp?Numord=<%= Rs24("numore") %>&FILIAL=GUADALAJARA" onclick="NewWindow(this.href,'<%= Rs24("numore") %>','800','600','yes');return false;"><%= Rs24("numore") %> </a></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs24("Diasore") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs24("Fecore") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs24("Nomprv") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs24("Staore") %></Td>
</Tr>
<%
Rs24.Movenext
Loop
%>
</Table>
<%
End If
%>
<%
'***** Conexion a la Base de Datos RIO ***
Set Cn25 = Server.CreateObject( "ADODB.Connection" )
Cn25.Open "DRIVER={SQL Server};SERVER=172.17.0.5;UID="& Session("MyName") &";PWD="& Session("MyPass") &";Database=RIO"
Set Rs25 = server.CreateObject("ADODB.Recordset")
Sql25 = "select Numore,DIASORE,Fecore,Nomprv,Staore,STAOC " &_
"from proveedores,cordenc " &_
"Where cveprv = proore and firmad is null AND STAOC = 1 and staore < 2 and Fecauto between '"& factual &"' and '"& factual &"' " &_
"order by numore desc"
Rs25.Open Sql25,Cn25,1,2
%>
<br><br>
<b>****** RIO *****</b>
<br><br>
<%
If Rs25.Eof Then
Else
%>
<Table Align="center">
<Tr Class="InvResultado">
<Td>Orden</Td>
<Td>Dias de Credito</Td>
<Td>Fecha</Td>
<Td>Proveedor</Td>
<Td>Status</Td>
</Tr>
<%
Do While Not Rs25.Eof
If Rs25("DIASORE") >= 1 Then
ColorFila = "#34f334"
Msga = "SI"
Else
ColorFila = "#FF0000"
Msga = "NO"
End IF
%>
<Tr Class="InvResultado">
<Td Bgcolor="<%= ColorFila %>"><a Href="Ocfirm.asp?Numord=<%= Rs25("numore") %>&FILIAL=RIO" onclick="NewWindow(this.href,'<%= Rs25("numore") %>','800','600','yes');return false;"><%= Rs25("numore") %> </a></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs25("Diasore") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs25("Fecore") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs25("Nomprv") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs25("Staore") %></Td>
</Tr>
<%
Rs25.Movenext
Loop
%>
</Table>
<%
End If
%>
<%
'***** Conexion a la Base de Datos MEXICO ***
Set Cn26 = Server.CreateObject( "ADODB.Connection" )
Cn26.Open "DRIVER={SQL Server};SERVER=172.17.0.5;UID="& Session("MyName") &";PWD="& Session("MyPass") &";Database=MEXICO"
Set Rs26 = server.CreateObject("ADODB.Recordset")
Sql26 = "select Numore,DIASORE,Fecore,Nomprv,Staore,STAOC " &_
"from proveedores,cordenc " &_
"Where cveprv = proore and firmad is null AND STAOC = 1 and staore < 2 and Fecauto between '"& factual &"' and '"& factual &"' " &_
"order by numore desc"
Rs26.Open Sql26,Cn26,1,2
%>
<br><br>
<b>****** MEXICO *****</b>
<br><br>
<%
If Rs26.Eof Then
Else
%>
<Table Align="center">
<Tr Class="InvResultado">
<Td>Orden</Td>
<Td>Dias de Credito</Td>
<Td>Fecha</Td>
<Td>Proveedor</Td>
<Td>Status</Td>
</Tr>
<%
Do While Not Rs26.Eof
If Rs26("DIASORE") >= 1 Then
ColorFila = "#34f334"
Msga = "SI"
Else
ColorFila = "#FF0000"
Msga = "NO"
End IF
%>
<Tr Class="InvResultado">
<Td Bgcolor="<%= ColorFila %>"><a Href="Ocfirm.asp?Numord=<%= Rs26("numore") %>&FILIAL=MEXICO" onclick="NewWindow(this.href,'<%= Rs26("numore") %>','800','600','yes');return false;"><%= Rs26("numore") %> </a></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs26("Diasore") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs26("Fecore") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs26("Nomprv") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs26("Staore") %></Td>
</Tr>
<%
Rs26.Movenext
Loop
%>
</Table>
<%
End If
%>
<%
'***** Conexion a la Base de Datos TAMPICO ***
Set Cn28 = Server.CreateObject( "ADODB.Connection" )
Cn28.Open "DRIVER={SQL Server};SERVER=172.17.0.5;UID="& Session("MyName") &";PWD="& Session("MyPass") &";Database=TAMPICO"
Set Rs28 = server.CreateObject("ADODB.Recordset")
Sql28 = "select Numore,DIASORE,Fecore,Nomprv,Staore,STAOC " &_
"from proveedores,cordenc " &_
"Where cveprv = proore and firmad is null AND STAOC = 1 and staore < 2 and Fecauto between '"& factual &"' and '"& factual &"' " &_
"order by numore desc"
Rs28.Open Sql28,Cn28,1,2
%>
<br><br>
<b>****** TAMPICO *****</b>
<br><br>
<%
If Rs28.Eof Then
Else
%>
<Table Align="center">
<Tr Class="InvResultado">
<Td>Orden</Td>
<Td>Dias de Credito</Td>
<Td>Fecha</Td>
<Td>Proveedor</Td>
<Td>Status</Td>
</Tr>
<%
Do While Not Rs28.Eof
If Rs28("DIASORE") >= 1 Then
ColorFila = "#34f334"
Msga = "SI"
Else
ColorFila = "#FF0000"
Msga = "NO"
End IF
%>
<Tr Class="InvResultado">
<Td Bgcolor="<%= ColorFila %>"><a Href="Ocfirm.asp?Numord=<%= Rs28("numore") %>&FILIAL=TAMPICO" onclick="NewWindow(this.href,'<%= Rs28("numore") %>','800','600','yes');return false;"><%= Rs28("numore") %> </a></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs28("Diasore") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs28("Fecore") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs28("Nomprv") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs28("Staore") %></Td>
</Tr>
<%
Rs28.Movenext
Loop
%>
</Table>
<%
End If
%>
<%
'***** Conexion a la Base de Datos MEXPINTURAS ***
Set Cn29 = Server.CreateObject( "ADODB.Connection" )
Cn29.Open "DRIVER={SQL Server};SERVER=172.17.0.5;UID="& Session("MyName") &";PWD="& Session("MyPass") &";Database=MEXPINTURAS"
Set Rs29 = server.CreateObject("ADODB.Recordset")
Sql29 = "select Numore,DIASORE,Fecore,Nomprv,Staore,STAOC " &_
"from proveedores,cordenc " &_
"Where cveprv = proore and firmad is null AND STAOC = 1 and staore < 2 and Fecauto between '"& factual &"' and '"& factual &"' " &_
"order by numore desc"
Rs29.Open Sql29,Cn29,1,2
%>
<br><br>
<b>****** MEXPINTURAS *****</b>
<br><br>
<%
If Rs29.Eof Then
Else
%>
<Table Align="center">
<Tr Class="InvResultado">
<Td>Orden</Td>
<Td>Dias de Credito</Td>
<Td>Fecha</Td>
<Td>Proveedor</Td>
<Td>Status</Td>
</Tr>
<%
Do While Not Rs29.Eof
If Rs29("DIASORE") >= 1 Then
ColorFila = "#34f334"
Msga = "SI"
Else
ColorFila = "#FF0000"
Msga = "NO"
End IF
%>
<Tr Class="InvResultado">
<Td Bgcolor="<%= ColorFila %>"><a Href="Ocfirm.asp?Numord=<%= Rs29("numore") %>&FILIAL=MEXPINTURAS" onclick="NewWindow(this.href,'<%= Rs29("numore") %>','800','600','yes');return false;"><%= Rs29("numore") %> </a></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs29("Diasore") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs29("Fecore") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs29("Nomprv") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs29("Staore") %></Td>
</Tr>
<%
Rs29.Movenext
Loop
%>
</Table>
<%
End If
%>
<%
'***** Conexion a la Base de Datos MIMTY ***
Set Cn30 = Server.CreateObject( "ADODB.Connection" )
Cn30.Open "DRIVER={SQL Server};SERVER=172.17.0.5;UID="& Session("MyName") &";PWD="& Session("MyPass") &";Database=MIMTY"
Set Rs30 = server.CreateObject("ADODB.Recordset")
Sql30 = "select Numore,DIASORE,Fecore,Nomprv,Staore,STAOC " &_
"from proveedores,cordenc " &_
"Where cveprv = proore and firmad is null AND STAOC = 1 and staore < 2 and Fecauto between '"& factual &"' and '"& factual &"' " &_
"order by numore desc"
Rs30.Open Sql30,Cn30,1,2
%>
<br><br>
<b>****** MIMTY *****</b>
<br><br>
<%
If Rs30.Eof Then
Else
%>
<Table Align="center">
<Tr Class="InvResultado">
<Td>Orden</Td>
<Td>Dias de Credito</Td>
<Td>Fecha</Td>
<Td>Proveedor</Td>
<Td>Status</Td>
</Tr>
<%
Do While Not Rs30.Eof
If Rs30("DIASORE") >= 1 Then
ColorFila = "#34f334"
Msga = "SI"
Else
ColorFila = "#FF0000"
Msga = "NO"
End IF
%>
<Tr Class="InvResultado">
<Td Bgcolor="<%= ColorFila %>"><a Href="Ocfirm.asp?Numord=<%= Rs30("numore") %>&FILIAL=MIMTY" onclick="NewWindow(this.href,'<%= Rs30("numore") %>','800','600','yes');return false;"><%= Rs30("numore") %> </a></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs30("Diasore") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs30("Fecore") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs30("Nomprv") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs30("Staore") %></Td>
</Tr>
<%
Rs30.Movenext
Loop
%>
</Table>
<%
End If
%>
<%
'***** Conexion a la Base de Datos CANCUN ***
Set Cn31 = Server.CreateObject( "ADODB.Connection" )
Cn31.Open "DRIVER={SQL Server};SERVER=172.17.0.5;UID="& Session("MyName") &";PWD="& Session("MyPass") &";Database=CANCUN"
Set Rs31 = server.CreateObject("ADODB.Recordset")
Sql31 = "select Numore,DIASORE,Fecore,Nomprv,Staore,STAOC " &_
"from proveedores,cordenc " &_
"Where cveprv = proore and firmad is null AND STAOC = 1 and staore < 2 and Fecauto between '"& factual &"' and '"& factual &"' " &_
"order by numore desc"
Rs31.Open Sql31,Cn31,1,2
%>
<br><br>
<b>****** CANCUN *****</b>
<br><br>
<%
If Rs31.Eof Then
Else
%>
<Table Align="center">
<Tr Class="InvResultado">
<Td>Orden</Td>
<Td>Dias de Credito</Td>
<Td>Fecha</Td>
<Td>Proveedor</Td>
<Td>Status</Td>
</Tr>
<%
Do While Not Rs31.Eof
If Rs31("DIASORE") >= 1 Then
ColorFila = "#34f334"
Msga = "SI"
Else
ColorFila = "#FF0000"
Msga = "NO"
End IF
%>
<Tr Class="InvResultado">
<Td Bgcolor="<%= ColorFila %>"><a Href="Ocfirm.asp?Numord=<%= Rs31("numore") %>&FILIAL=CANCUN" onclick="NewWindow(this.href,'<%= Rs31("numore") %>','800','600','yes');return false;"><%= Rs31("numore") %> </a></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs31("Diasore") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs31("Fecore") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs31("Nomprv") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs31("Staore") %></Td>
</Tr>
<%
Rs31.Movenext
Loop
%>
</Table>
<%
End If
%>
<%
'***** Conexion a la Base de Datos MERIDA ***
Set Cn32 = Server.CreateObject( "ADODB.Connection" )
Cn32.Open "DRIVER={SQL Server};SERVER=172.17.0.5;UID="& Session("MyName") &";PWD="& Session("MyPass") &";Database=MERIDA"
Set Rs32 = server.CreateObject("ADODB.Recordset")
Sql32 = "select Numore,DIASORE,Fecore,Nomprv,Staore,STAOC " &_
"from proveedores,cordenc " &_
"Where cveprv = proore and firmad is null AND STAOC = 1 and staore < 2 and Fecauto between '"& factual &"' and '"& factual &"' " &_
"order by numore desc"
Rs32.Open Sql32,Cn32,1,2
%>
<br><br>
<b>****** MERIDA *****</b>
<br><br>
<%
If Rs32.Eof Then
Else
%>
<Table Align="center">
<Tr Class="InvResultado">
<Td>Orden</Td>
<Td>Dias de Credito</Td>
<Td>Fecha</Td>
<Td>Proveedor</Td>
<Td>Status</Td>
</Tr>
<%
Do While Not Rs32.Eof
If Rs32("DIASORE") >= 1 Then
ColorFila = "#34f334"
Msga = "SI"
Else
ColorFila = "#FF0000"
Msga = "NO"
End IF
%>
<Tr Class="InvResultado">
<Td Bgcolor="<%= ColorFila %>"><a Href="Ocfirm.asp?Numord=<%= Rs32("numore") %>&FILIAL=MERIDA" onclick="NewWindow(this.href,'<%= Rs32("numore") %>','800','600','yes');return false;"><%= Rs32("numore") %> </a></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs32("Diasore") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs32("Fecore") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs32("Nomprv") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs32("Staore") %></Td>
</Tr>
<%
Rs32.Movenext
Loop
%>
</Table>
<%
End If
%>
<%
'***** Conexion a la Base de Datos ORIZABA ***
Set Cn34 = Server.CreateObject( "ADODB.Connection" )
Cn34.Open "DRIVER={SQL Server};SERVER=172.17.0.5;UID="& Session("MyName") &";PWD="& Session("MyPass") &";Database=ORIZABA"
Set Rs34 = server.CreateObject("ADODB.Recordset")
Sql34 = "select Numore,DIASORE,Fecore,Nomprv,Staore,STAOC " &_
"from proveedores,cordenc " &_
"Where cveprv = proore and firmad is null AND STAOC = 1 and staore < 2 and Fecauto between '"& factual &"' and '"& factual &"' " &_
"order by numore desc"
Rs34.Open Sql34,Cn34,1,2
%>
<br><br>
<b>****** ORIZABA *****</b>
<br><br>
<%
If Rs34.Eof Then
Else
%>
<Table Align="center">
<Tr Class="InvResultado">
<Td>Orden</Td>
<Td>Dias de Credito</Td>
<Td>Fecha</Td>
<Td>Proveedor</Td>
<Td>Status</Td>
</Tr>
<%
Do While Not Rs34.Eof
If Rs34("DIASORE") >= 1 Then
ColorFila = "#34f334"
Msga = "SI"
Else
ColorFila = "#FF0000"
Msga = "NO"
End IF
%>
<Tr Class="InvResultado">
<Td Bgcolor="<%= ColorFila %>"><a Href="Ocfirm.asp?Numord=<%= Rs34("numore") %>&FILIAL=ORIZABA" onclick="NewWindow(this.href,'<%= Rs34("numore") %>','800','600','yes');return false;"><%= Rs34("numore") %> </a></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs34("Diasore") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs34("Fecore") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs34("Nomprv") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs34("Staore") %></Td>
</Tr>
<%
Rs34.Movenext
Loop
%>
</Table>
<%
End If
%>
<%
'***** Conexion a la Base de Datos PUEBLA ***
Set Cn35 = Server.CreateObject( "ADODB.Connection" )
Cn35.Open "DRIVER={SQL Server};SERVER=172.17.0.5;UID="& Session("MyName") &";PWD="& Session("MyPass") &";Database=PUEBLA"
Set Rs35 = server.CreateObject("ADODB.Recordset")
Sql35 = "select Numore,DIASORE,Fecore,Nomprv,Staore,STAOC " &_
"from proveedores,cordenc " &_
"Where cveprv = proore and firmad is null AND STAOC = 1 and staore < 2 and Fecauto between '"& factual &"' and '"& factual &"' " &_
"order by numore desc"
Rs35.Open Sql35,Cn35,1,2
%>
<br><br>
<b>****** PUEBLA *****</b>
<br><br>
<%
If Rs35.Eof Then
Else
%>
<Table Align="center">
<Tr Class="InvResultado">
<Td>Orden</Td>
<Td>Dias de Credito</Td>
<Td>Fecha</Td>
<Td>Proveedor</Td>
<Td>Status</Td>
</Tr>
<%
Do While Not Rs35.Eof
If Rs35("DIASORE") >= 1 Then
ColorFila = "#34f334"
Msga = "SI"
Else
ColorFila = "#FF0000"
Msga = "NO"
End IF
%>
<Tr Class="InvResultado">
<Td Bgcolor="<%= ColorFila %>"><a Href="Ocfirm.asp?Numord=<%= Rs35("numore") %>&FILIAL=PUEBLA" onclick="NewWindow(this.href,'<%= Rs35("numore") %>','800','600','yes');return false;"><%= Rs35("numore") %> </a></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs35("Diasore") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs35("Fecore") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs35("Nomprv") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs35("Staore") %></Td>
</Tr>
<%
Rs35.Movenext
Loop
%>
</Table>
<%
End If
%>
<%
'***** Conexion a la Base de Datos Indmexmexico ***
Set Cn36 = Server.CreateObject( "ADODB.Connection" )
Cn36.Open "DRIVER={SQL Server};SERVER=172.17.0.5;UID="& Session("MyName") &";PWD="& Session("MyPass") &";Database=Indmexmexico"
Set Rs36 = server.CreateObject("ADODB.Recordset")
Sql36 = "select Numore,DIASORE,Fecore,Nomprv,Staore,STAOC " &_
"from proveedores,cordenc " &_
"Where cveprv = proore and firmad is null AND STAOC = 1 and staore < 2 and Fecauto between '"& factual &"' and '"& factual &"' " &_
"order by numore desc"
Rs36.Open Sql36,Cn36,1,2
%>
<br><br>
<b>****** INDMEXMEXICO *****</b>
<br><br>
<%
If Rs36.Eof Then
Else
%>
<Table Align="center">
<Tr Class="InvResultado">
<Td>Orden</Td>
<Td>Dias de Credito</Td>
<Td>Fecha</Td>
<Td>Proveedor</Td>
<Td>Status</Td>
</Tr>
<%
Do While Not Rs36.Eof
If Rs36("DIASORE") >= 1 Then
ColorFila = "#34f334"
Msga = "SI"
Else
ColorFila = "#FF0000"
Msga = "NO"
End IF
%>
<Tr Class="InvResultado">
<Td Bgcolor="<%= ColorFila %>"><a Href="Ocfirm.asp?Numord=<%= Rs36("numore") %>&FILIAL=INDMEXMEXICO" onclick="NewWindow(this.href,'<%= Rs36("numore") %>','800','600','yes');return false;"><%= Rs36("numore") %> </a></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs36("Diasore") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs36("Fecore") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs36("Nomprv") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs36("Staore") %></Td>
</Tr>
<%
Rs36.Movenext
Loop
%>
</Table>
<%
End If
%>
<%
'***** Conexion a la Base de Datos TOLUCA ***
Set Cn37 = Server.CreateObject( "ADODB.Connection" )
Cn37.Open "DRIVER={SQL Server};SERVER=172.17.0.5;UID="& Session("MyName") &";PWD="& Session("MyPass") &";Database=TOLUCA"
Set Rs37 = server.CreateObject("ADODB.Recordset")
Sql37 = "select Numore,DIASORE,Fecore,Nomprv,Staore,STAOC " &_
"from proveedores,cordenc " &_
"Where cveprv = proore and firmad is null AND STAOC = 1 and staore < 2 and Fecauto between '"& factual &"' and '"& factual &"' " &_
"order by numore desc"
Rs37.Open Sql37,Cn37,1,2
%>
<br><br>
<b>****** TOLUCA *****</b>
<br><br>
<%
If Rs37.Eof Then
Else
%>
<Table Align="center">
<Tr Class="InvResultado">
<Td>Orden</Td>
<Td>Dias de Credito</Td>
<Td>Fecha</Td>
<Td>Proveedor</Td>
<Td>Status</Td>
</Tr>
<%
Do While Not Rs37.Eof
If Rs37("DIASORE") >= 1 Then
ColorFila = "#34f334"
Msga = "SI"
Else
ColorFila = "#FF0000"
Msga = "NO"
End IF
%>
<Tr Class="InvResultado">
<Td Bgcolor="<%= ColorFila %>"><a Href="Ocfirm.asp?Numord=<%= Rs37("numore") %>&FILIAL=TOLUCA" onclick="NewWindow(this.href,'<%= Rs37("numore") %>','800','600','yes');return false;"><%= Rs37("numore") %> </a></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs37("Diasore") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs37("Fecore") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs37("Nomprv") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs37("Staore") %></Td>
</Tr>
<%
Rs37.Movenext
Loop
%>
</Table>
<%
End If
%>
<%
'***** Conexion a la Base de Datos COATZA ***
Set Cn38 = Server.CreateObject( "ADODB.Connection" )
Cn38.Open "DRIVER={SQL Server};SERVER=172.17.0.5;UID="& Session("MyName") &";PWD="& Session("MyPass") &";Database=COATZA"
Set Rs38 = server.CreateObject("ADODB.Recordset")
Sql38 = "select Numore,DIASORE,Fecore,Nomprv,Staore,STAOC " &_
"from proveedores,cordenc " &_
"Where cveprv = proore and firmad is null AND STAOC = 1 and staore < 2 and Fecauto between '"& factual &"' and '"& factual &"' " &_
"order by numore desc"
Rs38.Open Sql38,Cn38,1,2
%>
<br><br>
<b>****** COATZA *****</b>
<br><br>
<%
If Rs38.Eof Then
Else
%>
<Table Align="center">
<Tr Class="InvResultado">
<Td>Orden</Td>
<Td>Dias de Credito</Td>
<Td>Fecha</Td>
<Td>Proveedor</Td>
<Td>Status</Td>
</Tr>
<%
Do While Not Rs38.Eof
If Rs38("DIASORE") >= 1 Then
ColorFila = "#34f334"
Msga = "SI"
Else
ColorFila = "#FF0000"
Msga = "NO"
End IF
%>
<Tr Class="InvResultado">
<Td Bgcolor="<%= ColorFila %>"><a Href="Ocfirm.asp?Numord=<%= Rs38("numore") %>&FILIAL=COATZA" onclick="NewWindow(this.href,'<%= Rs38("numore") %>','800','600','yes');return false;"><%= Rs38("numore") %> </a></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs38("Diasore") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs38("Fecore") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs38("Nomprv") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs38("Staore") %></Td>
</Tr>
<%
Rs38.Movenext
Loop
%>
</Table>
<%
End If
%>
<%
'***** Conexion a la Base de Datos VILLAHERMOSA ***
Set Cn39 = Server.CreateObject( "ADODB.Connection" )
Cn39.Open "DRIVER={SQL Server};SERVER=172.17.0.5;UID="& Session("MyName") &";PWD="& Session("MyPass") &";Database=VILLAHERMOSA"
Set Rs39 = server.CreateObject("ADODB.Recordset")
Sql39 = "select Numore,DIASORE,Fecore,Nomprv,Staore,STAOC " &_
"from proveedores,cordenc " &_
"Where cveprv = proore and firmad is null AND STAOC = 1 and staore < 2 and Fecauto between '"& factual &"' and '"& factual &"' " &_
"order by numore desc"
Rs39.Open Sql39,Cn39,1,2
%>
<br><br>
<b>****** VILLAHERMOSA *****</b>
<br><br>
<%
If Rs39.Eof Then
Else
%>
<Table Align="center">
<Tr Class="InvResultado">
<Td>Orden</Td>
<Td>Dias de Credito</Td>
<Td>Fecha</Td>
<Td>Proveedor</Td>
<Td>Status</Td>
</Tr>
<%
Do While Not Rs39.Eof
If Rs39("DIASORE") >= 1 Then
ColorFila = "#34f334"
Msga = "SI"
Else
ColorFila = "#FF0000"
Msga = "NO"
End IF
%>
<Tr Class="InvResultado">
<Td Bgcolor="<%= ColorFila %>"><a Href="Ocfirm.asp?Numord=<%= Rs39("numore") %>&FILIAL=VILLAHERMOSA" onclick="NewWindow(this.href,'<%= Rs39("numore") %>','800','600','yes');return false;"><%= Rs39("numore") %> </a></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs39("Diasore") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs39("Fecore") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs39("Nomprv") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs39("Staore") %></Td>
</Tr>
<%
Rs39.Movenext
Loop
%>
</Table>
<%
End If
%>
<%
'***** Conexion a la Base de Datos PINTURAS ***
Set Cn40 = Server.CreateObject( "ADODB.Connection" )
Cn40.Open "DRIVER={SQL Server};SERVER=172.17.0.5;UID="& Session("MyName") &";PWD="& Session("MyPass") &";Database=PINTURAS"
Set Rs40 = server.CreateObject("ADODB.Recordset")
Sql40 = "select Numore,DIASORE,Fecore,Nomprv,Staore,STAOC " &_
"from proveedores,cordenc " &_
"Where cveprv = proore and firmad is null AND STAOC = 1 and staore < 2 and Fecauto between '"& factual &"' and '"& factual &"' " &_
"order by numore desc"
Rs40.Open Sql40,Cn40,1,2
%>
<br><br>
<b>****** PINTURAS *****</b>
<br><br>
<%
If Rs40.Eof Then
Else
%>
<Table Align="center">
<Tr Class="InvResultado">
<Td>Orden</Td>
<Td>Dias de Credito</Td>
<Td>Fecha</Td>
<Td>Proveedor</Td>
<Td>Status</Td>
</Tr>
<%
Do While Not Rs40.Eof
If Rs40("DIASORE") >= 1 Then
ColorFila = "#34f334"
Msga = "SI"
Else
ColorFila = "#FF0000"
Msga = "NO"
End IF
%>
<Tr Class="InvResultado">
<Td Bgcolor="<%= ColorFila %>"><a Href="Ocfirm.asp?Numord=<%= Rs40("numore") %>&FILIAL=PINTURAS" onclick="NewWindow(this.href,'<%= Rs40("numore") %>','800','600','yes');return false;"><%= Rs40("numore") %> </a></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs40("Diasore") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs40("Fecore") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs40("Nomprv") %></Td>
<Td Bgcolor="<%= ColorFila %>"><%= Rs40("Staore") %></Td>
</Tr>
<%
Rs40.Movenext
Loop
%>
</Table>
<%
End If
%>
</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
%>