<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>Sisplan Web | Relatório de Minuta</title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="plugins/fontawesome-free/css/all.min.css?versao=3.2512.9.1">
  <link rel="stylesheet" href="dist/css/adminlte.min.css?versao=3.2512.9.1">
  <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.2512.9.1">
  <link rel="stylesheet" href="dist/css/sisplan.css?versao=3.2512.9.1">
  <link rel="stylesheet" href="dist/css/PesquisaVariosSelect2.css?versao=3.2512.9.1">
  <link rel="stylesheet" type="text/css" href="dist/css/dataTables.bootstrap4.min.css?versao=3.2512.9.1" />
  <link rel="shortcut icon" href="favicon.ico">
  <link rel="stylesheet" href="plugins/toastr/toastr.min.css?versao=3.2512.9.1">
  <link rel="stylesheet" type="text/css" href="dist/css/driver.min.css?versao=3.2512.9.1" />
  <link rel="stylesheet" href="dist/css/jquery-ui.css?versao=3.2512.9.1">
  <link rel="stylesheet" href="plugins/datatables-colreorder/css/colReorder.bootstrap4.min.css?versao=3.2512.9.1">
  <link rel="stylesheet" href="plugins/select2/css/select2.min.css?versao=3.2512.9.1">
  <link rel="stylesheet" href="plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css?versao=3.2512.9.1">
  <link rel="stylesheet" href="https://cdn.datatables.net/select/1.6.0/css/select.dataTables.min.css">
  <link rel="stylesheet" type="text/css" href="dist/css/sisplan.newColorsButtons.css?versao=3.2512.9.1" />
  <link rel="stylesheet" type="text/css" href="dist/css/sisplan.adjustDataTableButtons.css?versao=3.2512.9.1" />
</head>
<style>
  /* .dataTables_length {
    display: flex;
    align-items: center;
    padding-left: 0px;
    margin-left: 0px;
  } */

  /* .dataTables_length .custom-select {
    margin-right: 3px;
  } */

  /* #tabelaRelFaturamento_wrapper .row {
    align-items: center;
  } */

  .margemCima {
    margin-top: 13px;
  }

  .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;
    margin: 0 0 0 0 !important;
    -webkit-box-shadow: 0px 0px 0px 0px #000;
    box-shadow: 0px 0px 0px 0px #000;
    border-radius: 3px !important;
  }

  /* #tabelaRelFaturamento_wrapper .row .col-md-6 {
    margin-left: 0px;
    padding-left: 5px;
  } */

  /* #tabelaRelFaturamento_length label {
    margin-top: 7px;
    margin-left: 3px;
  } */
</style>

