<?php include_once('../../config.php') ?>
<?php
$hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);
?>


<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>Sisplan Web | Exportação Fiscal</title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="plugins/fontawesome-free/css/all.min.css?versao=3.258.28.1">
  <!-- Ionicons -->
  <!-- Ionicons -->
  <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
  <!-- Theme style -->
  <link rel="stylesheet" href="dist/css/adminlte.min.css?versao=3.258.28.1">
  <!-- overlayScrollbars -->
  <link rel="stylesheet" href="plugins/overlayScrollbars/css/OverlayScrollbars.min.css?versao=3.258.28.1">
  <!-- Daterange picker -->
  <link href='https://fonts.googleapis.com/css?family=Roboto:400,300,500,600,700,400italic' rel='stylesheet' type='text/css'>

  <link rel="stylesheet" href="dist/css/custom.css?versao=3.258.28.1">

  <link rel="shortcut icon" href="<?php echo BASE_URI; ?>/favicon.ico">
  <link rel="stylesheet" href="dist/css/sisplan.css?versao=3.258.28.1">
  <link rel="stylesheet" href="dist/css/PesquisaVariosSelect2.css?versao=3.258.28.1">
  <link rel="stylesheet" type="text/css" href="dist/css/dataTables.bootstrap4.min.css?versao=3.258.28.1" />
  <!-- iCheck for checkboxes and radio inputs -->
  <link rel="stylesheet" href="plugins/icheck-bootstrap/icheck-bootstrap.min.css?versao=3.258.28.1">
  <link rel="shortcut icon" href="favicon.ico">
  <link rel="stylesheet" type="text/css" href="dist/css/driver.min.css?versao=3.258.28.1" />
  <link rel="stylesheet" href="plugins/select2/css/select2.min.css?versao=3.258.28.1">
  <link rel="stylesheet" href="plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css?versao=3.258.28.1">
  <link rel="stylesheet" href="dist/css/jquery-ui.css?versao=3.258.28.1">
  <link rel="stylesheet" href="plugins/datatables-colreorder/css/colReorder.bootstrap4.min.css?versao=3.258.28.1">
  <link rel="stylesheet" type="text/css" href="dist/css/sisplan.newColorsButtons.css?versao=3.258.28.1" />
  <link rel="stylesheet" type="text/css" href="dist/css/sisplan.adjustDataTableButtons.css?versao=3.258.28.1" />
  <!-- Google Font: Source Sans Pro -->
  <style>
    .botao {
      display: flex;
      justify-content: center;
      align-items: center;
    }

    #btnLimparFiltros {
      margin-right: 15px;
    }

    .groupDatasSaidas {
      flex-direction: row;
      display: inline;
    }

    #progressbar li {
      list-style-type: none;
      font-size: 12px;
      width: 25%;
      float: left;
      position: relative
    }

    .card-totais {
      margin-top: 2%;
    }

    #txtDados {
      padding-top: .7%;
      padding-left: .85%;
    }

    .input-group-append>a>i {
      margin-left: 0 !important;
      padding-left: 5px;
      padding-right: 5px;
    }

    .grupo_botao>button>i {
      margin-left: 0 !important;
      padding-left: 5px;
      padding-right: 5px;
    }

    .bg-light {
      background-color: #f8f9fa08 !important;
    }

    .focus:read-only:focus {
      border-color: #aa1212 !important;
    }

    .labelCheck {
      font-size: 110%;
      padding: 0.2%;
      margin-left: 1%;
    }

    .radiosStyle {
      font-size: 120%;
      margin-top: 1%;
      margin-bottom: 1%;
    }

    .checkboxNota {
      border: solid #e0e4e6;
      border-radius: 4px;
      border-width: 2px;
      padding: .8%;
    }

    .table.dataTable tbody td {
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
    }

    .border-Field .textoBorda {
      font-size: 1.1em !important;
      text-align: left !important;
      width: auto;
      padding: 0 10px;
      border-bottom: none;
    }

    .border-Field {
      border: 1px solid var(--font-color) !important;
      padding: 0 1.0em 0 1.0em !important;
      -webkit-box-shadow: 0px 0px 0px 0px #000;
      box-shadow: 0px 0px 0px 0px #000;
    }
  </style>
  <!-- Toastr -->
  <link rel="stylesheet" href="plugins/toastr/toastr.min.css">

