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

<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>Sisplan Web | Faturamento</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.263.17.1">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="../plugins/fontawesome-free/css/all.min.css?versao=3.263.17.1">
  <!-- Google 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.263.17.1" />

  <link href='../dist/css/bootstrap.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" type="text/css" href="../plugins/datatables-keytable/css/keyTable.bootstrap4.min.css?versao=3.263.17.1">
  <link rel="stylesheet" type="text/css" href="../dist/css/responsive.bootstrap.min.css?versao=3.263.17.1">
  <link rel="shortcut icon" href="../favicon.ico">
  <!-- Toastr -->
  <link rel="stylesheet" href="../plugins/toastr/toastr.min.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="../dist/css/jquery-ui.css?versao=3.263.17.1">
  <link rel="stylesheet" href="../dist/css/cadastro.css?versao=3.263.17.1">
  <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="../dist/css/PesquisaVariosSelect2.css?versao=3.263.17.1">
  <!-- Google Font: Source Sans Pro -->
  <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">

  <style>
    #progressbar li {
      list-style-type: none;
      font-size: 12px;
      width: 25%;
      float: left;
      position: relative
    }

    .card-totais {
      margin-top: 2%;
    }

    #txtDados {
      padding-top: .7%;
      padding-left: .85%;
    }

    .input-group-append>a>i {
      margin-left: 0 !important;
      padding-left: 5px;
      padding-right: 5px;
    }

    .grupo_botao>button>i {
      margin-left: 0 !important;
      padding-left: 5px;
      padding-right: 5px;
    }

    .bg-light {
      background-color: #f8f9fa08 !important;
    }

    .focus:read-only:focus {
      border-color: #aa1212 !important;
    }

    .labelCheck {
      font-size: 110%;
      padding: 0.2%;
      margin-left: 1%;
    }

    .configCheck {
      -ms-transform: scale(1.5);
      -moz-transform: scale(1.5);
      -webkit-transform: scale(1.5);
      -o-transform: scale(1.5);
      transform: scale(1.5);
      padding: 10px;
    }

    .radiosStyle {
      font-size: 120%;
      margin-top: 1%;
      margin-bottom: 1%;
    }

    .checkboxMoeda {
      border: solid #e0e4e6;
      border-radius: 4px;
      border-width: 2px;
      padding: .8%;
    }

    .bordaTab {
      border: solid #e0e4e6;
      border-radius: 4px;
      border-width: 2px;
      margin-top: 9.6%;
    }

    .configTabPreco {
      -ms-transform: scale(1.5);
      -moz-transform: scale(1.5);
      -webkit-transform: scale(1.5);
      -o-transform: scale(1.5);
      transform: scale(1.5);
    }

    .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 1.0em 0 1.0em !important;
      margin: 0 0 0 0 !important;
      -webkit-box-shadow: 0px 0px 0px 0px #000;
      box-shadow: 0px 0px 0px 0px #000;
      border-radius: 3px !important;
    }

    .icheck-primary {
      margin-top: 0px !important;
    }

    #modalProduto-titulo {
      font-size: 1.2em !important;
      font-weight: 400 !important;
    }

    .classeQuantidade,
    .classePreco,
    .classeDesconto,
    .maskItens {
      text-align: right;
    }

    .totalizadorFinanceiro {
      background-color: transparent !important;
      box-shadow: none !important;
    }

    .radioStyle {
      border: solid #e0e4e6;
      border-radius: 4px;
      border-width: 2px;
      padding: 6px;
    }
  </style>

</head>

