sábado, 27 de julio de 2013

ROL DE PAGO

CÓDIGO DE ROL DE PAGO - HTML

<html>
<head>
<title> Rol de Pago </title>
</head>
<body><form action="rol.php"method="get" target="_blank">
<br>
<br>
<br>
<font size="15"><center><b> ROL DE PAGO: </b></center></font>
<br>
<br>
<br>
<table border="5" width="100%" height="200">
<tr><td><center>NOMBRE</center></td><td> <center> MES </center> </td><td><center> A&NtildeO</center> </td><td><center> SUELDO</center> </td><td> <center>DESC. IESS </center></td><td> <center>HORAS EXTRAS</center> </td></tr>
<tr><td><center> <input type="text" name="nombre"> </center></td><td><center><input type="text" name="mes"></center></td><td><center><input type="text" name="ano"></center></td>
<td><center><input type="text" name="sueldo"></center><td><center><input type="text" name="iess"></center></td><td><center><input type="text" name="horas"></center></tr>
<BR>
<BR>
<tr><td colspan="6"><CENTER><input type="submit" value="CALCULAR"></CENTER></td></tr>
</table>
</form>
</body>
</html>
</body>
</html>

CÓDIGO DE ROL DE PAGO - PHP

<?php
$nombre=$_GET["nombre"];
$mes=$_GET["mes"];
$ano=$_GET["ano"];
$sueldo=$_GET["sueldo"];
$iess=$_GET["iess"];
$horas=$_GET["horas"];

$subtotal=$sueldo-$iess;
$totalhoras=$horas*4;
$total=$subtotal+$totalhoras;

echo "<br>";
echo "<br>";
echo "<br>";
echo "<font size=15><center><b> ROL DE PAGO: </b></center></font>";
echo "<br>";
echo "<br>";
echo "<br>";
echo "<table border=5 width=100%>";
echo "<tr><td width=20%>";
echo "<center><b> NOMBRE </b> </center>";
echo "</td><td width=10%>";
echo "<center><b>MES</b></center>";
echo "</td><td width=10%>";
echo "<center><b>A&NtildeO</b></center>";
echo "</td><td width=10%>";
echo "<center><b>SUELDO</b></center>";
echo "</td><td width=10%>";
echo "<center><b>DES. IESS</b></center>";
echo "</td><td width=10%>";
echo "<center><b>H. EXTRAS</b> <br> USD 4.00 C/H</b></center>";
echo "</td><td width=10%>";
echo "<center><H2><b>TOTAL</b><H2></center>";
echo "</td></tr>";
echo "<tr height=80><td style=text-align:left <>";
echo $nombre;
echo "</td><td style=text-align:center>";
echo $mes;
echo "</td><td style=text-align:center>";
echo $ano;
echo "</td><td style=text-align:center>";
echo $sueldo;
echo "</td><td style=text-align:center>";
echo $iess;
echo "</td><td style=text-align:center>";
echo $totalhoras;
echo "</td><td style=text-align:center>";
echo $total;
echo "</td></tr>
</table>";
?>