<?php include_once('../../config.php') ?>
<?php
$hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);
?>


<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>Sisplan Web | Impressão MDF-e</title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="<?php echo BASE_URI; ?>/plugins/fontawesome-free/css/all.min.css?versao=3.264.22.1">
  <!-- Ionicons -->
  <!-- Ionicons -->
  <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css?versao=3.264.22.1">
  <!-- Theme style -->
  <link rel="stylesheet" href="<?php echo BASE_URI; ?>/dist/css/adminlte.min.css?versao=3.264.22.1">
  <!-- overlayScrollbars -->
  <link rel="stylesheet" href="<?php echo BASE_URI; ?>/plugins/overlayScrollbars/css/OverlayScrollbars.min.css?versao=3.264.22.1">
  <!-- Daterange picker -->
  <link href='https://fonts.googleapis.com/css?family=Roboto:400,300,500,600,700,400italic' rel='stylesheet' type='text/css'>

  <link rel="stylesheet" href="<?php echo BASE_URI; ?>/dist/css/custom.css?versao=3.264.22.1">
  <link rel="stylesheet" href="<?php echo BASE_URI; ?>/dist/css/sisplan.css?versao=3.264.22.1">
  <link rel="stylesheet" type="text/css" href="<?php echo BASE_URI; ?>/plugins/datatables-keytable/css/keyTable.bootstrap4.min.css?versao=3.264.22.1">
  <link rel="stylesheet" type="text/css" href="<?php echo BASE_URI; ?>/dist/css/dataTables.bootstrap4.min.css?versao=3.264.22.1" />
  <!-- iCheck for checkboxes and radio inputs -->
  <link rel="stylesheet" href="<?php echo BASE_URI; ?>/plugins/icheck-bootstrap/icheck-bootstrap.min.css?versao=3.264.22.1">
  <link rel="shortcut icon" href="<?php echo BASE_URI; ?>/favicon.ico">
  <link rel="stylesheet" href="<?php echo BASE_URI; ?>/dist/css/select.bootstrap.min.css?versao=3.264.22.1">
  <!-- Google Font: Source Sans Pro -->
  <!-- AutoComplete -->
  <link rel="stylesheet" href="<?php echo BASE_URI; ?>/dist/css/jquery-ui.css?versao=3.264.22.1">

  <link rel="stylesheet" type="text/css" href="<?php echo BASE_URI; ?>/dist/css/driver.min.css?versao=3.264.22.1" />

  <style>
    .ui-autocomplete-loading {
      background: white url("<?php echo BASE_URI; ?>/dist/img/ui-anim_basic_16x16.gif") center center no-repeat;
    }

    .dropdown-toggle::after {
      display: inline-block;
      margin-left: 0.300cm;
      vertical-align: 0.255em;
      content: "";
      border-top: 0.3em solid;
      border-right: 0.3em solid transparent;
      border-bottom: 0;
      border-left: 0.3em solid transparent;
    }

    .input-group button,
    .input-group input {
      height: 40px;
    }

    .input-group button {
      min-width: 45px;
    }

    .btn.bg-danger {
      border: 1px solid white;
    }

    .info-box-text {
      font-size: 20px;
      font-weight: bold;
      color: grey;
    }

    .botoesMenu {
      height: 100%;
      padding-left: auto;
      padding-right: auto;
      color: white !important;
      min-width: 150px;
      font-weight: bold;
      margin-left: -4px !important;
      font-size: 1rem !important;
      background-color: #343a40;
      cursor: pointer !important;
    }

    .visible {
      visibility: hidden
    }

    .opcoesImpressao {
      border-top: 0px;
      background-color: transparent !important;
      color: #869099;
      padding: 1rem;
    }

    .bordaRadio {
      border: 2px solid #e0e4e6;
      border-radius: 4px;
      height: 169px;
      padding-left: 8px
    }

    #tabelaMunicipioCarregamento_wrapper .table.dataTable thead th {
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
    }

    #tabelaOutrosMotoristas_wrapper .table.dataTable thead th {
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
    }

    #tabelaPercurso_wrapper .table.dataTable thead th {
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
    }

    #tabelaReboques_wrapper .table.dataTable thead th {
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
    }

    #tabelaNFe_wrapper .table.dataTable thead th {
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
    }

    #tabelaNF_wrapper .table.dataTable thead th {
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
    }

    #tabelaCT_wrapper .table.dataTable thead th {
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
    }

    #tabelaAverbacoes_wrapper .table.dataTable thead th {
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
    }

    #tabelaEventoDFe_wrapper .table.dataTable thead th {
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
    }

    .card {
      padding: 1.5rem;
      border-top: 2px outset #ddd;
      box-shadow: none !important;
      margin-top: 20px;
      padding-top: 20px;
    }
  </style>
  <!-- Toastr -->
  <link rel="stylesheet" href="<?php echo BASE_URI; ?>/plugins/toastr/toastr.min.css">

