<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>Sisplan Web | Baixa de Consumos</title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <!-- Theme style -->
  <link rel="stylesheet" href="dist/css/adminlte.min.css?versao=3.255.7.1">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="plugins/fontawesome-free/css/all.min.css?versao=3.255.7.1">
  <!--e1Google Font: Source Sans Pro -->
  <link href='https://fonts.googleapis.com/css?family=Roboto:400,300,500,600,700,400italic' rel='stylesheet' type='text/css'>

  <link rel="stylesheet" type="text/css" href="dist/css/dataTables.bootstrap4.min.css?versao=3.255.7.1" />

  <link href='dist/css/bootstrap.min.css?versao=3.255.7.1'>
  <link rel="stylesheet" href="dist/css/custom.css?versao=3.255.7.1">
  <link rel="stylesheet" href="dist/css/sisplan.css?versao=3.255.7.1">
  <link rel="stylesheet" href="dist/css/PesquisaVariosSelect2.css?versao=3.255.7.1">
  <link rel="stylesheet" href="plugins/select2/css/select2.min.css?versao=3.255.7.1">
  <link rel="stylesheet" href="plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css?versao=3.255.7.1">
  <link rel="stylesheet" type="text/css" href="plugins/datatables-keytable/css/keyTable.bootstrap4.min.css?versao=3.255.7.1">
  <link rel="stylesheet" type="text/css" href="dist/css/responsive.bootstrap.min.css?versao=3.255.7.1">
  <link rel="shortcut icon" href="favicon.ico">
  <link rel="stylesheet" href="dist/css/cadastro.css?versao=3.255.7.1">

  <!-- Toastr -->
  <link rel="stylesheet" href="plugins/toastr/toastr.min.css?versao=3.255.7.1">
  <link rel="stylesheet" type="text/css" href="dist/css/driver.min.css?versao=3.255.7.1" />
  <link rel="stylesheet" href="dist/css/jquery-ui.css?versao=3.255.7.1">
  <!-- Google Font: Source Sans Pro -->
  <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">

  <style>
    .table.dataTable tbody td,
    .table.dataTable thead {
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
    }

    #tabelaEstReserva_filter {
      display: none;
    }

    .content-wrapper {
      margin-left: 0px !important;
    }

    .main-header,
    .main-sidebar {
      display: none;
    }

  </style>

</head>

