<%
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:64px; left:10">
<%
Dim rs10, sql10, rs11, sql11, rs12, sql12, rS13, sQL13, Rs14, sql14, Rs20, Sql20, Rs15, Sql15, Rs16, Sql16
Dim Fpednum, Cotiza
Fpednum = Request("Fpednum")
set rs13 = server.CreateObject("ADODB.Recordset")
Sql13 ="Select * from fcotdet where sigfcotd = "& Fpednum &";"
rs13.Open SQL13, cn1
If Rs13.Eof then
Response.write("No haces nada")
else
While Not rs13.eof
Cotiza = rs13("ncofcotd")
set rs14 = server.CreateObject("ADODB.Recordset")
Sql14 ="Update fcotenc set stafcote = 'A' where numfcote = "& Cotiza &";"
Cn1.Execute sql14
Rs13.Movenext
Wend
End If
set rs11 = server.CreateObject("ADODB.Recordset")
Sql11 ="Update Fcotdet " &_
"Set Csufcotd = (Csufcotd - canfcotd), Cpefcotd = (Cpefcotd + Canfcotd), sigfcotd = null " &_
"from fpeddet where npefpedd = "& Fpednum &" and ranfpedd = regfcotd;"
Cn1.Execute sql11
set rs12 = server.CreateObject("ADODB.Recordset")
Sql12 ="Update Ueps set pinueps = 0, ppiueps = 0 From fpeddet where npefpedd = "& Fpednum &" and npefpedd = pinueps and secfpedd = ppiueps;"
Cn1.Execute sql12
set rs15 = server.CreateObject("ADODB.Recordset")
Sql15 ="Update Uepsc set pinuepsc = 0 From fpeddet where npefpedd = "& Fpednum &" " &_
"and npefpedd = pinuepsc;"
Cn1.Execute sql15
set rs16 = server.CreateObject("ADODB.Recordset")
Sql16 ="Update Fpedenc set stafpede = 'C' where numfpede = "& Fpednum &";"
Cn1.Execute sql16
set rs20 = server.CreateObject("ADODB.Recordset")
Sql20 ="Update Multialmacen set " &_
"Capmul = (Capmul - Canfpedd) from Fpeddet " &_
"where npefpedd = "& Fpednum &" and almmul = almfpedd and artmul = codfpedd;"
Cn1.Execute sql20
Response.Redirect("Fpedesp.asp?Fpednum="&Fpednum&"&Empresa="&Negocio&"")
%>
</div>
</body>
</html>
<%
End Sub
'Add the chosen course to the cart
Call AddUsuario()
'Display contents of electronic shopping cart
Call DisplayUsuario()
%>