<div class="modal fade" id="modal-brinde" style="z-index: 1">
  <div class="modal-dialog modal-xl">
    <div class="modal-content">
      <div class="modal-header">
        <h4 class="modal-title" id="tituloOcorrencias">Brinde</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">
        <div class="card-body" style="padding-bottom: 0px !important">
          <nav>
            <div class="nav nav-tabs justify-content-start" id="nav-tab" role="tablist" style="text-decoration: none">
              <a class="nav-link abaLink active" id="tabAcessoBrinde" data-toggle="tab" href="#divAcessoBrinde" role="tab" aria-controls="divAcessoBrinde" aria-selected="false">Consulta Brinde</a>
              <a class="nav-link abaLink" id="tabBrinde" data-toggle="tab" href="#divBrinde" role="tab" aria-controls="divBrinde" aria-selected="true">Brinde</a>
            </div>
          </nav>
          <div class="tab-content" id="nav-tabContent">

            <div class="tab-pane fade show active card" id="divAcessoBrinde" role="tabpanel" aria-labelledby="tabAcessoBrinde">
              <div class="container-fluid mt-2">
                <div class="p-1" style="max-height: 38rem; overflow-y: auto; overflow-x: hidden;">
                  <div class="row">
                    <div class="form-group col-xl-3 col-lg-4 col-md-12 col-sm-12 col-12 px-1">
                      <label>Data de/até:</label>
                      <div class="input-group">
                        <input type="date" class="input-default focus form-control validate" id="txtAcessoDataDeBrinde" name="DataDe" max="2500-12-31">
                        <input type="date" class="input-default focus form-control validate" id="txtAcessoDataAteBrinde" name="DataAte" max="2500-12-31">
                      </div>
                    </div>

                    <div class="form-group col-xl-3 col-lg-4 col-md-12 col-sm-12 col-12 px-1">
                      <label for="txtAcessoVendaBrinde">Venda:</label>
                      <div class="input-group">
                        <input type="text" class="input-default focus form-control validate" required id="txtAcessoVendaBrinde" name="txtAcessoVendaBrinde" placeholder="Venda">
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnAcessoVendaBrinde" type="button"><i class="fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaAcessoVendaBrinde" type="button"><i class="fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>

                    <div class="form-group col-xl-3 col-lg-4 col-md-12 col-sm-12 col-12 px-1">
                      <label for="txtAcessoClienteBrinde">Cliente:</label>
                      <div class="input-group">
                        <input type="text" class="input-default focus form-control validate" required id="txtAcessoClienteBrinde" name="txtAcessoClienteBrinde" placeholder="Cliente">
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnAcessoClienteBrinde" type="button"><i class="fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaAcessoClienteBrinde" type="button"><i class="fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>

                    <div class="form-group col-xl-3 col-lg-4 col-md-12 col-sm-12 col-12 px-1">
                      <label for="txtAcessoVendendorBrinde">Vendedor:</label>
                      <div class="input-group">
                        <input type="text" class="input-default focus form-control validate" required id="txtAcessoVendendorBrinde" name="txtAcessoVendendorBrinde" placeholder="Vendedor">
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnAcessoVendendorBrinde" type="button"><i class="fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaAcessoVendendorBrinde" type="button"><i class="fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>

                    <div class="form-group col-xl-3 col-lg-4 col-md-12 col-sm-12 col-12 px-1">
                      <label for="txtAcessoCodigoBrinde">Brinde:</label>
                      <div class="input-group">
                        <input type="text" class="input-default focus form-control validate" required id="txtAcessoCodigoBrinde" name="txtAcessoCodigoBrinde" placeholder="Brinde">
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnAcessoCodigoBrinde" type="button"><i class="fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaAcessoCodigoBrinde" type="button"><i class="fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                    <div class="d-flex justify-content-end col-xl-9 col-lg-12 col-md-12 col-sm-12 col-12 pl-0 pr-1">
                      <div class="mt-3 pt-1">
                        <button type="button" class="btn btn-secondary btn-sisp mr-2" id="btnImprimirBrinde">Imprimir</button>
                        <button class="btn btn-primary btn-sisp" id="btnConsultarBrinde">Consultar</button>
                      </div>
                    </div>
                  </div>

                  <div class="row mt-2">
                    <div class="col-sm-12 table-responsive">
                      <button class="buttonExcel d-none" id="buttonExcel"><i class="fas fa-file-excel"></i></button>
                      <table id="tabelaAcessoBrinde" class="table table-sm table-select table-hover" width="100%">
                        <thead></thead>
                        <tbody></tbody>
                      </table>
                    </div>

                    <div class="col-sm-12">
                      <h5 id="titleInfoBrinde" class="mt-2 d-none">Informações Brinde</h5>
                      <div class="table-responsive">
                        <table id="tabelaAcessoBrindeInformacoesBrinde" class="table table-sm table-select table-hover" width="100%">
                          <thead></thead>
                          <tbody></tbody>
                        </table>
                      </div>
                    </div>
                  </div>
                </div>

                <div class="modal-footer justify-content-start px-0 pb-0 mt-3">
                  <div class="col-md-4 col-sm-4 col-12 pl-0">
                    <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 btnEdicaoRelatorio ml-1" style="height: 38px; width: 45px;" title="Edição de ordenações">
                        <i class="fas fa-check"></i>
                      </button>
                    </div>
                  </div>
                </div>

              </div>
            </div>

            <div class="tab-pane fade show active card" id="divBrinde" role="tabpanel" aria-labelledby="tabBrinde">
              <div class="container-fluid mt-2">
                <div class="row">
                  <div class="form-group col-lg-3 col-12">
                    <label data-error="wrong" data-success="right" for="txtVendaBrinde">Venda: </label>
                    <div class="input-group">
                      <input type="text" class="input-default focus form-control validate" required id="txtVendaBrinde" name="txtVendaBrinde" placeholder="Venda">
                      <div class="input-group-append">
                        <button class="btn bg-danger" id="btnVendaBrinde" name="btnVendaBrinde" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                        <button class="btn bg-danger" id="btnLimpaVendaBrinde" 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 data-error="wrong" data-success="right" for="txtClienteBrinde">Cliente: *</label>
                    <div class="input-group">
                      <input type="text" class="input-default focus form-control validate" required id="txtClienteBrinde" name="txtClienteBrinde" placeholder="Cliente">
                      <div class="input-group-append">
                        <button class="btn bg-danger" id="btnClienteBrinde" name="btnClienteBrinde" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                        <button class="btn bg-danger" id="btnLimpaClienteBrinde" 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 data-error="wrong" data-success="right" for="txtVendendorBrinde">Vendedor: *</label>
                    <div class="input-group">
                      <input type="text" class="input-default focus form-control validate" required id="txtVendendorBrinde" name="txtVendendorBrinde" placeholder="Vendedor">
                      <div class="input-group-append">
                        <button class="btn bg-danger" id="btnVendendorBrinde" name="btnVendendorBrinde" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                        <button class="btn bg-danger" id="btnLimpaVendendorBrinde" 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 data-error="wrong" data-success="right" for="txtDepositoBrinde">Depósito: *</label>
                    <div class="input-group">
                      <input type="text" class="input-default focus form-control validate" required id="txtDepositoBrinde" name="txtDepositoBrinde" placeholder="Depósito">
                      <div class="input-group-append">
                        <button class="btn bg-danger" id="btnDepositoBrinde" name="btnDepositoBrinde" data-button="absolute" type="button">
                          <i class="m-0 p-0 fas fa-search"></i>
                        </button>
                        <button class="btn bg-danger" id="btnLimpaDepositoBrinde" type="button">
                          <i class="m-0 p-0 fas fa-trash"></i>
                        </button>
                      </div>
                    </div>
                  </div>
                </div>

                <div class="row">
                  <div class="form-group col-lg-3 col-12">
                    <label data-error="wrong" data-success="right" for="txtTabPrecoBrinde">Tabela de preço: *</label>
                    <div class="input-group">
                      <input type="text" class="input-default focus form-control validate" required id="txtTabPrecoBrinde" name="txtTabPrecoBrinde" placeholder="Tabela de preço">
                      <div class="input-group-append">
                        <button class="btn bg-danger" id="btnTabPrecoBrinde" name="btnTabPrecoBrinde" data-button="absolute" type="button">
                          <i class="m-0 p-0 fas fa-search"></i>
                        </button>
                        <button class="btn bg-danger" id="btnLimpaTabPrecoBrinde" 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 data-error="wrong" data-success="right" for="txtQualidadeBrinde">Qualidade: </label>
                    <div class="input-group">
                      <input type="text" class="input-default focus form-control validate" required id="txtQualidadeBrinde" name="txtQualidadeBrinde" placeholder="Qualidade">
                      <div class="input-group-append">
                        <button class="btn bg-danger" id="btnQualidadeBrinde" name="btnQualidadeBrinde" data-button="absolute" type="button">
                          <i class="m-0 p-0 fas fa-search"></i>
                        </button>
                        <button class="btn bg-danger" id="btnLimpaQualidadeBrinde" type="button">
                          <i class="m-0 p-0 fas fa-trash"></i>
                        </button>
                      </div>
                    </div>
                  </div>
                  <div class="col-lg-6 col-12">
                    <div class="group-default form-group">
                      <label data-error="wrong" data-success="right" for="txtBarraBrinde">Barra: </label>
                      <div class="input-group">
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnMenosOuMaisBrinde" type="button" data-estorno="false">
                            <i class="m-0 p-0 fas fa-plus"></i>
                          </button>
                        </div>
                        <input type="text" placeholder="Barra" class="input-default form-control validate focus" id="txtBarraBrinde" name="txtBarraBrinde">
                        <div class="input-group-append">
                          <button type="button" class="btn-icon btn-icon-normal bg-danger" id="btn-codigo-brinde" name="btn-codigo-brinde">
                            <i style="color: white;font-size:20px;margin-left:-10px;padding:0px" class="fas fa-search"></i>
                          </button>
                        </div>
                      </div>
                    </div>
                  </div>
                  
                </div>

                  <div class="col-lg-12 col-12">
                    <label for="txtObservacaoBrinde">Observação: </label>
                    <div class="input-group">
                      <textarea id="txtObservacaoBrinde" style="resize: none;" class="autoExpand forumPost form-control" rows="2" placeholder="Observação"></textarea>
                    </div>
                  </div>

                </div>
                <div class="row mt-3">
                  <div class="col-sm-12 table-responsive">
                    <table id="tabelaItensBrinde" class="table table-sm table-select table-hover" width="100%">
                      <thead>
                      </thead>
                      <tbody>
                      </tbody>
                    </table>
                  </div>
                </div>
              </div>
              <div class="modal-footer justify-content-end">
                <button type="button" class="btn btn-secondary btn-sisp" id="btnCancelarBrinde">Cancelar</button>
                <button class="btn btn-primary btn-sisp" id="btnNFeBrinde">NF-e</button>
                <button type="button" class="btn bg-gradient-danger btn-sisp" id="btnGravarBrinde">Gravar</button>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>