<%
Option Explicit
%>
<%
Session.LCID = 2058
Response.ContentType = "application/vnd.ms-excel"
%>
<!--#include file="User.asp"-->
<!--#include file="general.asp"-->
<html>
<head>
<title>Grupo MIM</title>
</head>
<BODY>
<div class="normalw" style="position:absolute; top:1px">
<center>
</center>
</div>
<div class="normalw" style="position:absolute; top:1px;">
</div>
<div class="normalw" style="position:absolute; top:34px; left:1">
</div>
<div class="normal" style="position:absolute; top:70px; left:15">
<%
Dim Finicial,Ffinal,clientei,clientef
Dim rs11, sql11,sql12,rs12
finicial = request("fechai")
ffinal = request("fechaf")
clientei = request("clientei")
clientef = request("clientef")
Set Rs11 = server.CreateObject("ADODB.Recordset")
SQL11="select nfaffacd, cliffacd, fecfface, nomcli, ucofface as Costo, (subfface*tcafface) as Subtotal, "&_
" (ivtfface*tcafface) as Iva, (totfface*tcafface) as total, stafface, (antifface * Tcafface) as Anticipo " &_
"from ffacdet, ffacenc, clientes where numfface=nfaffacd AND CODFFACD <> 'ANTICIPO'"&_
" and clacli = cliffacd and fecfface between '"& Finicial &"' and '"& Ffinal &"' and Clacli between '"& ClienteI &"' and '"& ClienteF &"' " &_
"group by nfaffacd, fecfface, cliffacd, nomcli, "&_
" ucofface, subfface, ivtfface, totfface, tcafface, stafface, antifface order by fecfface asc"
Rs11.Open Sql11,cnl,1,2
Set Rs12 = server.CreateObject("ADODB.Recordset")
SQL12="select * from subfac where fecfface between '"& Finicial &"' and '"& Ffinal &"' order by fecfface asc"
Rs12.Open Sql12,cn1,1,2
%>
<Table border=0 cellspacing=0 cellpadding=1 bordecolor=#000000>
<TR>
<TD width="120" align="Left" class="normalw"><b>FACTURA</b></td>
<TD width="70" align="Left" class="normalw"><b>CLIENTE</b></td>
<TD width="70" align="Left" class="normalw"><b>FECHA</b></td>
<TD width="70" align="Left" class="normalw"><b>NOMBRE CLIENTE</b></td>
<TD width="50" align="Left" class="normalw"><b>COSTO</b></td>
<TD width="100" align="right" class="normalw"><b>SUBTOTAL</b></td>
<TD width="100" align="Center" class="normalw"><b>IVA</b></td>
<TD width="100" align="Center" class="normalw"><b>TOTAL</b></td>
<TD width="100" align="Center" class="normalw"><b>STATUS</b></td>
<TD width="100" align="Center" class="normalw"><b>ANTICIPO</b></td>
</tr>
<%
do until rs11.eof
Dim Color, Colorfila
if colorfila = 0 then
Color= "#d8d8d8"
Colorfila = 1
else
Color= "#ffffff"
Colorfila = 0
end if
%>
<TR>
<TD width="120" align="Left" class="normal" bgcolor=white><%= rs11("NUMNCR")%></td>
<TD width="120" align="Left" class="normal" bgcolor=white><%Response.Write rs11("FECNCR")%></td>
<TD width="120" align="Left" class="normal" bgcolor=white><%Response.Write rs11("NUMNCR")%></td>
<TD width="120" align="Left" class="normal" bgcolor=white><%Response.Write rs11("COICLI")%></td>
<TD width="120" align="Left" class="normal" bgcolor=white><%Response.Write rs11("NOMCLI")%></td>
<TD width="120" align="Left" class="normal" bgcolor=white><%Response.Write rs11("NOTNCR")%></td>
<TD width="120" align="Left" class="normal" bgcolor=white><%Response.Write rs11("UCOSTO")%></td>
<TD width="120" align="Left" class="normal" bgcolor=white><%Response.Write rs11("ANTNCR")%></td>
<TD width="120" align="Left" class="normal" bgcolor=white><%Response.Write rs11("SUBNCR")%></td>
<TD width="120" align="Left" class="normal" bgcolor=white><%Response.Write rs11("IVTNCR")%></td>
<TD width="120" align="Left" class="normal" bgcolor=white><%Response.Write rs11("IMPNCR")%></td>
</Tr>
<%
RS11.MOVENEXT
LOOP
%>
</table>
<%
RS11.CLOSE
%>
<%
End Sub
'Add the chosen course to the cart
Call AddUsuario()
'Display contents of electronic shopping cart
Call DisplayUsuario()
%>