<?php $r="../";
require_once($r."inc/funciones.php");
validNotSession($r);

$spe=$_SESSION['perfil'];
$mysqli = connectDB($r);
roleaccess(2121);
    
    $sql = $mysqli->query("SELECT * FROM z_retefuente ORDER BY id DESC LIMIT 1");
    $row = $sql->fetch_assoc();
    $error="";
?>
<!DOCTYPE html>
<html lang="esss">
  <?php include $r."inc/head.php"; ?>
<body class="fixed-nav sticky-footer  sidenav-toggled  bg-dark" id="page-top">
  <?php include $r."inc/nav.php"; ?>
  
  <div class="content-wrapper">
    <div class="container-fluid">
      <h2 class="text-center"><i class="fa fa-user"></i> RTE ICA</h2><hr/>
      <form id="formulario" name="nuevo" action="acciones.php" method="post">
        <div class="form-group row">
            <label for="base" class="col-sm-2 col-form-label"><span class="text-danger h5">*</span>Base</label>
            <div class="col-sm-9">
                <input type="number" class="form-control" name="base" value="<? if($row["base"]!=""){echo $row["base"]; } ?>" maxlength="14" min="1" placeholder="base" autocomplete="off" required>
            </div>
        </div>
        <div class="form-group row">
            <label for="porcentaje" class="col-sm-2 col-form-label"><span class="text-danger h5">*</span>Porcentaje</label>
            <div class="col-sm-9">
                <input type="number" class="form-control" id="celular" name="porcentaje" value="<? if($row["porcentaje"]!=""){echo $row["porcentaje"]; }  ?>" maxlength="14" placeholder="Número celular" autocomplete="off" required>
            </div>
        </div>
        <input type="hidden" name="retefuente" value="retefuente">
        <hr/>
        <div class="text-center">
            <a class="btn btn-primary" href="javascript:history.back(1)">ATRAS</a>
            <button type="submit" class="btn btn-success">ACTUALIZAR</button>
        </div>
      </form>
    </div><hr/>
  </div>
  <? include $r."inc/foot.php"; ?>
</body>
</html>