<?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 | Conferência</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="plugins/fontawesome-free/css/all.min.css">
  <!-- Ionicons -->
  <!-- Ionicons -->
  <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
  <!-- Theme style -->
  <link rel="stylesheet" href="dist/css/adminlte.min.css">
  <!-- overlayScrollbars -->
  <link rel="stylesheet" href="plugins/overlayScrollbars/css/OverlayScrollbars.min.css">
  <!-- 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="dist/css/custom.css">
  <link rel="stylesheet" href="dist/css/sisplan.css">
  <link rel="stylesheet" type="text/css" href="plugins/datatables-keytable/css/keyTable.bootstrap4.min.css">
  <link rel="stylesheet" type="text/css" href="dist/css/dataTables.bootstrap4.min.css" />
  <!-- iCheck for checkboxes and radio inputs -->
  <link rel="stylesheet" href="plugins/icheck-bootstrap/icheck-bootstrap.min.css">
  <link rel="shortcut icon" href="favicon.ico">
  <link rel="stylesheet" href="dist/css/select.bootstrap.min.css">
  <!-- Google Font: Source Sans Pro -->
  <!-- AutoComplete -->
  <link rel="stylesheet" href="dist/css/jquery-ui.css">

  <link rel="stylesheet" type="text/css" href="dist/css/driver.min.css" />

  <style>
  .bordaCampos {
    margin-left: 0.1%;
    border: solid #e0e4e6;
    border-radius: 4px;
    border-width: 2px;
    padding-top: 1%;
    padding-bottom: 0%;
  }
  </style>
  <!-- Toastr -->
  <link rel="stylesheet" href="./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) -->
      <!-- /.content-header -->
      <section class="content">
        <div class="content-header">
          <div class="container-fluid">
            <div class="row mb-2">
              <div class="col-sm-6 flex">
              </div>
              <div class="col-sm-6">
                <ol class="breadcrumb float-sm-right">
                  <li class="breadcrumb-item"><a href="./index">Início</a></li>
                  <li class="breadcrumb-item active">Conferência</li>
                </ol>
              </div><!-- /.col -->
            </div><!-- /.row -->
          </div>
          <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">
                <h2>
                  <strong>Conferência de Venda</strong>
                  <button type="button" class="btn btn-info btn-sm ml-2" title="Tutorial" style="color: white;"
                    id="tutorial">
                    <i class="fas fa-question-circle"></i>
                  </button>
                </h2>
                <div class="row">
                  <div class="col-md-12 mx-0">
                    <form id="msform">
                      <!-- progressbar -->
                      <div class="form-card">
                        <div class="card-10" id="campostour">
                          <div class="card-body">
                            <div class="row">

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

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

                              <div class="bordaCampos form-group col-lg-12 col-12" id="formNota">
                                <div class="row">
                                  <div class="form-group col-lg-6 col-12">
                                    <label data-error="wrong" data-success="right" for="txtBarraConferencia">Código de
                                      Barras</label>
                                    <div class="input-group">
                                      <input type="text" class="input-default focus form-control validate" required
                                        id="txtBarraConferencia" name="txtBarraConferencia"
                                        placeholder="Código de Barras">
                                    </div>
                                  </div>
                                  <div class="form-group col-lg-6 col-12">
                                    <label data-error="wrong" data-success="right"
                                      for="txtProdutoConferencia">Produto</label>
                                    <div class="input-group">
                                      <input type="text" class="input-default focus form-control validate" required
                                        id="txtProdutoConferencia" name="txtProdutoConferencia" placeholder="Produto">
                                      <div class="input-group-append">
                                        <button class="btn bg-danger" id="btnProdutoConferencia"
                                          name="btnProdutoConferencia" data-button="absolute" type="button">
                                          <i class="m-0 p-0 fas fa-search"></i>
                                        </button>
                                        <button class="btn bg-danger" id="btnAProdutoConferencia" type="button">
                                          <i class="m-0 p-0 fas fa-trash"></i>
                                        </button>
                                      </div>
                                    </div>
                                  </div>

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

                                  <div class="form-group col-lg-6 col-12">
                                    <label data-error="wrong" data-success="right"
                                      for="txtTamanhoConferencia">Tamanho</label>
                                    <div class="input-group">
                                      <input type="text" class="input-default focus form-control validate" required
                                        id="txtTamanhoConferencia" name="txtTamanhoConferencia" placeholder="Tamanho">
                                      <div class="input-group-append">
                                        <button class="btn bg-danger" id="btnTamanhoConferencia"
                                          name="btnTamanhoConferencia" data-button="absolute" type="button">
                                          <i class="m-0 p-0 fas fa-search"></i>
                                        </button>
                                        <button class="btn bg-danger" id="btnATamanhoConferencia" type="button">
                                          <i class="m-0 p-0 fas fa-trash"></i>
                                        </button>
                                      </div>
                                    </div>
                                  </div>
                                </div>
                              </div>
                            </div>
                            <input type="button" id="btnImportar" name="btnImportar" class="action-button d-none"
                              value="Importar" />
                            <input type="button" id="btnConsultar" name="btnConsultar"
                              class="action-button-previous d-none" value="Consultar" />
                          </div>
                        </div>
                      </div>
                    </form>
                  </div>
                </div>
                <div class="row px-2">
                  <div class="col-sm-12 table-responsive">
                    <table width="100%" style="width: 100%" id="tabelaImportacao"
                      class="table table-sm table-hover table-select table-condensed">
                      <thead>
                        <tr>
                          <th>Codigo</th>
                          <th>Descrição</th>
                          <th>Cor</th>
                          <th>Desc. Cor</th>
                          <th>Tam</th>
                          <th>Qtde</th>
                        </tr>
                      </thead>
                      <tbody>
                      </tbody>
                    </table>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </section>
      <!-- Main content -->

    </div>

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

  <script src="plugins/jquery/jquery.min.js"></script>

  <script type="text/javascript" src="dist/js/jquery.dataTables.js"></script>
  <script type="text/javascript" src="dist/js/dataTables.bootstrap4.min.js"></script>
  <script type="text/javascript" src="dist/js/loadingoverlay.min.js"></script>

  <!-- jQuery UI 1.11.4 -->
  <script src="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="plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
  <!-- AdminLTE App -->
  <script src="dist/js/adminlte.min.js"></script>

  <script src="dist/js/sisplan.js"></script>
  <script type="text/javascript" src="utils/funcoes.js"></script>
  <!-- SweetAlert2 -->
  <script src="plugins/sweetalert2/sweetalert2.min.js"></script>
  <script src="plugins/toastr/toastr.min.js"></script>
  <script src="dist/js/requisicoes.js"></script>
  <script type="text/javascript" src="dist/js/sum().js"></script>
  <script type="text/javascript" src="utils/funcoes.js"></script>
  <script src="utils/cookies.js"></script>
  <script src="dist/js/jquery.maskMoney.min.js"></script>
  <script src="pages/loja/js/rotinas.js"></script>
  <script src="dist/js/dataTables.keyTable.js"></script>
  <script src="dist/js/driver.min.js"></script>
  <script src="plugins/jquery-validation/jquery.validate.min.js"></script>
  <script src="plugins/jquery-validation/additional-methods.min.js"></script>
  <script type="text/javascript" src="config.js"></script>
  <script>
  $(document).ready(async function() {
    if (getCookie('usuario') == "") {
      window.location.href = `${BASE_URI}/login`;
      return;
    }

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

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

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

    sArquivo = `${BASE_URI}/pages/pafconferencia/pafconferencia.js`;
    insereJavaScriptPagina(sArquivo);
  });
  </script>
</body>

</html>