<body class="hold-transition sidebar-mini layout-fixed">
  <main 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">Relatório de Minuta</h1>
              <button type="button" class="btn btn-info btn-sm ml-2" title="Tutorial" style="color: white;" id="tutorial">
                <i class="fas fa-question-circle"></i></button>
            </div>
            <div class="col-sm-6">

            </div>
          </div>
          <div class="row">
            <div class="col-12">
              <fieldset>
                <div class="row">
                  <div class="col-12">
                    <div class="buttons">
                      <button class="btn btn-sisp btnFiltros" id="btnFiltros" type="button"><span class="fas fa-filter"></span> Filtros</button>
                      <button id="btnImprimir" class="btn-sisp btn btn-danger btnImprimir"><i class="fas fa-print"></i> Imprimir</button>
                      <button id="btnImprimirEtiqueta" class="btn-sisp btn btn-danger d-none"><i class="fas fa-print"></i> Imprimir</button>
                      <button id="btnWhatsapp" class="btn-sisp btn ms-2 text-white" style="background-color: #25D366;"><i class="fab fa-whatsapp"></i> Enviar WhatsApp</button>
                    </div>
                  </div>
                </div>
                <div class="card-body" id="divTabelaFaturamentos">
                  <div class="col-12 row">
                    <div class="col-sm-7 table-responsive card-body">
                      <table id="tabelaRelMinuta" class="table table-sm table-select table-hover" style="white-space: nowrap;" width="100%"></table>
                      <thead>
                        <tr></tr>
                      </thead>
                      <tbody>
                        <tr></tr>
                      </tbody>
                    </div>
                    <div class="col-sm-5 table-responsive card-body">
                      <table id="tabelaConferencia" class="table table-sm table-select table-hover" style="white-space: nowrap;" width="100%"></table>
                      <thead>
                        <tr></tr>
                      </thead>
                      <tbody>
                        <tr></tr>
                      </tbody>
                      <div class="col-md-12 col-sm-12 col-12 mt-2 d-none" id="divConferencia">
                        <label data-error="wrong" data-success="right" for="txtConferencia">Confere Chave NFe: </label>
                        <div class="relative">
                          <div class="input-group">
                            <input class="input-default form-control" id="txtConferencia" name="txtConferencia" multiple="multiple"></input>
                            <div class="input-group-append">
                              <button class="btn bg-danger" id="btnLimpaConferencia" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </fieldset>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="modal fade" id="modalWhatsapp" tabindex="-1" aria-labelledby="modalWhatsappLabel" aria-hidden="true">
      <div class="modal-dialog modal-dialog-centered">
        <div class="modal-content">
          <div class="modal-header bg-success text-white">
            <h5 class="modal-title" id="modalWhatsappLabel">
              <i class="fab fa-whatsapp"></i> Enviar via WhatsApp
            </h5>
            <button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal" aria-label="Fechar"></button>
          </div>
          <div class="modal-body">
            <div class="mb-3">
              <label data-error="wrong" data-success="right" for="txtContato">Contato: </label>
              <div class="relative">
                <div class="input-group">
                  <input type="text" class="input-default focus form-control" id="txtContato" name="txtContato" class="form-control" placeholder="Contato">
                  <div class="input-group-append">
                    <button class="btn bg-danger" id="btnContato" name="btnContato" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                    <button class="btn bg-danger" id="btnLimpaContato" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                  </div>
                </div>
              </div>
            </div>
            <div class="mb-3">
              <label for="txtMensagem" class="form-label fw-bold">Mensagem:</label>
              <textarea id="txtMensagem" class="input-default form-control" rows="7" style="resize: none;" placeholder="Digite a mensagem que será enviada..."></textarea>
            </div>
          </div>
          <div class="modal-footer">
            <button type="button" id="btnEnviarWhatsapp" class="btn btn-primary">
              Enviar Mensagem
            </button>
            <button type="button" id="btnCancelarWhatsapp" class="btn btn-danger" data-bs-dismiss="modal">
              <i class="fas fa-times"></i> Cancelar
            </button>
          </div>
        </div>
      </div>
    </div>
    <div id="modal-filtros" 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</h4>
            <div class="col-auto mt-6 mt-md-0">
              <fieldset class="form border-Field mb-0 pb-0 d-md-flex d-block">
                <legend class="textoBorda mb-0 pb-0">Tipo</legend>
                <div class="icheck-primary mr-3"><input type="radio" id="rdEtiqueta" class="ml-0 ml-md-0" name="rdtipo"><label for="rdEtiqueta">Etiqueta</label></div>
                <div class="icheck-primary mr-3"><input type="radio" id="rdMinuta" checked class="ml-0 ml-md-2" name="rdtipo"><label for="rdMinuta">Minuta</label></div>
              </fieldset>
            </div>
            <div class="col-lg-auto col-md-auto col-6">
              <fieldset class="form border-Field p-0">
                <legend class="textoBorda pb-0 mb-0">Opções</legend>
                <div class="form-row justify-content-center">
                  <div class="icheck-primary mr-2"><input type="checkbox" class="configCheckOpcoes" value="NOTAS" id="cbNotasDenegadas"><label class="labelCheck" for="cbNotasDenegadas"> Notas Denegadas</label></div>
                  <div class="icheck-primary mr-2"><input type="checkbox" class="configCheckOpcoes" value="EXPEDICAO" id="cbExpedicao"><label class="labelCheck" for="cbExpedicao"> Expedição</label></div>
                  <div class="icheck-primary mr-2"><input type="checkbox" class="configCheckOpcoes" value="EMBARQUE" id="cbSemDtEmbarque"><label class="labelCheck" for="cbSemDtEmbarque"> Sem Dt Embarque</label></div>
                  <div class="icheck-primary mr-2"><input type="checkbox" class="configCheckOpcoes" value="EMBARQUE" id="cbTipoNatVenda"><label class="labelCheck" for="cbTipoNatVenda"> Tipo Nat. Venda</label></div>
                </div>
              </fieldset>
            </div>
            <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-md-4 col-sm-6 col-12">
                <label data-error="wrong" data-success="right" for="dtEmissaoDe">Emissão nota de/até: </label>
                <div class="relative">
                  <div class="input-group">
                    <input type="date" max="2500-12-31" class="input-default focus form-control" id="dtEmissaoDe" name="dtEmissaoDe" class="form-control">
                    <input type="date" max="2500-12-31" class="input-default focus form-control" id="dtEmissaoAte" name="dtEmissaoAte" class="form-control">
                  </div>
                </div>
              </div>

              <div class="col-md-4 col-sm-6 col-12">
                <label data-error="wrong" data-success="right" for="dtSaidaDe">Saída nota de/até: </label>
                <div class="relative">
                  <div class="input-group">
                    <input type="date" max="2500-12-31" class="input-default focus form-control" id="dtSaidaDe" name="dtSaidaDe" class="form-control">
                    <input type="date" max="2500-12-31" class="input-default focus form-control" id="dtSaidaAte" name="dtSaidaAte" class="form-control">
                  </div>
                </div>
              </div>

              <div class="col-md-4 col-sm-6 col-12">
                <label data-error="wrong" data-success="right" for="dtEmbarqueDe">Embarque de/até: </label>
                <div class="relative">
                  <div class="input-group">
                    <input type="date" max="2500-12-31" class="input-default focus form-control" id="dtEmbarqueDe" name="dtEmbarqueDe" class="form-control">
                    <input type="date" max="2500-12-31" class="input-default focus form-control" id="dtEmbarqueAte" name="dtEmbarqueAte" class="form-control">
                  </div>
                </div>
              </div>

              <div class="col-md-4 col-sm-6 col-12 margemCima">
                <label data-error="wrong" data-success="right" for="txtNotaDe">Nota de/até: </label>
                <div class="relative">
                  <div class="input-group">
                    <input type="text" class="input-default focus form-control" id="txtNotaDe" name="txtNotaDe" class="form-control">
                    <input type="text" class="input-default focus form-control" id="txtNotaAte" name="txtNotaAte" class="form-control">
                  </div>
                </div>
              </div>

              <div class="col-md-4 col-sm-4 col-12 margemCima">
                <label data-error="wrong" data-success="right" for="txtTransportadora">Transportadora: </label>
                <div class="relative">
                  <div class="input-group">
                    <!-- <input type="text" class="input-default focus form-control" id="txtTransportadora" name="txtTransportadora" class="form-control" placeholder="Transportadora"> -->
                    <select class="js-example-programmatic js-states form-control" id="txtTransportadora" name="txtTransportadora" multiple="multiple"></select>
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btn-Transportadora" name="btn-Transportadora" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                      <button class="btn bg-danger" id="btn-limpa-Transportadora" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                  </div>
                </div>
              </div>

              <div class="col-md-4 col-sm-4 col-12 margemCima">
                <label data-error="wrong" data-success="right" for="txtTipoCliente">Tipo cliente: </label>
                <div class="relative">
                  <div class="input-group">
                    <!-- <input type="text" class="input-default focus form-control" id="txtTipoCliente" name="txtTipoCliente" class="form-control" placeholder="Tipo cliente"> -->
                    <select class="js-example-programmatic js-states form-control" id="txtTipoCliente" name="txtTipoCliente" multiple="multiple"></select>
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btn-TipoCliente" name="btn-TipoCliente" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                      <button class="btn bg-danger" id="btn-limpa-TipoCliente" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                  </div>
                </div>
              </div>

              <div class="col-md-4 col-sm-4 margemCima col-12">
                <label data-error="wrong" data-success="right" for="txtRepresentante">Representante: </label>
                <div class="relative">
                  <div class="input-group">
                    <!-- <input type="text" class="input-default focus form-control" id="txtRepresentante" name="txtRepresentante" class="form-control" placeholder="Representante"> -->
                    <select class="js-example-programmatic js-states form-control" id="txtRepresentante" name="txtRepresentante" multiple="multiple"></select>
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btn-Representante" name="btn-Representante" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                      <button class="btn bg-danger" id="btn-limpa-Representante" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                  </div>
                </div>
              </div>

              <div class="col-md-4 col-sm-4 col-12 margemCima">
                <label data-error="wrong" data-success="right" for="txtCliente">Cliente: </label>
                <div class="relative">
                  <div class="input-group">
                    <!-- <input type="text" class="input-default focus form-control" id="txtCliente" name="txtCliente" class="form-control" placeholder="Cliente"> -->
                    <select class="js-example-programmatic js-states form-control" id="txtCliente" name="txtCliente" multiple="multiple"></select>
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btn-Cliente" name="btn-Cliente" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                      <button class="btn bg-danger" id="btn-limpa-Cliente" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                  </div>
                </div>
              </div>

              <div class="col-md-4 col-sm-4 col-12 margemCima">
                <label data-error="wrong" data-success="right" for="txtUf">UF: </label>
                <div class="relative">
                  <div class="input-group">
                    <!-- <input type="text" class="input-default focus form-control" id="txtUf" name="txtUf" class="form-control" placeholder="UF"> -->
                    <select class="js-example-programmatic js-states form-control" id="txtUf" name="txtUf" multiple="multiple"></select>
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btn-Uf" name="btn-Uf" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                      <button class="btn bg-danger" id="btn-limpa-Uf" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                  </div>
                </div>
              </div>

              <div class="col-md-4 col-sm-4 col-12 margemCima">
                <label data-error="wrong" data-success="right" for="txtOperacaoFiscal">Operação fiscal: </label>
                <div class="relative">
                  <div class="input-group">
                    <!-- <input type="text" class="input-default focus form-control" id="txtOperacaoFiscal" name="txtOperacaoFiscal" class="form-control" placeholder="Operação fiscal"> -->
                    <select class="js-example-programmatic js-states form-control" id="txtOperacaoFiscal" name="txtOperacaoFiscal" multiple="multiple"></select>
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btn-OperacaoFiscal" name="btn-OperacaoFiscal" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                      <button class="btn bg-danger" id="btn-limpa-OperacaoFiscal" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                  </div>
                </div>
              </div>

              <div class="col-md-4 col-sm-4 col-12 margemCima">
                <label data-error="wrong" data-success="right" for="txtPlaca">Placa: </label>
                <div class="relative">
                  <div class="input-group">
                    <!-- <input type="text" class="input-default focus form-control" id="txtPlaca" name="txtPlaca" class="form-control" placeholder="Placa"> -->
                    <select class="js-example-programmatic js-states form-control" id="txtPlaca" name="txtPlaca" multiple="multiple"></select>
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btn-Placa" name="btn-Placa" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                      <button class="btn bg-danger" id="btn-limpa-Placa" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                  </div>
                </div>
              </div>

              <div class="col-md-4 col-sm-4 col-12 margemCima">
                <label data-error="wrong" data-success="right" for="txtTipoVenda">Tipo venda: </label>
                <div class="relative">
                  <div class="input-group">
                    <!-- <input type="text" class="input-default focus form-control" id="txtTipoVenda" name="txtTipoVenda" class="form-control" placeholder="Tipo venda"> -->
                    <select class="js-example-programmatic js-states form-control" id="txtTipoVenda" name="txtTipoVenda" multiple="multiple"></select>
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btn-TipoVenda" name="btn-TipoVenda" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                      <button class="btn bg-danger" id="btn-limpa-TipoVenda" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                  </div>
                </div>
              </div>

              <div class="col-md-4 col-sm-4 col-12 margemCima">
                <label data-error="wrong" data-success="right" for="txtNota">Nota: </label>
                <div class="relative">
                  <div class="input-group">
                    <select class="js-example-programmatic js-states form-control" id="txtNota" name="txtNota" multiple="multiple"></select>
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btn-Nota" name="btn-Nota" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                      <button class="btn bg-danger" id="btn-limpa-Nota" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                  </div>
                </div>
              </div>

              <div class="col-md-4 col-sm-4 col-12 margemCima">
                <label data-error="wrong" data-success="right" for="txtChave">Chave: </label>
                <div class="relative">
                  <div class="input-group">
                    <input type="text" class="input-default focus form-control" id="txtChave" name="txtChave" class="form-control" placeholder="Chave">
                  </div>
                </div>
              </div>

              <div class="col-md-4 col-sm-4 margemCima col-12">
                <div class="form-group">
                  <label>Tipo natureza: </label>
                  <select class="form-control select2 select2-danger" id="selectNotas" name="selectNotas" data-dropdown-css-class="select2-danger" style="width: 100%;">
                    <option selected="selected" value="">Todas</option>
                    <option value="1">Saida</option>
                    <option value="2">Entrada</option>
                  </select>
                </div>
              </div>

              <div class="col-md-4 col-sm-4 col-12">
                <label data-error="wrong" data-success="right" for="txtMinuta">Minuta: </label>
                <div class="relative">
                  <div class="input-group">
                    <select class="js-example-programmatic js-states form-control" id="txtMinuta" name="txtMinuta" multiple="multiple"></select>
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btn-Minuta" name="btn-Minuta" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                      <button class="btn bg-danger" id="btn-limpa-Minuta" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                  </div>
                </div>
              </div>

              <div class="col-md-8 col-sm-4 col-12">
                <label data-error="wrong" data-success="right" for="txtObs">Observação: </label>
                <div class="relative">
                  <div class="input-group">
                    <input type="text" class="input-default focus form-control" id="txtObs" name="txtObs" class="form-control" placeholder="Observação">
                  </div>
                </div>
              </div>

              <div class="col-md-4 col-sm-6 col-12" style="margin-top: 27px;">
                <button id="btnCarregaEmpresas" class="btn btn-danger col-lg-12 col-md-12 col-12">Selecionar Empresas</button>
              </div>

            </div>
          </div>
          <div class="modal-footer justify-content-start pl-0">
            <div class="row col-12">
              <div class="col-md-4 col-sm-4 col-12">
                <label for="txtOrdem">Opção de Relatório:</label>
                <div class="relative d-flex align-items-center">
                  <select id="txtOrdem" class="input-default focus custom-select">
                  </select>
                  <button class="btn btn-sm btn-success ml-2 btnEdicaoRelatorio" title="Edição de ordenações">
                    <i class="fas fa-check"></i>
                  </button>
                </div>
              </div>
              <div class="col-6 col-lg-8 d-flex justify-content-end align-items-end pr-0">
                <div class="d-flex">
                  <button class="btn btn-primary btn-sisp mr-2" id="btnLimparFiltros" style="background-color: #B22222; border-color: #B22222">
                    <span class="fas fa-trash"></span> Limpar Filtros
                  </button>
                  <button id="btnConsultar" class="btn btn-primary btn-sisp" type="button">
                    <span class="fas fa-search"></span> Consultar
                  </button>
                </div>
              </div>
            </div>
          </div>
          <!-- <div class="modal-footer">
            <div class="row">
              <button class="btn btn-primary btn-sisp" id="btnLimparFiltros" style="background-color: #B22222; border-color: #B22222"><span class="fas fa-trash"></span> Limpar Filtros</button>   
              <button id="btnConsultar" class='btn btn-primary btn-sisp' type='button'><span class="fas fa-search"></span> Consultar </button>
            </div>
          </div> -->
        </div>
      </div>
      
      <!-- Control Sidebar -->
      <aside class="control-sidebar control-sidebar-dark">
        <!-- Control sidebar content goes here -->
      </aside><!-- /.control-sidebar -->
  </main><!-- /.wrapper -->
  <?php include_once('../../modais.php'); ?>

  <script src="plugins/jquery/jquery.min.js?versao=3.2512.9.1"></script>
  <script src="dist/js/jquery.maskMoney.min.js?versao=3.2512.9.1"></script>
  <script src="plugins/jquery-ui/jquery-ui.min.js?versao=3.2512.9.1"></script>
  <script type="text/javascript" src="dist/js/jquery.dataTables.js?versao=3.2512.9.1"></script>
  <script type="text/javascript" src="dist/js/dataTables.bootstrap4.min.js?versao=3.2512.9.1"></script>
  <script src="plugins/sweetalert2/sweetalert2.min.js?versao=3.2512.9.1"></script>
  <script src="plugins/toastr/toastr.min.js?versao=3.2512.9.1"></script>
  <script>
    $.widget.bridge('uibutton', $.ui.button);
  </script>
  <script src="plugins/bootstrap/js/bootstrap.bundle.min.js?versao=3.2512.9.1"></script>
  <script src="dist/js/adminlte.min.js?versao=3.2512.9.1"></script>
  <script src="dist/js/requisicoes.js?versao=3.2512.9.1"></script>
  <script src="dist/js/loadingoverlay.min.js?versao=3.2512.9.1"></script>
  <script src="dist/js/valida_cpf_cnpj.js?versao=3.2512.9.1"></script>
  <script src="plugins/jquery-validation/jquery.validate.min.js?versao=3.2512.9.1"></script>
  <script src="dist/js/dataTables.keyTable.js?versao=3.2512.9.1"></script>
  <script src="dist/js/sisplan.js?versao=3.2512.9.1"></script>
  <script src="utils/funcoes.js?versao=3.2512.9.1"></script>
  <script src="utils/cookies.js?versao=3.2512.9.1"></script>
  <script src="dist/js/driver.min.js?versao=3.2512.9.1"></script>
  <script src="config.js?versao=3.2512.9.1"></script>
  <script src="plugins/datatables-colreorder/js/dataTables.colReorder.min.js?versao=3.2512.9.1"></script>
  <script type="text/javascript" src="plugins/datatables-buttons/js/dataTables.buttons.min.js?versao=3.2512.9.1"></script>
  <script type="text/javascript" src="plugins/datatables-buttons/js/buttons.html5.min.js?versao=3.2512.9.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('RELMINUTA');
      if (!temAcesso.resultado) {
        toastrAcesso(temAcesso, BASE_URI);
        return;
      }

      sArquivo = `${BASE_URI}/pages/relminuta/relminuta.js?versao=3.2512.9.1`;
      const nomeTela = ('<?php echo basename(__FILE__) ?>').replace('.php', '');

      await insereJavaScriptPagina(sArquivo);

      habilitaCamposObrigatoriosTela(nomeTela);
    });
  </script>

</body>

</html>