<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>Sisplan Web | Relatório de Venda</title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="plugins/fontawesome-free/css/all.min.css?versao=3.263.17.1">

  <link rel="stylesheet" href="dist/css/adminlte.min.css?versao=3.263.17.1">
  <link rel="stylesheet" href="dist/css/custom.css?versao=3.263.17.1">
  <link rel="stylesheet" href="dist/css/sisplan.css?versao=3.263.17.1">
  <link rel="stylesheet" href="dist/css/PesquisaVariosSelect2.css?versao=3.263.17.1">
  <link rel="stylesheet" type="text/css" href="plugins/datatables-keytable/css/keyTable.bootstrap4.min.css?versao=3.263.17.1">
  <link rel="stylesheet" href="plugins/toastr/toastr.min.css?versao=3.263.17.1">
  <link rel="stylesheet" href="plugins/fontawesome-free/css/all.min.css?versao=3.263.17.1">
  <link rel="shortcut icon" href="favicon.ico">
  <link rel="stylesheet" type="text/css" href="dist/css/driver.min.css?versao=3.263.17.1" />
  <link rel="stylesheet" href="dist/css/jquery-ui.css?versao=3.263.17.1">
  <link rel="stylesheet" type="text/css" href="dist/css/driver.min.css?versao=3.263.17.1" />
  <link rel="stylesheet" href="plugins/icheck-bootstrap/icheck-bootstrap.min.css?versao=3.263.17.1">
  <link rel="stylesheet" href="dist/css/jquery-ui.css?versao=3.263.17.1">
  <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
  <link rel="stylesheet" href="plugins/select2/css/select2.min.css?versao=3.263.17.1">
  <link rel="stylesheet" href="plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css?versao=3.263.17.1">
  <link rel="stylesheet" href="plugins/datatables-colreorder/css/colReorder.bootstrap4.min.css?versao=3.263.17.1">

  <style>
    .radioStyle {
      border: solid #e0e4e6;
      border-radius: 4px;
      border-width: 2px;
      padding: 7px;
      margin-top: 5px;
      width: 317px;
      margin-left: 8px;
    }

    .checkStyle {
      border: solid #e0e4e6;
      border-radius: 4px;
      border-width: 2px;
      padding: 7px;
      margin-top: 31px;
      width: 320px;
      margin-left: 6px;
      padding-left: 11px !important;
    }

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

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

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

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

    <div class="content-wrapper">
      <div class="content-header">
        <div class="container-fluid">
          <div class="row mb-2">
            <div class="col-sm-6 flex">
              <h1 class="m-0 text-dark">Relatório de Venda</h1>
              <button type="button" class="btn btn-info btn-sm ml-2" title="Tutorial" style="color: white;" id="tutorial">
                <i class="fas fa-question-circle"></i></button>
            </div>
            <div class="col-sm-6">

            </div>
          </div>
          <div class="row">
            <div class="col-12">
              <fieldset>
                <div class="row">
                  <div class="col-12">
                    <div class="buttons">
                      <button class="btn btn-success btn-sisp" id="btnFiltros" type="button"><span class="fas fa-filter"></span> Filtros</button>
                      <button id="btnImprimir" class="btn-sisp btn btn-danger"><i class="fas fa-print"></i> Imprimir</button>
                    </div>
                  </div>
                </div>
                <div class="card-body" id="divTabelaVendas">
                  <div class="card">
                    <div class="row">
                      <div class="col-sm-6 d-flex justify-content-center align-items-center" style="height: 100%;">
                        <div id="graficoRelVenda" style="width: 100%;"></div>
                      </div>
                      <div class="col-sm-6 d-flex justify-content-center align-items-center" style="height: 100%;">
                        <div id="graficoRelVenda1" style="width: 100%;"></div>
                      </div>
                    </div>
                    <div class="col-sm-12 table-responsive card-body">
                      <table id="tabelaRelVenda" class="table table-sm table-select table-hover" width="100%"></table>
                      <thead>
                        <tr></tr>
                      </thead>
                      <tbody>
                        <tr></tr>
                      </tbody>
                    </div>
                  </div>
                </div>
              </fieldset>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div id="modal-filtros" class="modal" tabindex="-1" role="dialog">
      <div class="modal-dialog modal-xl" role="document">
        <div class="modal-content" id="modalBody">
          <div class="modal-header">
            <h4 class="modal-title">Filtros

            </h4>
            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
              <span aria-hidden="true">&times;</span>
            </button>
          </div>
          <div class="modal-body pb-0">
            <div class="card">
              <div class="row">
                <div class="col-lg-12 col-12 row">

                  <div class="col-12 row d-flex">
                    <div class="col-md-6 col-6 form" id="tipos">
                      <fieldset class="form border-Field mb-0 pb-0">
                        <legend class="textoBorda mb-0 pb-0">Status</legend>
                        <div class="form-row ml-2">
                          <div class="form-group form-check icheck-primary">
                            <input type="checkbox" class="form-check-input" id="cbEmitido">
                            <label class="form-check-label pr-2" for="cbEmitido">Emitido</label>
                          </div>
                          <div class="form-group form-check icheck-primary">
                            <input type="checkbox" class="form-check-input" id="cbPendente">
                            <label class="form-check-label pr-2" for="cbPendente">Pendente</label>
                          </div>
                          <div class="form-group form-check icheck-primary">
                            <input type="checkbox" class="form-check-input" id="cbAgrupada">
                            <label class="form-check-label pr-2" for="cbAgrupada">Agrupada</label>
                          </div>
                          <div class="form-group form-check icheck-primary">
                            <input type="checkbox" class="form-check-input" id="cbDevolvido">
                            <label class="form-check-label pr-2" for="cbDevolvido">Devolvido</label>
                          </div>
                          <div class="form-group form-check icheck-primary">
                            <input type="checkbox" class="form-check-input" id="cbCancelada">
                            <label class="form-check-label pr-2" for="cbCancelada">Canceladas</label>
                          </div>
                        </div>
                      </fieldset>
                    </div>

                    <div class="col-md-auto col-12 form" id="tipos">
                      <fieldset class="form border-Field p-0" style="margin-bottom: 0.7em !important;">
                        <legend class="textoBorda pb-0 mb-0">Tipo</legend>
                        <div class="form-row">
                          <div class="d-flex">
                            <div class="radio-group form-radio icheck-primary"><input type="radio" checked="" id="radioProduto" name="tipoFat"><label for="radioProduto" class="container escondeRadio">Produto</label></div>
                            <div class="radio-group form-radio icheck-primary"><input type="radio" id="radioMaterial" name="tipoFat"><label for="radioMaterial" class="container escondeRadio">Material</label></div>
                          </div>
                        </div>
                      </fieldset>
                    </div>

                    <div class="col-md-3 col-sm-2 col-6 form-group form-check icheck-primary  d-flex align-items-center">
                      <input type="checkbox" class="form-check-input" id="cbConsiderarQtdeConferidas">
                      <label class="form-check-label pr-2" for="cbConsiderarQtdeConferidas" title="Considerar somente vendas/itens que foram conferidos">Considerar Vendas/Itens Conferidos</label>
                    </div>
                  </div>

                  <div class="col-md-2 col-sm-2 col-6 form-group">
                    <div class="">
                      <label for="dtEmissaoDe">Data Emissão:</label>
                      <div class="relative">
                        <input type="date" max="2500-12-31" value="1200-01-01" max="2500-12-31" class="input-default focus form-control validate" id="dtEmissaoDe" name="dtEmissaoDe">
                      </div>
                    </div>
                  </div>
                  <div class="col-md-2 col-sm-2 col-6 form-group">
                    <div class="">
                      <label for="dtEmissaoAte">Até:</label>
                      <div class="relative">
                        <input type="date" max="2500-12-31" value="2500-12-01" max="2500-12-31" class="input-default focus form-control validate" id="dtEmissaoAte" name="dtEmissaoAte">
                      </div>
                    </div>
                  </div>

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

                  <div class="col-md-4 col-sm-4 col-12 form-group">
                    <div class="">
                      <div style="margin-top: 12px;">
                        <button class="btn btn-danger btn-sisp" type='button' id="btnSelecionarEmpresas">Selecionar Empresas</button>   
                      </div>
                    </div>
                  </div>

                  <div class="col-md-4 col-sm-4 col-12 form-group" id="statusContainer">
                    <label data-error="wrong" data-success="right" for="txtStatus">Status: </label>
                    <div class="relative">
                      <div class="input-group">
                        <!-- <input type="text" class="input-default focus form-control" id="txtStatus" name="txtStatus" class="form-control" 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" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-md-4 col-sm-4 col-12 form-group">
                    <label data-error="wrong" data-success="right" for="txtPedido">Pedido: </label>
                    <div class="relative">
                      <div class="input-group">
                        <!-- <input type="text" class="input-default focus form-control" id="txtPedido" name="txtPedido" class="form-control" placeholder="Venda"> -->
                        <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" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-md-4 col-sm-4 col-12 form-group">
                    <label data-error="wrong" data-success="right" for="txtMoeda">Moeda: </label>
                    <div class="relative">
                      <div class="input-group">
                        <!-- <input type="text" class="input-default focus form-control" id="txtMoeda" name="txtMoeda" class="form-control" placeholder="Moeda"> -->
                        <select class="js-example-programmatic js-states form-control" id="txtMoeda" name="txtMoeda" multiple="multiple">
                        </select>
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnMoeda" name="btnMoeda" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaMoeda" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-md-4 col-sm-4 col-12 form-group">
                    <label data-error="wrong" data-success="right" for="txtTipoVenda">Tipo de venda: </label>
                    <div class="relative">
                      <div class="input-group">
                        <!-- <input type="text" class="input-default focus form-control" id="txtTipoVenda" name="txtTipoVenda" class="form-control" placeholder="Tipo de venda"> -->
                        <select class="js-example-programmatic js-states form-control" id="txtTipoVenda" name="txtTipoVenda" multiple="multiple">
                        </select>
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="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" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                  </div>

                  <div class="col-md-4 col-sm-4 col-12 form-group">
                    <label data-error="wrong" data-success="right" for="txtCliente">Cliente: </label>
                    <div class="relative">
                      <div class="input-group">
                        <!-- <input type="text" class="input-default focus form-control" id="txtCliente" name="txtCliente" class="form-control" placeholder="Cliente"> -->
                        <select class="js-example-programmatic js-states form-control" id="txtCliente" name="txtCliente" multiple="multiple">
                        </select>
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="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" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-md-4 col-sm-4 col-12 form-group">
                    <label data-error="wrong" data-success="right" for="txtVendedor">Vendedor: </label>
                    <div class="relative">
                      <div class="input-group">
                        <!-- <input type="text" class="input-default focus form-control" id="txtVendedor" name="txtVendedor" class="form-control" placeholder="Vendedor"> -->
                        <select class="js-example-programmatic js-states form-control" id="txtVendedor" name="txtVendedor" multiple="multiple">
                        </select>
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnVendedor" name="btnVendedor" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaVendedor" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-md-4 col-sm-4 col-12 form-group">
                    <label data-error="wrong" data-success="right" for="txtUsuario">Usuário: </label>
                    <div class="relative">
                      <div class="input-group">
                        <!-- <input type="text" class="input-default focus form-control" id="txtUsuario" name="txtUsuario" class="form-control" placeholder="Usuário"> -->
                        <select class="js-example-programmatic js-states form-control" id="txtUsuario" name="txtUsuario" multiple="multiple">
                        </select>
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnUsuario" name="btnUsuario" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaUsuario" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-md-4 col-sm-4 col-12 form-group">
                    <label data-error="wrong" data-success="right" for="txtFuncionario">Funcionário: </label>
                    <div class="relative">
                      <div class="input-group">
                        <!-- <input type="text" class="input-default focus form-control" id="txtFuncionario" name="txtFuncionario" class="form-control" placeholder="Usuário"> -->
                        <select class="js-example-programmatic js-states form-control" id="txtFuncionario" name="txtFuncionario" multiple="multiple">
                        </select>
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnFuncionario" name="btnFuncionario" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaFuncionario" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                  </div>

                  <div class="col-md-4 col-sm-4 col-12 divProduto form-group">
                    <label id="lblProduto" data-error="wrong" data-success="right" for="txtProduto">Produto: </label>
                    <div class="relative">
                      <div class="input-group">
                        <!-- <input type="text" class="input-default focus form-control" id="txtProduto" name="txtProduto" class="form-control" placeholder="Produto"> -->
                        <select class="js-example-programmatic js-states form-control" id="txtProduto" name="txtProduto" multiple="multiple">
                        </select>
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnProduto" name="btnProduto" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaProduto" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-md-4 col-sm-4 col-12 form-group">
                    <label data-error="wrong" data-success="right" for="txtCor">Cor: </label>
                    <div class="relative">
                      <div class="input-group">
                        <!-- <input type="text" class="input-default focus form-control" id="txtCor" name="txtCor" class="form-control" placeholder="Cor de preço"> -->
                        <select class="js-example-programmatic js-states form-control" id="txtCor" name="txtCor" multiple="multiple">
                        </select>
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnCor" name="btnCor" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaCor" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-md-4 col-sm-4 col-12 form-group">
                    <label data-error="wrong" data-success="right" for="txtColecao">Coleção: </label>
                    <div class="relative">
                      <div class="input-group">
                        <!-- <input type="text" class="input-default focus form-control" id="txtColecao" name="txtColecao" class="form-control" placeholder="Colecao de preç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" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                  </div>


                  <div class="col-md-4 col-sm-4 col-12 form-group">
                    <label data-error="wrong" data-success="right" id="lblGrupoPA" for="txtGrupoPA">Grupo: </label>
                    <div class="relative">
                      <div class="input-group">
                        <!-- <input type="text" class="input-default focus form-control" id="txtGrupoPA" name="txtGrupoPA" class="form-control" placeholder="GrupoPA Produto"> -->
                        <select class="js-example-programmatic js-states form-control" id="txtGrupoPA" name="txtGrupoPA" multiple="multiple">
                        </select>
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnGrupoPA" name="btnGrupoPA" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaGrupoPA" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-md-4 col-sm-4 col-12 form-group" id="divEtiqueta">
                    <label id="lblProduto" data-error="wrong" data-success="right" for="txtEtiqueta">Etiqueta: </label>
                    <div class="relative">
                      <div class="input-group">
                        <!-- <input type="text" class="input-default focus form-control" id="txtEtiqueta" name="txtEtiqueta" class="form-control" placeholder="Etiqueta"> -->
                        <select class="js-example-programmatic js-states form-control" id="txtEtiqueta" name="txtEtiqueta" multiple="multiple">
                        </select>
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnEtiqueta" name="btnEtiqueta" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaEtiqueta" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-md-4 col-sm-4 col-12 form-group" id="divLinha">
                    <label id="lblProduto" data-error="wrong" data-success="right" for="txtLinha">Linha: </label>
                    <div class="relative">
                      <div class="input-group">
                        <!-- <input type="text" class="input-default focus form-control" id="txtLinha" name="txtLinha" class="form-control" placeholder="Linha"> -->
                        <select class="js-example-programmatic js-states form-control" id="txtLinha" name="txtLinha" multiple="multiple">
                        </select>
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnLinha" name="btnLinha" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaLinha" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                  </div>

                  <div id="divMarca" class="col-md-4 col-sm-4 col-12 form-group">
                    <label data-error="wrong" data-success="right" for="txtMarca">Marca: </label>
                    <div class="relative">
                      <div class="input-group">
                        <!-- <input type="text" class="input-default focus form-control" id="txtMarca" name="txtMarca" class="form-control" placeholder="Marca"> -->
                        <select class="js-example-programmatic js-states form-control" id="txtMarca" name="txtMarca" multiple="multiple">
                        </select>
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnMarca" name="btnMarca" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaMarca" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div id="divModelo" class="col-md-4 col-sm-4 col-12 form-group">
                    <label data-error="wrong" data-success="right" for="txtModelo">Modelo: </label>
                    <div class="relative">
                      <div class="input-group">
                        <!-- <input type="text" class="input-default focus form-control" id="txtModelo" name="txtModelo" class="form-control" placeholder="Modelo"> -->
                        <select class="js-example-programmatic js-states form-control" id="txtModelo" name="txtModelo" multiple="multiple">
                        </select>
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnModelo" name="btnModelo" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaModelo" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-md-4 col-sm-4 col-12 form-group">
                    <label data-error="wrong" data-success="right" for="txtTabPreco">Tabela de Preço: </label>
                    <div class="relative">
                      <div class="input-group">
                        <!-- <input type="text" class="input-default focus form-control" id="txtTabPreco" name="txtTabPreco" class="form-control" placeholder="Tabela de Preço"> -->
                        <select class="js-example-programmatic js-states form-control" id="txtTabPreco" name="txtTabPreco" multiple="multiple">
                        </select>
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnTabPreco" name="btnTabPreco" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaTabPreco" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-md-4 col-sm-4 col-12 form-group">
                    <label data-error="wrong" data-success="right" for="txtRegEstado">Região: </label>
                    <div class="relative">
                      <div class="input-group">
                        <select class="js-example-programmatic js-states form-control" id="txtRegEstado" name="txtRegEstado" multiple="multiple">
                        </select>
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnRegEstado" name="btnRegEstado" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaRegEstado" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-md-4 col-sm-4 col-12 form-group">
                    <label data-error="wrong" data-success="right" for="txtGuia">Guia: </label>
                    <div class="relative">
                      <div class="input-group">
                        <select class="js-example-programmatic js-states form-control" id="txtGuia" name="txtGuia" multiple="multiple">
                        </select>
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnGuia" name="btnGuia" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaGuia" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-md-4 col-sm-4 col-12 form-group">
                    <label data-error="wrong" data-success="right" for="txtTransportadora">Transportadora: </label>
                    <div class="relative">
                      <div class="input-group">
                        <!-- <input type="text" class="input-default focus form-control" id="txtTransportadora" name="txtTransportadora" class="form-control" placeholder="Venda"> -->
                        <select class="js-example-programmatic js-states form-control" id="txtTransportadora" name="txtTransportadora" multiple="multiple">
                        </select>
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnTransportadora" name="btnTransportadora" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaTransportadora" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-md-4 col-sm-4 col-12 form-group">
                    <label data-error="wrong" data-success="right" for="txtTipoPessoa">Tipo Pessoa: </label>
                    <div class="relative">
                      <div class="input-group">
                        <select class="js-example-programmatic js-states form-control" id="txtTipoPessoa" name="txtTipoPessoa" multiple="multiple">
                        </select>
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnTipoPessoa" name="btnTipoPessoa" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaTipoPessoa" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div id="divTamanho" class="col-md-4 col-sm-4 col-12 form-group">
                    <label data-error="wrong" data-success="right" for="txtTamanho">Tamanho: </label>
                    <div class="relative">
                      <div class="input-group">
                        <select class="js-example-programmatic js-states form-control" id="txtTamanho" name="txtTamanho" multiple="multiple">
                        </select>
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnTamanho" name="btnTamanho" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaTamanho" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div id="divCategoria" class="col-md-4 col-sm-4 col-12 form-group">
                    <label data-error="wrong" data-success="right" for="txtAuxiliar">Categoria: </label>
                    <div class="relative">
                      <div class="input-group">
                        <select class="js-example-programmatic js-states form-control" id="txtAuxiliar" name="txtAuxiliar" multiple="multiple">
                        </select>
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnAuxiliar" name="btnAuxiliar" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaAuxiliar" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div id="divTipoProduto" class="col-md-4 col-sm-4 col-12 form-group">
                    <label data-error="wrong" data-success="right" for="txtTipoProduto">Tipo Produto: </label>
                    <div class="relative">
                      <div class="input-group">
                        <select class="js-example-programmatic js-states form-control" id="txtTipoProduto" name="txtTipoProduto" multiple="multiple">
                        </select>
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnTipoProduto" name="btnTipoProduto" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaTipoProduto" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-md-4 col-sm-4 col-12 form-group">
                    <label data-error="wrong" data-success="right" for="txtCaixa">Caixa: </label>
                    <div class="relative">
                      <div class="input-group">
                        <select class="js-example-programmatic js-states form-control" id="txtCaixa" name="txtCaixa" multiple="multiple">
                        </select>
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnCaixa" name="btnCaixa" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaCaixa" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-md-4 col-sm-4 col-12 form-group">
                    <label data-error="wrong" data-success="right" for="txtQualidade">Qualidade: </label>
                    <div class="relative">
                      <div class="input-group">
                        <select class="js-example-programmatic js-states form-control" id="txtQualidade" name="txtQualidade" multiple="multiple">
                        </select>
                        <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 id="divLote" class="col-md-4 col-sm-4 col-12 form-group d-none">
                    <label data-error="wrong" data-success="right" for="txtLote">Lote: </label>
                    <div class="relative">
                      <div class="input-group">
                        <select class="js-example-programmatic js-states form-control" id="txtLote" name="txtLote" multiple="multiple">
                        </select>
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnLote" name="btnLote" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaLote" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-md-4 col-sm-4 col-12 form-group">
                    <label data-error="wrong" data-success="right" for="txtMotivo">Motivo (Devolução): </label>
                    <div class="relative">
                      <div class="input-group">
                        <select class="js-example-programmatic js-states form-control" id="txtMotivo" name="txtMotivo" multiple="multiple">
                        </select>
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnMotivo" name="btnMotivo" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaMotivo" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
                <div class="col-lg-12 col-12 d-none">
                  <label class="textoBorda mt-2">Opções:</label>
                  <label for="checkCanceladasA" style="margin-top: 0px; margin-left: 0px;" class="container escondeRadio checkStyle">
                    <div class="form-check">
                      <input class="form-check-input" type="checkbox" id="cbAgrupaItens">
                      Agrupa Itens
                      <span class="checkmark"></span>
                    </div>
                  </label>
                </div>
              </div>
            </div>
          </div>
          <div class="modal-footer justify-content-start pl-0">
            <div class="row col-12 ml-0">
              <div class="col-md-4 col-sm-4 col-12">
                <label for="txtOrdem">Opção de Relatório:</label>
                <div class="relative d-flex align-items-center">
                  <select id="txtOrdem" class="input-default focus custom-select">
                  </select>
                  <button class="btn btn-sm btn-success ml-2 btnEdicaoRelatorio" title="Edição de ordenações">
                    <i class="fas fa-check"></i>
                  </button>
                </div>
              </div>
              <div class="col-md-8 col-sm-8 col-12 d-flex justify-content-end align-items-end pr-0">
                <div class="d-flex">
                  <button class="btn btn-primary btn-sisp mr-2" id="btnLimparFiltros" style="background-color: #B22222; border-color: #B22222">
                    <span class="fas fa-trash"></span> Limpar Filtros
                  </button>
                  <button id="btnConsultar" class="btn btn-primary btn-sisp" type="button">
                    <span class="fas fa-search"></span> Consultar
                  </button>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>

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

  <script src="plugins/jquery/jquery.min.js?versao=3.263.17.1"></script>
  <script src="dist/js/jquery.maskMoney.min.js?versao=3.263.17.1"></script>
  <script src="plugins/jquery-ui/jquery-ui.min.js?versao=3.263.17.1"></script>
  <script type="text/javascript" src="dist/js/jquery.dataTables.js?versao=3.263.17.1"></script>
  <script type="text/javascript" src="dist/js/dataTables.bootstrap4.min.js?versao=3.263.17.1"></script>
  <script src="plugins/sweetalert2/sweetalert2.min.js?versao=3.263.17.1"></script>
  <script src="plugins/toastr/toastr.min.js?versao=3.263.17.1"></script>
  <script>
    $.widget.bridge('uibutton', $.ui.button);
  </script>
  <script src="plugins/bootstrap/js/bootstrap.bundle.min.js?versao=3.263.17.1"></script>
  <script src="dist/js/adminlte.min.js?versao=3.263.17.1"></script>
  <script src="dist/js/requisicoes.js?versao=3.263.17.1"></script>
  <script src="dist/js/loadingoverlay.min.js?versao=3.263.17.1"></script>
  <script src="dist/js/valida_cpf_cnpj.js?versao=3.263.17.1"></script>
  <script src="plugins/jquery-validation/jquery.validate.min.js?versao=3.263.17.1"></script>
  <script src="dist/js/dataTables.keyTable.js?versao=3.263.17.1"></script>
  <script src="dist/js/sisplan.js?versao=3.263.17.1"></script>
  <script src="plugins/datatables-colreorder/js/dataTables.colReorder.min.js?versao=3.263.17.1"></script>
  <script src="utils/funcoes.js?versao=3.263.17.1"></script>
  <script src="utils/cookies.js?versao=3.263.17.1"></script>
  <script src="dist/js/driver.min.js?versao=3.263.17.1"></script>
  <script src="config.js?versao=3.263.17.1"></script>
  <script src="plugins/select2/js/select2.full.min.js?versao=3.263.17.1"></script>
  <script src="graficos/graficos.js?versao=3.263.17.1"></script>
  <script src="plugins/high-charts/highcharts.js"></script>
  <script src="plugins/high-charts/highcharts-3d.js"></script>
  <script src="plugins/high-charts/cylinder.js"></script>
  <script src="plugins/high-charts/exporting.js"></script>
  <script src="plugins/high-charts/export-data.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('RELVENDA');
      if (!temAcesso.resultado) {
        toastrAcesso(temAcesso, BASE_URI);
        return;
      }

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


      await insereJavaScriptPagina(sArquivo);

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

</body>

</html>