<!-- ./wrapper -->

<!-- REQUIRED SCRIPTS -->

<!-- jQuery -->
<script src="template/plugins/jquery/jquery.min.js"></script>
<!-- Bootstrap 4 -->
<script src="template/plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- AdminLTE App -->
<script src="template/dist/js/adminlte.min.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="template/dist/js/demo.js"></script>
<script src="./template/plugins/datatables/jquery.dataTables.min.js"></script>
<script src="./template/plugins/datatables-bs4/js/dataTables.bootstrap4.min.js"></script>
<script src="./template/plugins/datatables-responsive/js/dataTables.responsive.min.js"></script>
<script src="./template/plugins/datatables-responsive/js/responsive.bootstrap4.min.js"></script>
<script src="./template/plugins/datatables-buttons/js/dataTables.buttons.min.js"></script>
<script src="./template/plugins/datatables-buttons/js/buttons.bootstrap4.min.js"></script>
<script src="./template/plugins/toastr/toastr.min.js"></script>
<script src="./template/plugins/jszip/jszip.min.js"></script>
<script src="./template/plugins/pdfmake/pdfmake.min.js"></script>
<script src="./template/plugins/pdfmake/vfs_fonts.js"></script>
<script src="./template/plugins/bs-custom-file-input/bs-custom-file-input.min.js"></script>
<script src="./template/plugins/datatables-buttons/js/buttons.html5.min.js"></script>
<script src="./template/plugins/datatables-buttons/js/buttons.print.min.js"></script>
<script src="./template/plugins/datatables-buttons/js/buttons.colVis.min.js"></script>
<script src="template/plugins/select2/js/select2.full.min.js"></script>
<script src="./template/plugins/inputmask/jquery.inputmask.min.js"></script>
<script src="../js/thousandSeparator.js"></script>
<script src="../js/sweetalert.min.js"></script>
<script src="../js/sweetalert2.min.js"></script>
<script src="./template/dist/js/function.js"></script>
<script src="../pos/javascript/function.js"></script>

<script>
  $(function() {
    bsCustomFileInput.init();
  });

  $('[data-mask]').inputmask();

  $(function() {
    //Initialize Select2 Elements
    $('.select2').select2()

    //Initialize Select2 Elements
    $('.select2bs4').select2({
      theme: 'bootstrap4'
    })
  });

  funcaoSelect("../pos/includes/select.inc.php", "post", "json", "configuracao", function success(data) {
    let favicon = document.querySelector("head");
    let link = document.createElement("link");
    link.setAttribute("rel", "icon");
    link.setAttribute("href", `images/logo/${data[9]["valor"]}`);
    favicon.append(link);
  }, function error(data) {

  }, function done(data) {

  });

  funcaoSelect("../pos/includes/select.inc.php", "post", "json", "definicao", function success(data) {
    funcaoQuerySelect("../pos/includes/querySelect.inc.php", "post", "json", {
      idSerie: data[2]['valor']
    }, "serie", function success(data) {
      let serie = document.querySelector('#serie');
      if (serie) {
        serie.value = data[0]['descricao'];
      }
    }, function error(data) {

    }, function done(data) {

    });
  }, function error(data) {

  }, function done(data) {

  });

  /*funcaoQuerySelect("includes/querySelect.inc.php", "post", "json", {idUsuario: <?php echo $_SESSION["usuarioId"]; ?>}, "viewusuariotipo", function success(data) {
      console.log("Dados: ", data);
    }, function error(data){

    }, function done(data){

    });*/
</script>