$fila4 = mysql_fetch_array($rs4); $vapecli = $fila4[1]; $vnomcli = $fila4[2]; $vdircli = $fila4[3]; $vruccli = $fila4[5]; // $cad5 = "select sum(total)from carrito where codope='" . $_SESSION['ope'] . "'"; $rs5 = $obj->ejecutarConsulta($cad5); $fila5 = mysql_fetch_array($rs5); $total = $fila5[0]; $st = $total / 1.19; $igv = $total - $st; if ($_SESSION["n"] == 1) { $codven = '02'; $cadena = "insert into facturas values('" . $_SESSION['nf'] . "','" . $vcodcli . "','" . $hoy . "','" . number_format($st, 2) . "','" . number_format($igv, 2) . "','" . number_format($total, 2) . "','" . $codven . "')"; $rscadena = $obj->ejecutarActualizacion($cadena); } $cadenadf = "Select * from detalles where codope='" . $_SESSION["ope"] . "'"; $rsdf = $obj->ejecutarConsulta($cadenadf); //echo $cadenadf; //echo $rsdf; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <style type="text/css"> <!-- .Estilo4 { font-size: 18px; font-weight: bold;
$vcodproducto = $_GET["codpro"]; //echo $vcodproducto."<br>"; //precio unitario $pu = "select * from producto where codpro='" . $vcodproducto . "'"; $rspu = $obj->ejecutarConsulta($pu); $filapu = mysql_fetch_array($rspu); //echo $filapu[4]."<br>"; //insertar //$cadinsertar="Insert into carrito values('".$_SESSION["ope"]."','".$vcodproducto."',1,'".number_format($filapu[4],2)."')"; //echo $cadinsertar; //$obj->ejecutarActualizacion($cadinsertar); $cad4 = "Select * from carrito where codope='" . $ope . "' and codpro='" . $vcodproducto . "'"; $rs4 = $obj->ejecutarConsulta($cad4); if (mysql_num_rows($rs4) == 0) { $cadinsertar = "Insert into carrito values('" . $_SESSION["ope"] . "','" . $vcodproducto . "',1,'" . number_format($filapu[4], 2) . "')"; $obj->ejecutarActualizacion($cadinsertar); } else { ?> <script languaje="javascript"> //alert("Este producto ya existe..."); </script> <?php } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Ventas DOS</title> <link href="plantilla.css" rel="stylesheet" type="text/css" /> </head>