Este es el código fuente:
Código PHP:
Ver original<form action="nomina_reg.php" method="post" >
<table width="750" border="0" class="tabla2">
<tr>
<td colspan="5" class="td2" bgcolor="#95bce2">UNIDAD EDUCATIVA EL MILAGRO DE LA PERLA</td>
</tr>
<tr>
<td colspan="5">NOMINA PARA EL PAGO DE SUELDOS EMPLEADOS</td>
</tr>
<tr>
<td width="7%">Desde:</td>
<td width="15%"> </td>
<td width="7%">Hasta:</td>
<td width="16%"> </td>
<td> </td>
</tr>
</table>
<br />
<table width="750" border="1" bordercolor="#95bce2" class="tabla3">
<tr bgcolor="#95bce2 ">
<td width="3%" class="td3">Nº</td>
<td width="3%" class="td3">CI</td>
<td width="10%" class="td3">APELLIDOS</td>
<td width="11%" class="td3">NOMBRES</td>
<td width="4%" class="td3">DIAS</td>
<td width="8%" class="td3">SUELDO BÁSICO</td>
<td width="8%" class="td3">SUELDO B. QUINCENA</td>
<td width="8%" class="td3">IVSS</td>
<td width="8%" class="td3">PARO FORSOZO</td>
<td width="8%" class="td3">LPH</td>
<td width="8%" class="td3">OTROS INGRESOS</td>
<td width="8%" class="td3">OTROS DESCUENT</td>
<td width="8%" class="td3">TOTAL DEDUCCIONES</td>
<td width="8%" class="td3">TOTAL DEVENGADO</td>
</tr>
<script type="text/javascript">
// dias es el total de días trabajados
// campo es la id del input text que se debe actualizar
function calcula(dias, sueldo_quinc) {
sueldo = ;
// Va sin formato, eso tendrás que preguntarlo en el foro de Javascript
document.getElementById('sueldo_quinc').value = dias * sueldo;
}
</script>
<tr>
<td>1<input type="hidden" name="id_empleado[]" value="1" /></td>
<td>14587456</td>
<td>Tovar Lamas</td>
<td>Julia Lisa</td>
<td><input name="dias[]" type="text" id="dias1" size="2" value="" onblur="calcula(this.value, '1548.21', 1);" /></td>
<td>1548.21</td>
<td><input name="sueldo_quinc[]" type="text" id="sueldo_quinc1" size="5" value="" readonly="readonly" /></td>
<td>61.93</td>
<td>7.74</td>
<td>15.48</td>
<td><input name="otros_ing[]" type="text" size="5" /></td>
<td><input name="otros_desc[]" type="text"size="5" /></td>
<td></td>
<td></td>
</tr>
<tr>
<td>2<input type="hidden" name="id_empleado[]" value="2" /></td>
<td>18236369</td>
<td>Vera Suarez</td>
<td>Rosa Victoria</td>
<td><input name="dias[]" type="text" id="dias2" size="2" value="" onblur="calcula(this.value, '1548.21', 2);" /></td>
<td>1548.21</td>
<td><input name="sueldo_quinc[]" type="text" id="sueldo_quinc2" size="5" value="" readonly="readonly" /></td>
<td>61.93</td>
<td>7.74</td>
<td>15.48</td>
<td><input name="otros_ing[]" type="text" size="5" /></td>
<td><input name="otros_desc[]" type="text"size="5" /></td>
<td></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td class="td3">TOTAL</td>
<td> </td>
</tr>
</table>
</form>