Ver Mensaje Individual
  #3 (permalink)  
Antiguo 03/01/2009, 10:47
Avatar de colote
colote
 
Fecha de Ingreso: julio-2008
Ubicación: Rosario - Santa Fe - Argentina
Mensajes: 729
Antigüedad: 15 años, 10 meses
Puntos: 8
Respuesta: Problemas a mostrar forms !!!

Hola !!!
Te muestro parte del codigo ... Eso lo hace para una parte del form ...
Código PHP:
<body onload="calculo_carga();acumula_carga();calculoMod_carga();acumulaMod_carga();calculoT_carga();acumulaT_carga(); calculofondo_carga();acumulasub_carga();acumulasub();calculofondo()">

<form id="form" name="form" action="<?php echo $_SERVER['PHP_SELF'];?>" method="post">

<!-- //////////////////////////////////////////////////////////////////////////////////// -->
<div id=noprint>
<table id="tablita1" name="tablita1">
<tr><td align="center">
<input type="button" name="b0" id="b0" value="VOLVER" onclick = "self.location.href = 'inicio.php'"/>
<input type="submit" name="b1" id="b1" value="<" onclick="anterior()">
<input type="submit" name="b2" id="b2" value=">" onclick="siguiente()">
<input type="submit" name="b3" id="b3" value="Buscar">
<input type="button" name="b6" id="b6"  value="Imprimir" onclick="doPrint()">

</td></tr>
</table>
</div>

<table>
<tr>
<td align="center">
<font color="red" size="1"><b>Desde: </b></font>
<input type="text" size="8" name="desde" value="<?php echo $_POST['desde']?>">

<font color="red" size="1"><b>Hasta: </b></font>
<input type="text" size="8" name="hasta" value="<?php echo $_POST['hasta']?>">
</tr>
</table>

<?php

$desde
=$_POST['desde'];
$hasta=$_POST['hasta'];

// for ($z=$desde;$z<=$hasta;$z++)
// {

$piezas mysql_query("SELECT * FROM piezas where codigo between $desde and $hasta",$conexion);

while (
$resu_piezas mysql_fetch_array($piezas)){ //Recorro la tabla Piezas !!!


$dolar=mysql_query("select valor from valor_dolar where codigo='1'" $conexion) or  
die(
"Problemas en el select:".mysql_error());
$resu_dol=mysql_fetch_array($dolar);

?>


<table id="tablita">
<tr align="center">
<td><font color="red" size="4"><b>ALUPRES SRL</b></font></td>
<td><font color="blue" size="4"><b>Analisis de Costos</b></font></td>
</tr>
<tr>
<td align="center">
<font color="red" size="1"><b>Registro Actual: </b></font>
<input type="text" size="8" name="codigo" value="<?php echo $z?>">
</td>
</tr>

<tr> 
<td></td>
<td><font color="green" size="2"><b>Cotizacion del Dolar: >>> <? echo "USD ";echo $resu_dol['valor'];?></b></td>
</tr>


<tr>
<td><font color="red" size="1"><b>Codigo: </b></font><input type="text" size=8 name="cod_piezan" value="<?php echo $resu_piezas['cod_pieza']?>"></td>
<td><font color="red" size="1"><b>Nombre:</b> </font><input type="text" size=60 name="nombren" value="<?php echo $resu_piezas['nombre'?>"><br></td>
</tr>
</table>

<!-- /////////////////////////MATERIA PRIMA -->

<table id="tabla">
<tr>
<td align="left" colspan="9"><font color="1166FF" size="3"><b>MATERIA PRIMA</b></font></td>
</tr>

<tr align="left">
<td><font color="blue" size="1">COD</font></td>
<td><font color="blue" size="1">DESIGNACION</font></td>
<td><font color="blue" size="1">UNIDAD</font></td>
<td><font color="blue" size="1">CANTIDAD</font></td>
<td><font color="blue" size="1">DESP %</font></td>
<td><font color="blue" size="1">COSTO $</font></td>
<td><font color="blue" size="1">COSTO U$S</font></td>
<td width="65px"><font color="blue" size="1">SUBTOT $</font></td>
<td width="65px"><font color="blue" size="1">SUBTOT U$S</font></td>
</tr>

<?php
$cmp
=0;
$smp mysql_query("select * from sub_materia_prima where cod_pieza='$resu_piezas[cod_pieza]'",$conexion);
while (
$resu_smp mysql_fetch_array($smp)){ //Recorro la tabla Sub_Materia_Primas!!!

$mp mysql_query("select * from materia_prima where codigo='$resu_smp[cod_mp]'",$conexion);
while(
$resu_mp mysql_fetch_array($mp)){ //Recorro la tabla Materia_Primas!!!

$cmp++;
?>
<tr>
<td><input type="text" size="4" name="code_<?echo $cmp?>" value="<?echo $resu_mp['codigo']?>" /></td>
<td><input type="text" size="35" name="name_<?echo $cmp?>" value="<?echo $resu_mp["nombre"]?>" /></td>
<td><input type="text" size="8" name="unid_<?echo $cmp?>" value="<?echo $resu_mp['unidad']?>" /></td>
<td><input type="text" size="8" name="cant_mp_<?echo $cmp?>" value="<?echo $resu_smp['cant_mp']?>" /></td>
<td><input type="text" size="8" name="desperdicio_<?echo $cmp?>" value="<?echo $resu_smp['desperdicio']?>" /></td>
<td><input type="text" size="8" name="cos_mp_pesos_<?echo $cmp?>" value="<?echo $resu_mp['costo_mp_pesos']?>" /></td>
<td><input type="text" size="8" name="cos_mp_dolar_<?echo $cmp?>" value="<?echo $resu_mp['costo_mp_dolar']?>" /></td>
<!-- en este campo  no se muestra el calculo de funcionesjs.js -->
<td><input type="text" size="8" name="sub_mp_pesos_<?echo $cmp?>" /></td>
<!-- en este campo  no se muestra el calculo de funcionesjs.js -->
<td><input type="text" size="8" name="sub_mp_dolar_<?echo $cmp?>" /></td>

</tr>
<?php
}
}

?>
<input type="hidden" name="var_cont">
</table>
<table id="tabla_fondo1">
<tr>
<td></td>
<td width="65px"><font color="#5F9F9F" size="1">Costo $</font></td>
<td width="65px"><font color="#5F9F9F" size="1">Costo U$S</font></td>
</tr>
<tr>
<td size="1" align="right"><font color="red" size="1"><b>Subtotal Costo Materia Prima</b></font></td>
<!-- en este campo  no se muestra el calculo de funcionesjs.js -->
<td><input type="text" size="8" name="totcos_mp_pesos" ></td> 
<!-- en este campo  no se muestra el calculo de funcionesjs.js -->
<td><input type="text" size="8" name="totcos_mp_dolar" ></td>
</tr>
</table>
Gracias ...
__________________
Mail: [email protected]