 <?php 
 require_once("../header.php");
 ?>
 <div class="container-fluid">
 
 <div class="row">
      <div class="col-md-12">

        <a class="btn btn-md btn-success mb-2 mt-2" href="nuevo_movimiento_cuenta.php"><i class="fa fa-plus"></i> Registrar movimiento</a>
        <a class="btn btn-md btn-default mb-2 mt-2" href="movimientos_cuenta.php"><i class="fa fa-file-medical-alt"></i> Reportes</a>

		<a class="btn btn-md btn-default mb-2 mt-2" href="cuentas.php"><i class="fa fa-arrow-circle-left"></i> Ir atras</a>
<hr>
		<script type="text/javascript">
          function modalCuenta(){
            $("#modalCuenta").modal('show');
    
                
             $("#frm").trigger('reset'); 
                setTimeout(function(){
                $("#numero_cuenta").focus();
                $("#numero_cuenta").select();
                $("#fondo").prop("disabled",false);

            },500)
            
        }
        </script>
        <?php

      include_once("../php/config.php");
      $sql = mysql_query("select * from movimientos_cuenta where fecha='$hoy'") or die(mysql_error());
?>
 <div class="table-responsive border p-3">
      <table class="table table-hover table-striped table-sm table-bordered" data-page-length='8' style="width: 100%">

          <thead>
            <th>Id</th>
            <th>N Cuenta</th>
            <th>Descripcion</th>
            <th>Fecha</th>
            <th>Tipo</th>
            <th>Monto</th>
            <th>Balance</th>
			<th>Editar</th>
          </thead>
          <tbody>
          <?php while($r=mysql_fetch_array($sql)){
            $id = $r["id"];
            $c++;
            
            ?>
            <tr>
              <td>
			  <input type="checkbox" name="ch" id="ch">
			   <?php echo $r["id"]?></td>
              <td><span class="text-primary"><?php echo ($r["cuenta"])?></span></td>
              <td><?php echo $r["concepto"]?></td>
			  <td><?php echo $r["hora"]?></td>
			  <td><?php echo $r["tipo"]?></td>
              <td><?php echo decimal($r["monto"])?></td>
			  <td><?php echo decimal($r["balance"])?></td>

			  <td><a href='javascript:void(0)' onClick="ver(<?php echo $r["id"]?>)"><i class="fa fa-edit"></i></a></td>
              
            </tr>
                                                      <?php }?>
          </tbody>
          <tfoot>
            <br>

            <th>
              Cant. registros: <?php echo $c?>
            </th>
           
          </tfoot>
        </table>
      </div>
      </div>
    </div>
    
        </div>
      </div>
      


          
</div>
        


     </div>
   </div>
   
		
    </div>

	
<script>
 $(".table").DataTable();
         
        </script>