<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Sisplan Web | Emissão de Cheque</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="../plugins/fontawesome-free/css/all.min.css?versao=3.255.7.1">
    <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.255.7.1" />
    <link href='dist/css/bootstrap.min.css?versao=3.255.7.1'>
    <link rel="stylesheet" href="../dist/css/adminlte.min.css?versao=3.255.7.1">
    <link rel="stylesheet" href="../dist/css/custom.css?versao=3.255.7.1">
    <link rel="stylesheet" href="../dist/css/sisplan.css?versao=3.255.7.1">
    <link rel="stylesheet" type="text/css" href="../dist/css/responsive.bootstrap.min.css?versao=3.255.7.1">
    <link rel="stylesheet" type="text/css" href="../plugins/datatables-keytable/css/keyTable.bootstrap4.min.css?versao=3.255.7.1">
    <link rel="shortcut icon" href="../favicon.ico">
    <link rel="stylesheet" href="../plugins/toastr/toastr.min.css?versao=3.255.7.1">
    <link rel="stylesheet" type="text/css" href="../dist/css/driver.min.css?versao=3.255.7.1" />
    <link rel="stylesheet" href="../dist/css/jquery-ui.css?versao=3.255.7.1">
    <link rel="stylesheet" href="../dist/css/cadastro.css?versao=3.255.7.1">
    <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
    <link rel="stylesheet" href="../dist/css/PesquisaVariosSelect2.css?versao=3.255.7.1">
    <link rel="stylesheet" href="../plugins/select2/css/select2.min.css?versao=3.255.7.1">
    <link rel="stylesheet" href="../plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css?versao=3.255.7.1">

    <link rel="stylesheet" href="../plugins/icheck-bootstrap/icheck-bootstrap.min.css?versao=3.255.7.1">

</head>
<style>
    fieldset {
        text-align: start;
        position: relative;
    }

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

    .border-Field .textoBorda {
        font-size: 1.0em !important;
        text-align: left !important;
        width: auto;
        padding: 0 10px;
        border-bottom: none;
    }

    .border-Field .textoTitulo {
        font-size: 1.3em !important;
        text-align: left !important;
        width: auto;
        padding: 0 5px;
        border-bottom: none;
        font-weight: bold;
    }

    .border-Field {
        border: 1.0px solid var(--font-color) !important;
        padding: 0 1.0em 1.0em 1.0em !important;
        margin: 0 0 1.0em 0 !important;
        -webkit-box-shadow: 0px 0px 0px 0px #000;
        box-shadow: 0px 0px 0px 0px #000;
        padding-bottom: 0px !important;
    }

    .bordaProduto {
        padding: 10px;
        border: solid #e0e4e6;
        border-radius: 4px;
        border-width: 1px;
    }
</style>

