
PK 
<!--#include file="includes/openconn.asp" -->
<!--#include file="includes/checkadmin.asp" -->
<%'--------------------------- BORRA PEDIDO
rs.Open "SELECT * FROM Ventas WHERE idventa = " & request("idventa"),conn,2,2
rs.movefirst
rs.delete
rs.Close
'--------------------------- DESCUENTA STOCK
rs.open "SELECT * FROM Ventas_items WHERE xidventa = " & request("idventa"),conn,2,2
rs.movefirst
do until rs.EOF
rs1.open "SELECT * FROM Articulos WHERE idarticulo = " & rs("xidarticulo"),conn,2,2
if not rs1.EOF then
rs1.movefirst
for a = 35 to 40
rs1("art_stock" & a) = rs1("art_stock" & a) + rs("item_cantidad" & a)
next
rs1.update
end if
rs1.close
rs.delete
rs.movenext
loop
rs.close
conn.Close
Response.Redirect("showroom_ventas.asp")%>


PK 99