<%
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 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>
<!--#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:10">
<%
dim rs5, sql5
set rs5 = server.CreateObject("ADODB.Recordset")
sql5 = "select * from Ffacm where (usuario like'" & nombre & "') order by ffacs asc"
rs5.open sql5,cn1,1,2
%>
<%
do while not rs5.EOF
%>
<a href="<%=rs5.fields("Ffacm")%>.asp"><img src="Image/<%=rs5.fields("ffacn")%>.gif" border=0 alt="<%=rs5.fields("ffacn")%>"></a>
<%
rs5.MoveNext
loop
%>
</div>
<div class="normal" style="position:absolute; top:100px; left:1">
<center>
<hr>
<Form action="ffacant.asp" name="Ffactura" method='post'>
<TABLE border="0" cellspacing="0" cellpadding="0" class="normal">
<tr>
<td Class="Normalb">Factura: </td>
<td><input Type="Text" Class="Normalb" name="Factura" size="9" onChange="javascript:this.value=this.value.toUpperCase();"></td>
</tr>
<tr>
<td Colspan="2" Align="Center"><input type="submit" value="Buscar" Class="Normalb"></td>
</tr>
</table>
</form>
<hr>
<%
Dim Factura
Dim Rs11, Sql11, Rs12, Sql12
Dim ImporteP, Almacen
Factura = Request("Factura")
If Isnull(Factura) or Factura = "" Then
Factura = 0
Else
Factura = Factura
End If
Set Rs11 = server.CreateObject("ADODB.Recordset")
Sql11 = "Select Numfface, Clifface, Nomcli, Fecfface, Desdiv, Ivafface, subfface, Ivtfface, Totfface " &_
"from FFacenc, Clientes, Monedas " &_
"Where Numfface = "& Factura &" and Clacli = Clifface and Monfface = Cladiv;"
Rs11.Open Sql11,Cn1,1,2
If Rs11.Eof then
%>
***** No se Encontro la Factura <%= Factura %> ****
<br>
<%
Else
%>
<TABLE border=1 cellspacing=1 cellpadding=2 bordercolor=#c0c0c0>
<tr>
<td class="normal" align="left" bgcolor="#d8d8d8">Factura</td>
<td class="normal" align="left" bgcolor="#d8d8d8">Cliente</td>
<td class="normal" align="left" bgcolor="#d8d8d8">Nombre</td>
<td class="normal" align="left" bgcolor="#d8d8d8">Fecha</td>
<td class="normal" align="left" bgcolor="#d8d8d8">Moneda</td>
<td class="normal" align="left" bgcolor="#d8d8d8">Iva</td>
</tr>
<tr>
<td class="normal" align="Right"><%= Rs11("Numfface") %></td>
<td class="normal" align="left"><%= Rs11("Clifface") %></td>
<td class="normal" align="left"><%= Rs11("Nomcli") %></td>
<td class="normal" align="Right"><%= Rs11("Fecfface") %></td>
<td class="normal" align="Right"><%= Rs11("Desdiv") %></td>
<td class="normal" align="Right"><%= Formatnumber(Rs11("Ivafface")) %> %</td>
</tr>
</Table>
<%
Set Rs12 = server.CreateObject("ADODB.Recordset")
Sql12 = "Select Almffacd, Codffacd, Nominv, Canffacd, Uniffacd " &_
"From Ffacdet, Inventarios where Codffacd = Cveinv and Nfaffacd = "& Factura &";"
Rs12.Open Sql12,Cn1,1,2
%>
<TABLE border=1 cellspacing=1 cellpadding=2 bordercolor=#c0c0c0>
<tr>
<td class="normal" align="left" bgcolor="#d8d8d8">Almacen</td>
<td class="normal" align="left" bgcolor="#d8d8d8">Codigo</td>
<td class="normal" align="left" bgcolor="#d8d8d8">Descripcion</td>
<td class="normal" align="left" bgcolor="#d8d8d8">Cantidad</td>
<td class="normal" align="left" bgcolor="#d8d8d8">Unitario</td>
<td class="normal" align="left" bgcolor="#d8d8d8">Importe</td>
</tr>
<%
Almacen = Rs12("Almffacd")
Do While Not Rs12.Eof
ImporteP = Cdbl(Rs12("Canffacd")) * Cdbl(Rs12("Uniffacd"))
%>
<tr>
<td class="normal" align="Right"><%= Rs12("Almffacd") %></td>
<td class="normal" align="left"><%= Rs12("Codffacd") %></td>
<td class="normal" align="left"><%= Rs12("Nominv") %></td>
<td class="normal" align="Right"><%= FormatNumber(Rs12("Canffacd")) %></td>
<td class="normal" align="Right"><%= FormatCurrency(Rs12("Uniffacd")) %></td>
<td class="normal" align="Right"><%= FormatCurrency(ImporteP) %></td>
</tr>
<%
Rs12.Movenext
Loop
%>
<tr>
<td class="normal" align="Right" Colspan="5">Subtotal:</td>
<td class="normal" align="Right"><%= FormatCurrency(Rs11("Subfface")) %></td>
</tr>
<tr>
<td class="normal" align="Right" Colspan="5">Iva:</td>
<td class="normal" align="Right"><%= FormatCurrency(Rs11("Ivtfface")) %></td>
</tr>
<tr>
<td class="normal" align="Right" Colspan="5">Total:</td>
<td class="normal" align="Right"><%= FormatCurrency(Rs11("Totfface")) %></td>
</tr>
</Table>
<hr>
<Form action="Anticipo.asp" name="Anticipo" method='post'>
<TABLE border="0" cellspacing="2" cellpadding="2" class="normal">
<tr>
<td Class="Normalb">Factura: </td>
<td Class="Normalb">Anticipo: </td>
</tr>
<tr>
<td><input Type="Text" Class="Normalb" Value="<%= Factura %>" name="Factura" size="9" Style="Text-Align:right" readonly></td>
<td>
<input Type="Text" Class="Normalb" name="Anticipo" size="9" Value="0" Style="Text-Align:right">
<input Type="Hidden" Class="Normalb" name="Almacen" size="9" Value="<%= Almacen %>" Style="Text-Align:right">
</td>
</tr>
<tr>
<td Class="Normalb" Colspan="2">Cometarios: </td>
</tr>
<tr>
<td Class="Normalb" Colspan="2">
<textarea class="normalb" name="Nota" cols="70" rows="4" onChange="javascript:this.value=this.value.toUpperCase();"></textarea>
</td>
</tr>
<tr>
<td Colspan="2" Align="Center"><input type="submit" value="Aplicar Anticipo" Class="Normalb"></td>
</tr>
</table>
</form>
<%
End If
%>
</div>
</body>
</html>
<%
End Sub
'Add the chosen course to the cart
Call AddUsuario()
'Display contents of electronic shopping cart
Call DisplayUsuario()
%>