<body class="hold-transition 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>

        <div class="content-wrapper">
            <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">
                            </div><!-- /.col -->
                        </div><!-- /.row -->
                    </div>
                    <div class="row justify-content-center mt-0">
                        <div class="col-10 text-center p-0 mb-2">
                            <div class="card px-0 pt-4 pb-0 mb-3">
                                <div class="card-header text-center flex" style="border: none!important;box-shadow:none!important;">
                                    <h2>Emissão de Cheque
                                        <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>
                                <div class="row">
                                    <div class="col-md-12 mx-0">
                                        <form id="msform">
                                            <!-- progressbar -->
                                            <ul id="progressbar" class="mb-2">
                                                <li class="active" id="account"><strong>Geral</strong></li>
                                                <li id="confirm"><strong>Finalização</strong></li>
                                            </ul> <!-- fieldsets -->
                                            <p>Preencha os dados e clique em avançar para realizar o lançamento do cheque.</p>
                                            <fieldset>
                                                <div class="form-card p-0 mb-0" id="formcard1">
                                                    <div class="card-body pt-0">
                                                        <div class="form-row" id="divGeral">
                                                            <div class="col-md-12 col-12">
                                                                <div class="form-row">

                                                                    <div class="form-group col-md-4 col-4" id="contaInfoTour">
                                                                        <label for="txtConta">Conta: </label>
                                                                        <div class="input-group">
                                                                            <input type="text" class="input-default focus form-control" aria-describedby="ufError" required 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="btnLimpaConta" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                                                            </div>
                                                                        </div>
                                                                    </div>

                                                                    <div class="form-group col-md-2 col-2" id="numeroInfoTour">
                                                                        <label data-error="wrong" class="labelGeral" data-success="right" for="txtNumero">Número: </label>
                                                                        <div class="input-group">
                                                                            <input type="text" class="input-default focus form-control" id="txtNumero" required aria-describedby="codError" name="txtNumero" class="form-control" placeholder="Número">
                                                                        </div>
                                                                    </div>

                                                                    <div class="form-group col-lg-2 col-2 col-sm-6 mb-0">
                                                                        <div class="txtEmissao">
                                                                            <label for="">Emissão:</label>
                                                                            <div class="input-group">
                                                                                <input type="date" max="2500-12-31" class="input-default focus form-control validate" id="txtEmissao" name="DataDe">
                                                                            </div>
                                                                        </div>
                                                                    </div>

                                                                    <div class="form-group col-lg-2 col-2 col-sm-6 mb-0">
                                                                        <div class="txtVencimento">
                                                                            <label for="">Vencimento:</label>
                                                                            <div class="input-group">
                                                                                <input type="date" max="2500-12-31" class="input-default focus form-control validate" id="txtVencimento" name="DataDe">
                                                                            </div>
                                                                        </div>
                                                                    </div>

                                                                    <div class="form-group col-md-2 col-2 pt-3 mt-3">
                                                                        <div class="icheck-primary">
                                                                            <input type="checkbox" checked class="form-check-input" id="cbPendente">
                                                                            <label class="form-check-label pr-2 mb-1" for="cbPendente">Pendente</label>
                                                                        </div>
                                                                    </div>

                                                                    <div class="form-group col-md-4 col-4" id="bancoInfoTour">
                                                                        <label for="txtBanco">Banco: </label>
                                                                        <div class="input-group">
                                                                            <input type="text" class="input-default focus form-control" aria-describedby="ufError" disabled id="txtBanco" name="txtBanco" class="form-control" placeholder="Banco">
                                                                        </div>
                                                                    </div>

                                                                    <div class="form-group col-md-4 col-4" id="classeInfoTour">
                                                                        <label for="txtClasse">Classe: </label>
                                                                        <div class="input-group">
                                                                            <input type="text" class="input-default focus form-control" aria-describedby="ufError" required id="txtClasse" name="txtClasse" class="form-control" placeholder="Classe">
                                                                            <div class="input-group-append">
                                                                                <button class="btn bg-danger" id="btnClasse" name="btnClasse" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                                                                <button class="btn bg-danger" id="btnLimpaClasse" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                                                            </div>
                                                                        </div>
                                                                    </div>

                                                                    <div class="form-group col-md-4 col-4" id="historicoInfoTour">
                                                                        <label for="txtHistorico">Histórico: </label>
                                                                        <div class="input-group">
                                                                            <input type="text" class="input-default focus form-control" aria-describedby="ufError" required id="txtHistorico" name="txtHistorico" class="form-control" placeholder="Histórico">
                                                                            <div class="input-group-append">
                                                                                <button class="btn bg-danger" id="btnHistorico" name="btnHistorico" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                                                                <button class="btn bg-danger" id="btnLimpaHistorico" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                                                            </div>
                                                                        </div>
                                                                    </div>

                                                                    <div class="form-group col-md-4 col-4" id="situacaoInfoTour">
                                                                        <label for="txtSituacao">Stituação: </label>
                                                                        <div class="input-group">
                                                                            <input type="text" class="input-default focus form-control" aria-describedby="ufError" required id="txtSituacao" name="txtSituacao" class="form-control" placeholder="Stituação">
                                                                            <div class="input-group-append">
                                                                                <button class="btn bg-danger" id="btnSituacao" name="btnSituacao" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                                                                <button class="btn bg-danger" id="btnLimpaSituacao" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                                                            </div>
                                                                        </div>
                                                                    </div>

                                                                    <div class="form-group col-md-8 col-8" id="fornecedorInfoTour">
                                                                        <label for="txtFornecedor">Fornecedor: </label>
                                                                        <div class="input-group">
                                                                            <input type="text" class="input-default focus form-control" aria-describedby="ufError" required id="txtFornecedor" name="txtFornecedor" class="form-control" placeholder="Fornecedor">
                                                                            <div class="input-group-append">
                                                                                <button class="btn bg-danger" id="btnFornecedor" name="btnFornecedor" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                                                                <button class="btn bg-danger" id="btnLimpaFornecedor" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                                                            </div>
                                                                        </div>
                                                                    </div>

                                                                    <div class="form-group col-9" id="ObservacaoInfoTour">
                                                                        <label data-error="wrong" data-success="right" for="txtObservacao">Observação:</label>
                                                                        <div class="input-group">
                                                                            <textarea style="resize: none" id="txtObservacao" maxlength="1000" placeholder="Observação" class="input-default focus form-control" rows="6"></textarea>
                                                                        </div>
                                                                    </div>

                                                                    <div class="form-group col-md-3 col-3 mb-0">
                                                                        <legend class="textoBorda mb-0 pb-0">Tipo</legend>
                                                                        <div class="form-row">
                                                                            <div class="form-group icheck-primary col-12">
                                                                                <input type="radio" checked name="Situacao" class="checkSituacao" id="rgPagtoAp">
                                                                                <label class="form-check-label pr-1" for="rgPagtoAp">Pagto de AP</label>
                                                                            </div>
                                                                            <div class="form-group icheck-primary col-12">
                                                                                <input type="radio" name="Situacao" class="checkSituacao" id="rgPagtoAntecipacao">
                                                                                <label class="form-check-label pr-1" for="rgPagtoAntecipacao">Pagto de Antecipação</label>
                                                                            </div>
                                                                            <div class="form-group icheck-primary col-12">
                                                                                <input type="radio" name="Situacao" class="checkSituacao" id="rgPagtoSimples">
                                                                                <label class="form-check-label pr-1" for="rgPagtoSimples">Pagto Simples</label>
                                                                            </div>
                                                                            <div class="form-group icheck-primary col-12">
                                                                                <input type="radio" name="Situacao" class="checkSituacao" id="rgValorDeposito">
                                                                                <label class="form-check-label pr-1" for="rgValorDeposito">Valor para Depósito</label>
                                                                            </div>
                                                                        </div>
                                                                    </div>

                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <input type="button" name="avancar1" class="btn-sisp next action-button" value="Avançar" id="avancar1" />
                                                <button type="button" id="btnVoltar" style="font-size:15px;" class="btn-sisp action-button-previous" data-dismiss="modal">Voltar</button>
                                            </fieldset>

                                            <fieldset>
                                                <div class="form-card p-0 mb-0">

                                                    <div class="form-row">
                                                        <div class="form-group col-lg-4 col-4 col-sm-6 mb-0 pl-0">
                                                            <label for="txtFornecedorPesquisa">Fornecedor: </label>
                                                            <div class="input-group">
                                                                <input type="text" class="input-default focus form-control" id="txtFornecedorPesquisa" name="txtFornecedorPesquisa" class="form-control" placeholder="Fornecedor">
                                                                <div class="input-group-append">
                                                                    <button class="btn bg-danger" id="btnFornecedorPesquisa" name="btnFornecedorPesquisa" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                                                    <button class="btn bg-danger" id="btnLimpaFornecedorPesquisa" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                                                </div>
                                                            </div>
                                                        </div>

                                                        <div class="form-group col-lg-4 col-4 col-sm-6 mb-0">
                                                            <label for="txtClassePesquisa">Classe: </label>
                                                            <div class="input-group">
                                                                <input type="text" class="input-default focus form-control" id="txtClassePesquisa" name="txtClassePesquisa" class="form-control" placeholder="Classe">
                                                                <div class="input-group-append">
                                                                    <button class="btn bg-danger" id="btnClassePesquisa" name="btnClassePesquisa" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                                                    <button class="btn bg-danger" id="btnLimpaClassePesquisa" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                                                </div>
                                                            </div>
                                                        </div>

                                                        <div class="form-group col-lg-4 col-12 col-sm-12">
                                                            <label data-error="wrong" data-success="right" for="txtNumeroAp">Número AP: </label>
                                                            <div class="relative">
                                                                <div class="input-group">
                                                                    <select class="js-example-programmatic js-states form-control" id="txtNumeroAp" name="txtNumeroAp" multiple="multiple">
                                                                    </select>
                                                                    <div class="input-group-append">
                                                                        <button class="btn bg-danger" id="btnNumeroAp" name="btnNumeroAp" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                                                        <button class="btn bg-danger" id="btnLimpaNumeroAp" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>

                                                        <div class="form-group col-lg-3 col-3 col-sm-6 mb-0 pl-0">
                                                            <div class="">
                                                                <label for="">Vencimento de/até:</label>
                                                                <div class="input-group">
                                                                    <input type="date" value="1200-01-01" max="2500-12-31" class="input-default focus form-control validate" id="txtDtVencimentoI" name="DataDe">
                                                                    <input type="date" value="2500-12-31" max="2500-12-31" class="input-default focus form-control validate" id="txtDtVencimentoF" name="DataAte">
                                                                </div>
                                                            </div>
                                                        </div>

                                                        <div class="form-group col-lg-3 col-3 col-sm-6 mb-0">
                                                            <div class="">
                                                                <label for="">Emissão de/até:</label>
                                                                <div class="input-group">
                                                                    <input type="date" value="1200-01-01" max="2500-12-31" class="input-default focus form-control validate" id="txtDtEmissaoI" name="DataDe">
                                                                    <input type="date" value="2500-12-31" max="2500-12-31" class="input-default focus form-control validate" id="txtDtEmissaoF" name="DataAte">
                                                                </div>
                                                            </div>
                                                        </div>

                                                        <div class="col-md-2 col-12 mt-4 py-1 mb-3 mb-md-0">
                                                            <button class="btn btn-danger btn-sisp w-100" type='button' id="btnSelecionarEmpresas">Selecionar Empresas</button>
                                                        </div>

                                                        <div class="form-group col-md-2 py-1 col-12 mt-4">
                                                            <button id="btnConsultar" class="btn btn-primary btn-sisp" type="button"><span class="fas fa-search"></span> Consultar</button>
                                                        </div>

                                                        <div class="form-group col-md-2 col-2">
                                                            <label data-error="wrong" class="labelGeral" data-success="right" for="txtValor">Valor Cheque: </label>
                                                            <div class="input-group">
                                                                <input type="text" class="input-default focus form-control camposMascaraQtde" id="txtValor" disabled name="txtValor" class="form-control" placeholder="Valor Cheque">
                                                                <input type="text" class="input-default focus form-control camposMascaraQtde d-none" id="txtTotal" disabled name="txtTotal" class="form-control" placeholder="Total">
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="form-row d-none" id="divBaixaSimples">
                                                        <div class="form-group col-md-2 col-2 pl-0">
                                                            <label data-error="wrong" class="labelGeral" data-success="right" for="txtQtdeCheques">Qtde Cheques: </label>
                                                            <div class="input-group">
                                                                <input type="text" value="1" class="input-default focus form-control camposMascaraQtdeInteiro" id="txtQtdeCheques" name="txtQtdeCheques" class="form-control" placeholder="Qtde Cheques">
                                                            </div>
                                                        </div>

                                                        <div class="form-group col-md-2 col-2">
                                                            <label data-error="wrong" class="labelGeral" data-success="right" for="txtIntervaloDias">Intervalo de Dias: </label>
                                                            <div class="input-group">
                                                                <input type="text" value="0" class="input-default focus form-control camposMascaraQtdeInteiro" id="txtIntervaloDias" name="txtIntervaloDias" class="form-control" placeholder="Intervalo de Dias">
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="form-row d-none" id="divDeposito">
                                                        <div class="form-group col-md-4 col-4 pl-0">
                                                            <label data-error="wrong" class="labelGeral" data-success="right" for="txtContaDep">Conta Depósito: </label>
                                                            <div class="input-group">
                                                                <input type="text" class="input-default focus form-control" id="txtContaDep" name="txtContaDep" class="form-control" placeholder="Conta Depósito">
                                                                <div class="input-group-append">
                                                                    <button class="btn bg-danger" id="btnContaDep" name="btnContaDep" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                                                    <button class="btn bg-danger" id="btnLimpaContaDep" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="form-row d-none" id="divAntecipacao">
                                                        <div class="form-group col-md-4 col-4 pl-0">
                                                            <label data-error="wrong" class="labelGeral" data-success="right" for="txtHistoricoAnte">Historico Antecipação: </label>
                                                            <div class="input-group">
                                                                <input type="text" class="input-default focus form-control" id="txtHistoricoAnte" name="txtHistoricoAnte" class="form-control" placeholder="Historico Antecipação">
                                                                <div class="input-group-append">
                                                                    <button class="btn bg-danger" id="btnHistoricoAnte" name="btnHistoricoAnte" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                                                    <button class="btn bg-danger" id="btnLimpaHistoricoAnte" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="from-row" id="divAps">
                                                        <div class="form-row pt-1" >
                                                            <div class="col-12 pl-0">
                                                                <fieldset class="form border-Field mb-0 pb-0">
                                                                    <legend class="textoTitulo mb-0 pb-0">APs</legend>
                                                                    <div class="col-12 table-responsive card-body pr-0 pt-0 pl-0">
                                                                        <table id="tabelaAp" class="table table-sm table-hover table-select table-condensed" style="white-space: nowrap;">
                                                                            <thead>
                                                                            </thead>
                                                                            <tbody>
                                                                            </tbody>
                                                                        </table>
                                                                    </div>
                                                                </fieldset>
                                                            </div>
                                                        </div>
                                                        <div class="form-row pt-2">
                                                            <div class="col-7 pr-3 pl-0">
                                                                <fieldset class="form border-Field mb-0 pb-0">
                                                                    <legend class="textoTitulo mb-0 pb-0">Cheques Gerados</legend>
                                                                    <div class="col-12 table-responsive card-body pr-0 pt-0 pl-0">
                                                                        <table id="tabelaCheques" class="table table-sm table-hover table-select table-condensed" style="white-space: nowrap;">
                                                                            <thead>
                                                                            </thead>
                                                                            <tbody>
                                                                            </tbody>
                                                                        </table>
                                                                    </div>
                                                                </fieldset>
                                                            </div>
                                                            <div class="col-5 pl-0">
                                                                <fieldset class="form border-Field mb-0 pb-0">
                                                                    <legend class="textoTitulo mb-0 pb-0">Baixas</legend>
                                                                    <div class="col-12 table-responsive card-body pr-0 pt-0 pl-0">
                                                                        <table id="tabelaBaixas" class="table table-sm table-hover table-select table-condensed" style="white-space: nowrap;">
                                                                            <thead>
                                                                            </thead>
                                                                            <tbody>
                                                                            </tbody>
                                                                        </table>
                                                                    </div>
                                                                </fieldset>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <input type="button" name="btnGravar" class="btn-sisp action-button" value="Gravar" id="btnGravar">
                                                <input type="button" name="voltar2" class="btn-sisp previous action-button-previous" value="Voltar" id="voltar2" />
                                            </fieldset>

                                        </form>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </section>
        </div>
    </div>

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

    <aside class="control-sidebar control-sidebar-dark">
    </aside>
    </div>

    <script src="../plugins/jquery/jquery.min.js?versao=3.255.7.1"></script>
    <script src="../plugins/jquery-ui/jquery-ui.min.js?versao=3.255.7.1"></script>
    <script type="text/javascript" src="../dist/js/jquery.dataTables.js?versao=3.255.7.1"></script>
    <script type="text/javascript" src="../dist/js/dataTables.bootstrap4.min.js?versao=3.255.7.1"></script>
    <script src="../plugins/sweetalert2/sweetalert2.min.js?versao=3.255.7.1"></script>
    <script src="../plugins/toastr/toastr.min.js?versao=3.255.7.1"></script>
    <script>
        $.widget.bridge('uibutton', $.ui.button);
    </script>
    <script src="../plugins/bootstrap/js/bootstrap.bundle.min.js?versao=3.255.7.1"></script>
    <script src="../dist/js/adminlte.min.js?versao=3.255.7.1"></script>
    <script src="../dist/js/requisicoes.js?versao=3.255.7.1"></script>
    <script src="../dist/js/loadingoverlay.min.js?versao=3.255.7.1"></script>
    <script src="../plugins/jquery-validation/jquery.validate.min.js?versao=3.255.7.1"></script>
    <script src="../dist/js/dataTables.keyTable.js?versao=3.255.7.1"></script>
    <script src="../dist/js/sisplan.js?versao=3.255.7.1"></script>
    <script src="../utils/funcoes.js?versao=3.255.7.1"></script>
    <script src="../utils/cookies.js?versao=3.255.7.1"></script>
    <script src="../dist/js/driver.min.js?versao=3.255.7.1"></script>
    <script type="text/javascript" src="../config.js?versao=3.255.7.1"></script>
    <script src="../plugins/select2/js/select2.full.min.js?versao=3.255.7.1"></script>
    <script src="../dist/js/jquery.maskMoney.min.js?versao=3.255.7.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');

            sArquivo = `${BASE_URI}/pages/chequeemi/cadastro_chequeemi/chequeemi.js?versao=3.255.7.1`;
            const nomeTela = ('<?php echo basename(__FILE__) ?>').replace('.php', '');

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

            const permissaoUsuarioLogado = await permissaoAcessos("CHEQUEEMI");

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

            insereJavaScriptPagina(sArquivo);
        });
    </script>
</body>

</html>