</head>

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

    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
      <!-- Content Header (Page header) -->
      <div class="content-header">
        <div class="container-fluid">
          <div class="row mb-2">
            <div class="col-sm-6 row flex">
              <h4 class="m-0 text-dark">Envio e Impressão de MDF-e</h4>
              <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>
            </div><!-- /.col -->
            <div class="col-sm-6">
              <!-- <ol class="breadcrumb float-sm-right">
                <li class="breadcrumb-item active">Faturamento</li>
                <li class="breadcrumb-item active">Impressão NF-e</li>
              </ol> -->
            </div><!-- /.col -->
          </div><!-- /.row -->
        </div><!-- /.container-fluid -->
      </div>
      <!-- /.content-header -->

      <!-- Main content -->
      <section class="content">

        <div class="card" id="mar1133">
          <div class="card-body">
            <div class="container-fluid p-2">
              <div class="row pb-2">
                <div class="col-sm-12 d-flex justify-content-between">
                  <div>
                    <button id="btn-filtros" class="btn btn-success btn-sisp" type="button" data-toggle="modal" data-target="#modal-filtros">
                      <span class="fas fa-filter"></span> Filtros
                    </button>
                    <button id="btnConfig" class=" btn btn-danger text-white btn-sisp">
                      <span class="fas fa-cogs"></span> Config.
                    </button>
                    <button id="btnIncDFe" class=" btn btn-success text-white btn-sisp">
                      <span class="fas fa-newspaper"></span> Inc. de DFe
                    </button>
                  </div>
                  <div>
                    <p id="txtVencimentoCertificadoDigital" style="color: red; padding-top: 3.1%; "></p>
                  </div>
                  <div style="padding-top: .6%">
                    <span id="txtAmbienteDesc" style="color: red"></span>
                  </div>
                </div>
              </div>
              <div class="row">
                <div class="col-sm-12 table-responsive">
                  <table id="tabelaMDFe" class="table table-sm table-select table-hover" width="100%">
                    <thead>
                    </thead>
                    <tbody>
                    </tbody>
                  </table>
                </div>
              </div>
            </div>
          </div>
        </div>
      </section>
      <section class="content">
        <div class="modal fade" id="modal-itens">
          <div class="modal-dialog modal-xl">
            <div class="modal-content">
              <div class="modal-header">
                <h4 id="modal-itens-title" class="modal-title">Dados de Conferência MDF-e</h4>

                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                  <span aria-hidden="true">&times;</span>
                </button>
              </div>

              <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="tabInfTransporte" data-toggle="tab" href="#divInfTransporte" role="tab" aria-controls="divInfTransporte" aria-selected="true">Informações do Transporte</a>
                  <!-- <a class="nav-link abaLink active" id="tabMunicipioCarregamento" data-toggle="tab" href="#divMunicipioCarregamento" role="tab" aria-controls="divMunicipioCarregamento" aria-selected="true">Municípios Carregamento</a>
                  <a class="nav-link abaLink" id="tabOutrosMotoristas" data-toggle="tab" href="#divOutrosMotoristas" role="tab" aria-controls="divOutrosMotoristas" aria-selected="false">Outros Motoristas</a>
                  <a class="nav-link abaLink" id="tabPercurso" data-toggle="tab" href="#divPercurso" role="tab" aria-controls="divPercurso" aria-selected="true">Percurso</a>
                  <a class="nav-link abaLink" id="tabReboques" data-toggle="tab" href="#divReboques" role="tab" aria-controls="divReboques" aria-selected="true">Reboque(s)</a> -->
                  <a class="nav-link abaLink" id="tabDocFiscais" data-toggle="tab" href="#divDocFiscais" role="tab" aria-controls="divDocFiscais" aria-selected="true">Documentos Fiscais</a>
                  <!-- <a class="nav-link abaLink" id="tabNFe" data-toggle="tab" href="#divNFe" role="tab" aria-controls="divNFe" aria-selected="true">NF-e</a>
                  <a class="nav-link abaLink" id="tabCTe" data-toggle="tab" href="#divCTe" role="tab" aria-controls="divCTe" aria-selected="true">CT-e</a>
                  <a class="nav-link abaLink" id="tabNF" data-toggle="tab" href="#divNF" role="tab" aria-controls="divNF" aria-selected="true">NF - Nota fiscal mod. 1/1A</a>
                  <a class="nav-link abaLink" id="tabCT" data-toggle="tab" href="#divCT" role="tab" aria-controls="divCT" aria-selected="true">CT - Conhecimento Transporte</a> -->
                  <a class="nav-link abaLink" id="tabSeguradora" data-toggle="tab" href="#divSeguradora" role="tab" aria-controls="divSeguradora" aria-selected="false">Seguradora</a>
                  <a class="nav-link abaLink" id="tabProdPredominante" data-toggle="tab" href="#divProdPredominante" role="tab" aria-controls="divProdPredominante" aria-selected="false">Prod. Predominante</a>
                  <a class="nav-link abaLink" id="tabDadosMDFe" data-toggle="tab" href="#divDadosMDFe" role="tab" aria-controls="divDadosMDFe" aria-selected="false" hidden>Dados MDF-e</a>
                  <!-- <a class="nav-link abaLink" id="tabEventoDFe" data-toggle="tab" href="#divEventoDFe" role="tab" aria-controls="divEventoDFe" aria-selected="false">Evento DFe</a> -->
                </div>
              </nav>

              <div class="card-body">
                <div id="tourAlteraDadosNota">
                  <!-- <div class="modal-body" style="height: 57vh"> -->
                  <div class="tab-content" id="nav-tabContent">

                    <div class="tab-pane fade show active" id="divInfTransporte" role="tabpanel" aria-labelledby="tabInfTransporte">
                      <div class="modal-body" style="max-height: 50vh !important;">
                        <div class="card">
                          <h5>Municípios Carregamento</h5>
                          <div class="row">
                            <div class="col-sm-12 table-responsive">
                              <table id="tabelaMunicipioCarregamento" class="table table-sm table-select table-hover" width="100%">
                                <thead>
                                </thead>
                                <tbody>
                                </tbody>
                              </table>
                            </div>
                          </div>
                        </div>
                        <div class="card">
                          <h5>Outros Motoristas</h5>
                          <div class="row">
                            <div class="col-sm-12 table-responsive">
                              <table id="tabelaOutrosMotoristas" class="table table-sm table-select table-hover" width="100%">
                                <thead>
                                </thead>
                                <tbody>
                                </tbody>
                              </table>
                            </div>
                          </div>
                        </div>
                        <div class="card">
                          <h5>Percurso</h5>
                          <div class="row">
                            <div class="col-sm-12 table-responsive">
                              <table id="tabelaPercurso" class="table table-sm table-select table-hover" width="100%">
                                <thead>
                                </thead>
                                <tbody>
                                </tbody>
                              </table>
                            </div>
                          </div>
                        </div>
                        <div class="card">
                          <h5>Reboque(s)</h5>
                          <div class="row">
                            <div class="col-sm-12 table-responsive">
                              <table id="tabelaReboques" class="table table-sm table-select table-hover" width="100%">
                                <thead>
                                </thead>
                                <tbody>
                                </tbody>
                              </table>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>

                    <!-- <div class="tab-pane fade show active" id="divMunicipioCarregamento" role="tabpanel" aria-labelledby="tabMunicipioCarregamento">
                      <div class="modal-body" style="height: 50vh;">
                        <div class="row">
                          <div class="col-sm-12 table-responsive">
                            <table id="tabelaMunicipioCarregamento" class="table table-sm table-select table-hover" width="100%">
                              <thead>
                              </thead>
                              <tbody>
                              </tbody>
                            </table>
                          </div>
                        </div>
                      </div>
                    </div> -->

                    <!-- <div class="tab-pane fade show" id="divOutrosMotoristas" role="tabpanel" aria-labelledby="tabOutrosMotoristas">
                      <div class="modal-body" style="height: 50vh;">
                        <div class="row">
                          <div class="col-sm-12 table-responsive">
                            <table id="tabelaOutrosMotoristas" class="table table-sm table-select table-hover" width="100%">
                              <thead>
                              </thead>
                              <tbody>
                              </tbody>
                            </table>
                          </div>
                        </div>
                      </div>
                    </div> -->

                    <!-- <div class="tab-pane fade" id="divPercurso" role="tabpanel" aria-labelledby="tabPercurso">
                      <div class="modal-body" style="height: 50vh;">
                        <div class="row">
                          <div class="col-sm-12 table-responsive">
                            <table id="tabelaPercurso" class="table table-sm table-select table-hover" width="100%">
                              <thead>
                              </thead>
                              <tbody>
                              </tbody>
                            </table>
                          </div>
                        </div>
                      </div>
                    </div> -->

                    <!-- <div class="tab-pane fade" id="divReboques" role="tabpanel" aria-labelledby="tabReboques">
                      <div class="modal-body" style="height: 50vh;">
                        <div class="row">
                          <div class="col-sm-12 table-responsive">
                            <table id="tabelaReboques" class="table table-sm table-select table-hover" width="100%">
                              <thead>
                              </thead>
                              <tbody>
                              </tbody>
                            </table>
                          </div>
                        </div>
                      </div>
                    </div> -->

                    <div class="tab-pane fade" id="divDocFiscais" role="tabpanel" aria-labelledby="tabDocFiscais">
                      <div class="modal-body" style="max-height: 50vh !important;">
                        <div class="card">
                          <h5>NF-e</h5>
                          <div class="row">
                            <div class="col-sm-12 table-responsive">
                              <table id="tabelaNFe" class="table table-sm table-select table-hover" width="100%">
                                <thead>
                                </thead>
                                <tbody>
                                </tbody>
                              </table>
                            </div>
                          </div>
                        </div>

                        <div class="card">
                          <h5>CT-e</h5>
                          <div class="row">
                            <div class="col-sm-12 table-responsive">
                              <table id="tabelaCTe" class="table table-sm table-select table-hover" width="100%">
                                <thead>
                                </thead>
                                <tbody>
                                </tbody>
                              </table>
                            </div>
                          </div>
                        </div>

                        <div class="card">
                          <h5>NF - Nota fiscal mod.1/1A</h5>
                          <div class="row">
                            <div class="col-sm-12 table-responsive">
                              <table id="tabelaNF" class="table table-sm table-select table-hover" width="100%">
                                <thead>
                                </thead>
                                <tbody>
                                </tbody>
                              </table>
                            </div>
                          </div>
                        </div>

                        <div class="card">
                          <h5>CT - Conhecimento Transporte</h5>
                          <div class="row">
                            <div class="col-sm-12 table-responsive">
                              <table id="tabelaCT" class="table table-sm table-select table-hover" width="100%">
                                <thead>
                                </thead>
                                <tbody>
                                </tbody>
                              </table>
                            </div>
                          </div>
                        </div>

                        <div class="card">
                          <h5>Evento DFe</h5>
                          <div class="row">
                            <div class="col-sm-12 table-responsive">
                              <table id="tabelaEventoDFe" class="table table-sm table-select table-hover" width="100%">
                                <thead>
                                </thead>
                                <tbody>
                                </tbody>
                              </table>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                    <!-- <div class="tab-pane fade" id="divNFe" role="tabpanel" aria-labelledby="tabNFe">
                      <div class="modal-body" style="height: 50vh;">
                        <div class="row">
                          <div class="col-sm-12 table-responsive">
                            <table id="tabelaNFe" class="table table-sm table-select table-hover" width="100%">
                              <thead>
                              </thead>
                              <tbody>
                              </tbody>
                            </table>
                          </div>
                        </div>
                      </div>
                    </div> -->

                    <!-- <div class="tab-pane fade" id="divCTe" role="tabpanel" aria-labelledby="tabCTe">
                      <div class="modal-body" style="height: 50vh;">
                        <div class="row">
                          <div class="col-sm-12 table-responsive">
                            <table id="tabelaCTe" class="table table-sm table-select table-hover" width="100%">
                              <thead>
                              </thead>
                              <tbody>
                              </tbody>
                            </table>
                          </div>
                        </div>
                      </div>
                    </div> -->

                    <!-- <div class="tab-pane fade" id="divNF" role="tabpanel" aria-labelledby="tabNF">
                      <div class="modal-body" style="height: 50vh;">
                        <div class="row">
                          <div class="col-sm-12 table-responsive">
                            <table id="tabelaNF" class="table table-sm table-select table-hover" width="100%">
                              <thead>
                              </thead>
                              <tbody>
                              </tbody>
                            </table>
                          </div>
                        </div>
                      </div>
                    </div> -->

                    <!-- <div class="tab-pane fade" id="divCT" role="tabpanel" aria-labelledby="tabCT">
                      <div class="modal-body" style="height: 50vh;">
                        <div class="row">
                          <div class="col-sm-12 table-responsive">
                            <table id="tabelaCT" class="table table-sm table-select table-hover" width="100%">
                              <thead>
                              </thead>
                              <tbody>
                              </tbody>
                            </table>
                          </div>
                        </div>
                      </div>
                    </div> -->

                    <div class="tab-pane fade show" id="divSeguradora" role="tabpanel" aria-labelledby="tabSeguradora">
                      <div class="card-body">
                        <nav>
                          <div class="nav nav-tabs justify-content-start" id="nav-tab" role="tablist" style="text-decoration: none">
                            <a class="nav-link abaLink active" id="tabRespSeguro" data-toggle="tab" href="#divRespSeguro" role="tab" aria-controls="divRespSeguro" aria-selected="true">Responsável pelo seguro</a>
                            <a class="nav-link abaLink" id="tabInfSeguradora" data-toggle="tab" href="#divInfSeguradora" role="tab" aria-controls="divInfSeguradora" aria-selected="false">Informações da seguradora</a>
                            <a class="nav-link abaLink" id="tabAverbacoes" data-toggle="tab" href="#divAverbacoes" role="tab" aria-controls="divAverbacoes" aria-selected="false">Averbações</a>
                          </div>
                        </nav>

                        <div class="tab-content" id="nav-tabContent">
                          <div class="tab-pane fade show active" id="divRespSeguro" role="tabpanel" aria-labelledby="tabRespSeguro">
                            <div class="card-body">
                              <div class="row pt-2">
                                <div class="form-group col-sm-3">
                                  <label>Tipo</label>
                                  <select id="rgTipoRespSeguro" class="custom-select" disabled>
                                    <option value="0" selected>1 - Emitente</option>
                                    <option value="1">2 - Contratante</option>
                                  </select>
                                </div>
                                <div class="form-group col-sm-3">
                                  <label>CNPJ</label>
                                  <input type="text" class="form-control" id="txtCNPJRespSeguro" disabled>
                                </div>
                                <div class="form-group col-sm-3">
                                  <label>CPF</label>
                                  <input type="text" class="form-control" id="txtCPFRespSeguro" disabled>
                                </div>
                              </div>
                            </div>
                          </div>
                          <div class="tab-pane fade show" id="divInfSeguradora" role="tabpanel" aria-labelledby="tabInfSeguradora">
                            <div class="card-body">
                              <div class="row pt-2">
                                <div class="form-group col-sm-3">
                                  <label>Nome</label>
                                  <input type="text" class="form-control" id="txtNomeInfSeguradora" disabled>
                                </div>
                                <div class="form-group col-sm-3">
                                  <label>CNPJ</label>
                                  <input type="text" class="form-control" id="txtCNPJInfSeguradora" disabled>
                                </div>
                                <div class="form-group col-sm-3">
                                  <label>Apólice</label>
                                  <input type="text" class="form-control" id="txtApoliceInfSeguradora" disabled>
                                </div>
                              </div>
                            </div>
                          </div>
                          <div class="tab-pane fade show" id="divAverbacoes" role="tabpanel" aria-labelledby="tabAverbacoes">
                            <div class="card-body">
                              <div class="row pt-2">
                                <div class="form-group col-sm-3">
                                  <label>Número</label>
                                  <input type="text" class="form-control" id="txtNumeroAverbacoes" maxlength="40">
                                </div>
                              </div>
                              <div class="row pt-2">
                                <div class="col-sm-12 table-responsive">
                                  <table id="tabelaAverbacoes" class="table table-sm table-select table-hover" width="100%">
                                    <thead>
                                    </thead>
                                    <tbody>
                                    </tbody>
                                  </table>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>

                    <div class="tab-pane fade show" id="divProdPredominante" role="tabpanel" aria-labelledby="tabProdPredominante">
                      <div class="card-body">
                        <div class="row pt-2">
                          <div class="form-group col-sm-3">
                            <label>Tipo Carga</label>
                            <select id="rgTipoCargaProdPredo" class="custom-select" disabled>
                              <option value="00">00-Nenhum</option>
                              <option value="01">01-Granel sólido</option>
                              <option value="02">02-Granel líquido</option>
                              <option value="03">03-Frigorificada</option>
                              <option value="04">04-Conteinerizada</option>
                              <option value="05">05-Carga Geral</option>
                              <option value="06">06-Neogranel</option>
                              <option value="07">07-Perigosa (granel sólido)</option>
                              <option value="08">08-Perigosa (granel líquido)</option>
                              <option value="09">09-Perigosa (carga frigorificada)</option>
                              <option value="10">10-Perigosa (conteinerizada)</option>
                              <option value="11">11-Perigosa (carga geral)</option>
                            </select>
                          </div>
                          <div class="form-group col-sm-3">
                            <label>Desc. prod. predominante</label>
                            <input type="text" class="form-control" id="txtDescProdPredomiProdPredo" disabled>
                          </div>
                          <div class="form-group col-sm-3">
                            <label data-error="wrong" data-success="right" for="txtCEPCarregamentoProdPredo">CEP carregamento MDF-e
                            </label>
                            <div class="input-group">
                              <input type="text" autocomplete="off" class="input-default focus form-control validate" id="txtCEPCarregamentoProdPredo" name="txtCEPCarregamentoProdPredo" disabled>
                              <div class="input-group-append">
                                <button class="btn bg-danger" id="btn-CEPCarregamentoProdPredo" name="btn-CEPCarregamentoProdPredo" data-button="absolute" type="button" disabled><i class="m-0 p-0 fas fa-search"></i></button>
                                <button class="btn bg-danger" id="btn-limpar-CEPCarregamentoProdPredo" name="btn-limpar-CEPCarregamentoProdPredo" type="button" disabled><i class="m-0 p-0 fas fa-trash"></i></button>
                              </div>
                            </div>
                          </div>
                          <div class="form-group col-sm-3">
                            <label data-error="wrong" data-success="right" for="txtCEPDescarregamentoProdPredo">CEP descarregamento MDF-e
                            </label>
                            <div class="input-group">
                              <input type="text" autocomplete="off" class="input-default focus form-control validate" id="txtCEPDescarregamentoProdPredo" name="txtCEPDescarregamentoProdPredo" disabled>
                              <div class="input-group-append">
                                <button class="btn bg-danger" id="btn-CEPDescarregamentoProdPredo" name="btn-CEPDescarregamentoProdPredo" data-button="absolute" type="button" disabled><i class="m-0 p-0 fas fa-search"></i></button>
                                <button class="btn bg-danger" id="btn-limpar-CEPDescarregamentoProdPredo" name="btn-limpar-CEPDescarregamentoProdPredo" type="button" disabled><i class="m-0 p-0 fas fa-trash"></i></button>
                              </div>
                            </div>
                          </div>
                          <div class="form-group col-sm-3">
                            <label>Latitude carregamento</label>
                            <input type="number" class="form-control" id="txtLatitudeCarregamentoProdPredo" disabled>
                          </div>
                          <div class="form-group col-sm-3">
                            <label>Latitude descarregamento</label>
                            <input type="number" class="form-control" id="txtLatitudeDescarregamentoProdPredo" disabled>
                          </div>
                          <div class="form-group col-sm-3">
                            <label>Longitude carregamento</label>
                            <input type="number" class="form-control" id="txtLongitudeCarregamentoProdPredo" disabled>
                          </div>
                          <div class="form-group col-sm-3">
                            <label>Longitude descarregamento</label>
                            <input type="number" class="form-control" id="txtLongitudeDescarregamentoProdPredo" disabled>
                          </div>
                        </div>
                      </div>
                    </div>

                    <div class="tab-pane fade show" id="divDadosMDFe" role="tabpanel" aria-labelledby="tabDadosMDFe">
                      <div class="card-body">
                        <div class="row">
                          <div class="form-group col-md-3 col-12">
                            <label>Emissão</label>
                            <input type="date" max="2500-12-31" class="input-default focus form-control" id="txtDtEmissao">
                          </div>
                          <div class="form-group col-12 col-md-3">
                            <label data-error="wrong" data-success="right" for="txtVeiculo">Veículo
                            </label>
                            <div class="input-group">
                              <input type="text" class="input-default focus form-control validate" id="txtVeiculo" name="txtVeiculo" placeholder="Veículo *">
                              <div class="input-group-append">
                                <button class="btn bg-danger" id="btnVeiculo" name="btnVeiculo" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                <button class="btn bg-danger" id="btnLimpaVeiculo" name="btnLimpaVeiculo" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                              </div>
                            </div>
                          </div>
                          <div class="col-md-3  col-12 form-group">
                            <label>Capac. (KG)</label>
                            <input type="text" class="input-default focus form-control maskDecimais" id="txtCapacKG" name="txtCapacKG" placeholder="CapacKG" disabled>
                          </div>
                          <div class="col-md-6  col-12 form-group">
                            <label data-error="wrong" data-success="right" for="txtReboque">Reboque
                            </label>
                            <div class="input-group">
                              <!-- <input type="text" autocomplete="off" class="input-default focus form-control validate" id="txtReboque" name="txtReboque" required placeholder="Reboque"> -->
                              <select class="js-example-programmatic js-states form-control" id="txtReboque" name="txtReboque" multiple="multiple">
                              </select>
                              <div class="input-group-append">
                                <button class="btn bg-danger" id="btnReboque" name="btnReboque" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                <button class="btn bg-danger" id="btnLimpaReboque" name="btnLimpaReboque" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                              </div>
                            </div>
                          </div>
                          <div class="form-group col-md-3  col-12">
                            <label data-error="wrong" data-success="right" for="txtMotorista">Motorista
                            </label>
                            <div class="input-group">
                              <input type="text" autocomplete="off" class="input-default focus form-control validate" id="txtMotorista" name="txtMotorista" required placeholder="Motorista">
                              <div class="input-group-append">
                                <button class="btn bg-danger" id="btnMotorista" name="btnMotorista" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                <button class="btn bg-danger" id="btnLimpaMotorista" name="btnLimpaMotorista" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>

                    <!-- <div class="tab-pane fade show" id="divEventoDFe" role="tabpanel" aria-labelledby="tabEventoDFe">
                      <div class="modal-body" style="height: 50vh;">
                        <div class="row">
                          <div class="col-sm-12 table-responsive">
                            <table id="tabelaEventoDFe" class="table table-sm table-select table-hover" width="100%">
                              <thead>
                              </thead>
                              <tbody>
                              </tbody>
                            </table>
                          </div>
                        </div>
                      </div>
                    </div> -->

                  </div>
                  <!-- </div> -->
                </div>
              </div>
              <div class="modal-footer justify-content-between">
                <button type="button" class="btn bg-gradient-danger btn-sisp" data-dismiss="modal">Fechar</button>
                <button id="confirmar_dados" type="button" class="btn bg-gradient-success btn-sisp">Confirmar</button>
              </div>
            </div>
            <!-- /.modal-content -->
          </div>
          <!-- /.modal-dialog -->
        </div>
    </div>
    <!-- /.modal-dialog -->
  </div>
  <div class="modal fade" id="modal-IncDFe">
    <div class="modal-dialog modal-xl">
      <div class="modal-content">
        <form id="msDFe">
          <div class="modal-header">
            <h4 id="modal-inutilizar-title" class="modal-title">Adicionar Doc Frete Posterior</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-sm-6">
                <div class="group-default form-group">
                  <label for="txtIncDFeChaveMDFe">Chave MDF-e</label>
                  <input type="text" id="txtIncDFeChaveMDFe" name="txtIncDFeChaveMDFe" class="input-default focus form-control" disabled>
                </div>
              </div>
              <div class="col-sm-6">
                <label data-error="wrong" data-success="right" for="txtMunicipioCar">Município de carregamento *</label>
                <div class="input-group">
                  <input type="text" class="input-default focus form-control validate" id="txtMunicipioCar" name="txtMunicipioCar" class="form-control" required>
                  <div class="input-group-append">
                    <button class="btn bg-danger" id="btnMunicipioCar" name="btnMunicipioCar" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                    <button class="btn bg-danger" id="btnLimpaMunicipioCar" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                  </div>
                </div>
              </div>
              <div class="col-sm-6">
                <label data-error="wrong" data-success="right" for="txtMunicipioDesc">Município de descarregamento *</label>
                <div class="input-group">
                  <input type="text" class="input-default focus form-control validate" id="txtMunicipioDesc" name="txtMunicipioDesc" class="form-control" required>
                  <div class="input-group-append">
                    <button class="btn bg-danger" id="btnMunicipioDesc" name="btnMunicipioDesc" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                    <button class="btn bg-danger" id="btnLimpaMunicipioDesc" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                  </div>
                </div>
              </div>
              <div class="col-sm-6">
                <label data-error="wrong" data-success="right" for="txtChaveNFe">Chave NF-e *</label>
                <div class="input-group">
                  <input type="text" class="input-default focus form-control validate" id="txtChaveNFe" name="txtChaveNFe" class="form-control" required>
                  <div class="input-group-append">
                    <button class="btn bg-danger" id="btnChaveNFe" name="btnChaveNFe" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                    <button class="btn bg-danger" id="btnLimpaChaveNFe" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div class="modal-footer justify-content-between">
            <button id="btnGerarDFe" type="button" class="btn bg-gradient-success btn-sisp">Gerar e Transmitir DFe</button>
            <button type="button" class="btn bg-gradient-danger btn-sisp" data-dismiss="modal">Fechar</button>
          </div>
        </form>
      </div>
      <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
  </div>
  <div class="modal fade" id="modal-cancelamento">
    <div class="modal-dialog modal-xl">
      <div class="modal-content">
        <div class="modal-header">
          <h4 id="modal-cancelamento-title" class="modal-title">Cancelar MDF-e</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-sm-6">
              <div class="group-default form-group">
                <label for="txtCancFatura">Fatura:</label>
                <div class="relative">
                  <input type="number" class="input-default focus form-control validate" id="txtCancFatura" name="txtCancFatura" readonly>
                </div>
              </div>
            </div>
            <div class="col-sm-6">
              <div class="group-default form-group">
                <label for="txtCancSerie">Série:</label>
                <div class="relative">
                  <input type="number" class="input-default focus form-control validate" id="txtCancSerie" name="txtCancSerie" readonly>
                </div>
              </div>
            </div> -->
            <div class="col-sm-12" id="justificativaCancelamento">
              <div class="group-default form-group">
                <label data-error="wrong" data-success="right" for="txtCancJustificativa">Justificativa</label>
                <textarea type="textarea" style="resize: none; padding-top: .7%" placeholder="Justificativa" class="input-default focus form-control validate" id="txtCancJustificativa" name="txtCancJustificativa" required="required" rows="5"></textarea>
              </div>
            </div>
          </div>
        </div>
        <div class="modal-footer justify-content-between">
          <button id="btn-confirmar-cancelamento" type="button" class="btn bg-gradient-success btn-sisp">Confirmar</button>
          <button type="button" class="btn bg-gradient-danger btn-sisp" data-dismiss="modal">Fechar</button>
        </div>
      </div>
      <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
  </div>

  <div class="modal fade" id="modal-config">
    <div class="modal-dialog modal-lg">
      <div class="modal-content">
        <div class="modal-header">
          <h4 id="modal-Configuração-title" class="modal-title">Configurações MDF-e</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="collapse show" id="nfe">
            <div class="card card-body">
              <div class="row">
                <div class="col-6">
                  <label for="txtAmbiente">Ambiente</label>
                  <select id="txtAmbiente" class="input-default focus custom-select">
                    <option value="1">Produção</option>
                    <option value="2">Homologação</option>
                  </select>
                </div>
              </div>
              <div class="row">
                <div class="col-12">
                  <label for="txtDiretorioLog">
                    Diretorio Log
                  </label>
                  <div class="relative">
                    <input type="text" class="input-group input-default" id="txtDiretorioLog">
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div class="modal-footer float-right">
          <button id="btnConfirmarConfigMDFe" type="button" class="btn bg-gradient-danger btn-sisp">Gravar INI</button>
        </div>
      </div>
    </div>
  </div>

  </section>
  <!-- /.content -->
  </div>
  <div id="modal-filtros" class="modal" tabindex="-1" role="dialog">
    <div class="modal-dialog modal-xl" role="document">
      <div class="modal-content" id="modalBody">
        <div class="modal-header">
          <h4 class="modal-title">Filtros</h4>
          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">&times;</span>
          </button>
        </div>
        <div class="modal-body">
          <div class="row">
            <div class="col-lg-6 col-12">
              <div class="row">
                <div class="col-6">
                  <div class="group-default form-group">
                    <label for="dtIni">Data emissão de:</label>
                    <div class="relative">
                      <input type="date" max="2500-12-31" value="<?php echo (date('Y-m')); ?>-01" class="input-default focus form-control validate" id="txtDataEmissaoDe" name="txtDataEmissaoDe">
                    </div>
                  </div>
                </div>
                <div class="col-6">
                  <div class="group-default form-group">
                    <label for="dtFim">Data emissão até:</label>
                    <div class="relative">
                      <input type="date" max="2500-12-31" value="<?php echo (date('Y-m-d')); ?>" class="input-default focus form-control validate" id="txtDataEmissaoAte" name="txtDataEmissaoAte">
                    </div>
                  </div>
                </div>
                <div class="col-6">
                  <label style="margin-bottom: .1rem!important;" data-error="wrong" data-success="right" for="txtVeiculoFiltro">Veículo</label>
                  <div class="input-group">
                    <input type="text" class="input-default focus form-control" id="txtVeiculoFiltro" name="txtVeiculoFiltro" class="form-control" placeholder="VeiculoFiltro">
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btnVeiculoFiltro" name="btnVeiculoFiltro" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                      <button class="btn bg-danger" id="btnLimpaVeiculoFiltro" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                  </div>
                </div>
                <div class="col-6">
                  <label style="margin-bottom: .1rem!important;" data-error="wrong" data-success="right" for="txtMDFe">Número</label>
                  <div class="input-group">
                    <input type="text" class="input-default focus form-control" id="txtMDFe" name="txtMDFe" class="form-control" placeholder="Número">
                    <div class="input-group-append">
                      <button class="btn bg-danger" id="btnMDFe" name="btnMDFe" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                      <button class="btn bg-danger" id="btnLimpaMDFe" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <div class="col-lg-3 col-12">
              <div class="form-group bordaRadio">
                <h6>Status </h6>
                <div class="icheck-primary">
                  <input type="radio" id="radioStatus" value="0" name="rg_status" checked>
                  <label for="radioStatus">Todos
                  </label>
                </div>
                <div class="icheck-primary">
                  <input type="radio" id="radioPrimary2" value="1" name="rg_status">
                  <label for="radioPrimary2">Impressos
                  </label>
                </div>
                <div class="icheck-primary">
                  <input type="radio" id="radioPrimary3" value="2" name="rg_status">
                  <label for="radioPrimary3">Não Impressos</label>
                </div>
                <div class="icheck-primary">
                  <input type="radio" id="radioPrimary4" value="3" name="rg_status">
                  <label for="radioPrimary4">Cancelados
                  </label>
                </div>
                <div class="icheck-primary">
                  <input type="radio" id="radioPrimary5" value="4" name="rg_status">
                  <label for="radioPrimary5">Encerrados
                  </label>
                </div>
              </div>
            </div>
            <div class="col-lg-3 col-12">
              <div class="form-group bordaRadio">
                <h6>Protocolo </h6>
                <div class="icheck-primary">
                  <input type="radio" id="radioProtocolo1" value="0" name="rg_protocolo" checked>
                  <label for="radioProtocolo1">Todos
                  </label>
                </div>
                <div class="icheck-primary">
                  <input type="radio" id="radioProtocolo2" value="1" name="rg_protocolo">
                  <label for="radioProtocolo2">Com Protocolo
                  </label>
                </div>
                <div class="icheck-primary">
                  <input type="radio" id="radioProtocolo3" value="2" name="rg_protocolo">
                  <label for="radioProtocolo3">Sem Protocolo</label>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div class="modal-footer">
          <div class="row">
            <button class="btn btn-primary btn-sisp" id="btnLimparFiltros" style="background-color: #B22222; border-color: #B22222"><span class="fas fa-trash"></span> Limpar
              Filtros</button>     
            <button id="btn-consultar" class="btn btn-primary btn-sisp" type="button">
              <span class="fas fa-search"></span> Consultar
            </button>
          </div>
        </div>
      </div>
    </div>
  </div>

  <!-- Control Sidebar -->
  <aside class="control-sidebar control-sidebar-dark">
    <!-- Control sidebar content goes here -->
  </aside>
  <!-- /.content-wrapper -->
  <div class="opcoesImpressao">
    <div class="row">
      <div class="col-12">
        <div id="dadosnota" class="row">
          <div class="col-xl-3">
            <div class="group-default form-group">
              <label data-error="wrong" data-success="right" for="txtChave">Nº Chave</label>
              <div class="relative">
                <input type="text" class="input-default focus form-control validate" id="txtChave" name="txtChave" readonly>
              </div>
            </div>
          </div>
          <div class="col-xl-2">
            <div class="group-default form-group">
              <label data-error="wrong" data-success="right" for="txtProtocolo">Nº Protocolo</label>
              <div class="relative">
                <input type="text" class="input-default focus form-control validate" id="txtProtocolo" name="txtProtocolo" readonly>
              </div>
            </div>
          </div>
          <div class="col-xl-2">
            <div class="group-default form-group">
              <label data-error="wrong" data-success="right" for="txtEmissao">Emissão</label>
              <div class="relative">
                <input type="text" class="input-default focus form-control validate" id="txtEmissao" name="txtEmissao" readonly>
              </div>
            </div>
          </div>
          <div class="col-xl-1">
            <div class="group-default form-group">
              <label data-error="wrong" data-success="right" for="txtRecibo">Nº Recibo</label>
              <div class="relative">
                <input type="text" class="input-default focus form-control validate" id="txtRecibo" name="txtRecibo" readonly>
              </div>
            </div>
          </div>
          <div class="col-xl-1">
            <div class="group-default form-group">
              <label data-error="wrong" data-success="right" for="txtLote">Nº Lote</label>
              <div class="relative">
                <input type="text" class="input-default focus form-control validate" id="txtLote" name="txtLote" readonly>
              </div>
            </div>
          </div>
          <div class="col-xl-3">
            <div class="group-default form-group">
              <label data-error="wrong" data-success="right" for="txtQrCode">QrCode</label>
              <div class="relative">
                <input type="text" class="input-default focus form-control validate" id="txtQrCode" name="txtQrCode" readonly>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="col-12 text-center">
        <div class="btn-group flex-wrap btn-group-justified btn-group-lg" role="group" aria-label="Basic example">
          <button id="btnGerar" class="btn btn-secondary text-white btn-sisp botoesMenu">
            <span class="fas fa-cogs pr-1"></span> Gerar
          </button>
          <button id="btnEncerramento" class="btn btn-secondary text-white btn-sisp botoesMenu">
            <span class="fas fa-check pr-1" style="color: white!important"></span> Fazer Encerramento
          </button>
          <button id="btnImprimir" class="btn btn-secondary text-white btn-sisp botoesMenu">
            <span class="fas fa-print pr-1" style="color: white!important"></span> Imprimir
          </button>
          <button id="btnCancelar" class=" btn btn-secondary text-white btn-sisp botoesMenu">
            <span class="fas fa-ban pr-1"></span> Cancelar</button>
          <button id="btnExcluir" class=" btn btn-secondary text-white btn-sisp botoesMenu">
            <span class="fas fa-trash pr-1"></span> Excluir</button>
          <button id="btnConsultar" class="btn btn-secondary text-white btn-sisp botoesMenu">
            <span class="fas fa-search pr-1"></span> Consultar
          </button>
        </div>

      </div>
    </div>
  </div>
  <?php
  include_once('../../modais.php');
  ?>
  <!-- /.control-sidebar -->
  </div>
  <!-- ./wrapper -->

  <script src="<?php echo BASE_URI; ?>/plugins/jquery/jquery.min.js?versao=3.264.22.1"></script>
  <script type="text/javascript" src="<?php echo BASE_URI; ?>/dist/js/jquery.dataTables.js?versao=3.264.22.1"></script>
  <script type="text/javascript" src="<?php echo BASE_URI; ?>/dist/js/dataTables.bootstrap4.min.js?versao=3.264.22.1"></script>
  <script type="text/javascript" src="<?php echo BASE_URI; ?>/dist/js/loadingoverlay.min.js?versao=3.264.22.1"></script>

  <!-- jQuery UI 1.11.4 -->
  <script src="<?php echo BASE_URI; ?>/plugins/jquery-ui/jquery-ui.min.js"></script>
  <!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
  <script>
    $.widget.bridge('uibutton', $.ui.button)
  </script>
  <!-- Bootstrap 4 -->
  <script src="<?php echo BASE_URI; ?>/plugins/bootstrap/js/bootstrap.bundle.min.js?versao=3.264.22.1"></script>
  <!-- AdminLTE App -->
  <script src="<?php echo BASE_URI; ?>/dist/js/adminlte.min.js?versao=3.264.22.1"></script>

  <script src="<?php echo BASE_URI; ?>/dist/js/sisplan.js?versao=3.264.22.1"></script>
  <script type="text/javascript" src="<?php echo BASE_URI; ?>/utils/funcoes.js?versao=3.264.22.1"></script>
  <!-- SweetAlert2 -->
  <script src="<?php echo BASE_URI; ?>/plugins/sweetalert2/sweetalert2.min.js?versao=3.264.22.1"></script>
  <script src="<?php echo BASE_URI; ?>/plugins/toastr/toastr.min.js?versao=3.264.22.1"></script>
  <script src="<?php echo BASE_URI; ?>/dist/js/requisicoes.js?versao"></script>
  <script type="text/javascript" src="<?php echo BASE_URI; ?>/dist/js/sum().js?versao=3.264.22.1"></script>
  <script src="<?php echo BASE_URI; ?>/utils/cookies.js?versao=3.264.22.1"></script>
  <script src="plugins/moment/moment.min.js?versao=3.264.22.1"></script>
  <script src="<?php echo BASE_URI; ?>/dist/js/jquery.maskMoney.min.js?versao=3.264.22.1"></script>
  <script src="<?php echo BASE_URI; ?>/pages/loja/js/rotinas.js?versao=3.264.22.1"></script>
  <script src="<?php echo BASE_URI; ?>/dist/js/dataTables.keyTable.js?versao=3.264.22.1"></script>
  <script src="<?php echo BASE_URI; ?>/plugins/jquery-validation/jquery.validate.min.js?versao=3.264.22.1"></script>
  <script src="<?php echo BASE_URI; ?>/dist/js/driver.min.js?versao=3.264.22.1"></script>
  <script src="<?php echo BASE_URI; ?>/config.js?versao=3.264.22.1"></script>
  <script src="<?php echo BASE_URI; ?>/dist/js/FileSaver.min.js?versao=3.264.22.1""></script>
  <script>
    $(document).ready(async function() {

      if (getCookie('usuario') == "") {
        window.location.href = `${BASE_URI}/login`;
        return;
      }

      let usuario = getCookie('usuario');
      let empresa = getCookie('empresa');

      ipInterno = IP_INTERNO;
      ipExterno = IP_EXTERNO;
      basicAuth = BASIC_AUTH;

      const temAcesso = await temAcessoTela('IMPRESSAO_MDFE');
      if (!temAcesso.resultado) {
        toastrAcesso(temAcesso, BASE_URI);
        return;
      }

      const permissaoUsuarioLogado = await permissaoAcessos("IMPRESSAO_MDFE"); if (permissaoUsuarioLogado.INCLUI=='N' ) { await criaMensagemErro("Sem permissão para incluir!", ()=>
    {
      window.location.href = `${BASE_URI}/mdfe`
    });
    return;
    }

    sArquivo = `${BASE_URI}/pages/mdfe/imprimir_mdfe.js?versao=3.264.22.1`;
    insereJavaScriptPagina(sArquivo);
    });
  </script>

</body>

</html>