</head>

<body class="hold-transition sidebar-mini layout-fixed">
  <div class="wrapper">

    <div class="content-wrapper">
      <div class="content-header">
        <div class="container-fluid">
          <div class="row mb-2">
            <div class="col-sm-6 flex">
              <h1 class="m-0 text-dark">Exportação Fiscal</h1>
              <button class="btn btn-info btn-sm ml-2" id="tutorial">
                <i class="fas fa-question-circle"></i>
              </button>
            </div>
            <div class="col-sm-6">

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

      <section class="content">

        <div class="container-fluid">
          <nav>
            <div class="nav nav-tabs justify-content-center" id="nav-tab" role="tablist" style="text-decoration: none">
              <a class="nav-link abaLink active" id="tabNFE" data-toggle="tab" href="#divNFE" role="tab" aria-controls="divNFE" aria-selected="true">Nota Fiscal Eletrônica - NF-e</a>
              <a class="nav-link abaLink" id="tabNFCE" data-toggle="tab" href="#divNFCE" role="tab" aria-controls="divNFCE" aria-selected="false">Nota Fiscal Consumidor Eletrônica - NFC-e</a>
              <a class="nav-link abaLink" id="tabCFE" data-toggle="tab" href="#divCFE" role="tab" aria-controls="divCFE" aria-selected="false">Cupom Fiscal Eletrônico - CF-e</a>
            </div>
          </nav>
          <div class="tab-pane fade show active" id="divNFE" role="tabpanel">
            <div class="card" style="margin-right: 7px;margin-left: 7px;" id="cardNFE">
              <div class="col-sm-12 mt-3 ml-2 ">
                <button class="btn btn-success btn-sisp btnFiltros" id="btnFiltrosNFE" type="button"><span class="fas fa-filter"></span> Filtros</button>
                <button class="btn btn-danger btn-sisp btnIncluir" id="btnExportarNFE" type="button"><span class="fas fa-file-export"></span> Exportar</button>
                <button class="btn-sisp btn btn-primary" id="btnImprimirNFE"><i class="fas fa-print"></i> Imprimir</button>
              </div>
              <div class="card-body" style="margin-right: 7px;">
                <div class="row">
                  <div class="col-sm-12">
                    <div class="d-inline pb-2">
                      <h5>Selecionar todas as NF-e: </h5>
                    </div>
                    <div class="icheck-primary">
                      <input class="form-check-input" type="checkbox" id="check_todosNFE" value="option1">
                      <label class="form-check-label" for="check_todosNFE" id="check_todosTourNFE">Selecionar Todos</label>
                    </div>
                  </div>
                </div>
                <div class="row">
                  <div class="col-12 table-responsive">
                    <table id="tabelaNFE" class="table table-sm">
                      <tbody>
                        <thead>
                        </thead>
                      </tbody>
                    </table>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div class="tab-pane fade" id="divNFCE" role="tabpanel">
            <div class="card d-none" style="margin-right: 7px;margin-left: 7px;" id="cardNFCE">
              <div class="col-sm-12 mt-3 ml-2 ">
                <button class="btn btn-success btn-sisp btnFiltros" id="btnFiltrosNFCE" type="button"><span class="fas fa-filter"></span> Filtros</button>
                <button class="btn btn-danger btn-sisp btnIncluir" id="btnExportarNFCE" type="button"><span class="fas fa-file-export"></span> Exportar</button>
                <button class="btn-sisp btn btn-primary" id="btnImprimirNFCE"><i class="fas fa-print"></i> Imprimir</button>
              </div>
              <div class="card-body" style="margin-right: 7px;">
                <div class="row">
                  <div class="col-sm-12">
                    <div class="d-inline pb-2">
                      <h5>Selecionar todas as NFC-e: </h5>
                    </div>
                    <div class="icheck-primary">
                      <input class="form-check-input" type="checkbox" id="check_todosNFCE" value="option2">
                      <label class="form-check-label" for="check_todosNFCE" id="check_todosTourNFCE">Selecionar Todos</label>
                    </div>
                  </div>
                </div>
                <div class="row">
                  <div class="col-sm-12 table-responsive">
                    <table id="tabelaNFCE" class="table table-sm" width="100%">
                      <tbody>
                        <thead>
                        </thead>
                      </tbody>
                    </table>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div class="tab-pane fade" id="divCFE" role="tabpanel">
            <div class="card d-none" style="margin-right: 7px;margin-left: 7px;" id="cardCFE">
              <div class="col-sm-12 mt-3 ml-2 ">
                <button class="btn btn-success btn-sisp btnFiltros" id="btnFiltrosCFE" type="button"><span class="fas fa-filter"></span> Filtros</button>
                <button class="btn btn-danger btn-sisp btnIncluir" id="btnExportarCFE" type="button"><span class="fas fa-file-export"></span> Exportar</button>
                <button class="btn-sisp btn btn-primary" id="btnImprimirCFE"><i class="fas fa-print"></i> Imprimir</button>
              </div>
              <div class="card-body" style="margin-right: 7px;">
                <div class="row">
                  <div class="col-sm-12">
                    <div class="d-inline pb-2">
                      <h5>Selecionar todas as CF-e: </h5>
                    </div>
                    <div class="icheck-primary">
                      <input class="form-check-input" type="checkbox" id="check_todosCFE" value="option3">
                      <label class="form-check-label" for="check_todosCFE" id="check_todosTourCFE">Selecionar Todos</label>
                    </div>
                  </div>
                </div>
                <div class="col-md-12 col-12 table-responsive table-responsive">
                  <table id="tabelaCFE" class="table table-sm table-hover table-select table-condensed" width="100%">
                    <thead>
                    </thead>
                    <tbody>
                    </tbody>
                  </table>
                </div>
              </div>
            </div>
          </div>
        </div>

      </section>
      <!-- /.content -->
    </div>
    <!-- Control Sidebar -->
    <aside class="control-sidebar control-sidebar-dark">
      <!-- Control sidebar content goes here -->
    </aside>
    <!-- /.content-wrapper -->
    <?php
    include_once('../../modais.php');
    ?>
    <!-- /.control-sidebar -->
  </div>

  <div id="modalFiltrosNFE" class="modal" tabindex="-1" role="dialog">
    <div class="modal-dialog modal-xl" role="document">
      <div class="modal-content" id="modalBody">
        <div class="modal-header">
          <h4 class="modal-title">Filtros NF-e
          </h4>
          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">&times;</span>
          </button>
        </div>
        <div class="modal-body pt-1">
          <div class="form-row">

            <fieldset class="border-Field col-lg-3 col-12 mr-2 ml-0 ml-lg-3">
              <legend class="textoBorda mb-0 pb-0">Operação</legend>
              <div id="divTipoNota" class="d-flex mt-1">
                </label>
                <label class="container"><input type="radio" checked id="rgEntradas" name="tipoNota"> <span class="checkmark"></span>  Entradas</label>
                <label class="container"><input type="radio" id="rgSaidas" name="tipoNota">  Saídas<span class="checkmark"></span></label>
              </div>
            </fieldset>

            <fieldset class="border-Field col-lg col-12 mt-2 mt-lg-0 mr-0 mr-lg-3 ">
              <legend class="textoBorda mb-0 pb-0">Opções</legend>
              <div id="divTipoNota" class="d-flex mt-1 justify-content-between">
                <label class="mr-3" for="cbExportaDanfe"><input type="checkbox" class="configCheck" id="cbExportaDanfe">  Exporta Danfe</label>
                <label for="cbNotaCanceladaNFE"><input type="checkbox" class="configCheck" id="cbNotaCanceladaNFE">  Trazer Canceladas</label>
                <label for="cbNotaInutilizadaNFE"><input type="checkbox" class="configCheck" id="cbNotaInutilizadaNFE">  Trazer Inutilizadas</label>
                <label for="cbSomenteCanceladasNFE"><input type="checkbox" class="configCheck" id="cbSomenteCanceladasNFE">  Somente Canceladas</label>
                <label for="cbSomenteInutilizadasNFE"><input type="checkbox" class="configCheck" id="cbSomenteInutilizadasNFE">  Somente Inutilizadas</label>
              </div>
            </fieldset>

            <div class="row col-12 form mt-3" id="divEntradas" style="padding-left: 13px;padding-right: 0px;">
              <div class="col-lg-6 col-12">
                <label data-error="wrong" data-success="right" for="dtEntradaDe" style="margin-bottom: 0;">Entrada de/até:</label>
                <div class="input-group">
                  <input type="date" max="2500-12-31" autocomplete="off" value="1200-01-01" class="input-default focus form-control" id="dtEntradaDe" name="dtEntradaDe" class="form-control">  
                  <input type="date" max="2500-12-31" autocomplete="off" value="2500-12-31" class="input-default focus form-control" id="dtEntradaAte" name="dtEntradaAte" class="form-control">
                </div>
              </div>

              <div class="col-lg-6 col-12 mt-2 mt-lg-0">
                <label data-error="wrong" data-success="right" for="dtEntrEmissaoDe" style="margin-bottom: 0;">  Emissão de/até:</label>
                <div class="input-group">
                    <input type="date" max="2500-12-31" autocomplete="off" value="1200-01-01" class="input-default focus form-control" id="dtEntrEmissaoDe" name="dtEntrEmissaoDe" class="form-control">  
                  <input type="date" max="2500-12-31" autocomplete="off" value="2500-12-31" class="input-default focus form-control" id="dtEntrEmissaoAte" name="dtEntrEmissaoAte" class="form-control">
                </div>
              </div>
            </div>

            <div class="row col-12 form mt-3" id="divSaidas" style="padding-left: 13px;padding-right: 0px;">
              <div class="col-lg-6 col-12">
                <label data-error="wrong" data-success="right" for="dtEmissaoDe" style="margin-bottom: 0;">Emissão de/até:</label>
                <div class="input-group">
                  <input type="date" max="2500-12-31" autocomplete="off" value="1200-01-01" class="input-default focus form-control" id="dtEmissaoDe" name="dtEmissaoDe" class="form-control">  
                  <input type="date" max="2500-12-31" autocomplete="off" value="2500-12-31" class="input-default focus form-control" id="dtEmissaoAte" name="dtEmissaoAte" class="form-control">
                </div>
              </div>

              <div class="col-lg-6 col-12 mt-2 mt-lg-0">
                <label data-error="wrong" data-success="right" for="dtSaidaDe" style="margin-bottom: 0;">  Saída de/até:</label>
                <div class="input-group">
                    <input type="date" max="2500-12-31" autocomplete="off" value="1200-01-01" class="input-default focus form-control" id="dtSaidaDe" name="dtSaidaDe" class="form-control">  
                  <input type="date" max="2500-12-31" autocomplete="off" value="2500-12-31" class="input-default focus form-control" id="dtSaidaAte" name="dtSaidaAte" class="form-control">
                </div>
              </div>
            </div>

            <div class="col-12 col-md-6">
              <div class="row">
                <div class="col-lg-12 col-md-12 col-sm-12">
                  <label data-error="wrong" data-success="right" for="txtNotaNFE" style="margin-bottom: 0;" class="mt-2">Nota:</label>
                  <div class="input-group">
                    <!-- <input type="text" autocomplete="off" class="input-default focus form-control" id="txtNotaNFE" name="txtNotaNFE" class="form-control" placeholder="Nota Fiscal"> -->
                    <select class="js-example-programmatic js-states form-control" id="txtNotaNFE" name="txtNotaNFE" multiple="multiple">
                    </select>
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btnNotaNFE" name="btnNotaNFE" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                      <button class="btn bg-danger" id="btnLimpaNotaNFE" name="btnLimpaNotaNFE" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                  </div>
                  <label data-error="wrong" data-success="right" for="txtClienteNFE" style="margin-bottom: 0;" class="mt-2">Cliente:</label>
                  <div class="input-group">
                    <input type="text" autocomplete="off" class="input-default focus form-control" id="txtClienteNFE" name="txtClienteNFE" class="form-control" placeholder="Cliente">
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btnClienteNFE" name="btnClienteNFE" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                      <button class="btn bg-danger" id="btnLimpaClienteNFE" name="btnLimpaClienteNFE" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                  </div>
                  <label data-error="wrong" data-success="right" for="txtGrupoClienteNFE" style="margin-bottom: 0;" class="mt-2">Grupo Cliente:</label>
                  <div class="input-group">
                    <input type="text" autocomplete="off" class="input-default focus form-control" id="txtGrupoClienteNFE" name="txtGrupoClienteNFE" class="form-control" placeholder="Grupo Cliente">
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btnGrupoClienteNFE" name="btnGrupoClienteNFE" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                      <button class="btn bg-danger" id="btnLimpaGrupoClienteNFE" name="btnLimpaGrupoClienteNFE" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <div class="col-12 col-md-6">
              <div class="row">
                <div class="col-lg-12 col-md-12 col-sm-12">
                  <label data-error="wrong" data-success="right" for="txtNaturezaNFE" style="margin-bottom: 0;" class="mt-2">Natureza:</label>
                  <div class="input-group">
                    <input type="text" autocomplete="off" class="input-default focus form-control" id="txtNaturezaNFE" name="txtNaturezaNFE" class="form-control" placeholder="Natureza">
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btnNaturezaNFE" name="btnNaturezaNFE" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                      <button class="btn bg-danger" id="btnLimpaNaturezaNFE" name="btnLimpaNaturezaNFE" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                    <button class="btn btn-danger btn-sisp ml-2" type='button' id="btnSelecionarEmpresas">Selecionar Empresas</button>   
                  </div>
                  <label data-error="wrong" data-success="right" for="txtVendedorNFE" style="margin-bottom: 0;" class="mt-2">Vendedor:</label>
                  <div class="input-group">
                    <input type="text" autocomplete="off" class="input-default focus form-control" id="txtVendedorNFE" name="txtVendedorNFE" class="form-control" placeholder="Vendedor">
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btnVendedorNFE" name="btnVendedorNFE" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                      <button class="btn bg-danger" id="btnLimpaVendedorNFE" name="btnLimpaVendedorNFE" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                  </div>
                  <label data-error="wrong" data-success="right" for="txtTransportadoraNFE" style="margin-bottom: 0;" class="mt-2">Transportadora:</label>
                  <div class="input-group">
                    <input type="text" autocomplete="off" class="input-default focus form-control" id="txtTransportadoraNFE" name="txtTransportadoraNFE" class="form-control" placeholder="Transportadora">
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btnTransportadoraNFE" name="btnTransportadoraNFE" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                      <button class="btn bg-danger" id="btnLimpaTransportadoraNFE" name="btnLimpaTransportadoraNFE" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div class="modal-footer mt-4">
            <div class="row">
              <button class="btn btn-primary btn-sisp" id="btnLimparFiltrosNFE" style="background-color: #B22222; border-color: #B22222"><span class="fas fa-trash"></span> Limpar Filtros</button>     
              <button class="btn btn-primary btn-sisp" id="btnConsultarNFE"><span class="fas fa-search"></span> Consultar</button>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>

  <div id="modalFiltrosNFCE" class="modal" tabindex="-1" role="dialog">
    <div class="modal-dialog modal-lg" role="document">
      <div class="modal-content" id="modalBody">
        <div class="modal-header">
          <h4 class="modal-title">Filtros NFC-e</h4>
          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">&times;</span>
          </button>
        </div>
        <div class="modal-body">

          <fieldset class="border-Field ml-3 mr-3">
            <legend class="textoBorda mb-0 pb-0">Opções</legend>
            <!-- <label class="labelGeral" style="font-size: 108%;" data-error="wrong" data-success="right">Opções</label> -->
            <div id="divTipoNota">
              <label for="cbCanceladasNFCE" class="ml-3"><input type="checkbox" id="cbCanceladasNFCE">  Trazer Canceladas</label>
              <label for="cbInutilizadasNFCE" class="ml-3"><input type="checkbox" id="cbInutilizadasNFCE">  Trazer Inutilizadas</label>
              <label for="cbSomenteCanceladasNFCE" class="ml-3"><input type="checkbox" id="cbSomenteCanceladasNFCE">  Somente Canceladas</label>
              <label for="cbSomenteInutilizadasNFCE" class="ml-3"><input type="checkbox" id="cbSomenteInutilizadasNFCE">  Somente Inutilizadas</label>
            </div>
          </fieldset>

          <div class="row ml-2 mr-2">
            <div class="col-12 mt-0 mt-lg-2">
              <label data-error="wrong" data-success="right" for="dtEmissaoNFCEDe" style="margin-bottom: 0;" class="mt-2">Saída de/até:</label>
              <div class="input-group">
                <input type="date" max="2500-12-31" autocomplete="off" value="1200-01-01" class="input-default focus form-control" id="dtEmissaoNFCEDe" name="dtEmissaoNFCEDe" class="form-control">  
                <input type="date" max="2500-12-31" autocomplete="off" value="2500-12-31" class="input-default focus form-control" id="dtEmissaoNFCEAte" name="dtEmissaoNFCEAte" class="form-control">
              </div>
            </div>
          </div>

          <div class="col-6 col-md-6">
            <label data-error="wrong" data-success="right" for="txtNotaNFCE" style="margin-bottom: 0;" class="mt-2">Nota:</label>
            <div class="input-group">
              <input type="text" autocomplete="off" class="input-default focus form-control" id="txtNotaNFCE" name="txtNotaNFCE" class="form-control" placeholder="Nota Fiscal de Consumidor Final">
              <div class="input-group-append">
                <button class="btn bg-danger" id="btnNotaNFCE" name="btnNotaNFCE" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                <button class="btn bg-danger" id="btnLimpaNotaNFCE" name="btnLimpaNotaNFCE" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
              </div>
            </div>
          </div>
          <div class="col-6 col-md-6">
            <label data-error="wrong" data-success="right" for="txtNaturezaNFCE" style="margin-bottom: 0;" class="mt-2">Natureza:</label>
            <div class="input-group">
              <input type="text" autocomplete="off" class="input-default focus form-control" id="txtNaturezaNFCE" name="txtNaturezaNFCE" class="form-control" placeholder="Natureza">
              <div class="input-group-append">
                <button class="btn bg-danger" id="btnNaturezaNFCE" name="btnNaturezaNFCE" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                <button class="btn bg-danger" id="btnLimpaNaturezaNFCE" name="btnLimpaNaturezaNFCE" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
              </div>
            </div>
          </div>
          <div class="col-6 col-md-6">
            <label data-error="wrong" data-success="right" for="txtClienteNFCE" style="margin-bottom: 0;" class="mt-2">Cliente:</label>
            <div class="input-group">
              <input type="text" autocomplete="off" class="input-default focus form-control" id="txtClienteNFCE" name="txtClienteNFCE" class="form-control" placeholder="Cliente">
              <div class="input-group-append">
                <button class="btn bg-danger" id="btnClienteNFCE" name="btnClienteNFCE" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                <button class="btn bg-danger" id="btnLimpaClienteNFCE" name="btnLimpaClienteNFCE" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
              </div>
            </div>
          </div>
          <div class="col-6 col-md-6">
            <label data-error="wrong" data-success="right" for="txtGrupoClienteNFCE" style="margin-bottom: 0;" class="mt-2">Grupo Cliente:</label>
            <div class="input-group">
              <input type="text" autocomplete="off" class="input-default focus form-control" id="txtGrupoClienteNFCE" name="txtGrupoClienteNFCE" class="form-control" placeholder="Grupo Cliente">
              <div class="input-group-append">
                <button class="btn bg-danger" id="btnGrupoClienteNFCE" name="btnGrupoClienteNFCE" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                <button class="btn bg-danger" id="btnLimpaGrupoClienteNFCE" name="btnLimpaGrupoClienteNFCE" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
              </div>
            </div>
          </div>
        </div>
        <div class="modal-footer mt-4">
          <div class="row">
            <button class="btn btn-primary btn-sisp" id="btnLimparFiltrosNFCE" style="background-color: #B22222; border-color: #B22222"><span class="fas fa-trash"></span> Limpar Filtros</button>     
            <button class="btn btn-primary btn-sisp" id="btnConsultarNFCE"><span class="fas fa-search"></span> Consultar</button>
          </div>
        </div>
      </div>
    </div>
  </div>
  </div>

  <div id="modalFiltrosCFE" class="modal" tabindex="-1" role="dialog">
    <div class="modal-dialog modal-lg" role="document">
      <div class="modal-content" id="modalBody">
        <div class="modal-header">
          <h4 class="modal-title">Filtros CF-e</h4>
          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">&times;</span>
          </button>
        </div>
        <div class="modal-body">
          <div class="row">
            <div class="col-12 col-md-12" name="groupDatasSaidas">
              <div class="col-6 ml-3 pr-2 mb-2">
                <fieldset class="border-Field">
                  <legend class="textoBorda mb-0 pb-0">Opções</legend>
                  <!-- <label class="labelGeral" style="font-size: 108%;" data-error="wrong" data-success="right">Opções</label> -->
                  <div id="divTipoNota">
                    <label for="cbCfeCanceladas" class="ml-0"><input type="checkbox" id="cbCfeCanceladas">  Trazer Canceladas</label>
                    <label for="cbCfeSomenteCanceladas" class="ml-3"><input type="checkbox" id="cbCfeSomenteCanceladas">  Somente Canceladas</label>
                  </div>
                </fieldset>
              </div>
            </div>
          </div>
          <div class="row">
            <div class="col-12 col-md-12" name="groupDatasSaidas">
              <div class="col-12 ml-3 pr-3">
                <label data-error="wrong" data-success="right" for="dtEmissaoCFEDe">Emissão de/até:</label>
                <div class="input-group">
                  <input type="date" max="2500-12-31" autocomplete="off" value="1200-01-01" class="input-default focus form-control" id="dtEmissaoCFEDe" name="dtEmissaoCFEDe" class="form-control">  
                  <input type="date" max="2500-12-31" autocomplete="off" value="2500-12-31" class="input-default focus form-control" id="dtEmissaoCFEAte" name="dtEmissaoCFEAte" class="form-control">
                </div>
              </div>
            </div>
          </div>
        </div>
        <div class="modal-footer mt-4">
          <div class="row">
            <button class="btn btn-primary btn-sisp" id="btnLimparFiltrosCFE" style="background-color: #B22222; border-color: #B22222"><span class="fas fa-trash"></span> Limpar Filtros</button>     
            <button class="btn btn-primary btn-sisp" id="btnConsultarCFE"><span class="fas fa-search"></span> Consultar</button>
          </div>
        </div>
      </div>
    </div>
  </div>

  <script src="plugins/jquery/jquery.min.js?versao=3.258.28.1"></script>
  <script src="plugins/jquery-ui/jquery-ui.min.js?versao=3.258.28.1"></script>
  <script>
    if ($('[type="date"]').prop('type') != 'date') {
      $('[type="date"]').datepicker();
    }
    $.widget.bridge('uibutton', $.ui.button);
  </script>

  <!-- Bootstrap 4 -->
  <script src="plugins/bootstrap/js/bootstrap.bundle.min.js?versao=3.258.28.1"></script>
  <script src="dist/js/sisplan.js?versao=3.258.28.1"></script>
  <script type="text/javascript" src="utils/funcoes.js?versao=3.258.28.1"></script>
  <script src="dist/js/adminlte.min.js?versao=3.258.28.1"></script>
  <script type="text/javascript" src="dist/js/jquery.dataTables.min.js?versao=3.258.28.1"></script>
  <script type="text/javascript" src="dist/js/loadingoverlay.min.js?versao=3.258.28.1"></script>
  <script type="text/javascript" src="dist/js/dataTables.bootstrap4.min.js?versao=3.258.28.1"></script>
  <script src="dist/js/jquery.maskMoney.min.js?versao=3.258.28.1"></script>
  <script src="dist/js/dataTables.keyTable.js?versao=3.258.28.1"></script>
  <script src="utils/cookies.js?versao=3.258.28.1"></script>
  <script src="dist/js/requisicoes.js?versao=3.258.28.1"></script>
  <!-- SweetAlert2 -->
  <script type="text/javascript" src="<?php echo BASE_URI; ?>/dist/js/sum().js?versao=3.258.28.1"></script>
  <script src="plugins/sweetalert2/sweetalert2.min.js?versao=3.258.28.1"></script>
  <script src="plugins/toastr/toastr.min.js?versao=3.258.28.1"></script>
  <script src="dist/js/driver.min.js?versao=3.258.28.1"></script>
  <script src="plugins/moment/moment.min.js?versao=3.258.28.1"></script>
  <script src="plugins/select2/js/select2.full.min.js?versao=3.258.28.1"></script>
  <script type="text/javascript" src="config.js?versao=3.258.28.1"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-scrollTo/2.1.3/jquery.scrollTo.min.js"></script>
  <script src="plugins/datatables-colreorder/js/dataTables.colReorder.min.js?versao=3.258.28.1"></script>
  <script type="text/javascript" src="plugins/datatables-buttons/js/dataTables.buttons.min.js?versao=3.258.28.1"></script>
  <script type="text/javascript" src="plugins/datatables-buttons/js/buttons.html5.min.js?versao=3.258.28.1"></script>
  <script>
    $(document).ready(async function() {
      if (getCookie('usuario') == "") {
        window.location.href = `${BASE_URI}/login`;
        return;
      }

      let usuario = getCookie('usuario');
      let empresa = getCookie('empresa');

      ipInterno = IP_INTERNO;
      ipExterno = IP_EXTERNO;
      basicAuth = BASIC_AUTH;

      const temAcesso = await temAcessoTela('EXPORTAFISCAL');
      if (!temAcesso.resultado) {
        toastrAcesso(temAcesso, BASE_URI);
        return;
      }

      sArquivo = `${BASE_URI}/pages/exportafiscal/exportafiscal.js?versao=3.258.28.1`;
      insereJavaScriptPagina(sArquivo);

    });
  </script>
</body>

</html>