<%
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">
</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="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 CXcM where usuario = '" & nombre &"';"
rs5.open sql5,cn1,1,2
%>
<%
do while not rs5.EOF
%>
<a href="<%=rs5.fields("cxcm")%>.asp"><img src="Image/<%=rs5.fields("cxcn")%>.gif" border=0 ALT="<%=rs5.fields("cxCn")%>"></a>
<%
rs5.MoveNext
loop
%>
</div>
<div style="position:absolute; top:105px; left:10">
<center>
<hr>
<%
Dim Rs11, Sql11, Rs12, Sql12, Rs13, Sql13, Rs14, Sql14, Rs15, Sql15, Rs16, Sql16
Dim Nota, TipoN, DocuN, FechaC
Nota = Request("Nota")
Set Rs11 = server.CreateObject("ADODB.Recordset")
Sql11 = "select * from cxcncr where numncr = "& Nota &";"
Rs11.Open Sql11,Cn1,1,2
If Rs11.Eof then
%>
***** NO SE ENCONTRO LA NOTA DE CREDITO : <%= Nota %> ******
<br>
<a href = "javascript:history.back()"><<< Regresar</a><br><br>
<%
Else
TipoN = Rs11("Tipod")
DocuN = Rs11("DocNcr")
FechaC = Date()
'***** PROCESO DE CANCELACION DE LA NOTA DE CREDITO POR BONIFICACION *****
If TipoN = 0 then
Set Rs12 = server.CreateObject("ADODB.Recordset")
Sql12 = "Update Cxcgen " &_
"Set NCCXCG = (NCCXCG - ImpNcr), Salcxcg = (Salcxcg + ImpNcr), " &_
"Pagcxcg = (Pagcxcg - ImpNcr), Imtcxcg = (Imtcxcg + (ImpNcr * TcaNcr)) " &_
"From CxcNcr Where nfacxcg = Docncr and NumNcr = "& Nota &" and Movcxcg = 1;"
Cn1.Execute Sql12
Set Rs13 = server.CreateObject("ADODB.Recordset")
Sql13 = "Update Cxcdet " &_
"Set Impcxcd = 0, Imdcxcd = 0 " &_
"From CxcNcr Where nfacxcd = Docncr and NumNcr = "& Nota &" and Movcxcd = 16 and Refcxcd = '"& Nota &"';"
Cn1.Execute Sql13
Set Rs14 = server.CreateObject("ADODB.Recordset")
Sql14 = "Update Clientes " &_
"Set Salcli = (Salcli + (ImpNcr * TcaNcr)) " &_
"From CxcNcr where Clacli = CliNcr and NumNcr = "& Nota &";"
Cn1.Execute Sql14
Set Rs15 = server.CreateObject("ADODB.Recordset")
Sql15 = "Update CxcNcr " &_
"Set subNcr = 0, IvtNcr = 0, ImpNcr = 0, ImxNcr = 0, NotNcr = NotNcr + ' Cancelado' + '"& FechaC &"'" &_
"From CxcNcr where NumNcr = "& Nota &";"
Cn1.Execute Sql15
Response.Redirect("Ncrcan.asp")
Else
End If
%>
<%
End If
%>
</div>
</body>
</html>
<%
End Sub
'Add the chosen course to the cart
Call AddUsuario()
'Display contents of electronic shopping cart
Call DisplayUsuario()
%>