<body class="sidebar-mini layout-fixed">
  <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>

    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
      <section class="content">
        <div class="container-fluid" id="grad1">
          <div class="row justify-content-center mt-0">
            <div class="col-10 text-center p-0 mt-3 mb-2">
              <div class="card px-0 pt-4 pb-0 mt-3 mb-3">
                <div class="card-header text-center flex" style="border: none!important;box-shadow:none!important;">
                  <h2>Faturamento
                    <button title="Tutorial" type="button" class="btn btn-info btn-sm ml-2" style="color: white;" id="tutorial">
                      <i class="fas fa-question-circle"></i>
                    </button>
                  </h2>
                  <p id="txtVencimentoCertificadoDigital" style="color: red; margin-top: 12px; margin-left: 7px;"></p>
                </div>

                <div class="row">
                  <div class="col-md-12 mx-0">
                    <form id="msform">
                      <!-- progressbar -->
                      <ul id="progressbar">
                        <li class="active" id="account"><strong>Geral</strong></li>
                        <li id="payment"><strong>Itens</strong></li>
                        <li id="personal"><strong>Financeiro</strong></li>
                        <li id="confirm"><strong>Conclusão</strong></li>
                      </ul> <!-- fieldsets -->
                      <p>Preencha os dados e clique em avançar até a conclusão do faturamento</p>
                      <fieldset>
                        <div class="form-card" id="tourGeral">
                          <h2 class="fs-title d-md-flex d-block">
                            Dados Gerais
                            <input type="button" class="btn btn-sm btn-primary ml-4" id="btn-importar-venda" style="font-size: 50%;" value="Importação">
                            <input type="button" class="btn btn-sm btn-secondary ml-2" id="btn-referenciar-nota" style="font-size: 50%;" value="Referenciar">  
                            <div class="d-md-flex d-block">
                              <div class="icheck-primary mx-2 "><input type="checkbox" id="consumidorFinal"> <label for="consumidorFinal" style="font-size: 70%; margin-top: 6px">Consumidor Final</label></div>
                              <div class="icheck-primary ml-2"><input type="checkbox" id="gerarDifal"> <label for="gerarDifal" style="font-size: 70%; margin-top: 6px">Gerar Difal</label></div>
                            </div>
                          </h2>
                          <div class="row">
                            <div class="col-lg-8 col-8 form-group">
                              <label data-error="wrong" data-success="right" for="txtCliente">Cliente *</label>
                              <div class="input-group">
                                <input type="text" class="input-default focus form-control" id="txtCliente" name="txtCliente" class="form-control" placeholder="Cliente">
                                <input type="text" id="txtCNPJ" class="d-none">
                                <div class="input-group-append">
                                  <button class="btn bg-danger" id="btn-cliente" name="btn-cliente" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                  <button class="btn bg-danger" id="btn-limpa-cliente" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                </div>
                              </div>
                            </div>

                            <div class="col-lg-4  col-4 form-group">
                              <label data-error="wrong" data-success="right" for="txtEnderecoEntrega">Endereço entrega</label>
                              <div class="input-group">
                                <select style="width:100%;" class="form-control select2 select2-danger focus" data-dropdown-css-class="select2-danger" id="dropdown" class="custom-select focus">
                                  <!-- <select class="input-default focus custom-select" id="dropdown"> -->
                                  <option value="0" id="enderecoPadrao" title="Endereço Padrão" class="active">Padrão</option>
                                  <option value="1" id="enderecoEntrega" title="Endereço de Entrega">Entrega</option>
                                  <option value="2" id="enderecoCobranca" title="Endereço de Cobrança">Cobrança</option>
                                  <option value="3" id="enderecoEmpresa" title="Endereço de Empresa">Empresa</option>
                                  <option value="4" id="enderecoPedido" title="Endereço do Pedido">Pedido</option>
                                </select>
                              </div>
                            </div>

                            <div class="col-lg-12 col-12 form-group">
                              <label data-error="wrong" data-success="right" for="txtRepresentante">Representante</label>
                              <div class="input-group">
                                <input type="text" class="input-default focus form-control" id="txtRepresentante" name="txtRepresentante" class="form-control" placeholder="Representante">
                                <div class="input-group-append">
                                  <button class="btn bg-danger" id="btn-representante" name="btn-representante" data-button="absolute" type="button">
                                    <i class="m-0 p-0 fas fa-search"></i>
                                  </button>
                                  <button class="btn bg-danger" id="btn-limpa-representante" type="button">
                                    <i class="m-0 p-0 fas fa-trash"></i>
                                  </button>
                                </div>
                              </div>
                            </div>

                            <div class="col-lg-6  col-12 form-group">
                              <label data-error="wrong" data-success="right" for="txtNatureza">Natureza *</label>
                              <div class="input-group">
                                <input type="text" class="input-default focus form-control" id="txtNatureza" name="txtNatureza" class="form-control" placeholder="Natureza">
                                <div class="input-group-append">
                                  <button class="btn bg-danger" id="btn-natureza" name="btn-natureza" data-button="absolute" type="button">
                                    <i class="m-0 p-0 fas fa-search"></i>
                                  </button>
                                  <button class="btn bg-danger" id="btn-limpa-natureza" type="button">
                                    <i class="m-0 p-0 fas fa-trash"></i>
                                  </button>
                                </div>
                              </div>
                            </div>

                            <div class="col-lg-6  col-12 form-group">
                              <label data-error="wrong" data-success="right" for="txtReducao">Operação </label>
                              <div class="input-group">
                                <input type="text" class="input-default focus form-control" id="txtReducao" name="txtReducao" class="form-control" placeholder="Operação">
                                <div class="input-group-append">
                                  <button class="btn bg-danger" id="btnReducao" name="btnReducao" data-button="absolute" type="button">
                                    <i class="m-0 p-0 fas fa-search"></i>
                                  </button>
                                  <button class="btn bg-danger" id="btnAReducao" type="button">
                                    <i class="m-0 p-0 fas fa-trash"></i>
                                  </button>
                                </div>
                              </div>
                            </div>

                            <div class="col-lg-6  col-12 form-group">
                              <label data-error="wrong" data-success="right" for="txtDeposito">Depósito *</label>
                              <div class="input-group">
                                <input type="text" class="input-default focus form-control" id="txtDeposito" name="txtDeposito" class="form-control" 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="btnADeposito" type="button">
                                    <i class="m-0 p-0 fas fa-trash"></i>
                                  </button>
                                </div>
                              </div>
                            </div>

                            <div class="col-lg-3  col-12 form-group">
                              <label data-error="wrong" data-success="right" for="txtDataEmissao">Data emissão</label>
                              <div class="input-group">
                                <input type="date" max="2500-12-31" value="" class="input-default focus form-control" id="txtDataEmissao" name="txtDataEmissao" class="form-control" placeholder="Comissão 1">
                              </div>
                            </div>

                            <div class="col-lg-3  col-12 form-group">
                              <label data-error="wrong" data-success="right" for="txtDataSaida">Data saída</label>
                              <div class="input-group">
                                <input type="date" max="2500-12-31" value="" class="input-default focus form-control" id="txtDataSaida" name="txtDataSaida" class="form-control" placeholder="Comissão 1">
                              </div>
                            </div>

                            <div class="col-lg-3  col-12 form-group">
                              <label data-error="wrong" data-success="right" for="txtEspecie">Espécie</label>
                              <div class="input-group">
                                <input type="text" class="input-default focus form-control" id="txtEspecie" name="txtEspecie" class="form-control" placeholder="Espécie">
                              </div>
                            </div>

                            <div class="col-lg-3  col-12 form-group">
                              <label data-error="wrong" data-success="right" for="txtVolumes">Volumes</label>
                              <div class="input-group">
                                <input type="text" min="0" value="0" class="input-default focus form-control" id="txtVolumes" name="txtVolumes" class="form-control" placeholder="Volumes">
                              </div>
                            </div>

                            <div class="col-lg-3  col-12 form-group">
                              <label data-error="wrong" data-success="right" for="txtPesoBruto">Peso Bruto</label>
                              <div class="input-group">
                                <input type="text" mmin="0" value="0" class="input-default focus form-control" id="txtPesoBruto" name="txtPesoBruto" class="form-control" placeholder="Peso Bruto">
                              </div>
                            </div>

                            <div class="col-lg-3  col-12 form-group">
                              <label data-error="wrong" data-success="right" for="txtPesoLiq">Peso Líq.</label>
                              <div class="input-group">
                                <input type="text" min="0" value="0" class="input-default focus form-control" id="txtPesoLiq" name="txtPesoLiq" class="form-control" placeholder="Peso Líq.">
                              </div>
                            </div>

                            <!-- <div class="col-lg-3  col-12 form-group">
                                                            <label data-error="wrong" data-success="right" for="txtFrete">Frete</label>
                                                            <div class="input-group">
                                                                <input type="text" min="0" value="0" class="input-default focus form-control" id="txtFrete" name="txtFrete" class="form-control" placeholder="Frete">
                                                            </div>
                                                        </div> -->

                            <div class="col-lg-6 col-12 m-6 form-group">
                              <label data-error="wrong" data-success="right" for="txtTransportador">Frete por Conta</label>
                              <select style="width:100%;" class="form-control select2 select2-danger focus" data-dropdown-css-class="select2-danger" id="rgTransportador" class="custom-select focus">
                                <option value="">Selecione uma opção</option>
                                <option value="0">0 - Contratação do Frete por conta do Remetente (CIF)</option>
                                <option value="1">1 - Contratação do Frete por conta do Destinatário (FOB)</option>
                                <option value="2">2 - Contratação do Frete por conta de Terceiros</option>
                                <option value="3">3 - Transporte Próprio por conta do Remetente</option>
                                <option value="4">4 - Transporte Próprio por conta do Destinatário</option>
                                <option value="8">8 - Por Conta do Destinatário na NF</option>
                                <option selected value="9">9 - Sem Ocorrência de Transporte</option>
                              </select>
                            </div>

                            <div class="col-lg-6 col-12 m-6 form-group">
                              <label data-error="wrong" data-success="right" for="txtPresenca">Presença</label>
                              <select style="width:100%;" class="form-control select2 select2-danger focus" data-dropdown-css-class="select2-danger" id="rgPresenca" class="custom-select focus">
                                <option value="">Selecionar presença</option>
                                <option value="0">0 - Não se aplica (por exemplo, Nota Fiscal
                                  complementar ou de ajuste)</option>
                                <option value="1">1 - Operação presencial</option>
                                <option value="2">2 - Operação não presencial, pela Internet
                                </option>
                                <option value="3">3 - Operação não presencial, Teleatendimento
                                </option>
                                <option value="4">4 - NFC-e em operação com entrega a domicílio
                                </option>
                                <option value="5">5 - Operação presencial, fora do estabelecimento
                                </option>
                                <option value="9">9 - Operação não presencial, outros</option>
                              </select>
                            </div>

                            <div class="col-lg-12  col-12 form-group" id="divTransportadora">
                              <label data-error="wrong" data-success="right" for="txtTransportadora">Transportadora</label>
                              <div class="input-group">
                                <input type="text" class="input-default focus form-control" id="txtTransportadora" name="txtTransportadora" class="form-control" placeholder="Transportadora">
                                <div class="input-group-append">
                                  <button class="btn bg-danger" id="btn-transportadora" name="btn-transportadora" data-button="absolute" type="button">
                                    <i class="m-0 p-0 fas fa-search"></i>
                                  </button>
                                  <button class="btn bg-danger" id="btn-limpa-transportadora" type="button">
                                    <i class="m-0 p-0 fas fa-trash"></i>
                                  </button>
                                </div>
                              </div>
                            </div>
                            <div class="col-lg-6 col-6 form-group d-none" id="divTabPreco">
                              <label data-error="wrong" data-success="right" for="txtTabPreco">Tabela de preço</label>
                              <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">
                                <div class="input-group-append">
                                  <button class="btn bg-danger" id="btn-TabPreco" name="btn-TabPreco" data-button="absolute" type="button">
                                    <i class="m-0 p-0 fas fa-search"></i>
                                  </button>
                                  <button class="btn bg-danger" id="btn-limpa-TabPreco" type="button">
                                    <i class="m-0 p-0 fas fa-trash"></i>
                                  </button>
                                </div>
                              </div>
                            </div>
                            <div class="col-lg-12  col-12 form-group">
                              <label data-error="wrong" data-success="right" for="txtDados">Dados Adicionais <input type="button" class="btn btn-sm btn-primary ml-4" id="btnContaOrdem" style="font-size: 80%;" value="Conta e Ordem" onClick="$('#modalContaOrdem').modal('show')"></label>
                              <textarea style="resize: none" id="txtDados" placeholder="Dados adicionais" class="input-default focus form-control" rows="4"></textarea>
                            </div>
                          </div>
                        </div>
                        <input type="button" id="avancar1" name="next" class="next action-button" value="Avançar" />
                      </fieldset>
                      <fieldset>
                        <div class="form-card">

                          <div class="row">
                            <div class="col-lg-1">
                              <h2 class="fs-title">Itens</h2>
                            </div>

                            <div class="col-4 col-lg-4" id="barraBipar">
                              <div class="input-group">
                                <div class="input-group-append">
                                  <button class="btn bg-danger" id="btnMais" type="button"><i class="m-0 p-0 fas fa-plus"></i></button>
                                </div>
                                <input type="text" class="input-default focus form-control" id="txtBarraBipar" name="txtBarraBipar" class="form-control" placeholder="Barra">
                              </div>
                            </div>

                            <div class="col-4 col-lg-4 d-none" id="barraEstorno">
                              <div class="input-group">
                                <div class="input-group-append">
                                  <button class="btn bg-danger" id="btnMenos" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-minus"></i></button>
                                </div>
                                <input type="text" class="input-default focus form-control d-none" id="txtBarraEstorno" name="txtBarraEstorno" class="form-control" placeholder="Barra Estorno">
                              </div>
                            </div>

                            <div class="col-sm-2 d-flex mb-1" title="Integração RFID">
                              <div class="relative divRFID">
                                <button type="button" class="btn btn-icon-normal btn-danger divRFID d-none" style="border-radius: 4px!important; text-align: center; margin-left: 1px;" id="btn-iniciar-epc-itens" name="btn-iniciar-epc-itens" data-button="absolute" title="Iniciar RFID, Atalho (Alt + 1)">
                                  <i class="fas fa-play"></i>
                                </button>
                                <button type="button" class="btn btn-icon-normal btn-danger divRFID d-none" style="border-radius: 4px!important;" id="btn-parar-epc-itens" name="btn-parar-epc-itens" data-button="absolute" title="Parar RFID, Atalho (Alt + 2)">
                                  <i class="fas fa-pause"></i>
                                </button>
                              </div>
                              <input type="text" class="input-default focus form-control d-none" id="txtIdItem" name="txtIdItem">
                              <input type="text" class="input-default focus form-control d-none" id="txtIdEpc" name="txtIdEpc">
                              <input type="text" class="input-default focus form-control d-none" id="txtIdQtde" name="txtIdQtde">
                            </div>

                            <div class="col-lg-2">
                              <div class="input-group">
                                <input type="text" class="input-default focus form-control d-none" id="txtPercIndice" name="txtPercIndice" placeholder="Índice">
                              </div>
                            </div>
                            <!-- <div class="col-lg-2">
                            </div> -->
                            <div class="col-lg-3" style="padding-top: .6%">
                              <input type="checkbox" id="movEstoqueCheck"> <label for="movEstoqueCheck"> MOVIMENTAR ESTOQUE</label>    
                            </div>
                          </div>

                          <hr>
                          <div id="items-wrap" class="table-wrap">
                          </div>

                          <h2 class="fs-title" style="margin-top: 2%">Totais</h2>
                          <hr>
                          <div class="row card-totais" style="margin-bottom: 2.5%">

                            <!-- <div class="col-lg-3  col-12 form-group">
                                                            <label data-error="wrong" data-success="right" for="txtPesoBruto">Peso Bruto</label>
                                                            <div class="input-group">
                                                                <input type="text" mmin="0" value="0" class="input-default focus form-control" id="txtPesoBruto" name="txtPesoBruto" class="form-control" placeholder="Peso Bruto">
                                                            </div>
                                                        </div> -->
                            <div class="col-sm-3 col-6">
                              <div style="padding-left: 10%; padding-right: 10%">
                                <label data-error="wrong" data-success="right" for="txtSeguroTotal">Seguro</label>
                                <div class="input-group">
                                  <input type="text" value="0.00" class="input-default focus form-control maskItens" id="txtSeguroTotal" name="txtSeguroTotal" placeholder="0.00">
                                </div>
                              </div>
                            </div>
                            <div class="col-sm-3 col-6">
                              <div style="padding-left: 10%; padding-right: 10%">
                                <label data-error="wrong" data-success="right" for="txtDespesaTotal">Despesa</label>
                                <div class="input-group">
                                  <input type="text" value="0.00" class="input-default focus form-control maskItens" id="txtDespesaTotal" name="txtDespesaTotal" placeholder="0.00">
                                </div>
                              </div>
                            </div>
                            <div class="col-sm-3 col-6">
                              <div style="padding-left: 10%; padding-right: 10%">
                                <label data-error="wrong" data-success="right" for="txtFreteTotal">Frete</label>
                                <div class="input-group">
                                  <input type="text" value="0.00" class="input-default focus form-control maskItens" id="txtFreteTotal" name="txtFreteTotal" placeholder="0.00">
                                </div>
                              </div>
                            </div>
                            <div class="col-sm-3 col-6">
                              <div style="padding-left: 10%; padding-right: 10%">
                                <label data-error="wrong" data-success="right" for="txtDescontoTotal">Desconto</label>
                                <div class="input-group">
                                  <input type="text" value="0.00" class="input-default focus form-control maskItens" id="txtDescontoTotal" name="txtDescontoTotal" placeholder="0.00">
                                </div>
                              </div>
                            </div>
                          </div>
                          <hr>
                          <div class="row card-totais">

                            <div class="col-sm-12 col-12">
                              <!-- LINHA 1 -->
                              <div class="row d-flex justify-content-center">
                                <div class="col-sm-2 col-6">
                                  <div class="description-block border-right">
                                    <h5 id="txtValorICMS" class="description-header">R$ 0,00</h5>
                                    <span>Valor ICMS</span>
                                  </div>
                                </div>
                                <div class="col-sm-2 col-6">
                                  <div class="description-block border-right">
                                    <h5 id="txtTotalIPI" class="description-header">R$ 0,00</h5>
                                    <span>Valor IPI</span>
                                  </div>
                                </div>
                                <div class="col-sm-2 col-6">
                                  <div class="description-block border-right">
                                    <h5 id="txtValorICMSST" class="description-header">R$ 0,00</h5>
                                    <span>Valor ICMSST</span>
                                  </div>
                                </div>
                                <div class="col-sm-2 col-6">
                                  <div class="description-block border-right">
                                    <h5 id="txtValorPIS" class="description-header">R$ 0,00</h5>
                                    <span>Valor PIS</span>
                                  </div>
                                </div>
                                <div class="col-sm-2 col-6">
                                  <div class="description-block">
                                    <h5 id="txtValorCofins" class="description-header">R$0,00</h5>
                                    <span>Valor Cofins</span>
                                  </div>
                                </div>
                              </div>
                              <!-- LINHA 2 -->
                              <div class="row d-flex justify-content-center">
                                <div class="col-sm-2 col-6">
                                  <div class="description-block border-right">
                                    <h5 id="txtBaseICMS" class="description-header">R$ 0,00</h5>
                                    <span>Base ICMS</span>
                                  </div>
                                </div>
                                <div class="col-sm-2 col-6">
                                  <div class="description-block border-right">
                                    <h5 id="txtBaseIPI" class="description-header">R$ 0,00</h5>
                                    <span>Base IPI</span>
                                  </div>
                                </div>
                                <div class="col-sm-2 col-6">
                                  <div class="description-block border-right">
                                    <h5 id="txtBaseICMSST" class="description-header">R$ 0,00</h5>
                                    <span>Base ICMSST</span>
                                  </div>
                                </div>
                                <div class="col-sm-2 col-6">
                                  <div class="description-block border-right">
                                    <h5 id="txtBasePISCOFINS" class="description-header">R$ 0,00</h5>
                                    <span>Base PIS/COFINS</span>
                                  </div>
                                </div>
                                <div class="col-sm-2 col-6">
                                  <div class="description-block">
                                    <h5 id="txtQuantidade" class="description-header">0</h5>
                                    <span>Quantidade</span>
                                  </div>
                                </div>
                              </div>
                              <!-- LINHA 3 -->
                              <div class="row d-flex justify-content-center">
                                <div class="col-sm-2 col-6">
                                  <div class="description-block border-right">
                                    <h5 id="txtValorDespesa" class="description-header">R$ 0,00</h5>
                                    <span>Valor Despesa</span>
                                  </div>
                                </div>
                                <div class="col-sm-2 col-6">
                                  <div class="description-block border-right">
                                    <h5 id="txtValorFrete" class="description-header">R$ 0,00</h5>
                                    <span>Valor Frete</span>
                                  </div>
                                </div>
                                <div class="col-sm-2 col-6">
                                  <div class="description-block border-right">
                                    <h5 id="txtDesconto" class="description-header">R$ 0,00</h5>
                                    <span>Desconto</span>
                                  </div>
                                </div>
                                <div class="col-sm-2 col-6">
                                  <div class="description-block border-right">
                                    <h5 id="txtValorBruto" class="description-header">R$ 0,00</h5>
                                    <span>Valor Itens</span>
                                  </div>
                                </div>
                                <div class="col-sm-2 col-6">
                                  <div class="description-block">
                                    <h5 id="txtValorNota" class="description-header">R$ 0,00</h5>
                                    <span>Valor Nota</span>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </div>
                          <hr>
                        </div>

                        <input type="button" id="avancarItens" name="make_payment" class="next action-button" value="Avançar" />
                        <input type="button" name="previous" class="previous action-button-previous" value="Voltar" />
                        <input type="button" id="btnDesconto" name="btnDesconto" style="background-color: #0496d8; background: #0496d8" class="action-button d-none" value="Desconto" />
                        <input type="button" id="btnFrete" name="btnFrete" style="background-color: #5F9EA0; background: #5F9EA0" class="action-button d-none" value="Frete" />
                        <input type="button" id="btnDespesa" name="btnDespesa" style="background-color: #B8860B; background: #B8860B" class="action-button d-none" value="Despesa" />

                      </fieldset>
                      <fieldset id="financeiroFs">
                        <div class="form-card">
                          <h2 class="fs-title">Dados Financeiros</h2>
                          <div class="row">
                            <div class="col-12">
                              <label>Vencimentos</label>
                              <div class="row">
                                <div class="col-12">
                                  <div class="row">
                                    <div class="col-lg-1 col-sm-1 form-group">
                                      <input min="0" class="input-default focus form-control" maxlength="3" id="edtVencimento1" type="tel" placeholder="Parcela 01" />
                                    </div>
                                    <div class="col-lg-1 col-sm-1 form-group">
                                      <input min="0" class="input-default focus form-control" maxlength="3" id="edtVencimento2" type="tel" placeholder="Parcela 02" />
                                    </div>
                                    <div class="col-lg-1 col-sm-1 form-group">
                                      <input min="0" class="input-default focus form-control" maxlength="3" id="edtVencimento3" type="tel" placeholder="Parcela 03" />
                                    </div>
                                    <div class="col-lg-1 col-sm-1 form-group">
                                      <input min="0" class="input-default focus form-control" maxlength="3" id="edtVencimento4" type="tel" placeholder="Parcela 04" />
                                    </div>
                                    <div class="col-lg-1 col-sm-1 form-group">
                                      <input min="0" class="input-default focus form-control" maxlength="3" id="edtVencimento5" type="tel" placeholder="Parcela 05" />
                                    </div>
                                    <div class="col-lg-1 col-sm-1 form-group">
                                      <input min="0" class="input-default focus form-control" maxlength="3" id="edtVencimento6" type="tel" placeholder="Parcela 06" />
                                    </div>
                                    <div class="col-lg-1 col-sm-1 form-group">
                                      <input min="0" class="input-default focus form-control" maxlength="3" id="edtVencimento7" type="tel" placeholder="Parcela 07" />
                                    </div>
                                    <div class="col-lg-1 col-sm-1 form-group">
                                      <input min="0" class="input-default focus form-control" maxlength="3" id="edtVencimento8" type="tel" placeholder="Parcela 08" />
                                    </div>
                                    <div class="col-lg-1 col-sm-1 form-group">
                                      <input min="0" class="input-default focus form-control" maxlength="3" id="edtVencimento9" type="tel" placeholder="Parcela 09" />
                                    </div>
                                    <div class="col-lg-1 col-sm-1 form-group">
                                      <input min="0" class="input-default focus form-control" maxlength="3" id="edtVencimento10" type="tel" placeholder="Parcela 10" />
                                    </div>
                                    <div class="col-lg-1 col-sm-1 form-group">
                                      <input min="0" class="input-default focus form-control" maxlength="3" id="edtVencimento11" type="tel" placeholder="Parcela 11" />
                                    </div>
                                    <div class="col-lg-1 col-sm-1 form-group">
                                      <input min="0" class="input-default focus form-control" maxlength="3" id="edtVencimento12" type="tel" placeholder="Parcela 12" />
                                    </div>
                                  </div>
                                </div>


                                <div class="col-lg-4 col-sm-12 form-group">
                                  <label data-error="wrong" data-success="right" for="txtMoeda">Moeda *</label>
                                  <div class="input-group">
                                    <input type="text" class="input-default focus form-control" id="txtMoeda" name="txtMoeda" class="form-control" placeholder="Moeda">
                                    <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="btnAMoeda" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                    </div>
                                  </div>
                                </div>
                                <div class="col-lg-4 col-sm-12 form-group">
                                  <label data-error="wrong" data-success="right" for="txtHistorico">Histórico *</label>
                                  <div class="input-group">
                                    <input type="text" class="input-default focus form-control" id="txtHistorico" name="txtHistorico" class="form-control" placeholder="Histórico">
                                    <div class="input-group-append">
                                      <button class="btn bg-danger" id="btn-historico" name="btn-historico" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                      <button class="btn bg-danger" id="btn-limpa-historico" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                    </div>
                                  </div>
                                </div>
                                <div class="col-lg-4 col-sm-12 form-group">
                                  <label data-error="wrong" data-success="right" for="txtBanco">Banco *</label>
                                  <div class="input-group">
                                    <input type="text" class="input-default focus form-control" id="txtBanco" name="txtBanco" class="form-control" placeholder="Banco">
                                    <div class="input-group-append">
                                      <button class="btn bg-danger" id="btn-banco" name="btn-banco" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                      <button class="btn bg-danger" id="btn-limpa-banco" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                    </div>
                                  </div>
                                </div>
                                <div class="col-lg-4 col-sm-12 form-group">
                                  <label data-error="wrong" data-success="right" for="txtSituacao">Situação *</label>
                                  <div class="input-group">
                                    <input type="text" class="input-default focus form-control" id="txtSituacao" name="txtSituacao" class="form-control" placeholder="Situação">
                                    <div class="input-group-append">
                                      <button class="btn bg-danger" id="btn-situacao" name="btn-situacao" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                      <button class="btn bg-danger" id="btn-limpa-situacao" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                    </div>
                                  </div>
                                </div>
                                <div class="col-lg-4 col-sm-12 form-group">
                                  <label data-error="wrong" data-success="right" for="txtClasseGer">Classe Gerencial
                                    *</label>
                                  <div class="input-group">
                                    <input type="text" class="input-default focus form-control" id="txtClasseGer" name="txtClasseGer" class="form-control" placeholder="Classe Gerencial">
                                    <div class="input-group-append">
                                      <button class="btn bg-danger" id="btn-classeGer" name="btn-classeGer" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                      <button class="btn bg-danger" id="btn-limpa-classeGer" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                    </div>
                                  </div>
                                </div>
                                <div class="col-lg-4 col-sm-12 form-group">
                                  <label data-error="wrong" data-success="right" for="txtConta">Conta</label>
                                  <div class="input-group">
                                    <input type="text" class="input-default focus form-control" id="txtConta" name="txtConta" class="form-control" placeholder="Conta">
                                    <div class="input-group-append">
                                      <button class="btn bg-danger" id="btnConta" name="btnConta" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                      <button class="btn bg-danger" id="btnAConta" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                    </div>
                                  </div>
                                </div>

                                <div class="col-lg-3 col-3 form-group campoCondicao d-none">
                                  <label data-error="wrong" data-success="right" for="txtCondicao">Condição:</label>
                                  <div class="input-group">
                                    <input type="text" class="input-default focus form-control" id="txtCondicao" name="txtCondicao" placeholder="Condicao">
                                    <div class="input-group-append">
                                      <button class="btn bg-danger" id="btn-Condicao" name="btn-Condicao" data-button="absolute" type="button">
                                        <i class="m-0 p-0 fas fa-search"></i>
                                      </button>
                                      <button class="btn bg-danger" id="btn-limpa-Condicao" type="button" disabled>
                                        <i class="m-0 p-0 fas fa-trash"></i>
                                      </button>
                                    </div>
                                  </div>
                                </div>
                                <div class="col-lg-2 campoCondicao col-2 form-group d-none">
                                  <label data-error="wrong" data-success="right" for="txtNrParcelas">Nr. Parcelas:</label>
                                  <div class="input-group">
                                    <input type="number" class="input-default focus form-control" id="txtNrParcelas" name="txtNrParcelas" value="0">
                                  </div>
                                </div>
                                <div class="col-lg-2 campoCondicao col-2 form-group d-none">
                                  <label data-error="wrong" data-success="right" for="txtIntervaloDias">Intervalo de Dias:</label>
                                  <div class="input-group">
                                    <input type="number" class="input-default focus form-control" id="txtIntervaloDias" name="txtIntervaloDias" value="1">
                                  </div>
                                </div>
                                <div class="col-lg-2 campoCondicao col-2 form-group d-none">
                                  <label data-error="wrong" data-success="right" for="dtPrimeiroVencto">1º Vencimento:</label>
                                  <div class="input-group">
                                    <input type="date" max="2500-12-31" class="input-default focus form-control" id="dtPrimeiroVencto" name="dtPrimeiroVencto">
                                  </div>
                                </div>
                                <div class="col-lg-3 campoCondicao col-3 form-group d-none">
                                  <label data-error="wrong" data-success="right" for="txtValorCondicao">Valor condição:</label>
                                  <div class="input-group">
                                    <input type="text" class="input-default focus form-control maskDecimais" id="txtValorCondicao" name="txtValorCondicao" placeholder="Valor condição">
                                  </div>
                                </div>
                                <div class="col-12 campoCondicao form_group d-none">
                                  <div class="row d-flex justify-content-end">
                                    <div class="col-lg-12 col-12 form-group" style="margin-top: 24px;">
                                      <input type="button" class="btn float-right btn-danger btn-sisp" id="btnAtualizar" name="make_payment" value="Atualizar" style="margin: 1px" disabled />
                                      <input type="button" class="btn float-right  btn-primary btn-sisp" id="btnLimpar" name="make_payment" value="Limpar" style="margin: 1px" disabled />
                                    </div>
                                  </div>
                                </div>
                                <div class="col-lg-12">
                                  <div class="row">


                                    <div class="col-lg-12 table-responsive">
                                      <!-- <label data-error="wrong" data-success="right" for="tabelaDuplicatas">Financeiro</label> -->
                                      <table id="tabelaDuplicatas" class="display table table-sm" width="100%" style="width:100%">
                                        <thead>
                                          <tr>
                                            <th>Parcela</th>
                                            <th>Vencimento</th>
                                            <th>Moeda</th>
                                            <th>NSU</th>
                                            <th>Valor</th>
                                          </tr>
                                        </thead>
                                        <tbody>
                                        </tbody>
                                      </table>
                                    </div>

                                    <div class="col-lg-12">
                                      <div class=" info-box col-2 ml-auto totalizadorFinanceiro">
                                        <span class="info-box-icon"><i class="fas fa-dollar-sign"></i></span>
                                        <div class="info-box-content">
                                          <span class="info-box-text" style="font-size:15px; color: --font-color">VALOR
                                            TOTAL</span>
                                          <span id="txtValorFinanceiro" class="info-box-number" style="font-size:20px; color: --font-color">R$&nbsp;0,00</span>
                                        </div>
                                      </div>
                                    </div>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                        <input type="button" id="avancarFinanceiro" name="next" class="next action-button" value="Avançar" />
                        <input type="button" name="previous" id="voltarFinanceiro" class="previous action-button-previous" value="Voltar" />
                      </fieldset>
                      <fieldset>
                        <div class="form-card">
                          <h2 class="fs-title text-center">Conclusão</h2> <br><br>
                          <div class="row justify-content-center">
                            <input type="button" id="btnVincCli" class="btn btn-primary d-none" value="Dividir Nota" style="margin-right: 10px">
                            <input type="button" id="gravar" class="btn btn-danger" value="Gravar">
                          </div>
                        </div>
                        <input type="button" name="previous" id="ultimoVoltar" class="previous action-button-previous" value="Voltar" />
                      </fieldset>
                    </form>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </section>
    </div>
  </div>
  <div class="modal fade" id="modalProduto" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-xl">
      <div class="modal-content">
        <div class="modal-header" style="padding: 1rem 1rem 0.5rem 1rem;">
          <h4 id="modalProduto-titulo" class="modal-title d-flex">Pesquisa Item

            <div class="icheck-primary mx-2" style="min-height: 0px; margin-top: 0px !important; margin-bottom: 0px; padding-left: 0;"><input type="radio" checked="checked" id="radioProduto" name="tipoFat"><label class="escondeRadio" for="radioProduto">Produto</label></div>
            <div class="icheck-primary mr-2" style="min-height: 0px; margin-top: 0px !important; margin-bottom: 0px; padding-left: 0;"><input type="radio" id="radioMaterial" name="tipoFat"><label class="escondeRadio" for="radioMaterial">Material</label></div>
            <div class="icheck-primary" style="min-height: 0px; margin-top: 0px !important; margin-bottom: 0px; padding-left: 0;"><input type="checkbox" id="cbContemEstoque"><label for="cbContemEstoque">Somente c/ Estoque</label></div>
          </h4>
          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">&times;</span>
          </button>
        </div>
        <div class="modal-body" style="padding: 0.2rem 1rem;">
          <div class="row justify-content-sm-start justify-content-center mb-3">
            <div class="col-auto">
              <fieldset class="form border-Field mb-0 pb-0 d-sm-flex d-block">
                <legend class="textoBorda mb-0 pb-0">Opções</legend>
                <div class="m-1 icheck-primary">
                  <input type="radio" id="cbTodos" name="cbStatus" checked>
                  <label for="cbTodos">Todos</label>
                </div>
                <div class="m-1 icheck-primary">
                  <input type="radio" id="cbAtivoStatus" name="cbStatus" value="S">
                  <label for="cbAtivoStatus">Ativo</label>
                </div>
                <div class="m-1 icheck-primary">
                  <input type="radio" id="cbInativo" name="cbStatus" value="N">
                  <label for="cbInativo">Inativo</label>
                </div>
              </fieldset>
            </div>
          </div>
          <div class="row">
            <div class="col-9">
              <div class="row">
                <div class="col-sm-3">
                  <input type="text" placeholder="Barra" autocomplete="off" class="input-default focus" id="txtProdutoBarra" name="txtProdutoBarra">
                </div>
                <div class="col-sm-3">
                  <input class="d-none" id="idLinha" />
                  <input type="text" placeholder="Codigo" class="input-default focus" id="txtProdutoCodigo" name="txtProdutoCodigo">
                </div>
                <div class="col-sm-3">
                  <input type="text" placeholder="Descrição" class="input-default focus" id="txtProdutoDescricao" name="txtProdutoDescricao">
                </div>
                <div class="col-sm-3">
                  <input type="text" placeholder="Codigo2" class="input-default focus" id="txtProdutoCodigo2" name="txtProdutoCodigo2">
                </div>
                <div class="col-sm-3">
                  <input type="text" placeholder="Lote" class="input-default focus mt-2" id="txtMaterialLote" name="txtMaterialLote">
                </div>
              </div>
            </div>
            <div class="col-sm-3" style="text-align:center">
              <button type="button" class="btn btn-info focus" id="btnConsultarProduto" name="btnConsultarProduto">
                <i class='fas fa-search'></i> Consultar
              </button>
            </div>
            <div class="col-sm-12 table-responsive" style="margin-top: 2%;">
              <table style="width:100%" width="100%" id="tabelaProdutos" class="display table table-sm">
                <!-- <thead>
                                        </thead>
                                        <tbody>
                                        </tbody> -->
              </table>
            </div>
          </div>
        </div>
        <div class="modal-footer">
          <div class="row">
            <div class="col-sm-12">
              <button id="btn_confirmar_produto" class="btn btn-danger"> Confirmar </button>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>

  <div class="modal fade" id="modal-importar-venda" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-xl">
      <div class="modal-content">
        <div class="modal-header">
          <h4 id="modal-importar-venda-titulo" class="modal-title">Importação</h4>
          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">&times;</span>
          </button>
        </div>
        <div class="modal-body">
          <nav>
            <div class="nav nav-tabs justify-content-center" id="nav-tab" role="tablist" style="text-decoration: none">
              <a class="nav-link abaLink active" id="tabImpVenda" data-toggle="tab" href="#divImportarVenda" role="tab" aria-controls="divImportarVenda" aria-selected="true"> Venda</a>
              <a class="nav-link abaLink" id="tabImpNota" data-toggle="tab" href="#divImportarNota" role="tab" aria-controls="divImportarNota" aria-selected="false"> Nota</a>
              <a class="nav-link abaLink" id="tabImpMovimentacao" data-toggle="tab" href="#divImportarMovimentacao" role="tab" aria-controls="divImportarMovimentacao" aria-selected="false"> Movimentação</a>
              <a class="nav-link abaLink" id="tabImpPedido" data-toggle="tab" href="#divImportarPedido" role="tab" aria-controls="divImportarPedido" aria-selected="false"> Pedido</a>
              <a class="nav-link abaLink" id="tabImpLote" data-toggle="tab" href="#divImportarLote" role="tab" aria-controls="divImportarLote" aria-selected="false"> Lote</a>
              <a class="nav-link abaLink" id="tabImpOs" data-toggle="tab" href="#divImportarOS" role="tab" aria-controls="divImportarOS" aria-selected="false"> Serviço</a>
            </div>
          </nav>
          <div class="tab-content" id="nav-tabContent">

            <div class="tab-pane fade show active" id="divImportarVenda" role="tabpanel" aria-labelledby="tabImpVenda">
              <div class="row">

                <div class="col-lg-12 col-sm-12 form-group" style="margin-top: 1%;">
                  <div class="row">
                    <div class="col-md-6 col-6 form" id="tipos" style="margin-top: 7px; margin-left: -6px;">
                      <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">
                            <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">
                            <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">
                            <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">
                            <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">
                            <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-lg-6 col-sm-6 form-group">
                      <label data-error="wrong" data-success="right" for="txtNumeroVenda">Venda *     
                        <input type="checkbox" id="checkTodasEmpresas"> <label for="checkTodasEmpresas">Todas Empresas</label>
                      </label>
                      <div class="input-group" style="margin-top: -8px;">
                        <!-- <input type="text" class="input-default focus form-control" id="txtNumeroVenda" name="txtNumeroVenda" placeholder="Número Venda"> -->
                        <div class="input-group-append">
                          <input type="text" class="input-default col-lg-3 col-12 focus form-control" id="txtNumeroVenda" name="txtNumeroVenda" class="form-control" placeholder="Número venda">
                          <button class="btn bg-danger" id="btn-PedidoConsulta" name="btn-PedidoConsulta" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <input type="text" id="txtListaVendas" class="form-group col-lg-9 col-12 input-default focus form-control" placeholder="Lista de vendas" disabled>
                          <button class="btn bg-danger" id="btnANumeroVenda" name="btnANumeroVenda" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                          <!-- <button class="btn bg-danger" id="btnNumeroVenda" name="btnNumeroVenda" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnANumeroVenda" type="button"><i class="m-0 p-0 fas fa-trash"></i></button> -->
                        </div>
                      </div>
                    </div>
                    <div class="group-default form-group col-lg-2 col-12">
                      <label for="txtDtEmiVendasDe">Emissão De: </label>
                      <div class="relative">
                        <input type="date" max="2500-12-31" value="1200-01-01" class="input-default focus form-control validate" id="txtDtEmiVendasDe" name="DataDe">
                      </div>
                    </div>
                    <div class="group-default form-group col-lg-2 col-12">
                      <label for="txtDtEmiVendasAte">Até: </label>
                      <div class="relative">
                        <input type="date" max="2500-12-31" value="2500-12-01" class="input-default focus form-control validate" id="txtDtEmiVendasAte" name="DataDe">
                      </div>
                    </div>
                    <div class="col-lg-4 col-12 form-group">
                      <label data-error="wrong" data-success="right" for="txtNaturezaVenda">Natureza </label>
                      <div class="input-group">
                        <input type="text" class="input-default focus form-control" id="txtNaturezaVenda" name="txtNaturezaVenda" placeholder="Natureza">
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnNaturezaVenda" name="btnNaturezaVenda" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnANaturezaVenda" 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" data-success="right" for="txtOperacaoVenda">Operação</label>
                      <div class="input-group">
                        <input type="text" class="input-default focus form-control" id="txtOperacaoVenda" name="txtOperacaoVenda" placeholder="Operação">
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnOperacaoVenda" name="btnOperacaoVenda" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnAOperacaoVenda" 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" data-success="right" for="txtTabPrecoVenda">Tabela de Preço</label>
                      <div class="input-group">
                        <input type="text" class="input-default focus form-control" id="txtTabPrecoVenda" name="txtTabPrecoVenda" placeholder="Tabela de Preço">
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnTabPrecoVenda" name="btnTabPrecoVenda" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaTabPrecoVenda" 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 d-none" id="divPrazoVenda">
                      <label data-error="wrong" data-success="right" for="selectPrazoVenda">Prazo</label>
                      <select style="width:100%;" class="form-control select2 select2-danger focus" data-dropdown-css-class="select2-danger" id="selectPrazoVenda" class="custom-select focus">
                        <option selected value="00">00</option>
                        <option value="07">07</option>
                        <option value="14">14</option>
                        <option value="21">21</option>
                        <option value="28">28</option>
                        <option value="35">35</option>
                        <option value="42">42</option>
                        <option value="49">49</option>
                        <option value="56">56</option>
                        <option value="63">63</option>
                        <option value="70">70</option>
                        <option value="77">77</option>
                        <option value="84">84</option>
                        <option value="91">91</option>
                        </option>
                      </select>
                    </div>
                    <div class="col-lg-4 col-12 form-group">
                      <label data-error="wrong" data-success="right" for="txtVendaCliente">Cliente</label>
                      <div class="input-group">
                        <input type="text" class="input-default focus form-control" id="txtVendaCliente" name="txtVendaCliente" placeholder="Cliente">
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnVendaCliente" name="btnVendaCliente" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                          <button class="btn bg-danger" id="btnLimpaVendaCliente" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                        </div>
                      </div>
                    </div>
                    <div class="form-group ml-2 d-flex align-items-center">
                      <label class="form-check-label" for="check_todos" id="check_todosTour" style="margin-left: 20px">
                        <input class="form-check-input" type="checkbox" id="check_todos" value="">Marcar/Desmarcar Todos
                      </label>
                    </div>
                  </div>
                  <div class="row">
                    <div class="col-sm-12">
                      <button id="btnConsultarVendas" class="btn btn-primary btn-sisp float-right"> Consultar </button>
                    </div>
                  </div>
                  <div class="row">
                    <div class="col-sm-12">
                      <table id="tabelaVendas" class="table table-sm table-select table-hover" width="100%">
                        <thead>
                          <th>Sel</th>
                          <th>Venda</th>
                          <th>Cliente</th>
                        </thead>
                        <tbody>
                        </tbody>
                      </table>
                    </div>
                  </div>
                </div>


              </div>

              <div class="modal-footer">
                <div class="row">
                  <div class="col-sm-12">
                    <button id="btn_confirmar_venda" class="btn btn-danger"> Importar </button>
                  </div>
                </div>
              </div>
            </div>

            <div class="tab-pane fade" id="divImportarNota" role="tabpanel" aria-labelledby="tabImpNota">

              <div class="col-12 col-sm-12 col-md-12">
                <div class="row" style="margin-top: 11px;">
                  <div class="col-sm-3">
                    <label data-error="wrong" data-success="right" for="txtSerie">Série *</label>
                    <div class="input-group">
                      <input type="text" data-selecionado="false" class="input-default focus form-control" id="txtSerie" name="txtSerie" placeholder="Série">
                    </div>
                  </div>
                  <!-- <div class="col-sm-7">
                    <label data-error="wrong" data-success="right" for="txtNota">Nota *</label>
                    <div class="input-group">
                      <input type="text" data-selecionado="false" class="input-default focus form-control" id="txtNota" name="txtNota" placeholder="Nota">
                      
                    </div>
                  </div> -->

                  <div class="col-sm-7">
                    <label data-error="wrong" data-success="right" for="txtNota">Nota *</label>
                    <div class="input-group">
                      <input type="text" class="input-default focus form-control" id="txtNota" name="txtNota" placeholder="Nota">
                      <div class="input-group-append">
                        <button class="btn bg-danger" id="btnPesquisaNota" name="btnPesquisaNota" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                        <button class="btn bg-danger" id="btnApagaNota" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                      </div>
                    </div>
                  </div>

                  <div class="col-sm-2" style="margin-top: 26px">
                    <div class="radiosStyle">
                      <label class="container">
                        <input type="radio" checked="checked" id="radioSaida" name="tipoNota">
                        <span class="checkmark"></span> Saída
                      </label>
                      <label class="container">
                        <input type="radio" id="radioEntrada" name="tipoNota">
                        <span class="checkmark"></span> Entrada
                      </label>
                    </div>
                  </div>
                  <div class="col-lg-12 d-none" style="margin-top: 1%;" id="divClienteNota">
                    <label data-error="wrong" data-success="right" for="txtClienteNota">Fornecedor *</label>
                    <div class="input-group">
                      <input type="text" class="input-default focus form-control" id="txtClienteNota" name="txtClienteNota" placeholder="Fornecedor">
                      <div class="input-group-append">
                        <button class="btn bg-danger" id="btnClienteNota" name="btnClienteNota" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                        <button class="btn bg-danger" id="btnAClienteNota" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                      </div>
                    </div>
                  </div>
                  <div class="col-lg-5" style="margin-top: 1%;">
                    <label data-error="wrong" data-success="right" for="txtNaturezaNota">Natureza *</label>
                    <div class="input-group">
                      <input type="text" class="input-default focus form-control" id="txtNaturezaNota" name="txtNaturezaNota" placeholder="Natureza">
                      <div class="input-group-append">
                        <button class="btn bg-danger" id="btnNaturezaNota" name="btnNaturezaNota" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                        <button class="btn bg-danger" id="btnANaturezaNota" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                      </div>
                    </div>
                  </div>
                  <div class="col-lg-5" style="margin-top: 1%;">
                    <label data-error="wrong" data-success="right" for="txtOperacaoNota">Operação</label>
                    <div class="input-group">
                      <input type="text" class="input-default focus form-control" id="txtOperacaoNota" name="txtOperacaoNota" placeholder="Operação">
                      <div class="input-group-append">
                        <button class="btn bg-danger" id="btnOperacaoNota" name="btnOperacaoNota" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                        <button class="btn bg-danger" id="btnAOperacaoNota" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                      </div>
                    </div>
                  </div>
                  <div class="col-sm-2" style="display: flex!important;align-items: flex-end!important;justify-content: flex-end!important;">
                    <button type="button" class="btn btn-primary btn-sisp float-right" id="btn-consulta-imp-notas">Consultar</button>
                  </div>
                  <div class="col-sm-12 table-responsive" style="margin-top: 5px;">
                    <table style="width:100%" width="100%" id="tabelaImportarNotas" class="table table-sm table-select table-hover table-condensed mt-2">
                      <thead>
                      </thead>
                    </table>
                  </div>
                </div>
              </div>

              <div class="modal-footer">
                <div class="row">
                  <div class="col-sm-12">
                    <button type="button" class="btn btn-icon-normal btn-danger divRFID d-none" style="border-radius: 4px!important; text-align: center; margin-left: 1px;" id="btn-iniciar-epc" name="btn-iniciar-epc" data-button="absolute" title="Iniciar RFID, Atalho (Alt + 1)">
                      <i class="fas fa-play"></i>
                    </button>
                    <button type="button" class="btn btn-icon-normal btn-danger divRFID d-none" style="border-radius: 4px!important;" id="btn-parar-epc" name="btn-parar-epc" data-button="absolute" title="Parar RFID, Atalho (Alt + 2)">
                      <i class="fas fa-pause"></i>
                    </button>
                    <button id="btn_confirmar_nota" class="btn btn-danger"> Importar </button>
                  </div>
                </div>
              </div>
            </div>

            <div class="tab-pane fade" id="divImportarMovimentacao" role="tabpanel" aria-labelledby="tabImpMovimentacao">
              <div class="col-12 col-sm-12 col-md-12">
                <div class="row" style="margin-top: 11px; margin-bottom: 20px">
                  <div class="col-lg-3" style="margin-top: 1%;">
                    <label data-error="wrong" data-success="right" for="txtEntradaSaida">Entrada/Saída</label>
                    <select style="width:100%;" class="form-control select2 select2-danger focus" data-dropdown-css-class="select2-danger" id="rgEntradaSaida" class="custom-select focus">
                      <option value="0">0 - Entrada</option>
                      <option value="1">1 - Saída</option>
                      </option>
                    </select>
                  </div>
                  <div class="col-lg-3" style="margin-top: 1%;">
                    <label data-error="wrong" data-success="right" for="txtTipoItem">Produto/Material</label>
                    <select style="width:100%;" class="form-control select2 select2-danger focus" data-dropdown-css-class="select2-danger" id="rgTipoItem" class="custom-select focus">
                      <option value="0">0 - Produto</option>
                      <option value="1">1 - Material</option>
                      </option>
                    </select>
                  </div>
                  <!-- <div class="col-sm-6" style="margin-top: 1%;">
                    <label data-error="wrong" data-success="right" for="txtDocumento">Documento *</label>
                    <div class="input-group">
                      <input type="text" data-selecionado="false" class="input-default focus form-control" id="txtDocumento" name="txtDocumento" placeholder="Documento">
                      <div class="input-group-append">
                        <button class="btn bg-danger" id="btnDocumentoMovimentacao" name="btnDocumentoMovimentacao" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                        <button class="btn bg-danger" id="btnADocumentoMovimentacao" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                      </div>
                    </div>
                  </div> -->
                  <div class="col-sm-6" style="margin-top: 1%;">
                    <label data-error="wrong" data-success="right" for="txtDocumento">Documento: </label>
                    <div class="input-group">
                      <select class="js-example-programmatic js-states form-control" id="txtDocumento" name="txtDocumento" multiple="multiple"> </select>
                      <div class="input-group-append">
                        <button class="btn bg-danger" id="btnDocumentoMovimentacao" name="btnDocumentoMovimentacao" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                        <button class="btn bg-danger" id="btnADocumentoMovimentacao" name="btnADocumentoMovimentacao" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                      </div>
                    </div>
                  </div>
                  <div class="col-lg-6" style="margin-top: 1%;" id="divClienteMovimentacao">
                    <label data-error="wrong" data-success="right" for="txtClienteMovimentacao">Cliente *</label>
                    <div class="input-group">
                      <input type="text" class="input-default focus form-control" id="txtClienteMovimentacao" name="txtClienteMovimentacao" placeholder="Cliente">
                      <div class="input-group-append">
                        <button class="btn bg-danger" id="btnClienteMovimentacao" name="btnClienteMovimentacao" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                        <button class="btn bg-danger" id="btnAClienteMovimentacao" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                      </div>
                    </div>
                  </div>
                  <div class="col-lg-6" style="margin-top: 1%;">
                    <label data-error="wrong" data-success="right" for="txtNaturezaMovimentacao">Natureza *</label>
                    <div class="input-group">
                      <input type="text" class="input-default focus form-control" id="txtNaturezaMovimentacao" name="txtNaturezaMovimentacao" placeholder="Natureza">
                      <div class="input-group-append">
                        <button class="btn bg-danger" id="btnNaturezaMovimentacao" name="btnNaturezaMovimentacao" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                        <button class="btn bg-danger" id="btnANaturezaMovimentacao" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                      </div>
                    </div>
                  </div>
                  <div class="col-lg-4" style="margin-top: 1%;">
                    <label data-error="wrong" data-success="right" for="txtTabPrecoMovimentacao">Tabela de Preço *</label>
                    <div class="input-group">
                      <input type="text" class="input-default focus form-control" id="txtTabPrecoMovimentacao" name="txtTabPrecoMovimentacao" placeholder="Tabela de Preço">
                      <div class="input-group-append">
                        <button class="btn bg-danger" id="btnTabPrecoMovimentacao" name="btnTabPrecoMovimentacao" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                        <button class="btn bg-danger" id="btnATabPrecoMovimentacao" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                      </div>
                    </div>
                  </div>
                  <div class="col-lg-4" style="margin-top: 1%;">
                    <label data-error="wrong" data-success="right" for="txtOperacaoMovimentacao">Operação</label>
                    <div class="input-group">
                      <input type="text" class="input-default focus form-control" id="txtOperacaoMovimentacao" name="txtOperacaoMovimentacao" placeholder="Operação">
                      <div class="input-group-append">
                        <button class="btn bg-danger" id="btnOperacaoMovimentacao" name="btnOperacaoMovimentacao" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                        <button class="btn bg-danger" id="btnAOperacaoMovimentacao" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                      </div>
                    </div>
                  </div>
                  <div class="col-lg-4" style="margin-top: 4%;">
                    <div class="input-group form-check form-check-inline">
                      <input type="checkbox" id="agrupItensMov" checked> <label for="agrupItensMov" style="margin-top: 7px;margin-left: 4px;" title="Itens com o mesmo código/cor/tamanho serão agrupados">Agrupar Itens</label>  
                      <input type="checkbox" id="precoCusto" style="margin-left: 4%;"> <label for="precoCusto" style="margin-top: 7px;margin-left: 4px;" title="Irá levar o custo do produto como preço">Preço Custo</label>  
                    </div>
                  </div>
                </div>
              </div>

              <div class="modal-footer">
                <div class="row">
                  <div class="col-sm-12">
                    <button id="btn_confirmar_movimentacao" class="btn btn-danger"> Importar </button>
                  </div>
                </div>
              </div>
            </div>

            <div class="tab-pane fade" id="divImportarPedido" role="tabpanel" aria-labelledby="tabImpPedido">
              <div class="col-12 col-sm-12 col-md-12">
                <div class="row d-flex justify-content-center" style="margin-top: 11px;">

                  <div class="group-default form-group col-lg-2 col-12">
                    <label for="dtIniPedido">Emissão De: </label>
                    <div class="relative">
                      <input type="date" max="2500-12-31" value="1200-01-01" class="input-default focus form-control validate" id="dtIniPedido" name="DataDe">
                    </div>
                  </div>
                  <div class="group-default form-group col-lg-2 col-12">
                    <label for="dtFimPedido">Até: </label>
                    <div class="relative">
                      <input type="date" max="2500-12-31" value="2500-12-01" class="input-default focus form-control validate" id="dtFimPedido" name="DataDe">
                    </div>
                  </div>

                </div>
                <div class="row d-flex justify-content-center" style="margin-bottom: 20px">
                  <div class="col-md-8 col-8 form" style="margin-top: 7px; margin-left: -6px;">
                    <div class="radioStyle">
                      <div class="form-row pr-2">
                        <div class="form-group ml-2 icheck-primary flex align-items-center pt-1">
                          <input type="radio" class="" checked name="radioPedido" id="radiotodos">
                          <label class="form-check-label pr-1" style="font-weight: bold;" for="radiotodos">Todos</label>
                        </div>
                        <div class="form-group ml-2 icheck-primary flex align-items-center pt-1">
                          <input type="radio" class="" name="radioPedido" id="radiopendentes">
                          <label class="form-check-label pr-1" style="font-weight: bold;" for="radiopendentes">Pendentes</label>
                        </div>
                        <div class="form-group ml-2 icheck-primary flex align-items-center pt-1">
                          <input type="radio" class="" name="radioPedido" id="radiofaturados">
                          <label class="form-check-label pr-1" style="font-weight: bold;" for="radiofaturados">Faturados</label>
                        </div>
                        <div class="form-group ml-2 icheck-primary flex align-items-center pt-1">
                          <input type="radio" class="" name="radioPedido" id="radiopercfat">
                          <label class="form-check-label pr-1" style="font-weight: bold;" for="radiopercfat">% Fat.</label>
                        </div>
                        <div class="form-group ml-2 icheck-primary flex align-items-center pt-1">
                          <input type="radio" class="" name="radioPedido" id="radioexppend">
                          <label class="form-check-label pr-1" style="font-weight: bold;" for="radioexppend">Exp. Pend.</label>
                        </div>
                        <div class="form-group ml-2 icheck-primary flex align-items-center pt-1">
                          <input type="radio" class="" name="radioPedido" id="radiosemexp">
                          <label class="form-check-label pr-1" style="font-weight: bold;" for="radiosemexp">Sem Exp.</label>
                        </div>
                      </div>
                    </div>
                  </div>

                  <div class="col-lg-8" style="margin-top: 1%;" id="divPedido">
                    <label data-error="wrong" data-success="right" for="txtPedido">Pedido *
                      <input style="margin-left: 15px;" type="checkbox" id="cbTodasEmpPedido"> <label for="cbTodasEmpPedido">Todas Empresas</label>
                      <input style="margin-left: 15px;" type="checkbox" id="cbSomenteExpedidos"> <label for="cbSomenteExpedidos">Somente expedidos</label>
                    </label>
                    <div class="input-group">
                      <input type="text" class="input-default focus form-control" id="txtPedido" name="txtPedido" placeholder="Pedido">
                      <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="btnAPedido" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                      </div>
                    </div>
                  </div>
                  <div class="col-sm-8">
                    <table id="tabelaPedidos" class="table table-sm table-select table-hover" width="100%">
                      <thead>
                        <th>Pedido</th>
                        <th>Cliente</th>
                        <th>Excluir</th>
                      </thead>
                      <tbody>
                      </tbody>
                    </table>
                  </div>

                </div>
              </div>

              <div class="modal-footer">
                <div class="row">
                  <div class="col-sm-12">
                    <button id="btn_confirmar_pedido" class="btn btn-danger"> Importar </button>
                  </div>
                </div>
              </div>
            </div>

            <div class="tab-pane fade" id="divImportarLote" role="tabpanel" aria-labelledby="tabImpLote">
              <div class="col-12 col-sm-12 col-md-12">
                <div class="row" style="margin-top: 11px; margin-bottom: 20px">

                  <div class="col-5 mt-6 mt-md-0">
                    <fieldset class="form border-Field mb-0 pb-0 d-md-flex d-block">
                      <legend class="textoBorda mb-0 pb-0">Lote</legend>
                      <div class="icheck-primary mr-3"><input type="radio" id="rdTinturaria" class="ml-0 ml-md-0" name="lotede"><label for="rdTinturaria">Tinturaria</label></div>
                      <div class="icheck-primary mr-3"><input type="radio" id="rdFaccao" checked class="ml-0 ml-md-2" name="lotede"><label for="rdFaccao">Facção</label></div>
                      <div class="icheck-primary mr-3"><input type="radio" id="tdTecelagem" class="ml-0 ml-md-2" name="lotede"><label for="tdTecelagem">Tecel.</label></div>
                      <div class="icheck-primary mr-3"><input type="radio" id="rdFacProc" class="ml-0 ml-md-2" name="lotede"><label for="rdFacProc">Fac. reproc.</label></div>
                    </fieldset>
                  </div>

                  <div class="col-4">
                    <fieldset class="form border-Field mb-0 pb-0 d-md-flex d-block">
                      <legend class="textoBorda mb-0 pb-0">Tipo</legend>
                      <div class="icheck-primary mr-3"><input type="radio" id="rdTipoTodos" class="ml-0 ml-md-0" name="tipo"><label for="rdTipoTodos">Todos</label></div>
                      <div class="icheck-primary mr-3"><input type="radio" id="rdTipoPecas" checked class="ml-0 ml-md-2" name="tipo"><label for="rdTipoPecas">Peças</label></div>
                      <div class="icheck-primary mr-3"><input type="radio" id="rdTipoAviamentos" class="ml-0 ml-md-2" name="tipo"><label for="rdTipoAviamentos">Aviamentos</label></div>
                    </fieldset>
                  </div>

                  <div class="col-3">
                    <fieldset class="form border-Field mb-0 pb-0">
                      <legend class="textoBorda mb-0 pb-0">Opções</legend>
                      <div class="icheck-primary"><input type="checkbox" checked id="cbAgruparItensConsumo"><label for="cbAgruparItensConsumo">Agrupar itens do consumo</label></div>
                    </fieldset>
                  </div>

                  <div class="col-6" style="margin-top: 10px;">
                    <fieldset class="form border-Field mb-0 pb-0 d-md-flex d-block">
                      <legend class="textoBorda mb-0 pb-0">Agrupar itens por</legend>
                      <div class="icheck-primary mr-3"><input type="radio" id="rdNenhum" class="ml-0 ml-md-0" name="agrupitenspor"><label for="rdNenhum">Nenhum</label></div>
                      <div class="icheck-primary mr-3"><input type="radio" id="rdCodigo" checked class="ml-0 ml-md-2" name="agrupitenspor"><label for="rdCodigo">Código</label></div>
                      <div class="icheck-primary mr-3"><input type="radio" id="rdCodigoCor" class="ml-0 ml-md-2" name="agrupitenspor"><label for="rdCodigoCor">Código/Cor</label></div>
                    </fieldset>
                  </div>

                  <div class="col-6" style="margin-top: 10px;">
                    <fieldset class="form border-Field mb-0 pb-0">
                      <legend class="textoBorda mb-0 pb-0">Opções</legend>
                      <div class="icheck-primary"><input type="checkbox" id="cbBuscaConsSetorPadrao"><label for="cbBuscaConsSetorPadrao">Buscar consumos do setor informado</label></div>
                    </fieldset>
                  </div>


                  <div class="col-lg-4" style="margin-top: 1%;">
                    <label data-error="wrong" data-success="right" for="txtLote">Lote *</label>
                    <div class="input-group">
                      <input type="text" class="input-default focus form-control" id="txtLote" name="txtLote" placeholder="Lote">
                    </div>
                  </div>

                  <div class="col-lg-4" style="margin-top: 1%;">
                    <label data-error="wrong" data-success="right" for="txtSetorLote">Setor *</label>
                    <div class="input-group">
                      <input type="text" class="input-default focus form-control" id="txtSetorLote" name="txtSetorLote" placeholder="Setor">
                      <div class="input-group-append">
                        <button class="btn bg-danger" id="btnSetorLote" name="btnSetorLote" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                        <button class="btn bg-danger" id="btnASetorLote" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                      </div>
                    </div>
                  </div>

                  <div class="col-lg-4" style="margin-top: 1%;">
                    <label data-error="wrong" data-success="right" for="txtParteLote">Parte *</label>
                    <div class="input-group">
                      <input type="text" class="input-default focus form-control" id="txtParteLote" name="txtParteLote" placeholder="Parte" value="[00] - PARTE UNICA">
                      <div class="input-group-append">
                        <button class="btn bg-danger" id="btnParteLote" name="btnParteLote" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                        <button class="btn bg-danger" id="btnAParteLote" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                      </div>
                    </div>
                  </div>

                  <div class="col-lg-6" style="margin-top: 1%;">
                    <label data-error="wrong" data-success="right" for="txtNaturezaLote">Natureza *</label>
                    <div class="input-group">
                      <input type="text" class="input-default focus form-control" id="txtNaturezaLote" name="txtNaturezaLote" placeholder="Natureza">
                      <div class="input-group-append">
                        <button class="btn bg-danger" id="btnNaturezaLote" name="btnNaturezaLote" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                        <button class="btn bg-danger" id="btnANaturezaLote" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                      </div>
                    </div>
                  </div>

                  <div class="col-lg-6" style="margin-top: 1%;">
                    <label data-error="wrong" data-success="right" for="txtOperacaoLote">Operação</label>
                    <div class="input-group">
                      <input type="text" class="input-default focus form-control" id="txtOperacaoLote" name="txtOperacaoLote" placeholder="Operação">
                      <div class="input-group-append">
                        <button class="btn bg-danger" id="btnOperacaoLote" name="btnOperacaoLote" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                        <button class="btn bg-danger" id="btnAOperacaoLote" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                      </div>
                    </div>
                  </div>

                </div>
              </div>

              <div class="modal-footer">
                <div class="row">
                  <div class="col-sm-12">
                    <button id="btn_confirmar_lote" class="btn btn-danger"> Importar </button>
                  </div>
                </div>
              </div>
            </div>

            <div class="tab-pane fade" id="divImportarOS" role="tabpanel" aria-labelledby="tabImpOs">
              <div class="col-12 col-sm-12 col-md-12">
                <div class="row d-flex justify-content-center" style="margin-top: 11px; margin-bottom: 20px">

                  <div class="col-lg-8" style="margin-top: 1%;" id="divOs">
                    <label data-error="wrong" data-success="right" for="txtOs">Ordem de Serviço: *</label>
                    <div class="input-group">
                      <input type="text" class="input-default focus form-control" id="txtOs" name="txtOs" placeholder="Ordem de Serviço">
                      <div class="input-group-append">
                        <button class="btn bg-danger" id="btnOs" name="btnOs" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                        <button class="btn bg-danger" id="btnAOs" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                      </div>
                    </div>
                  </div>
                  <div class="col-sm-8">
                    <table id="tabelaOs" class="table table-sm table-select table-hover" width="100%">
                      <thead>
                        <th>O.S.</th>
                        <th>Cliente</th>
                        <th>Excluir</th>
                      </thead>
                      <tbody>
                      </tbody>
                    </table>
                  </div>

                </div>
              </div>

              <div class="modal-footer">
                <div class="row">
                  <div class="col-sm-12">
                    <button id="btn_confirmar_os" class="btn btn-danger"> Importar </button>
                  </div>
                </div>
              </div>
            </div>

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

  <div class="modal fade" id="modalReferenciar" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-xl">
      <div class="modal-content">
        <div class="modal-header">
          <h4 class="modal-title">Referenciar Nota</h4>
          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">&times;</span>
          </button>
        </div>
        <div class="modal-body">
          <div class="row form-group">

            <div class="col-lg-12">
              <div class="row">
                <div class="col-sm-6">
                  <label class="labelGeral" for="divOperacaoRef" data-error="wrong" data-success="right">Operação</label>
                  <div id="divOperacaoRef" class="checkboxMoeda" style="margin-top: -.5%">
                    <label class="container">Entrada/Aquisição
                      <input type="radio" checked="checked" value="E" id="radioEntradaAquisicao" name="operacaoRef">
                      <span class="checkmark"></span>
                    </label>
                    <label class="container">Saída/Prestação
                      <input type="radio" id="radioSaidaPrestacao" value="S" name="operacaoRef">
                      <span class="checkmark"></span>
                    </label>
                  </div>
                </div>
                <div class="col-sm-6">
                  <label class="labelGeral" for="divEmitenteRef" data-error="wrong" data-success="right">Emitente</label>
                  <div id="divEmitenteRef" class="checkboxMoeda" style="margin-top: -.5%">
                    <label class="container">Emissão Própria
                      <input type="radio" checked="checked" value="0" id="radioEmissaoPropria" name="emitenteRef">
                      <span class="checkmark"></span>
                    </label>
                    <label class="container">Terceiros
                      <input type="radio" id="radioTerceirosRef" value="1" name="emitenteRef">
                      <span class="checkmark"></span>
                    </label>
                  </div>
                </div>
                <div class="col-lg-6 col-6 form-group" style="margin-top: 13px;">
                  <label data-error="wrong" class="labelGeral" data-success="right" for="txtModeloDocto">Modelo de Docto *</label>
                  <div class="input-group">
                    <input type="text" class="input-default focus form-control" id="txtModeloDocto" name="txtModeloDocto" class="form-control" placeholder="Modelo de Docto">
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btnModeloDocto" name="btnModeloDocto" data-button="absolute" type="button">
                        <i class="m-0 p-0 fas fa-search"></i>
                      </button>
                      <button class="btn bg-danger" id="btnAModeloDocto" type="button">
                        <i class="m-0 p-0 fas fa-trash"></i>
                      </button>
                    </div>
                  </div>
                </div>
                <div class="col-lg-6 col-6 form-group" style="margin-top: 13px;" id="divInfCompl">
                  <label data-error="wrong" class="labelGeral" data-success="right" for="txtInfCompl">Inf. Compl. *</label>
                  <div class="input-group">
                    <input type="text" class="input-default focus form-control" id="txtInfCompl" name="txtInfCompl" class="form-control" placeholder="Inf. Compl.">
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btnInfCompl" name="btnInfCompl" data-button="absolute" type="button">
                        <i class="m-0 p-0 fas fa-search"></i>
                      </button>
                      <button class="btn bg-danger" id="btnAInfCompl" type="button">
                        <i class="m-0 p-0 fas fa-trash"></i>
                      </button>
                    </div>
                  </div>
                </div>
                <div class="col-lg-6 col-6 form-group d-none" style="margin-top: 13px;" id="divSeqEcf">
                  <label data-error="wrong" class="labelGeral" data-success="right" for="txtSeqEcf">Seq. do ECF *</label>
                  <div class="input-group">
                    <input type="text" class="input-default focus form-control" id="txtSeqEcf" name="txtSeqEcf" class="form-control" placeholder="Seq. do ECF">
                  </div>
                </div>
                <div class="col-lg-12 col-12 form-group" id="divNotaRef">
                  <div class="row">
                    <div class="col-lg-2" style="margin-top: 25px;">
                      <button class="btn btn-sm btn-danger" title="Referenciar por nota" id="btnReferenciarPorNota">Nota</button>
                      <button class="btn btn-sm btn-danger" title="Referenciar por chave" id="btnReferenciarPorChave">Chave</button>
                    </div>
                    <div class="col-lg-10" id="divRefNota">
                      <label data-error="wrong" class="labelGeral" data-success="right" for="txtNotaRef">Nota *</label>
                      <div class="input-group">
                        <input type="text" disabled class="input-default focus form-control" id="txtNotaRef" name="txtNotaRef" class="form-control" placeholder="Nota">
                        <div class="input-group-append">
                          <button class="btn bg-danger" id="btnNotaRef" name="btnNotaRef" data-button="absolute" type="button">
                            <i class="m-0 p-0 fas fa-search"></i>
                          </button>
                          <button class="btn bg-danger" id="btnANotaRef" type="button">
                            <i class="m-0 p-0 fas fa-trash"></i>
                          </button>
                        </div>
                      </div>
                    </div>
                    <div class="col-lg-7 d-none" id="divRefChave">
                      <label data-error="wrong" class="labelGeral" data-success="right" for="txtChaveRef">Chave *</label>
                      <input type="text" class="input-default focus form-control" maxlength="44" id="txtChaveRef" name="txtChaveRef" class="form-control" placeholder="Chave">
                    </div>
                    <div class="col-lg-3 d-none" id="divRefData">
                      <label data-error="wrong" class="labelGeral" data-success="right" for="txtDataRef">Data Emissão *</label>
                      <input type="date" max="2500-12-31" class="input-default focus form-control" id="txtDataRef" name="txtDataRef">
                    </div>
                    <div class="col-lg-3 d-none" id="divRefValorNota">
                      <label data-error="wrong" class="labelGeral" data-success="right" for="txtValorNota">Valor Nota *</label>
                      <input type="text" class="input-default focus form-control" id="txtValorNota" name="txtValorNota">
                    </div>
                  </div>
                </div>
                <div class="col-lg-12 col-12 form-group d-none" id="divNumCoo">
                  <label data-error="wrong" class="labelGeral" data-success="right" for="txtNumCoo">Num. COO. *</label>
                  <div class="input-group">
                    <input type="text" class="input-default focus form-control" id="txtNumCoo" name="txtNumCoo" class="form-control" placeholder="Num. COO.">
                  </div>
                </div>
                <div class="col-lg-6 col-6 form-group">
                  <label data-error="wrong" class="labelGeral" data-success="right" for="txtValorRef">Valor</label>
                  <div class="input-group">
                    <input type="text" class="input-default focus form-control" id="txtValorRef" name="txtValorRef" class="form-control" placeholder="Valor">
                  </div>
                </div>
                <div class="col-lg-6 col-6 form-group">
                  <label data-error="wrong" class="labelGeral" data-success="right" for="txtPesoRef">Peso</label>
                  <div class="input-group">
                    <input type="text" class="input-default focus form-control" id="txtPesoRef" name="txtPesoRef" class="form-control" placeholder="Peso">
                  </div>
                </div>
                <div class="col-lg-12 form-group">
                  <button class="btn bg-danger btn-block" id="btnAddNotaRef" name="btnAddNotaRef" data-button="absolute" type="button">
                    <label class="m-0 p-0">Adicionar</label>
                  </button>
                </div>
                <input type="text" class="d-none" id="txtDataNotaRef" name="txtDataNotaRef">
                <input type="text" class="d-none" id="txtCodcliNotaRef" name="txtCodcliNotaRef">
                <input type="text" class="d-none" id="txtChaveNotaRef" name="txtChaveNotaRef">
                <input type="text" class="d-none" id="txtValorNotaRef" name="txtValorNotaRef">
              </div>
            </div>
            <div class="col-lg-12">
              <table id="tabelaNotasRef" class="table table-sm table-select table-hover">
                <thead>
                  <tr>
                    <th class="th-sm">Fatura</th>
                    <th class="th-sm">Serie</th>
                    <th class="th-sm">Codcli</th>
                    <th class="th-sm">Emissão</th>
                    <th class="th-sm">Ind_Oper</th>
                    <th class="th-sm">Ind_Emit</th>
                    <th class="th-sm">Tipo_Doc</th>
                    <th class="th-sm">Codref</th>
                    <th class="th-sm">Peso</th>
                    <th class="th-sm">Valor</th>
                    <th class="th-sm">Valor_Nota</th>
                    <th class="th-sm">Num. COO.</th>
                    <th class="th-sm">Seq. ECF</th>
                    <th class="th-sm">Ações</th>
                  </tr>
                </thead>
                <tbody>
                </tbody>
              </table>
            </div>
          </div>
        </div>
        <div class="modal-footer">
          <div class="row">
            <div class="col-sm-12">
              <button id="btnConfirmarNotaRef" class="btn btn-danger"> Confirmar </button>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>

  <div class="modal fade" id="modalDesconto" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
      <div class="modal-content">
        <div class="modal-header">
          <h4 class="modal-title">Adicionar Desconto</h4>
          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">&times;</span>
          </button>
        </div>
        <div class="modal-body">
          <div class="row">
            <div class="col-lg-12 col-sm-12 form-group" style="margin-top: 2%;">
              <div class="input-group">
                <input type="text" class="input-default focus form-control" id="txtDescontoOld" value="0.00" name="txtDescontoTotal" class="form-control" placeholder="Valor desconto">
              </div>
            </div>
          </div>
        </div>
        <div class="modal-footer">
          <div class="row">
            <div class="col-sm-12">
              <button id="btnConfirmarDesc" class="btn btn-danger"> Confirmar </button>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>

  <div class="modal fade" id="modalContaOrdem" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-lg">
      <div class="modal-content">
        <div class="modal-header">
          <h4 class="modal-title">Conta e Ordem</h4>
          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">&times;</span>
          </button>
        </div>
        <div class="modal-body">
          <div class="row">
            <div class="col-lg-12 col-sm-12 form-group" style="margin-top: 2%;">
              <div class="input-group">
                <input type="text" disabled class="input-default focus form-control" id="txtContaOrdem" name="txtContaOrdem" class="form-control" placeholder="Conta e Ordem de:">
                <div class="input-group-append">
                  <button class="btn bg-danger" id="btn-clienteContaOrdem" name="btn-clienteContaOrdem" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                  <button class="btn bg-danger" id="btn-limpa-clienteContaOrdem" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>

  <div class="modal fade" id="modalFrete" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
      <div class="modal-content">
        <div class="modal-header">
          <h4 class="modal-title">Adicionar Valor de Frete</h4>
          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">&times;</span>
          </button>
        </div>
        <div class="modal-body">
          <div class="row">
            <div class="col-lg-12 col-sm-12 form-group" style="margin-top: 2%;">
              <div class="input-group">
                <input type="text" class="input-default focus form-control" id="txtFreteOld" value="0.00" name="txtFreteTotal" class="form-control" placeholder="Valor frete">
              </div>
            </div>
          </div>
        </div>
        <div class="modal-footer">
          <div class="row">
            <div class="col-sm-12">
              <button id="btnConfirmarFrete" class="btn btn-danger"> Confirmar </button>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>

  <div class="modal fade" id="modalDespesa" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
      <div class="modal-content">
        <div class="modal-header">
          <h4 class="modal-title">Adicionar Valor de Despesa</h4>
          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">&times;</span>
          </button>
        </div>
        <div class="modal-body">
          <div class="row">
            <div class="col-lg-12 col-sm-12 form-group" style="margin-top: 2%;">
              <div class="input-group">
                <input type="text" class="input-default focus form-control" id="txtDespesaOld" value="0.00" name="txtDespesaTotal" class="form-control" placeholder="Valor despesa">
              </div>
            </div>
          </div>
        </div>
        <div class="modal-footer">
          <div class="row">
            <div class="col-sm-12">
              <button id="btnConfirmarDespesa" class="btn btn-danger"> Confirmar </button>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>

  <div id="modalTribProd" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div id="modalProdutoTrib" class="modal-dialog modal-lg">
      <div class="modal-content">
        <div class="modal-header">
          <h4 class="modal-title">Tributações</h4>
          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">&times;</span>
          </button>
        </div>
        <div class="modal-body">
          <div class="row">
            <input type="text" class="input-default form-control d-none" id="txtIndiceAlteracao" name="txtIndiceAlteracao">
            <div class="col-lg-6 col-sm-12 form-group">
              <label data-error="wrong" data-success="right" for="txtEnquadra">Enquadramento IPI</label>
              <div class="input-group">
                <input type="text" class="input-default focus form-control" id="txtEnquadra" name="txtEnquadra" class="form-control" placeholder="Enquadramento IPI">
                <div class="input-group-append">
                  <button class="btn bg-danger" id="btnEnquadra" name="btnEnquadra" data-button="absolute" type="button">
                    <i class="m-0 p-0 fas fa-search"></i>
                  </button>
                  <button class="btn bg-danger" id="btnAEnquadra" type="button">
                    <i class="m-0 p-0 fas fa-trash"></i>
                  </button>
                </div>
              </div>
            </div>
            <div class="col-lg-6 col-sm-12 form-group">
              <label data-error="wrong" data-success="right" for="txtCsosn">CSOSN</label>
              <div class="input-group">
                <input type="text" class="input-default focus form-control" id="txtCsosn" name="txtCsosn" class="form-control" placeholder="CSOSN">
                <div class="input-group-append">
                  <button class="btn bg-danger" id="btnCsosn" name="btnCsosn" data-button="absolute" type="button">
                    <i class="m-0 p-0 fas fa-search"></i>
                  </button>
                  <button class="btn bg-danger" id="btnACsosn" type="button">
                    <i class="m-0 p-0 fas fa-trash"></i>
                  </button>
                </div>
              </div>
            </div>
            <div class="col-lg-6 col-sm-12 form-group">
              <label data-error="wrong" data-success="right" for="txtCstIcms">CST ICMS</label>
              <div class="input-group">
                <input type="text" class="input-default focus form-control" id="txtCstIcms" name="txtCstIcms" class="form-control" placeholder="CST ICMS">
                <div class="input-group-append">
                  <button class="btn bg-danger" id="btnCstIcms" name="btn-representante" data-button="absolute" type="button">
                    <i class="m-0 p-0 fas fa-search"></i>
                  </button>
                  <button class="btn bg-danger" id="btnACstIcms" type="button">
                    <i class="m-0 p-0 fas fa-trash"></i>
                  </button>
                </div>
              </div>
            </div>
            <div class="col-lg-6 col-sm-12 form-group">
              <label data-error="wrong" data-success="right" for="txtCstIpi">CST IPI</label>
              <div class="input-group">
                <input type="text" class="input-default focus form-control" id="txtCstIpi" name="txtCstIpi" class="form-control" placeholder="CST IPI">
                <div class="input-group-append">
                  <button class="btn bg-danger" id="btnCstIpi" name="btn-representante" data-button="absolute" type="button">
                    <i class="m-0 p-0 fas fa-search"></i>
                  </button>
                  <button class="btn bg-danger" id="btnACstIpi" type="button">
                    <i class="m-0 p-0 fas fa-trash"></i>
                  </button>
                </div>
              </div>
            </div>
            <div class="col-lg-6 col-sm-12 form-group">
              <label data-error="wrong" data-success="right" for="txtCstPis">CST PIS</label>
              <div class="input-group">
                <input type="text" class="input-default focus form-control" id="txtCstPis" name="txtCstPis" class="form-control" placeholder="CST PIS">
                <div class="input-group-append">
                  <button class="btn bg-danger" id="btnCstPis" name="btn-representante" data-button="absolute" type="button">
                    <i class="m-0 p-0 fas fa-search"></i>
                  </button>
                  <button class="btn bg-danger" id="btnACstPis" type="button">
                    <i class="m-0 p-0 fas fa-trash"></i>
                  </button>
                </div>
              </div>
            </div>
            <div class="col-lg-6 col-sm-12 form-group">
              <label data-error="wrong" data-success="right" for="txtCstCofins">CST COFINS</label>
              <div class="input-group">
                <input type="text" class="input-default focus form-control" id="txtCstCofins" name="txtCstCofins" class="form-control" placeholder="CST COFINS">
                <div class="input-group-append">
                  <button class="btn bg-danger" id="btnCstCofins" name="btn-representante" data-button="absolute" type="button">
                    <i class="m-0 p-0 fas fa-search"></i>
                  </button>
                  <button class="btn bg-danger" id="btnACstCofins" type="button">
                    <i class="m-0 p-0 fas fa-trash"></i>
                  </button>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div class="modal-footer">
          <div class="row">
            <div class="col-sm-12">
              <button id="btnConfirmarTrib" class="btn btn-danger"> Confirmar </button>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>

  <div id="modalVinculo" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div id="modalProdutoTrib" class="modal-dialog modal-xl" style="min-width: 95%">
      <div class="modal-content">
        <div class="modal-header">
          <h4 class="modal-title">Dividir Nota</h4>
          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">&times;</span>
          </button>
        </div>
        <div class="modal-body">
          <div class="col-sm-12 table-responsive card-body px-0 pb-0 pt-0">
            <table id="tabelaDivisao" style="white-space: nowrap" class="table table-sm table-select table-hover" width="100%">
              <thead></thead>
              <tbody></tbody>
            </table>
          </div>
        </div>
        <div class="modal-footer">
          <div class="row">
            <div class="col-sm-12">
              <button id="btnConfirmarDivisao" class="btn btn-danger"> Confirmar </button>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>

  <div class="modal fade" id="modalImportacao" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-xl">
      <div class="modal-content">
        <div class="modal-header">
          <h4 class="modal-title">Informações de Importação</h4>
          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">&times;</span>
          </button>
        </div>
        <div class="modal-body">

          <nav>
            <div class="nav nav-tabs justify-content-center" id="nav-tab" role="tablist" style="text-decoration: none">
              <a class="nav-link abaLink active" id="tabDadosGerais" data-toggle="tab" href="#divDadosGerais" role="tab" aria-controls="divDadosGerais" aria-selected="true">Dados Gerais</a>
              <a class="nav-link abaLink" id="tabImpostos" data-toggle="tab" href="#divImpostos" role="tab" aria-controls="divImpostos" aria-selected="false">Impostos</a>
              <!-- <a class="nav-link abaLink" id="tabImpMovimentacao" data-toggle="tab" href="#divImportarMovimentacao" role="tab" aria-controls="divImportarMovimentacao" aria-selected="false">Importar Movimentação</a>
              <a class="nav-link abaLink" id="tabImpPedido" data-toggle="tab" href="#divImportarPedido" role="tab" aria-controls="divImportarPedido" aria-selected="false">Importar Pedido</a> -->
            </div>
          </nav>
          <div class="tab-content" id="nav-tabContent">

            <div class="tab-pane fade show active" id="divDadosGerais" role="tabpanel" aria-labelledby="tabDadosGerais">
              <div class="row" style="margin-top: 15px;">
                <div class="col-lg-4 form-group">
                  <label data-error="wrong" data-success="right" for="txtNumDocImp">Nº Documento Importação</label>
                  <div class="input-group">
                    <input type="text" class="input-default focus form-control" id="txtNumDocImp" name="txtNumDocImp" placeholder="Nº Documento Importação">
                  </div>
                </div>

                <div class="col-lg-4 form-group">
                  <label data-error="wrong" data-success="right" for="dtDataDi">Data D.I.</label>
                  <div class="input-group">
                    <input type="date" max="2500-12-31" class="input-default focus form-control" id="dtDataDi" name="dtDataDi">
                  </div>
                </div>

                <div class="col-lg-4 form-group">
                  <label data-error="wrong" data-success="right" for="txtIdEstrangeiro">ID Estrangeiro</label>
                  <div class="input-group">
                    <input type="text" class="input-default focus form-control" id="txtIdEstrangeiro" name="txtIdEstrangeiro" placeholder="ID Estrangeiro">
                  </div>
                </div>

                <div class="col-lg-4 form-group">
                  <label data-error="wrong" data-success="right" for="txtUfLocalDes">UF/Local Desembaraço</label>
                  <div class="input-group">
                    <input type="text" class="input-default focus form-control" id="txtUfLocalDes" name="txtUfLocalDes" placeholder="UF/Local Desembaraço">
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btnUfLocalDes" name="btn-representante" data-button="absolute" type="button">
                        <i class="m-0 p-0 fas fa-search"></i>
                      </button>
                      <button class="btn bg-danger" id="btnAUfLocalDes" type="button">
                        <i class="m-0 p-0 fas fa-trash"></i>
                      </button>
                    </div>
                  </div>
                </div>

                <div class="col-lg-4 form-group">
                  <label data-error="wrong" data-success="right" for="dtDesembaraco">Data Desembaraço</label>
                  <div class="input-group">
                    <input type="date" max="2500-12-31" class="input-default focus form-control" id="dtDesembaraco" name="dtDesembaraco">
                  </div>
                </div>

                <div class="col-lg-4 form-group">
                  <label data-error="wrong" data-success="right" for="txtUfAdquirente">Estado Adquirente</label>
                  <div class="input-group">
                    <input type="text" class="input-default focus form-control" id="txtUfAdquirente" name="txtUfAdquirente" placeholder="Estado Adquirente">
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btnUfAdquirente" name="btn-representante" data-button="absolute" type="button">
                        <i class="m-0 p-0 fas fa-search"></i>
                      </button>
                      <button class="btn bg-danger" id="btnAUfAdquirente" type="button">
                        <i class="m-0 p-0 fas fa-trash"></i>
                      </button>
                    </div>
                  </div>
                </div>

                <div class="col-lg-4 form-group">
                  <label data-error="wrong" data-success="right" for="rgTipoDocto">Tipo Docto.</label>
                  <div class="input-group">
                    <select style="width:100%;" class="form-control select2 select2-danger focus" data-dropdown-css-class="select2-danger" id="rgTipoDocto" class="custom-select focus">
                      <option value="" selected>Selecione uma opção</option>
                      <option value="0">0 - Declaração de Importação</option>
                      <option value="1">1 - Declaração Simplificada de Importação</option>
                    </select>
                  </div>
                </div>

                <div class="col-lg-4 form-group">
                  <label data-error="wrong" data-success="right" for="txtDrawback">Número Drawback</label>
                  <div class="input-group">
                    <input type="text" class="input-default focus form-control" id="txtDrawback" name="txtDrawback" placeholder="Número Drawback">
                  </div>
                </div>

                <div class="col-lg-4 form-group">
                  <label data-error="wrong" data-success="right" for="txtCnpjAdquirente">CNPJ Adquirente</label>
                  <div class="input-group">
                    <input type="text" class="input-default focus form-control" id="txtCnpjAdquirente" name="txtCnpjAdquirente" placeholder="CNPJ Adquirente">
                  </div>
                </div>

                <div class="col-lg-4 form-group">
                  <label data-error="wrong" data-success="right" for="txtValMarinha">Val. Marinha Mercante</label>
                  <div class="input-group">
                    <input type="text" class="input-default focus form-control" id="txtValMarinha" name="txtValMarinha" placeholder="Val. Marinha Mercante">
                  </div>
                </div>

                <div class="col-lg-4 form-group">
                  <label data-error="wrong" data-success="right" for="txtDespAduaneiras">Val. Desp. Aduaneiras</label>
                  <div class="input-group">
                    <input type="text" class="input-default focus form-control" id="txtDespAduaneiras" name="txtDespAduaneiras" placeholder="Val. Marinha Mercante">
                  </div>
                </div>

                <div class="col-lg-4 form-group">
                  <label data-error="wrong" data-success="right" for="txtSiscomex">Taxa Siscomex</label>
                  <div class="input-group">
                    <input type="text" class="input-default focus form-control" id="txtSiscomex" name="txtSiscomex" placeholder="Taxa Siscomex">
                  </div>
                </div>

                <div class="col-lg-4 form-group">
                  <label data-error="wrong" data-success="right" for="txtValSeguro">Val. Seguro</label>
                  <div class="input-group">
                    <input type="text" class="input-default focus form-control" id="txtValSeguro" name="txtValSeguro" placeholder="Val. Seguro">
                  </div>
                </div>

                <div class="col-lg-4 form-group">
                  <label data-error="wrong" data-success="right" for="txtValFrete">Val. Frete</label>
                  <div class="input-group">
                    <input type="text" class="input-default focus form-control" id="txtValFrete" name="txtValFrete" placeholder="Val. Frete">
                  </div>
                </div>

                <div class="col-lg-4 form-group">
                  <label data-error="wrong" data-success="right" for="txtOutDesp">Outras Despesas</label>
                  <div class="input-group">
                    <input type="text" class="input-default focus form-control" id="txtOutDesp" name="txtOutDesp" placeholder="Outras Despesas">
                  </div>
                </div>
              </div>
            </div>

            <div class="tab-pane fade" id="divImpostos" role="tabpanel" aria-labelledby="tabImpostos">
              <div class="row" style="margin-top: 15px;">
                <div class="col-lg-6">
                  <div class="row">

                    <div class="col-lg-7 form-group">
                      <label data-error="wrong" data-success="right" for="txtBaseCalcImp">Base Cálc. Importação</label>
                      <div class="input-group">
                        <input type="text" class="input-default focus form-control" id="txtBaseCalcImp" name="txtBaseCalcImp" placeholder="Base Cálc. Importação">
                      </div>
                    </div>
                    <div class="col-lg-5 form-group" style="margin-top: 37px;">
                      <input type="checkbox" id="checkManterValDig"> <label for="checkManterValDig">Manter Val. Digitado</label>
                    </div>

                    <div class="col-lg-7 form-group">
                      <label data-error="wrong" data-success="right" for="txtAliqImportacao">Aliq. Importação</label>
                      <div class="input-group">
                        <input type="text" class="input-default focus form-control" id="txtAliqImportacao" name="txtAliqImportacao" placeholder="Aliq. Importação">
                      </div>
                    </div>
                    <div class="col-lg-5 form-group" style="margin-top: 37px;">
                      <input type="checkbox" id="checkImpFrete"> <label for="checkImpFrete">+ Frete</label>
                    </div>

                    <div class="col-lg-7 form-group">
                      <label data-error="wrong" data-success="right" for="txtValImpImportacao">Imposto Importação</label>
                      <div class="input-group">
                        <input type="text" class="input-default focus form-control" id="txtValImpImportacao" name="txtValImpImportacao" placeholder="Imposto Importação">
                      </div>
                    </div>
                    <div class="col-lg-5 form-group" style="margin-top: 37px;">
                      <input type="checkbox" id="checkImpSeguro"> <label for="checkImpSeguro">+ Seguro</label>
                    </div>

                    <div class="col-lg-7 form-group" style="margin-top: 37px;">
                      <input type="checkbox" id="checkRatearValImpImp"> <label for="checkRatearValImpImp">Ratear val. imp. importação para os itens</label>
                    </div>
                    <div class="col-lg-5 form-group" style="margin-top: 37px;">
                      <input type="checkbox" id="checkImpDesp"> <label for="checkImpDesp">+ Despesas</label>
                    </div>

                  </div>
                </div>

                <div class="col-lg-6">
                  <div class="row">

                    <div class="col-lg-6 form-group">
                      <label data-error="wrong" data-success="right" for="txtBaseCalcImpaaaa">Base Cálc. Importação</label>
                      <div class="input-group">
                        <input type="text" class="input-default focus form-control" id="txtBaseCalcImpaaaa" name="txtBaseCalcImpaaaa" placeholder="Outras Despesas">
                      </div>
                    </div>

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

          </div>
        </div>
        <div class="modal-footer">
          <div class="row">
            <div class="col-sm-12">
              <button id="btnConfirmarInfos" class="btn btn-danger"> Confirmar </button>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>


  <?php
  include_once('../../modais.php');
  ?>

  <!-- Control Sidebar -->
  <aside class="control-sidebar control-sidebar-dark">
    <!-- Control sidebar content goes here -->
  </aside>
  <!-- /.control-sidebar -->
  </div>

  <!-- jQuery -->
  <script src="../plugins/jquery/jquery.min.js?versao=3.263.17.1"></script>
  <!-- jQuery UI 1.11.4 -->
  <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>
  <!-- SweetAlert2 -->
  <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>

  <!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
  <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/cliente/entidade.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/sisplan.js?versao=3.263.17.1"></script>
  <script src="../dist/js/popper.min.js?versao=3.263.17.1"></script>
  <script src="../dist/js/tippy-bundle.umd.js?versao=3.263.17.1"></script>
  <script src="../utils/funcoes.js?versao=3.263.17.1"></script>
  <script src="../dist/js/jquery.maskMoney.min.js?versao=3.263.17.1"></script>
  <script src="../utils/cookies.js?versao=3.263.17.1"></script>
  <script src="../utils/epc.js?versao=3.263.17.1"></script>
  <script src="../dist/js/driver.min.js?versao=3.263.17.1"></script>
  <script src="../dist/js/dataTables.keyTable2.js?versao=3.263.17.1"></script>
  <script type="text/javascript" src="../config.js?versao=3.263.17.1"></script>
  <script src="../plugins/select2/js/select2.full.min.js?versao=3.263.17.1"></script>
  <!-- Production -->
  <script type="text/javascript">
    $(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('FATURAMENTO_GERAL');
      if (!temAcesso.resultado) {
        toastrAcesso(temAcesso, BASE_URI);
        return;
      }

      const bQtdeCasasDecimais = parseFloat(await CopiaParametro('SISTEMA', 1)) + 2;
      const bloqNatureza = await CopiaParametro('FATURAMENTO', 13);
      const bDescontoVenda = await CopiaParametro('FATURAMENTO', 4);

      setCookie('qtde_casas_decimais', bQtdeCasasDecimais, 30);
      setCookie('bloqueia_natureza', bloqNatureza, 30);
      setCookie('param_desc_venda', bDescontoVenda, 30);

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

    });
  </script>
</body>

</html>