<?php include_once('../../config.php') ?>

<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>Sisplan Web | Liberação Pedido Comercial</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="plugins/fontawesome-free/css/all.min.css?versao=3.263.26.1">
  <link rel="stylesheet" href="dist/css/adminlte.min.css?versao=3.263.26.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.263.26.1">
  <link rel="stylesheet" href="dist/css/sisplan.css?versao=3.263.26.1">
  <link rel="stylesheet" type="text/css" href="dist/css/dataTables.bootstrap4.min.css?versao=3.263.26.1" />
  <link rel="shortcut icon" href="favicon.ico">
  <link rel="stylesheet" href="plugins/toastr/toastr.min.css?versao=3.263.26.1">
  <link rel="stylesheet" type="text/css" href="dist/css/driver.min.css?versao=3.263.26.1" />
  <link rel="stylesheet" href="dist/css/jquery-ui.css?versao=3.263.26.1">
  <link rel="stylesheet" href="dist/css/PesquisaVariosSelect2.css?versao=3.263.26.1">
  <link rel="stylesheet" href="plugins/select2/css/select2.min.css?versao=3.263.26.1">
  <link rel="stylesheet" href="plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css?versao=3.263.26.1">
  <link rel="stylesheet" href="dist/css/sisplan.newColorsButtons.css?versao=3.263.26.1">
  <style>
    .radioStyle {
      border: solid #e0e4e6;
      border-radius: 4px;
      border-width: 2px;
      padding: 6px;
    }

    .campoSel {
      display: inline-block;
      position: absolute;
      width: 22px;
      height: 22px;
      border: 1px solid #D3CFC8;
      border-radius: 0;
    }

    .border-Field {
      border: 1px solid var(--font-color) !important;
      padding: 0 1.0em 0 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;
      border-radius: 3px;
    }

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

    .table-wrapper {
      max-height: 336px;
      overflow-y: auto;
    }

    .table-wrapper table {
      width: 100%;
      border-collapse: collapse;
      table-layout: auto;
    }

    .icon-blue {
      color: var(--blue);
      transition: color 0.2s ease;
    }

    .icon-blue:hover {
      color: #4da6ff;
    }

    .icon-red {
      color: var(--red);
      transition: color 0.2s ease;
    }

    .icon-red:hover {
      color: #ff6b6b;
    }
  </style>
