<head>
        <script type="text/javascript" src="<?php echo base_url()?>assets/dist/js/reportePromociones.js"></script> 
        <link rel="stylesheet" type="text/css" href='<?php echo base_url()?>assets/dist/css/table.css' />        
        <link rel="stylesheet" href="<?php echo base_url().'assets/dist/css/styles.css'?>">
        <script type="text/javascript">
        var base_url="<?php echo base_url()?>";
        </script> 
       <link rel="stylesheet" href="<?php echo base_url().'assets/plugins/select/bootstrap-select.min.css'?>">
    <!-- Latest compiled and minified JavaScript -->
    <script src="<?php echo base_url().'assets/plugins/select/bootstrap-select.min.js'?>"></script>
</head>
<body>
<form action="#" method="POST" OnSubmit="return false">
            <div class="col-md-8">
                <div class="form-group col-md-6">
                  <div class="form-content">
                    <label class="col-md-1 control-label">Desde:</label>
                    <input class="form-control date-picker" name="fechainicio" id="fechainicio" value="<?php echo !empty($fechainicio) ? $fechainicio:'';?>">
                  </div>
                </div>
                <div class="form-group col-md-6">
                  <div class="form-content">
                  <label class="col-md-1 control-label">Hasta:</label>
                  <input class="form-control date-picker" name="fechafin" id="fechafin" value="<?php  echo !empty($fechafin) ? $fechafin:'';?>">
                  </div>
                </div>
                <div class="form-group col-md-6">
                  <div class="form-content">
                  <label class="col-md-1 control-label">Tipo:</label>
                  <select class="form-control" id="tipo" name="tipo"> 
                    <option value="">TODOS</option>
                    <!-- <option value="1">INSTITUCIONAL</option> -->
                    <option value="2">LOCAL</option>
                    <!-- <option value="3">FIJA</option> -->
                    <option value="4">EMERGENTE</option>
                  </select>
                  </div>
                </div>
                <div class="form-group col-md-6">
                  <div class="form-content">
                    <label class="col-md-1 control-label">Estatus:</label>
                    <select class="form-control" id="status" name="status"> 
                    <option value="">TODOS</option>
                    <option value="ACTIVA">ACTIVA</option>
                    <option value="DESACTIVA">DESACTIVA</option>
                  </select>
                  </div>
                </div>
          </div>
          <div class="col-md-4">
                <div class="form-group col-md-12 col-xs-12 contenedor pull-left">
                  <div class="form-content">
                  <div class="col-md-12 col-xs-12">
                    <a href="javascript:window.history.back()" ><button type="button" class="btn btn-danger col-md-12 col-xs-12 "><span class="glyphicon glyphicon-circle-arrow-left"> </span> Regresar</button></a>
                  </div>
                  </div>
                </div>
                <div class="form-group col-md-12 col-xs-12 contenedor pull-right">
                  <div class="form-content">
                  <div class="col-md-12 col-xs-12">
                  <button type="submit" class="btn btn-primary col-md-12 col-xs-12 " id="filtrarReportes"><span class="glyphicon glyphicon-search">  </span> Buscar </button>                    
                  </div>
                  </div>
                </div>                  
          </div>
          <center><h3>Reporte de Promociones</h3></center>
          <div class="container">
        <!-- <h1>Reporte de Adeudos</h1> -->
            <table id="reporte-promoiones" class="display up table" style="width:100%">
        </table>
    </div>
 </form>
</body>
<!-- Modal loading -->
<div class="modal fade" id="modal-loader" data-backdrop="static" data-keyboard="false">
<div class="vertical-alignment-helper">
  <div class="modal-dialog vertical-align-center modal-sm">
	  	<div style=" text-align: center;">
		<div class="lds-spinner"><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div></div>
		<center class="cargando"> Cargando...</center>
		</div>
  </div>
</div>
</div>
<!-- fin modal loading -->
<!-- ------ -->
<!-- Modal activar -->
<div id="modalActivar" class="modal fade" role="dialog">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <center><h4 class="modal-title">Activar promoción</h4></center>
      </div>
      <div class="modal-body">
      <input type="text" class="invisible" id="idPromocion">
            <div class="col-md-12 centrar">
              <h4 id="nombrePromocion"></h4>
            </div>

            <div class="col-md-10 div-centrado" id="contenedorFT">
              <label for="fechaTermino"> Fecha Termino </label>
              <input type="text" id="fechaTermino" name="fechaTermino" class="form-control termino-picker">
            </div>

      </div>
      <div class="modal-footer">
            <button type="button" class="btn btn-danger  pull-left" id="cerrarModal" data-dismiss="modal">Cancelar</button>  
            <button type="button" class="btn btn-primary  pull-right" id="activar" >Activar</button> 
      </div>
    </div>

  </div>
</div>
<!-- --------- -->
<script type="text/javascript">
  (function(){
            function removeAccents ( data ) {
                if ( data.normalize ) {
                    /* Use la API I18n si está disponible para dividir caracteres y acentos, luego elimine
                       los acentos al por mayor. Tenga en cuenta que utilizamos los datos originales, así como
                       lo nuevo para permitir la búsqueda de cualquiera de los formularios.*/
                    return data +' '+ data
                        .normalize('NFD')
                        .replace(/[\u0300-\u036f]/g, '');
                }
             
                return data;
            }
             
            var searchType = jQuery.fn.DataTable.ext.type.search; 
            searchType.string = function ( data ) {
                return ! data ?
                    '' :
                    typeof data === 'string' ?
                        removeAccents( data ) :
                        data;
            };
             
            searchType.html = function ( data ) {
                return ! data ?
                    '' :
                    typeof data === 'string' ?
                        removeAccents( data.replace( /<.*?>/g, '' ) ) :
                        data;
            };
        }());
</script>