<body class="hold-transition sidebar-mini layout-fixed">
  <main class="wrapper">
    <?php
    include_once('../../menu.php');
    ?>
    <div class="wrapper">


      <div id="myModal" class="modal" tabindex="-1" role="dialog">
        <div class="modal-dialog" role="document">
          <div class="modal-content">
            <div class="modal-header">
              <h5 id="myModalLabel" class="modal-title"></h5>
              <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                <span aria-hidden="true">&times;</span>
              </button>
            </div>
            <div class="modal-body">
              <p id="myModalText"></p>
            </div>
            <div class="modal-footer">
              <button id="btnYes" type="button" class="btn btn-primary">Sim</button>
              <button id="btnNo" type="button" class="btn btn-secondary" data-dismiss="modal">Não</button>
            </div>
          </div>
        </div>
      </div>

      <div class="modal fade pr-0" data-backdrop="static" id="modal-controle-itens">
        <div class="modal-dialog m-0 mt-3 d-flex justify-content-center" style="min-width: 100%; min-height: 100%">
          <div class="modal-content" style="height: 100vh!important; width: 89%!important">
            <div class="modal-header">
              <h4 class="modal-title">Controle de Itens</h4>
              <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                <span aria-hidden="true">&times;</span>
              </button>
            </div>
            <div class="modal-body p-1" id="modal-scroll">
              <div class="card mx-2">
                <div class="row col-lg-12 col-12 m-0 p-0 mt-2">
                  <div class="form-group col-lg-4 col-12 d-none">
                    <label class="labelGeral" for="txtIdCI">Id:</label>
                    <div class="input-group" id="search-setor">
                      <input type="text" class="input-default focus form-control classCI" id="txtIdCI" aria-describedby="codError" name="txtIdCI" class="form-control" placeholder="Id">
                      <div class="input-group-append">
                        <button class="btn bg-danger classCI" id="btnIdCI" name="btnIdCI" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                        <button class="btn bg-danger classCI" id="btnLimpaIdCI" name="btnLimpaIdCI" 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 class="labelGeral" for="txtCodigoCI">Código:</label>
                    <div class="input-group" id="search-setor">
                      <input type="text" class="input-default focus form-control classCI" id="txtCodigoCI" aria-describedby="codError" name="txtCodigoCI" class="form-control" placeholder="Código">
                      <div class="input-group-append">
                        <button class="btn bg-danger classCI" id="btnCodigoCI" name="btnCodigoCI" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                        <button class="btn bg-danger classCI" id="btnLimpaCodigoCI" name="btnLimpaCodigoCI" 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 class="labelGeral" for="txtCorCI">Cor:</label>
                    <div class="input-group" id="search-setor">
                      <input type="text" class="input-default focus form-control classCI" id="txtCorCI" aria-describedby="codError" name="txtCorCI" class="form-control" placeholder="Cor">
                      <div class="input-group-append">
                        <button class="btn bg-danger classCI" id="btnCorCI" name="btnCorCI" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                        <button class="btn bg-danger classCI" id="btnLimpaCorCI" name="btnLimpaCorCI" 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 class="labelGeral" for="txtAplicacaoCI">Aplicação:</label>
                    <div class="input-group" id="search-setor">
                      <input type="text" class="input-default focus form-control classCI" id="txtAplicacaoCI" aria-describedby="codError" name="txtAplicacaoCI" class="form-control" placeholder="Aplicação">
                      <div class="input-group-append">
                        <button class="btn bg-danger classCI" id="btnAplicacaoCI" name="btnAplicacaoCI" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                        <button class="btn bg-danger classCI" id="btnLimpaAplicacaoCI" name="btnLimpaAplicacaoCI" 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 class="labelGeral" for="txtSetorCI">Setor:</label>
                    <div class="input-group" id="search-setor">
                      <input type="text" class="input-default focus form-control classCI" id="txtSetorCI" aria-describedby="codError" name="txtSetorCI" class="form-control" placeholder="Setor">
                      <div class="input-group-append">
                        <button class="btn bg-danger classCI" id="btnSetorCI" name="btnSetorCI" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                        <button class="btn bg-danger classCI" id="btnLimpaSetorCI" name="btnLimpaSetorCI" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                      </div>
                    </div>
                  </div>
                  <div class="form-group col-lg-3 col-12">
                    <label class="labelGeral" for="txtParteCI">Parte:</label>
                    <div class="input-group" id="search-Parte">
                      <input type="text" class="input-default focus form-control classCI" id="txtParteCI" aria-describedby="codError" name="txtParteCI" class="form-control" placeholder="Parte">
                      <div class="input-group-append">
                        <button class="btn bg-danger classCI" id="btnParteCI" name="btnParteCI" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                        <button class="btn bg-danger classCI" id="btnLimpaParteCI" name="btnLimpaParteCI" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                      </div>
                    </div>
                  </div>
                  <div class="form-group col-lg-1 col-12">
                    <label class="labelGeral" for="txtUnidadeCI">Unidade:</label>
                    <input type="text" class="input-default focus form-control" disabled id="txtUnidadeCI" aria-describedby="codError" autocomplete="off" name="txtUnidadeCI" class="form-control" placeholder="UN">
                  </div>
                  <div class="form-group col-lg-1 col-12">
                    <label class="labelGeral" for="txtConsumoUniCI">Cons. Uni.:</label>
                    <input type="text" class="input-default focus form-control apenasFloat" disabled id="txtConsumoUniCI" aria-describedby="codError" name="txtConsumoUniCI" class="form-control" placeholder="0.0000">
                  </div>
                  <div class="form-group col-lg-1 col-12">
                    <label class="labelGeral" for="txtConsumoCI">Consumo:</label>
                    <input type="text" class="input-default focus form-control classCI apenasFloat" id="txtConsumoCI" aria-describedby="codError" name="txtConsumoCI" class="form-control" placeholder="0.0000">
                  </div>
                  <div class="form-group col-lg-1 col-12">
                    <label class="labelGeral" for="txtConsumoOrigCI">Cons. Orig.:</label>
                    <input type="text" class="input-default focus form-control" disabled id="txtConsumoOrigCI" aria-describedby="codError" name="txtConsumoOrigCI" class="form-control" placeholder="0.0000">
                  </div>
                  <div class="form-group col-lg-1 col-12">
                    <label class="labelGeral" for="txtBaixadoCI">Baixado:</label>
                    <input type="text" class="input-default focus form-control" disabled id="txtBaixadoCI" aria-describedby="codError" name="txtBaixadoCI" class="form-control" placeholder="0.0000">
                  </div>
                  <div class="col-lg-12 col-12 d-flex align-items-center mt-2 pt-1">
                    <button class="btn btn-secondary btn-sisp mr-2" id="btnIncluirCI" title="Clique para incluir um novo item">Incluir</button>
                    <button class="btn btn-secondary btn-sisp mr-2" id="btnAlterarCI" title="Clique para alterar um item">Alterar</button>
                    <button class="btn btn-danger btn-sisp mr-2" id="btnExcluirCI" title="Clique para excluir um item">Excluir</button>
                    <button class="btn btn-primary btn-sisp mr-2 d-none" id="btnConfirmarCI" title="Clique para confirmar uma inclusão/alteração">Confirmar</button>
                    <button class="btn btn-danger btn-sisp d-none" id="btnDesistirCI" title="Clique para desistir de uma inclusão/alteração">Desistir</button>
                  </div>
                </div>
                <div class="row col-12" style="margin: 0px!important; padding: 0px!important;">
                  <div class="col-lg-12 table-responsive card-body" id="tabControleItens">
                    <table id="tabelaControleItens" class="table table-sm table-select table-hover" width="100%">
                      <thead>
                      </thead>
                      <tbody>
                      </tbody>
                    </table>
                  </div>
                </div>
              </div>
            </div>
            <div class="modal-footer">
              <button class="btn btn-danger btn-sisp" id="btnFecharCI" title="Clique para gravar os dados">Fechar</button>
            </div>
          </div>
        </div>
      </div>

      <div class="content-wrapper">
        <section class="content">
          <div class="content-header py-0">
            <div class="container-fluid">
              <div class="row mb-2">
                <div class="col-sm-6 flex">
                </div>
                <div class="col-sm-6">
                </div>
              </div>
            </div>
            <div class="row justify-content-center mt-0">
              <div class="col-12 text-center p-0 mt-3 mb-2">
                <div class="card p-0">
                  <div class="card-header text-center flex pl-0" style="border: none!important;box-shadow:none!important;">
                    <h2 class="ml-5 mb-0">Baixa de Consumos</h2>
                    <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="d-flex flex-row justify-content-center">
                    <div class="col-12 mx-0">
                      <form id="msform">
                        <fieldset class="d-flex justify-content-center">
                          <div class="form-card mx-2 px-2 py-0" id="formcard1">
                            <div id="tutorial-step1" class="row">
                              <div class="col-lg-4 col-12 form-group">
                                <label data-error="wrong" class="labelGeral" data-success="right" for="txtOF">* Número OF:</label>
                                <div class="input-group">
                                  <input type="text" class="input-default focus form-control" aria-describedby="produtoError" id="txtOF" name="txtOF" placeholder="Número OF">
                                  <div class="input-group-append">
                                    <button class="btn bg-danger" id="btnOF" name="btnOF" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                    <button class="btn bg-danger" id="btnLimpaOF" name="btnLimpaOF" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                  </div>
                                </div>
                              </div>
                              <div class="col-lg-4 col-12 form-group">
                                <label data-error="wrong" class="labelGeral" data-success="right" for="txtParte">Parte:</label>
                                <div class="input-group">
                                  <select class="js-example-programmatic js-states form-control" id="txtParte" name="txtParte" multiple="multiple">
                                  </select>
                                  <div class="input-group-append">
                                    <button class="btn bg-danger" id="btnParte" name="btnParte" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                    <button class="btn bg-danger" id="btnLimpaParte" name="btnLimpaParte" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                  </div>
                                </div>
                              </div>
                              <div class="col-lg-4 col-12 form-group">
                                <label data-error="wrong" class="labelGeral" data-success="right" for="txtAplicacao">Aplicação:</label>
                                <div class="input-group">
                                  <select class="js-example-programmatic js-states form-control" id="txtAplicacao" name="txtAplicacao" multiple="multiple">
                                  </select>
                                  <div class="input-group-append">
                                    <button class="btn bg-danger" id="btnAplicacao" name="btnAplicacao" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                    <button class="btn bg-danger" id="btnLimpaAplicacao" name="btnLimpaAplicacao" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                  </div>
                                </div>
                              </div>
                              <div class="col-lg-4 col-12 form-group">
                                <label data-error="wrong" class="labelGeral" data-success="right" for="txtGrupo">Grupo:</label>
                                <div class="input-group">
                                  <select class="js-example-programmatic js-states form-control" id="txtGrupo" name="txtGrupo" multiple="multiple">
                                  </select>
                                  <div class="input-group-append">
                                    <button class="btn bg-danger" id="btnGrupo" name="btnGrupo" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                    <button class="btn bg-danger" id="btnLimpaGrupo" name="btnLimpaGrupo" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                  </div>
                                </div>
                              </div>
                              <div class="col-lg-4 col-12 form-group">
                                <label data-error="wrong" class="labelGeral" data-success="right" for="txtSubGrupo">Subgrupo:</label>
                                <div class="input-group">
                                  <select class="js-example-programmatic js-states form-control" id="txtSubGrupo" name="txtSubGrupo" multiple="multiple">
                                  </select>
                                  <div class="input-group-append">
                                    <button class="btn bg-danger" id="btnSubGrupo" name="btnSubGrupo" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                    <button class="btn bg-danger" id="btnLimpaSubGrupo" name="btnLimpaSubGrupo" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                  </div>
                                </div>
                              </div>
                              <div class="col-lg-4 col-12 form-group">
                                <label data-error="wrong" class="labelGeral" data-success="right" for="txtSetor">Setor:</label>
                                <div class="input-group">
                                  <select class="js-example-programmatic js-states form-control" id="txtSetor" name="txtSetor" multiple="multiple">
                                  </select>
                                  <div class="input-group-append">
                                    <button class="btn bg-danger" id="btnSetor" name="btnSetor" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                    <button class="btn bg-danger" id="btnLimpaSetor" name="btnLimpaSetor" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                  </div>
                                </div>
                              </div>
                              <div class="col-lg-4 col-12 form-group">
                                <label data-error="wrong" class="labelGeral" data-success="right" for="txtDeposito">* Depósito:</label>
                                <div class="input-group">
                                  <input type="text" class="input-default focus form-control validate" 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" name="btnLimpaDeposito" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                  </div>
                                </div>
                              </div>
                              <div class="col-lg-4 col-12 form-group">
                                <label data-error="wrong" class="labelGeral" data-success="right" for="txtCliente">Cliente:</label>
                                <div class="input-group">
                                  <input type="text" class="input-default focus form-control" aria-describedby="produtoError" id="txtCliente" name="txtCliente" placeholder="Cliente">
                                  <div class="input-group-append">
                                    <button class="btn bg-danger" id="btnCliente" name="btnCliente" data-button="absolute" type="button" title="A consulta retornará somente clientes do tipo terceiro."><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-4 col-12 form-group">
                                <label data-error="wrong" class="labelGeral" data-success="right" for="txtTipoBaixa">Tipo Baixa:</label>
                                <div class="input-group">
                                  <input type="text" class="input-default focus form-control" aria-describedby="produtoError" id="txtTipoBaixa" name="txtTipoBaixa" placeholder="Tipo Baixa">
                                  <div class="input-group-append">
                                    <button class="btn bg-danger" id="btnTipoBaixa" name="btnTipoBaixa" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                    <button class="btn bg-danger" id="btnLimpaTipoBaixa" name="btnLimpaTipoBaixa" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                  </div>
                                </div>
                              </div>
                              <div class="col-lg-4 col-12 form-group">
                                <label data-error="wrong" class="labelGeral" data-success="right" for="txtQualidade">Qualidade:</label>
                                <div class="input-group">
                                  <input type="text" class="input-default focus form-control" aria-describedby="produtoError" 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" name="btnLimpaQualidade" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                  </div>
                                </div>
                              </div>
                              <div class="col-lg-1 col-12 form-group">
                                <label data-error="wrong" class="labelGeral" data-success="right" for="txtMovimento">Movimento:</label>
                                <input type="text" class="input-default focus form-control" aria-describedby="produtoError" id="txtMovimento" name="txtMovimento" placeholder="0">
                              </div>
                              <div class="col-lg-1 col-12 form-group">
                                <label data-error="wrong" data-success="right" for="txtPrecoSped">Preço SPED:</label>
                                <input type="text" class="input-default focus form-control" id="txtPrecoSped" aria-describedby="codError" name="txtPrecoSped" class="form-control" placeholder="0,00">
                              </div>
                            </div>
                            <div class="row">
                              <div class="row col-12" id="divTabelaConsumos" style="margin: 0px!important; padding: 0px!important;">
                                <h5 class="col-12 mt-2">Consumos</h5>
                                <div class="col-lg-12 table-responsive card-body" style="max-height: 300px">
                                  <table id="tabelaConsumos" class="table table-sm table-select table-hover" width="100%">
                                    <thead>
                                    </thead>
                                    <tbody>
                                    </tbody>
                                  </table>
                                </div>
                              </div>
                              <div class="col-lg-4 col-12 form-group">
                                <label data-error="wrong" class="labelGeral" data-success="right" for="txtBarra">Barra:</label>
                                <div class="input-group">
                                  <input type="text" class="input-default focus form-control" aria-describedby="produtoError" id="txtBarra" name="txtBarra" placeholder="Barra">
                                </div>
                              </div>
                              <div class="col-lg-4 col-12 form-group d-flex align-items-end pl-0">
                                <button class="btn bg-gradient-success btn-sisp ml-2" id="btnConfirmarBarra">Confirmar</button>
                              </div>

                              <nav class="col-lg-12">
                                <div class="nav nav-tabs d-flex flex-nowrap" id="nav-tab" role="tablist" style="text-decoration: none; max-width: none!important; white-space: nowrap!important; overflow-x: auto!important; overflow-y: hidden">
                                  <a class="nav-link abaLink active" id="tabLotes" data-toggle="tab" href="#divLotes" role="tab" aria-controls="divLotes" aria-selected="true">Estoque/Reserva</a>
                                  <a class="nav-link abaLink" id="tabBaixas" data-toggle="tab" href="#divBaixas" role="tab" aria-controls="divBaixas" aria-selected="false">Baixas</a>
                                </div>
                              </nav>
                              <div class="tab-content col-lg-12 px-0" id="nav-tabContent">
                                <div id="divLotes" class="tab-pane fade show active" role="tabpanel" aria-labelledby="tabLotes">
                                  <div class="row col-12" id="divEstReserva" style="margin: 0px!important; padding: 0px!important;">
                                    <div class="col-lg-12 table-responsive card-body" style="max-height: 220px">
                                      <table id="tabelaEstReserva" class="table table-sm table-select table-hover" width="100%">
                                        <thead>
                                        </thead>
                                        <tbody>
                                        </tbody>
                                      </table>
                                    </div>
                                  </div>
                                  <div class="d-flex col-12 px-0">
                                    <button class="btn btn-danger btn-sisp d-none" id="btnGravar">Gravar</button>
                                    <button class="btn btn-secondary btn-sisp ml-2 d-none" id="btnControleItens">Controle de Itens</button>
                                    <button class="btn btn-primary btn-sisp ml-2 d-none" id="btnFinalizar">Finalizar</button>
                                    <button class="btn btn-primary btn-sisp ml-2 mr-auto d-none" id="btnReabrir">Reabrir</button>
                                  </div>
                                </div>
                                <div id="divBaixas" class="tab-pane fade" role="tabpanel" aria-labelledby="tabBaixas">
                                  <div class="row col-12" id="divBaixas" style="margin: 0px!important; padding: 0px!important;">
                                    <div class="col-lg-12 table-responsive card-body" style="max-height: 220px">
                                      <table id="tabelaBaixas" class="table table-sm table-select table-hover" width="100%">
                                        <thead>
                                        </thead>
                                        <tbody>
                                        </tbody>
                                      </table>
                                    </div>
                                  </div>
                                  <div class="d-flex col-12 px-0 mt-2">
                                    <button class="btn btn-danger btn-sisp ml-2 d-none" id="btnEstornar">Estornar</button>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </fieldset>
                      </form>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </section>
      </div>
    </div>
    <aside class="control-sidebar control-sidebar-dark">
    </aside>
    <?php include_once('../../modais.php'); ?>
  </main>

  <script src="plugins/jquery/jquery.min.js?versao=3.255.7.1"></script>
  <script src="plugins/jquery-ui/jquery-ui.min.js?versao=3.255.7.1"></script>
  <script type="text/javascript" src="dist/js/jquery.dataTables.js?versao=3.255.7.1"></script>
  <script type="text/javascript" src="dist/js/dataTables.bootstrap4.min.js?versao=3.255.7.1"></script>
  <script src="plugins/sweetalert2/sweetalert2.min.js?versao=3.255.7.1"></script>
  <script src="plugins/toastr/toastr.min.js?versao=3.255.7.1"></script>
  <script>
    $.widget.bridge('uibutton', $.ui.button);
  </script>
  <script src="plugins/bootstrap/js/bootstrap.bundle.min.js?versao=3.255.7.1"></script>
  <script src="dist/js/adminlte.min.js?versao=3.255.7.1"></script>
  <script src="dist/js/requisicoes.js?versao=3.255.7.1"></script>
  <script src="dist/js/cliente/entidade.js?versao=3.255.7.1"></script>
  <script src="dist/js/loadingoverlay.min.js?versao=3.255.7.1"></script>
  <script src="dist/js/valida_cpf_cnpj.js?versao=3.255.7.1"></script>
  <script src="plugins/jquery-validation/jquery.validate.min.js?versao=3.255.7.1"></script>
  <script src="dist/js/sisplan.js?versao=3.255.7.1"></script>
  <script src="utils/funcoes.js?versao=3.255.7.1"></script>
  <script src="utils/cookies.js?versao=3.255.7.1"></script>
  <script src="dist/js/jquery.maskMoney.min.js?versao=3.255.7.1"></script>
  <script src="dist/js/driver.min.js?versao=3.255.7.1"></script>
  <script src="dist/js/dataTables.keyTable2.js?versao=3.255.7.1"></script>
  <script type="text/javascript" src="config.js?versao=3.255.7.1"></script>
  <script src="plugins/select2/js/select2.full.min.js?versao=3.255.7.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('BAIXA_CONSUMOS');
      if (!temAcesso.resultado) {
        toastrAcesso(temAcesso, BASE_URI);
        return;
      }

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

      await insereJavaScriptPagina(sArquivo);

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

</body>

</html>