</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">Liberação de Pedido Comercial</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">
              <!-- <ol class="breadcrumb float-sm-right">
                
                <li class="breadcrumb-item active">Liberação de Pedido Comercial</li>
              </ol> -->
            </div>
          </div>
        </div>
        <div class="container-fluid card">
          <div class="row card-body" id="abaGeral">
            <div id="escondeInputs" class="row">
              <div class="col-lg-3 form-group">
                <label data-error="wrong" data-success="right" for="txtPedido">Pedido: </label>
                <div class="input-group">
                  <select class="js-example-programmatic js-states form-control" id="txtPedido" name="txtPedido" multiple="multiple"></select>
                  <div class="input-group-append">
                    <button class="btn bg-danger" id="btnPedido" name="btnPedido" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                    <button class="btn bg-danger" id="btnLimpaPedido" name="btnLimpaPedido" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                  </div>
                </div>
              </div>

              <div class="col-lg-3 form-group">
                <label data-error="wrong" data-success="right" for="txtCliente">Cliente: </label>
                <div class="input-group">
                  <!-- <input type="text" class="input-default focus form-control" id="txtCliente" name="txtCliente" 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="btnCliente" name="btnCliente" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                    <button class="btn bg-danger" id="btnLimpaCliente" name="btnLimpaCliente" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                  </div>
                </div>
              </div>

              <div class="col-lg-3 form-group">
                <label data-error="wrong" data-success="right" for="txtRepresentante">Representante: </label>
                <div class="input-group">
                  <!-- <input type="text" class="input-default focus form-control" id="txtRepresentante" name="txtRepresentante" 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="btnRepresentante" name="btnRepresentante" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                    <button class="btn bg-danger" id="btnLimpaRepresentante" name="btnLimpaRepresentante" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                  </div>
                </div>
              </div>

              <div class="col-lg-3 form-group">
                <label data-error="wrong" data-success="right" for="txtStatus">Status: </label>
                <div class="input-group">
                  <!-- <input type="text" class="input-default focus form-control" id="txtStatus" name="txtStatus" placeholder="Status"> -->
                  <select class="js-example-programmatic js-states form-control" id="txtStatus" name="txtStatus" multiple="multiple"></select>
                  <div class="input-group-append">
                    <button class="btn bg-danger" id="btnStatus" name="btnStatus" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                    <button class="btn bg-danger" id="btnLimpaStatus" name="btnLimpaStatus" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                  </div>
                </div>
              </div>

              <div class="col-lg-3 form-group">
                <label data-error="wrong" data-success="right" for="txtColecao">Coleção: </label>
                <div class="input-group">
                  <!-- <input type="text" class="input-default focus form-control" id="txtColecao" name="txtColecao" placeholder="Coleção"> -->
                  <select class="js-example-programmatic js-states form-control" id="txtColecao" name="txtColecao" multiple="multiple"></select>
                  <div class="input-group-append">
                    <button class="btn bg-danger" id="btnColecao" name="btnColecao" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                    <button class="btn bg-danger" id="btnLimpaColecao" name="btnLimpaColecao" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                  </div>
                </div>
              </div>

              <div class="col-lg-3 form-group">
                <label data-error="wrong" data-success="right" for="txtDtFaturaDe">Período Fatura (de/até): </label>
                <div class="input-group">
                  <input type="date" max="2500-12-31" class="input-default focus form-control" id="txtDtFaturaDe" name="txtDtFaturaDe">
                  <input type="date" max="2500-12-31" class="input-default focus form-control" id="txtDtFaturaAte" name="txtDtFaturaAte">
                </div>
              </div>

              <div class="col-lg-3 form-group">
                <label data-error="wrong" data-success="right" for="txtDtEmissaoDe">Período Emissão (de/até): </label>
                <div class="input-group">
                  <input type="date" max="2500-12-31" class="input-default focus form-control" id="txtDtEmissaoDe" name="txtDtEmissaoDe">
                  <input type="date" max="2500-12-31" class="input-default focus form-control" id="txtDtEmissaoAte" name="txtDtEmissaoAte">
                </div>
              </div>

              <div class="col-lg-3 form-group">
                <label data-error="wrong" data-success="right" for="txtDtSaidaDe">Data de Saída (de/até): </label>
                <div class="input-group">
                  <input type="date" max="2500-12-31" class="input-default focus form-control" id="txtDtSaidaDe" name="txtDtSaidaDe">
                  <input type="date" max="2500-12-31" class="input-default focus form-control" id="txtDtSaidaAte" name="txtDtSaidaAte">
                </div>
              </div>

              <div class="col-lg-3 form-group periodoEntregaPadrao">
                <label data-error="wrong" data-success="right" for="txtPeriodoEntDe">Período Entrega de: </label>
                <div class="input-group">
                  <input type="text" class="input-default focus form-control" id="txtPeriodoEntDe" name="txtPeriodoEntDe" placeholder="de">
                  <div class="input-group-append">
                    <button class="btn bg-danger" id="btn-PeriodoEntDe" name="btn-PeriodoEntDe" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                    <button class="btn bg-danger" id="btn-limpa-PeriodoEntDe" name="btn-limpa-PeriodoEntDe" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                  </div>
                </div>
              </div>

              <div class="col-lg-3 form-group periodoEntregaPadrao">
                <label data-error="wrong" data-success="right" for="txtPeriodoEntAte"> até: </label>
                <div class="input-group">
                  <input type="text" class="input-default focus form-control" id="txtPeriodoEntAte" name="txtPeriodoEntAte" placeholder="até">
                  <div class="input-group-append">
                    <button class="btn bg-danger" id="btn-PeriodoEntAte" name="btn-PeriodoEntAte" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                    <button class="btn bg-danger" id="btn-limpa-PeriodoEntAte" name="btn-limpa-PeriodoEntAte" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                  </div>
                </div>
              </div>

              <div class="col-lg-3 form-group d-none periodoEntregaMotivo mv-0">
                <label data-error="wrong" data-success="right" for="txtPeriodoEntDe">Período Entrega de/ate: </label>
                <div class="d-flex items-center">
                  <div class="input-group mr-2">
                    <input type="text" class="input-default focus form-control" id="txtPeriodoEntDe" name="txtPeriodoEntDe" placeholder="de">
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btn-PeriodoEntDe" name="btn-PeriodoEntDe" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                      <button class="btn bg-danger" id="btn-limpa-PeriodoEntDe" name="btn-limpa-PeriodoEntDe" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                  </div>
                  <div class="input-group">
                    <input type="text" class="input-default focus form-control" id="txtPeriodoEntAte" name="txtPeriodoEntAte" placeholder="até">
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btn-PeriodoEntAte" name="btn-PeriodoEntAte" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                      <button class="btn bg-danger" id="btn-limpa-PeriodoEntAte" name="btn-limpa-PeriodoEntAte" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                  </div>
                </div>
              </div>

              <div class="form-group col-3 col-lg-3 mb-0">
                <label data-error="wrong" data-success="right" for="txtTipoVenda">Tipo Venda: </label>
                <div class="input-group">
                  <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="btnTipoVenda" name="btnTipoVenda" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                    <button class="btn bg-danger" id="btnLimpaTipoVenda" name="btnLimpaTipoVenda" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                  </div>
                </div>
              </div>

              <div class="col-lg-3 form-group d-none containerMotivo mb-0">
                <label data-error="wrong" data-success="right" for="txtPedRegras">Motivo Bloqueio: </label>
                <div class="input-group">
                  <select class="js-example-programmatic js-states form-control" id="txtPedRegras" name="txtPedRegras" multiple="multiple"></select>
                  <div class="input-group-append">
                    <button class="btn bg-danger" id="btnPedRegras" name="btnPedRegras" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                    <button class="btn bg-danger" id="btnLimpaPedRegras" name="btLimpaPedRegras" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                  </div>
                </div>
              </div>

              <div class="col-lg-3 form-group d-none containerMotivo mb-0">
                <div class="group-default form-group">
                  <label for="Situacao">Situação Bloqueio:</label>
                  <div class="relative">
                    <select id="txtSituacao" class="input-default focus form-control validate">
                      <option value="" selected>Todos</option>
                      <option value="S">Liberados</option>
                      <option value="N">Bloqueados</option>
                    </select>
                  </div>
                </div>
              </div>

              <!-- <div class="col-sm-5 form-group mb-0">
                <fieldset class="form border-Field mb-0 pb-0">
                  <legend class="textoBorda mb-0 pb-0">Financeiro/Comercial</legend>
                  <div class="form-row">
                    <div class="form-group ml-2 icheck-primary">
                      <input type="radio" class="" checked name="tipo" id="radioTodos">
                      <label class="form-check-label pr-1" for="radioTodos">Todos</label>
                    </div>
                    <div class="form-group ml-2 icheck-primary">
                      <input type="radio" class="" name="tipo" id="radioBloqVendas">
                      <label class="form-check-label pr-1" for="radioBloqVendas">Bloq. Vendas</label>
                    </div>
                    <div class="form-group ml-2 icheck-primary">
                      <input type="radio" class="" name="tipo" id="radioBloqFinan">
                      <label class="form-check-label pr-1" for="radioBloqFinan">Bloq. Finan.</label>
                    </div>
                    <div class="form-group ml-2 icheck-primary">
                      <input type="radio" class="" name="tipo" id="radioBloqVendLibFinan">
                      <label class="form-check-label pr-1" for="radioBloqVendLibFinan">Bloq. Vendas / Lib. Finan.</label>
                    </div>
                    <div class="form-group ml-2 icheck-primary">
                      <input type="radio" class="" name="tipo" id="radioBloqExp">
                      <label class="form-check-label pr-1" for="radioBloqExp">Bloq. Expedição</label>
                    </div>
                  </div>
                </fieldset>
              </div> -->

              <div class="col-lg-3 form-group">
                <label data-error="wrong" data-success="right" for="txtGrupoCli">Grupo de Cliente: </label>
                <div class="input-group">
                  <select class="js-example-programmatic js-states form-control" id="txtGrupoCli" name="txtGrupoCli" multiple="multiple"></select>
                  <div class="input-group-append">
                    <button class="btn bg-danger" id="btnGrupoCli" name="btnGrupoCli" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                    <button class="btn bg-danger" id="btnLimpaGrupoCli" name="btnLimpaGrupoCli" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                  </div>
                </div>
              </div>

              <div class="col-lg-3 form-group containerCondicaoPagamento">
                <label data-error="wrong" data-success="right" for="txtCondicaoPagamento">Condição de Pagamento: </label>
                <div class="input-group">
                  <select class="js-example-programmatic js-states form-control" id="txtCondicaoPagamento" name="txtCondicaoPagamento" multiple="multiple"></select>
                  <div class="input-group-append">
                    <button class="btn bg-danger" id="btnCondicaoPagamento" name="btnCondicaoPagamento" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                    <button class="btn bg-danger" id="btnLimpaCondicaoPagamento" name="btnLimpaCondicaoPagamento" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                  </div>
                </div>
              </div>
            </div>

            <div class="row col-12 pl-0">
              <div class="col-sm-5 form-group mb-0">
                <fieldset class="form border-Field mb-0 pb-0">
                  <legend class="textoBorda mb-0 pb-0">Situação Pedido</legend>
                  <div class="form-row">
                    <div class="form-group ml-2 icheck-primary">
                      <input type="radio" class="" checked name="Pedido" id="rgPedidoTodos">
                      <label class="form-check-label pr-1" for="rgPedidoTodos">Todos</label>
                    </div>
                    <div class="form-group ml-2 icheck-primary">
                      <input type="radio" class="" name="Pedido" id="rgPedidoPendentes">
                      <label class="form-check-label pr-1" for="rgPedidoPendentes">Pendentes</label>
                    </div>
                    <div class="form-group ml-2 icheck-primary">
                      <input type="radio" class="" name="Pedido" id="rgPedidoFaturados">
                      <label class="form-check-label pr-1" for="rgPedidoFaturados">Faturados</label>
                    </div>
                    <div class="form-group ml-2 icheck-primary">
                      <input type="radio" class="" name="Pedido" id="rgPedidoParcFat">
                      <label class="form-check-label pr-1" for="rgPedidoParcFat">Parc. Fat.</label>
                    </div>
                    <div class="form-group ml-2 icheck-primary">
                      <input type="radio" class="" name="Pedido" id="rgPedidoExpPendente">
                      <label class="form-check-label pr-1" for="rgPedidoExpPendente">Exp. Pendente</label>
                    </div>
                    <div class="form-group ml-2 icheck-primary">
                      <input type="radio" class="" name="Pedido" id="rgPedidoSemExpedicao">
                      <label class="form-check-label pr-1" for="rgPedidoSemExpedicao">Sem Expedição</label>
                    </div>
                  </div>
                </fieldset>
              </div>
              <div class="col-sm-2 form-group flex mt-2">
                <div class="flex align-items-center">
                  <button class=" btn btn-primary btn-sisp" id="btnConsultar"><span class="fas fa-search"></span> Consultar</button>
                </div>
              </div>
            </div>

            <div class="col-sm-12 table-responsive card-body p-0">
              <div class="col-12 row px-0">
                <div class="col-lg-1 form-group">
                  <label data-error="wrong" data-success="right" for="txtTotalQtdePend">Qtde. Pendente </label>
                  <div class="input-group">
                    <input type="text" class="input-default focus form-control text-right" readonly disabled id="txtTotalQtdePend" name="txtTotalQtdePend" value='0,00'>
                  </div>
                </div>
                <div class="col-lg-1 form-group">
                  <label data-error="wrong" data-success="right" for="txtTotalValorPend">Valor Pendente </label>
                  <div class="input-group">
                    <input type="text" class="input-default focus form-control text-right" readonly disabled id="txtTotalValorPend" name="txtTotalValorPend" value='0,00'>
                  </div>
                </div>
                <div class="col-lg-1 form-group">
                  <label data-error="wrong" data-success="right" for="txtTotalValorLiq">Valor Líquido </label>
                  <div class="input-group">
                    <input type="text" class="input-default focus form-control text-right" readonly disabled id="txtTotalValorLiq" name="txtTotalValorLiq" value='0,00'>
                  </div>
                </div>
                <div class="col-lg-1 form-group">
                  <label data-error="wrong" data-success="right" for="txtTotalValorBruto">Valor Bruto </label>
                  <div class="input-group">
                    <input type="text" class="input-default focus form-control text-right" readonly disabled id="txtTotalValorBruto" name="txtTotalValorBruto" value='0,00'>
                  </div>
                </div>
              </div>
              <div class="row">
                <div class="col-sm-12">
                  <div class="icheck-primary">
                    <input class="form-check-input" type="checkbox" id="check_todos" value="option5">
                    <label class="form-check-label" for="check_todos" id="check_todosTour">Selecionar Todos</label>
                  </div>
                </div>
              </div>
              <h5>Pedidos</h5>
              <table id="tabelaPedido" class="table table-sm-sisp table-select table-hover" style="white-space: nowrap;" width="100%">
                <thead>
                </thead>
                <tbody>
                </tbody>
              </table>
            </div>

            <div class="col-sm-6 table-responsive card-body pt-0" id="div-itens">
              <h5>Itens</h5>
              <div class="table-wrapper">
                <table id="tabelaItens" class="table table-sm-sisp table-select table-hover" style="white-space: nowrap;" width="100%">
                  <thead>
                  </thead>
                  <tbody>
                  </tbody>
                </table>
              </div>
            </div>

            <div class="col-sm-6 table-responsive card-body pt-0" id="div-receber">
              <h5>Receber Em Aberto</h5>
              <table id="tabelaReceber" class="table table-sm-sisp table-select table-hover" width="100%" style="white-space: nowrap;">
                <thead>
                </thead>
                <tbody>
                </tbody>
              </table>
            </div>

            <div class="col-sm-12 d-flex justify-content-end align-items-end">
              <div class="col-12 d-flex justify-content-end">
                <div class="col-lg-6 d-none" id="divMotivo">
                  <label data-error="wrong" data-success="right" for="txtMotivo">Motivo: * </label>
                  <div class="input-group">
                    <input type="text" class="input-default focus form-control" id="txtMotivo" name="txtMotivo" placeholder="Motivo">
                  </div>
                </div>
                <div class="radioStyle mt-2 pt-1">
                  <div class="form-row pr-2">
                    <div class="form-group ml-2 icheck-primary flex align-items-center pt-1">
                      <input type="radio" class="liberarBloq" checked name="liberarBloq" id="radioLiberar">
                      <label class="form-check-label pr-1" style="font-weight: bold;" for="radioLiberar">Liberar</label>
                    </div>
                    <div class="form-group ml-2 icheck-primary flex align-items-center pt-1">
                      <input type="radio" class="liberarBloq" name="liberarBloq" id="radioBloquear">
                      <label class="form-check-label pr-1" style="font-weight: bold;" for="radioBloquear">Bloquear</label>
                    </div>
                    <button id="btnLiberar" class="btn btn-danger btnVerde btn-sisp">Confirmar</button>
                    <button id="btnIncluirBloqueio" class="btn btn-danger btn-sisp" style="margin-left: .5rem;">Incluir Bloqueio</button>
                  </div>
                </div>
              </div>
            </div>

          </div>
        </div>
      </div>
      <!-- modal  -->
    </div>
  </div>

  <div id="modalBloqueios" 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" id="tituloBloqueios"></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">
              <table id="tabelaBloqueiosFinanceiros" class="table table-sm-sisp table-select table-hover" width="100%" style="white-space: nowrap;">
                <thead>
                </thead>
                <tbody>
                </tbody>
              </table>
            </div>
          </div>
        </div>

        <div class="modal-footer">
          <div class="row">
            <button class="btn btn-danger btn-sisp" id="btnFecharModalBloqueios" data-dismiss="modal">Fechar</button>
          </div>
        </div>
      </div>
    </div>
  </div>

  <?php
  include_once('../../modais.php');
  include_once('../../modals/modal_incluir_bloqueio.html');
  ?>
  <aside class="control-sidebar control-sidebar-dark">
  </aside>
  </div>
  <script src="plugins/jquery/jquery.min.js?versao=3.263.26.1"></script>
  <script type="text/javascript" src="dist/js/jquery.dataTables.js?versao=3.263.26.1"></script>
  <script type="text/javascript" src="dist/js/dataTables.bootstrap4.min.js?versao=3.263.26.1"></script>
  <script src="plugins/jquery-ui/jquery-ui.min.js?versao=3.263.26.1"></script>
  <script>
    $.widget.bridge('uibutton', $.ui.button);
  </script>
  <script src="plugins/bootstrap/js/bootstrap.bundle.min.js?versao=3.263.26.1"></script>
  <script src="dist/js/adminlte.min.js?versao=3.263.26.1"></script>
  <script src="dist/js/sisplan.js?versao=3.263.26.1"></script>
  <script src="utils/funcoes.js?versao=3.263.26.1"></script>
  <script src="utils/cookies.js?versao=3.263.26.1"></script>
  <script src="dist/js/requisicoes.js?versao=3.263.26.1"></script>
  <script src="dist/js/loadingoverlay.min.js?versao=3.263.26.1"></script>
  <script src="dist/js/driver.min.js?versao=3.263.26.1"></script>
  <script src="plugins/toastr/toastr.min.js?versao=3.263.26.1"></script>
  <script src="plugins/select2/js/select2.full.min.js?versao=3.263.26.1"></script>
  <script src="plugins/datatables-colreorder/js/dataTables.colReorder.min.js?versao=3.263.26.1"></script>
  <script type="text/javascript" src="dist/js/sum().js?versao=3.263.26.1"></script>
  <script type="text/javascript" src="config.js?versao=3.263.26.1"></script>
  <script type="text/javascript" src="modals/modal_incluir_bloqueio.js"></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('LIBERACAO_COMERCIAL');
      if (!temAcesso.resultado) {
        toastrAcesso(temAcesso, BASE_URI);
        return;
      }

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

    });
  </script>
</body>

</html>