<?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 | Importação</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.2511.13.1">
  <!-- Ionicons -->
  <!-- Ionicons -->
  <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css?versao=3.2511.13.1">
  <!-- Theme style -->
  <link rel="stylesheet" href="dist/css/adminlte.min.css?versao=3.2511.13.1">
  <!-- overlayScrollbars -->
  <link rel="stylesheet" href="plugins/overlayScrollbars/css/OverlayScrollbars.min.css?versao=3.2511.13.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.2511.13.1">
  <link rel="stylesheet" href="dist/css/sisplan.css?versao=3.2511.13.1">
  <link rel="stylesheet" href="dist/css/PesquisaVariosSelect2.css?versao=3.2511.13.1">
  <link rel="stylesheet" type="text/css" href="plugins/datatables-keytable/css/keyTable.bootstrap4.min.css?versao=3.2511.13.1">
  <link rel="stylesheet" type="text/css" href="dist/css/dataTables.bootstrap4.min.css?versao=3.2511.13.1" />
  <!-- iCheck for checkboxes and radio inputs -->
  <link rel="stylesheet" href="plugins/icheck-bootstrap/icheck-bootstrap.min.css?versao=3.2511.13.1">
  <link rel="shortcut icon" href="favicon.ico">
  <link rel="stylesheet" href="dist/css/select.bootstrap.min.css?versao=3.2511.13.1">
  <!-- Google Font: Source Sans Pro -->
  <!-- AutoComplete -->
  <link rel="stylesheet" href="dist/css/jquery-ui.css?versao=3.2511.13.1">

  <link rel="stylesheet" type="text/css" href="dist/css/driver.min.css?versao=3.2511.13.1" />

  <link rel="stylesheet" href="plugins/select2/css/select2.min.css?versao=3.2511.13.1">
  <link rel="stylesheet" href="plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css?versao=3.2511.13.1">

  <style>
    .bordaCampos {
      margin-left: 0.1%;
      border: solid #e0e4e6;
      border-radius: 4px;
      border-width: 2px;
      padding-top: 1%;
      padding-bottom: 0%;
    }

    .bordaCampos:first-child {
      display: flex;
      flex-direction: row;
      flex-wrap: wrap;
      justify-content: flex-end;
      align-items: center;
    }

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

    .border-Field {
      border: 1.0px solid var(--font-color) !important;
      padding: 0 1.0em 1.0em 1.0em !important;
      margin: 0 0 1.0em 0 !important;
      -webkit-box-shadow: 0px 0px 0px 0px #000;
      box-shadow: 0px 0px 0px 0px #000;
      padding-bottom: 0px !important;
      border-radius: 0 !important;
    }
  </style>
  <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">
      <section class="content">
        <div class="content-header">
          <div class="container-fluid">
            <div class="row mb-2">
              <div class="col-sm-6 flex">
              </div>
              <div class="col-sm-6">
                <!-- <ol class="breadcrumb float-sm-right">
                  
                  <li class="breadcrumb-item active">Importação</li>
                </ol> -->
              </div>
            </div>
          </div>
          <div class="row justify-content-center mt-0">
            <div class="col-10 text-center p-0 mt-3 mb-2">
              <div class="card px-0 pt-4 pb-0 mt-3 mb-3">
                <div class="card-header text-center flex" style="border-bottom: 2px solid var(--primary-color);">
                  <h2>Importação de Estoque da Matriz
                    <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>
                  </h2>
                </div>
                <div class="card-body">
                  <div class="row">


                    <div class="col-md-12 mx-0">
                      <div class="form-card">
                        <div class="card-body" style="padding-bottom: 0;">
                          <div class="row  justify-content-md-end justify-content-center">

                            <div class="col-12 col-lg-auto">
                              <div class="row">
                                <div class="col-12 col-lg-auto text-left">
                                  <fieldset class="form border-Field mb-0 pb-0 pr-4 pr-md-0">
                                    <legend class="textoBorda mb-0 pb-0">Tipo Item</legend>
                                    <div class="ativo d-md-flex d-block">
                                      <div class="icheck-primary mr-3"><input type="radio" id="radioProduto" name="tipoItem"><label for="radioProduto" class="checkmark">Produto</label></div>
                                      <div class="icheck-primary"><input type="radio" id="radioMaterial" name="tipoItem"> <label for="radioMaterial" class="checkmark">Material</label></div>
                                    </div>
                                  </fieldset>
                                </div>
                              </div>
                            </div>

                            <div class="col-12 col-lg-auto">
                              <div class="row">
                                <div class="ml-0 ml-md-2 col-12 col-lg-auto text-left">
                                  <fieldset class="form border-Field mb-0 pb-0 pr-4 pr-md-0">
                                    <legend class="textoBorda mb-0 pb-0">Tipo Conferência</legend>
                                    <div class="ativo d-md-flex d-block">
                                      <div class="icheck-primary mr-3" title="Irá fazer a entrada no depósito informado. Sendo possível consultar documentos que não são de transferência. No campo nota irá buscar as notas emitidas."><input type="radio" checked="checked" value="normal" id="radioNormal" name="tipoConf"><label for="radioNormal" class="checkmark">Normal</label></div>
                                      <div class="icheck-primary mr-3" title="Irá fazer a transferência de depósito, respeitando os depósitos informados. Sendo possível consultar qualquer tipo de documento."><input type="radio" value="transferencia" id="radioTransf" name="tipoConf"><label for="radioTransf" class="checkmark">Transferência</label></div>
                                      <div class="icheck-primary"><input type="radio" value="entrada" id="radioNotaEntra" name="tipoConf"><label for="radioNotaEntra" class="checkmark" title="No campo nota irá buscar as notas emitidas por terceiros que foram lançadas na entrada de notas no compras.">Nota Entrada</label></div>
                                    </div>
                                  </fieldset>
                                </div>
                              </div>
                            </div>

                            <div class="col-12 col-lg-auto d-none" id="divNotas">
                              <div class="row">
                                <div class="col-12 col-lg-auto text-left">
                                  <fieldset class="form border-Field mb-0 pb-0 pr-4 pr-md-0">
                                    <legend class="textoBorda mb-0 pb-0">Filtro Notas</legend>
                                    <div class="ativo d-md-flex d-block">
                                      <div class="icheck-primary mr-3"><input type="checkbox" id="checkNotasEmpLogada"><label for="checkNotasEmpLogada" class="checkmark">Somente da empresa logada</label></div>
                                      <div class="icheck-primary"><input type="checkbox" id="checkNotasConferidas"> <label for="checkNotasConferidas" class="checkmark">Somente não conferidas</label></div>
                                    </div>
                                  </fieldset>
                                </div>
                              </div>
                            </div>

                            <div class="col-12 col-lg-auto d-none" id="divNotasEntrada">
                              <div class="row">
                                <div class="col-12 col-lg-auto text-left">
                                  <fieldset class="form border-Field mb-0 pb-0 pr-4 pr-md-0">
                                    <legend class="textoBorda mb-0 pb-0">Filtro Notas</legend>
                                    <div class="ativo d-md-flex d-block">
                                      <div class="icheck-primary mr-3 d-none"><input type="checkbox" checked id="checkNotasEntradaEmpLogada"><label for="checkNotasEntradaEmpLogada" class="checkmark">Somente da empresa logada</label></div>
                                      <div class="icheck-primary"><input type="checkbox" id="checkNotasEntradaConferidas"> <label for="checkNotasEntradaConferidas" class="checkmark">Somente não conferidas</label></div>
                                    </div>
                                  </fieldset>
                                </div>
                              </div>
                            </div>

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


                    <div class="col-md-12 mx-0">
                      <form id="msform">
                        <div class="form-card">
                          <div class="card-10" id="campostour">
                            <div class="card-body">
                              <div class="row">

                                <div class="col-12 col-lg-6 mb-3">
                                  <div class="row">
                                    <div class="col-12">
                                      <fieldset class="form border-Field mb-0 pb-0 pr-4 pr-md-0">
                                        <legend class="textoBorda mb-0 pb-2">Movimentações</legend>
                                        <div class="col-lg-12 col-12" id="formNota">
                                          <div class="row">
                                            <div class="form-group col-lg-6 col-12">
                                              <label data-error="wrong" data-success="right" for="txtLancamento">Lançamento </label>
                                              <div class="input-group">
                                                <input type="text" class="input-default focus form-control" required id="txtLancamento" name="txtLancamento" placeholder="Lançamento">
                                              </div>
                                            </div>
                                            <div class="form-group col-lg-6 col-12">
                                              <label data-error="wrong" data-success="right" for="txtDocumento">Documento </label>
                                              <div class="input-group">
                                                <input type="text" class="input-default focus form-control" required id="txtDocumento" name="txtDocumento" placeholder="Documento">
                                                <div class="input-group-append">
                                                  <button class="btn bg-danger" id="btn-documento" name="btn" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                                  <button class="btn bg-danger" id="btn-limpa-documento" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                                </div>
                                              </div>
                                            </div>
                                          </div>
                                        </div>
                                      </fieldset>
                                    </div>
                                  </div>
                                </div>

                                <div class="col-12 col-lg-6 mb-3" id="divNota">
                                  <div class="row justify-content-sm-start justify-content-center">
                                    <div class="col-12">
                                      <fieldset class="form border-Field mb-0 pb-0 pr-4 pr-md-0">
                                        <legend class="textoBorda mb-0 pb-2">Nota</legend>
                                        <div class="col-lg-12 col-12" id="formNota">
                                          <div class="row">
                                            <div class="form-group col-lg-6 col-12">
                                              <label data-error="wrong" data-success="right" for="txtEmpresa">Empresa </label>
                                              <div class="input-group">
                                                <input type="text" class="input-default focus form-control" required id="txtEmpresa" name="txtEmpresa" placeholder="Empresa">
                                                <div class="input-group-append">
                                                  <button class="btn bg-danger" id="btnEmpresa" name="btnEmpresa" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                                  <button class="btn bg-danger" id="btnAEmpresa" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                                </div>
                                              </div>
                                            </div>
                                            <div class="form-group col-lg-6 col-12">
                                              <label data-error="wrong" data-success="right" for="txtNota">Nota </label>
                                              <div class="input-group">
                                                <input type="text" class="input-default focus form-control" required id="txtNota" name="txtNota" placeholder="Nota">
                                                <div class="input-group-append">
                                                  <button class="btn bg-danger" id="btnNota" name="btnNota" data-button="absolute" type="button">
                                                    <i class="m-0 p-0 fas fa-search"></i>
                                                  </button>
                                                  <button class="btn bg-danger" id="btnANota" type="button">
                                                    <i class="m-0 p-0 fas fa-trash"></i>
                                                  </button>
                                                </div>
                                              </div>
                                            </div>
                                          </div>
                                        </div>
                                      </fieldset>
                                    </div>
                                  </div>
                                </div>

                                <div class="col-12 col-lg-6 mb-3 d-none" id="divNotaEntra">
                                  <div class="row justify-content-sm-start justify-content-center">
                                    <div class="col-12">
                                      <fieldset class="form border-Field mb-0 pb-0 pr-4 pr-md-0">
                                        <legend class="textoBorda mb-0 pb-2">Nota</legend>
                                        <div class="col-lg-12 col-12" id="formNota">
                                          <div class="row">
                                            <div class="form-group col-lg-6 col-12">
                                              <label data-error="wrong" data-success="right" for="txtCredorNota">Credor </label>
                                              <div class="input-group">
                                                <input type="text" class="input-default focus form-control" required id="txtCredorNota" name="txtCredorNota" placeholder="Credor">
                                                <div class="input-group-append">
                                                  <button class="btn bg-danger" id="btnCredorNota" name="btnCredorNota" data-button="absolute" type="button">
                                                    <i class="m-0 p-0 fas fa-search"></i>
                                                  </button>
                                                  <button class="btn bg-danger" id="btnACredorNota" type="button">
                                                    <i class="m-0 p-0 fas fa-trash"></i>
                                                  </button>
                                                </div>
                                              </div>
                                            </div>
                                            <div class="form-group col-lg-6 col-12">
                                              <label data-error="wrong" data-success="right" for="txtNotaEntra">Nota </label>
                                              <div class="input-group">
                                                <input type="text" class="input-default focus form-control" required id="txtNotaEntra" name="txtNotaEntra" placeholder="Nota Entrada">
                                                
                                                <!-- <select class="js-example-programmatic js-states form-control" id="txtNotaEntra" name="txtNotaEntra" multiple="multiple"></select> -->

                                                <div class="input-group-append">
                                                  <button class="btn bg-danger" id="btnNotaEntra" name="btnNotaEntra" data-button="absolute" type="button">
                                                    <i class="m-0 p-0 fas fa-search"></i>
                                                  </button>
                                                  <button class="btn bg-danger" id="btnLimpaNotaEntra" type="button">
                                                    <i class="m-0 p-0 fas fa-trash"></i>
                                                  </button>
                                                </div>
                                              </div>
                                            </div>
                                          </div>
                                        </div>
                                      </fieldset>
                                    </div>
                                  </div>
                                </div>

                                <div class="col-12 col-lg-6 mb-3 d-none" id="divEstoqueSaida">
                                  <div class="row">
                                    <div class="col-12">
                                      <fieldset class="form border-Field mb-0 pb-0 pr-4 pr-md-0">
                                        <legend class="textoBorda mb-0 pb-2">Estoque Saída</legend>
                                        <div class="col-lg-12 col-12" id="formSaida">
                                          <div class="row">
                                            <div class="form-group col-lg-12 col-12">
                                              <label data-error="wrong" data-success="right" disabled for="txtDepositoSaida">Depósito Saída</label>
                                              <div class="input-group">
                                                <input type="text" disabled class="input-default focus form-control validate" required id="txtDepositoSaida" name="txtDepositoSaida" placeholder="Depósito Saída">
                                              </div>
                                            </div>
                                          </div>
                                        </div>
                                      </fieldset>
                                    </div>
                                  </div>
                                </div>


                                <div class="col-12">
                                  <div class="row">
                                    <div class="col-12">
                                      <fieldset class="form border-Field mb-0 pb-0 pr-4 pr-md-0">
                                        <legend class="textoBorda mb-0 pb-2">Estoque Entrada</legend>
                                        <div class="col-lg-12 col-12" for="formEstoque">
                                          <div class="row">
                                            <div class="form-group col-lg-4 col-12">
                                              <label data-error="wrong" data-success="right" for="txtTpMovimento">Tipo Movimento *</label>
                                              <div class="input-group">
                                                <input type="text" class="input-default focus form-control validate" required id="txtTpMovimento" name="txtTpMovimento" placeholder="Tipo Movimento">
                                                <div class="input-group-append">
                                                  <button class="btn bg-danger" id="btnTpMovimento" name="btnTpMovimento" data-button="absolute" type="button">
                                                    <i class="m-0 p-0 fas fa-search"></i>
                                                  </button>
                                                  <button class="btn bg-danger" id="btnLimpaTpMovimento" type="button">
                                                    <i class="m-0 p-0 fas fa-trash"></i>
                                                  </button>
                                                </div>
                                              </div>
                                            </div>
                                            <div class="form-group col-lg-4 col-12">
                                              <label data-error="wrong" data-success="right" for="txtDeposito">Depósito *</label>
                                              <div class="input-group">
                                                <input type="text" class="input-default focus form-control validate" required id="txtDeposito" name="txtDeposito" placeholder="Depósito">
                                                <div class="input-group-append">
                                                  <button class="btn bg-danger" id="btnDeposito" name="btnDeposito" data-button="absolute" type="button">
                                                    <i class="m-0 p-0 fas fa-search"></i>
                                                  </button>
                                                  <button class="btn bg-danger" id="btnLimpaDeposito" type="button">
                                                    <i class="m-0 p-0 fas fa-trash"></i>
                                                  </button>
                                                </div>
                                              </div>
                                            </div>
                                            <div class="form-group col-lg-4 col-12" id="divQualidade">
                                              <label data-error="wrong" data-success="right" for="txtQualidade">Qualidade *</label>
                                              <div class="input-group">
                                                <input type="text" class="input-default focus form-control validate" required id="txtQualidade" name="txtQualidade" placeholder="Qualidade">
                                                <div class="input-group-append">
                                                  <button class="btn bg-danger" id="btnQualidade" name="btnQualidade" data-button="absolute" type="button">
                                                    <i class="m-0 p-0 fas fa-search"></i>
                                                  </button>
                                                  <button class="btn bg-danger" id="btnLimpaQualidade" type="button">
                                                    <i class="m-0 p-0 fas fa-trash"></i>
                                                  </button>
                                                </div>
                                              </div>
                                            </div>
                                          </div>
                                        </div>
                                      </fieldset>
                                    </div>
                                  </div>
                                </div>





                                <div class="form-group col-lg-2 col-12" id="CampoConferenciaQtde">
                                  <div class="row">
                                    <div class="col-lg-12 col-12">
                                      <label data-error="wrong" class="labelGeral" data-success="right" for="txtQuantidade">Qtde</label>
                                      <div class="input-group">
                                        <input type="number" class="input-default form-control" id="txtQuantidade" name="txtQuantidade" placeholder="Quantidade" value="1">
                                      </div>
                                    </div>
                                  </div>
                                </div>

                                <div class="form-group col-lg-6 col-12" id="CampoConferencia">
                                  <div class="row">
                                    <label data-error="wrong" style="margin-left: 5px" id="labelConferencia" data-success="right" for="txtConferencia">Conferência</label>
                                    <div id="btnSom" class="form-group col-lg-1 col-12">
                                      <i title='desativar som bipagem' style="font-size: 20px" class="fas fa-volume-up somAtivo d-none"></i>
                                      <i title='ativar som bipagem' style="font-size: 20px" class="fas fa-volume-mute somInativo"></i>
                                    </div>
                                  </div>
                                  <div class="input-group" style="margin-top: -10px">
                                    <div class="input-group-append">
                                      <button class="btn bg-danger" id="btnMenosOuMais" data-button="absolute" type="button" data-estorno="false">
                                        <i class="m-0 p-0 fas fa-plus"></i>
                                      </button>
                                    </div>
                                    <input type="text" class="input-default focus form-control" required id="txtConferencia" name="txtConferencia" placeholder="Informe as barras para conferência">
                                    <div id="PesquisabarraProduto">
                                      <div class="input-group-append">
                                        <button class="btn bg-danger" id="btnBarraProduto" name="btnBarraProduto" data-button="absolute" type="button">
                                          <i class="m-0 p-0 fas fa-search"></i>
                                        </button>
                                      </div>
                                    </div>
                                  </div>
                                </div>

                              </div>
                              <input type="button" id="btnImportar" name="btnImportar" class="action-button btn-sisp d-none" value="Importar" />
                              <input type="button" id="btnImprimir" name="btnImprimir" class="action-button btn-sisp d-none" value="Imprimir" />
                              <input type="button" id="btnCancelar" name="btnCancelar" class="action-button-previous btn-sisp d-none" value="Cancelar" />
                              <input type="button" id="btnRFID" name="btnRFID" class="action-button-previous btn-sisp d-none" value="RFID" />
                              <input type="button" id="btnConsultar" name="btnConsultar" class="action-button-previous btn-sisp " value="Consultar" />
                            </div>
                          </div>
                        </div>
                      </form>
                    </div>
                  </div>
                </div>
                <div class="row px-2">
                  <div class="col-sm-12 table-responsive">
                    <table width="100%" style="width: 100%" id="tabelaImportacao" class="table table-sm table-hover table-select table-condensed">
                      <thead>
                        <tr>
                          <th>Codigo</th>
                          <th>Descrição</th>
                          <th>Cor</th>
                          <th>Tam</th>
                          <th>Qtde</th>
                          <th>Barra</th>
                          <th>Barra28</th>
                          <th>BarraCli</th>
                          <th>Ativo</th>
                          <th>Preco</th>
                          <th>Qtde Conf.</th>
                          <th>Qualidade</th>
                          <th>Lote</th>
                        </tr>
                      </thead>
                      <tbody>
                      </tbody>
                    </table>
                  </div>
                </div>
                <div class="col-md-2" style="margin-top: 15px; margin-left: 20px; margin-bottom: 20px">
                  <div class="flex">
                    <span class="info-box-icon"><i class="fas fa-box-open text-white" style="font-size: 25px; margin-right: 5px; margin-top: 5px;"></i></span>
                    <div class="info-box-content ">
                      <input type="number" name="txtQuantidadeBipada" id="txtQuantidadeBipada" class="form-control" data-bs-toggle="tooltip" title="Quantidade total de peças Bipadas" readonly>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </section>
      <!-- Main content -->

      <div id="modal-RFID" 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">RFID</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-lg-12">
                  <label data-error="wrong" data-success="right" for="txtNumLeitura">Número da leitura </label>
                  <div class="input-group">
                    <input type="text" class="input-default col-lg-3 col-12 focus form-control" id="txtNumLeitura" name="txtNumLeitura" class="form-control" placeholder="Número da leitura">
                  </div>
                </div>
              </div>
            </div>

            <div class="modal-footer">
              <div class="row">
                <button class="btn btn-primary btn-sisp" id="btnConfirmarRFID">Confirmar</button>     
                <button class="btn btn-danger btn-sisp" id="btnCancelarRFID">Cancelar</button>
              </div>
            </div>
          </div>
        </div>
      </div>

    </div>

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

  <script src="plugins/jquery/jquery.min.js?versao=3.2511.13.1"></script>

  <script type="text/javascript" src="dist/js/jquery.dataTables.js?versao=3.2511.13.1"></script>
  <script type="text/javascript" src="dist/js/dataTables.bootstrap4.min.js?versao=3.2511.13.1"></script>
  <script type="text/javascript" src="dist/js/loadingoverlay.min.js?versao=3.2511.13.1"></script>

  <!-- jQuery UI 1.11.4 -->
  <script src="plugins/jquery-ui/jquery-ui.min.js?versao=3.2511.13.1"></script>
  <!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
  <script>
    $.widget.bridge('uibutton', $.ui.button)
  </script>
  <!-- Bootstrap 4 -->
  <script src="plugins/bootstrap/js/bootstrap.bundle.min.js?versao=3.2511.13.1"></script>
  <!-- AdminLTE App -->
  <script src="dist/js/adminlte.min.js?versao=3.2511.13.1"></script>

  <script src="dist/js/sisplan.js?versao=3.2511.13.1"></script>
  <!-- SweetAlert2 -->
  <script src="plugins/sweetalert2/sweetalert2.min.js?versao=3.2511.13.1"></script>
  <script src="plugins/toastr/toastr.min.js?versao=3.2511.13.1"></script>
  <script src="dist/js/requisicoes.js?versao=3.2511.13.1"></script>
  <script type="text/javascript" src="dist/js/sum().js?versao=3.2511.13.1"></script>
  <script src="utils/cookies.js?versao=3.2511.13.1"></script>
  <script src="dist/js/jquery.maskMoney.min.js?versao=3.2511.13.1"></script>
  <script src="pages/loja/js/rotinas.js?versao=3.2511.13.1"></script>
  <script src="dist/js/dataTables.keyTable.js?versao=3.2511.13.1"></script>
  <script src="dist/js/driver.min.js?versao=3.2511.13.1"></script>
  <script src="plugins/jquery-validation/jquery.validate.min.js?versao=3.2511.13.1"></script>
  <script src="plugins/jquery-validation/additional-methods.min.js?versao=3.2511.13.1"></script>
  <script type="text/javascript" src="config.js?versao=3.2511.13.1"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-scrollTo/2.1.3/jquery.scrollTo.min.js"></script>
  <script src="plugins/select2/js/select2.full.min.js?versao=3.2511.13.1"></script>
  <script type="text/javascript" src="utils/funcoes.js?versao=3.2511.13.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('IMPORTACAO');
      if (!temAcesso.resultado) {
        toastrAcesso(temAcesso, BASE_URI);
        return;
      }

      sArquivo = `${BASE_URI}/pages/importacao/importacao.js?versao=3.2511.13.1`;
      insereJavaScriptPagina(sArquivo);
    });
  </script>
</body>

</html>