Ver Mensaje Individual
  #1 (permalink)  
Antiguo 30/05/2013, 13:12
andres_py
 
Fecha de Ingreso: mayo-2013
Ubicación: Asuncion
Mensajes: 2
Antigüedad: 11 años
Puntos: 0
Php con ajax,, tengo problema en enviar el codigo de producto a eliminar

buENAAAAS.. pueden ayudarme con estoo.. tengo el detalle de la venta con el listado de productos. y quiero quitar algunos productoc pero mi variable solo envia numero, al enviar caracter ya no muestra nada.. esta en rojo el problema..
porfavor me estoy trancando mucho tiempo ya en eso



//MUESTRA LOS PRODUCTOS EN EL DETALLE DE VENTAS


if ($_GET['valor1']==11)
{
$query_jrprueba = "SELECT TEM_CODIGO,TEM_DESCR,TEM_CANT,TEM_IVA,TEM_PRECIO,T EM_TOTAL FROM tem_detventa";
$jrprueba = mysql_query($query_jrprueba, $db_gco) or die(mysql_error());

$total = "SELECT TEM_TOTAL, Sum(TEM_TOTAL) as a_total FROM tem_detventa";
$jrtotal = mysql_query($total, $db_gco) or die(mysql_error());
$totalROW=mysql_fetch_array($jrtotal);

if (!$jrprueba)
{
echo "Por algún motivo no se ejecutó la consulta";
}else{
$ficolor="";

echo "<table width='100%' border='0'cellpadding='0' cellspacing='0' >";
while($row = mysql_fetch_array($jrprueba))
{
$xx=$row['TEM_CODIGO'];
echo "<tr bgcolor='$ficolor'>";

echo "<td width='60'>".$row['TEM_CODIGO']." </td><td width='150'> ".$row['TEM_DESCR']."</td>
<td width='15' align='center'>".$row['TEM_CANT']."</td><td width='60' align='right'> ".number_format($row['TEM_PRECIO'])."</td>
<td width='30' align='center'>".number_format($row['TEM_IVA'])."</td><td width='50' align='right'> ".number_format($row['TEM_TOTAL'])."</td>
<td width='40' align='center'><img src='ico/delete_icon.gif' width='20' height='20' onclick='quitarPS('.$xx.')'/></td>" ;
echo "</tr>";
if ($ficolor==""){
$ficolor="#CCCCFF";
}else{
$ficolor="";
}
}
echo "</table>";

//CALCULA E IMPRIME EL TOTAL DE LA TABLA TEMPPORAL
$vIva=($totalROW['a_total'])/11;

echo "<table width='100%' border='0'cellpadding='0' cellspacing='0' align='right'>";
echo "<tr>";
echo "<td>.</td>";
echo "<td>.</td>";
echo "</tr>";
echo "<tr bgcolor='#99CC99'>";
echo "<td width='60' align='right'>"."<h3>"."IVA 10%"."</h3>"."<H2>".number_format($vIva)."</H2>"."</td>
<td width='150' align='right'>"."<h3>"."TOTAL"."</h3>"."<H2>"."Gs.".number_format($totalROW['a_total'])."<H2>"."</td>";
echo "</tr>";
echo "</table>";

}
}

?>