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

<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Sisplan Web | Manutenção de Movimentação Bancária</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- Theme style -->
    <link rel="stylesheet" href="../dist/css/adminlte.min.css?versao=3.257.10.1">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="../plugins/fontawesome-free/css/all.min.css?versao=3.257.10.1">
    <!-- Google Font: Source Sans Pro -->
    <link href='https://fonts.googleapis.com/css?family=Roboto:400,300,500,600,700,400italic' rel='stylesheet' type='text/css'>

    <link rel="stylesheet" type="text/css" href="../dist/css/dataTables.bootstrap4.min.css?versao=3.257.10.1" />

    <link href='../dist/css/bootstrap.min.css?versao=3.257.10.1'>

    <link rel="stylesheet" href="../dist/css/custom.css?versao=3.257.10.1">
    <link rel="stylesheet" href="../dist/css/sisplan.css?versao=3.257.10.1">
    <link rel="stylesheet" type="text/css" href="../plugins/datatables-keytable/css/keyTable.bootstrap4.min.css?versao=3.257.10.1">

    <link rel="stylesheet" type="text/css" href="../dist/css/responsive.bootstrap.min.css?versao=3.257.10.1">

    <link rel="shortcut icon" href="../favicon.ico">
    <link rel="stylesheet" href="../dist/css/cadastro.css?versao=3.257.10.1">
    <link rel="stylesheet" href="../plugins/icheck-bootstrap/icheck-bootstrap.min.css?versao=3.257.10.1">

    <!-- Toastr -->
    <link rel="stylesheet" href="../plugins/toastr/toastr.min.css?versao=3.257.10.1">
    <link rel="stylesheet" type="text/css" href="../dist/css/driver.min.css?versao=3.257.10.1" />
    <link rel="stylesheet" href="../dist/css/jquery-ui.css?versao=3.257.10.1">
    <!-- Google Font: Source Sans Pro -->
    <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
    <style>
        .form-control:disabled,
        .form-control[readonly] {
            background-color: #f7f7f7;
            opacity: 1;
        }

        #msform {
            text-align: start;
            position: relative;
        }

        .card {
            box-shadow: none !important;
            border-radius: 0 !important;
            margin-bottom: 0 !important;
        }

        .card-header {
            box-shadow: 0px 1px rgb(0 0 0 / 20%) !important;
        }

        .card.card-header {
            border-bottom: 1px dashed #ddd;
            box-shadow: none !important;
        }

        .card-body {
            padding-left: 1.25rem !important;
            padding-top: 0px;
            padding-bottom: 0px;
            padding-right: 1.25rem !important;
        }

        .fa-angle-right,
        .fa-angle-down {
            color: #343a40;
        }

        .header-content-page .title-page,
        .title-content-page .title,
        .title-page {
            font-size: 20px;
            line-height: normal;
            font-weight: 500;
            color: var(--font-color);
            margin: 0;
            font-family: Roboto, Arial, sans-serif;
        }

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

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

        #multiCollapseContábil {
            position: relative;
            z-index: 99999999;
        }

        td {
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        @media (max-width: 1194.8px) {
            .centralizaBotao {
                text-align: center;
            }
        }

        /* Estilo para telas maiores ou iguais a 992px (telas lg e maiores) */
        @media (min-width: 1195px) {
            .centralizaBotao {
                text-align: start;
            }
        }

        td.ColunaVermelha {
            color: red;
            font-weight: 600;
        }
    </style>
</head>

<body class="hold-transition sidebar-mini layout-fixed">
    <div class="wrapper">
        <?php
        include_once('../../../menu.php');
        ?>
        <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="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">
                <div class="content-header">
                    <div class="container-fluid">
                        <div class="row mb-2">
                            <div class="col-sm-6 col-12">
                            </div><!-- /.col -->
                            <div class="col-sm-6 col-12">
                            </div><!-- /.col -->
                        </div><!-- /.row -->
                    </div>
                </div>
                <section class="content">
                    <div class="container-fluid">
                        <div class="row">
                            <div class="col-12">
                                <div class="card" style="height:auto;min-height:715px">
                                    <div class="card-header text-center flex" style="border: none!important;box-shadow:none!important;">
                                        <h2 class="m-0">Manutenção de Movimentação Bancária</h2>
                                        <button title="Tutorial" class="mt-2 btn btn-info btn-sm ml-2" id="tutorial">
                                            <i class="fas fa-question-circle"></i>
                                        </button>
                                    </div>
                                    <fieldset>
                                        <div class="card-body">
                                            <form style="text-align:left!important;" id="msform" name="msform">

                                                <div class="card card-header" role="tab" id="geral">
                                                    <a style="width:100%;" data-toggle="collapse" data-parent="#multiCollapseExample1" href="#multiCollapseExample1" aria-expanded="true" aria-controls="collapseOne1">
                                                        <div class="row">
                                                            <div style="max-width:20px;margin-top:auto; margin-bottom: auto" class="col-1">
                                                                <i class="fas fa-angle-down"></i>
                                                            </div>
                                                            <div class="col-11">
                                                                <h4 class="title-page">
                                                                    Geral
                                                                </h4>
                                                            </div>
                                                        </div>
                                                    </a>
                                                </div>

                                                <div class="collapse  show" id="multiCollapseExample1">
                                                    <div class="card card-body mt-2">
                                                        <div class=" tab-pane fade show active" role="tabpanel" aria-labelledby="geral-tab">
                                                            <!-- AQUI COMEÇA COM AS ROW OU COM A TABLE Q PRECISA -->
                                                            <div class="row">
                                                                <div class="col-xl-3 col-12 form-group">
                                                                    <label data-error="wrong" class="labelGeral" data-success="right" for="txtLancamento">Lançamento: </label>
                                                                    <div class="input-group">
                                                                        <input type="text" readonly class="input-default focus form-control validate" id="txtLancamento" name="txtLancamento" placeholder="Lançamento">
                                                                    </div>
                                                                </div>
                                                                <div class="col-xl-3 col-12 form-group">
                                                                    <label data-error="wrong" data-success="right" for="txtConta">Conta:</label>
                                                                    <div class="relative">
                                                                        <div class="input-group">
                                                                            <input type="text" class="input-default focus form-control" id="txtConta" name="txtConta" class="form-control" placeholder="Conta">
                                                                            <div class="input-group-append">
                                                                                <button class="btn bg-danger" id="btn-ContaConsulta" name="btn-ContaConsulta" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                                                                <button class="btn bg-danger" id="btn-limpa-Conta" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="col-xl-3 col-12 form-group">
                                                                    <label data-error="wrong" data-success="right" for="txtBanco">Banco:</label>
                                                                    <div class="relative">
                                                                        <div class="input-group">
                                                                            <input type="text" class="input-default focus form-control" disabled id="txtBanco" name="txtBanco" class="form-control" placeholder="Banco">
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="col-xl-3 col-12 form-group">
                                                                    <label data-error="wrong" class="labelGeral" data-success="right" for="txtDocumento">Documento: </label>
                                                                    <div class="input-group">
                                                                        <input type="text" class="input-default focus form-control validate" id="txtDocumento" name="txtDocumento" placeholder="Documento">
                                                                    </div>
                                                                </div>
                                                            </div>

                                                            <div class="row">
                                                                <div class="col-md-6 col-12 text-left pr-0 pl-2">
                                                                    <div class="col-md-4 col-12 text-left pl-0">
                                                                        <label data-error="wrong" class="labelGeral" data-success="right" for="dtVencimento">Vencimento: </label>
                                                                        <div class="input-group">
                                                                            <input type="date" max="2500-12-31" value="1200-01-01" class="input-default focus form-control" id="dtVencimento" name="dtVencimento">
                                                                        </div>
                                                                    </div>
                                                                    <div class="col-md-4 col-12 text-left pl-0">
                                                                        <label data-error="wrong" class="labelGeral" data-success="right" for="dtLancamento">Lançamento: </label>
                                                                        <div class="input-group">
                                                                            <input type="date" max="2500-12-31" value="1200-01-01" class="input-default focus form-control" id="dtLancamento" name="dtLancamento">
                                                                        </div>
                                                                    </div>
                                                                    <div class="col-md-4 col-12 text-left pl-0 pr-2">
                                                                        <label data-error="wrong" class="labelGeral" data-success="right" for="dtContabilizacao">Contabilização: </label>
                                                                        <div class="input-group">
                                                                            <input type="date" max="2500-12-31" value="1200-01-01" class="input-default focus form-control" id="dtContabilizacao" name="dtContabilizacao">
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-3 col-12 text-left mt-2 pr-2 pl-2 pt-1">
                                                                    <fieldset class="form border-Field">
                                                                        <legend class="textoBorda pb-0 mb-0">Situação</legend>
                                                                        <div class="d-flex">
                                                                            <div class="icheck-primary mr-4"><input type="radio" id="rdPendente" name="rdSituacao" value="1"><label class="labelCheck" for="rdPendente">Pendente</label></div>
                                                                            <div class="icheck-primary mr-4"><input type="radio" id="rdBaixado" checked name="rdSituacao" value="2"><label class="labelCheck" for="rdBaixado">Baixado/Comp.</label></div>
                                                                        </div>
                                                                    </fieldset>
                                                                </div>
                                                                <div class="col-xl-3 col-12 form-group">
                                                                    <label data-error="wrong" class="labelGeral" data-success="right" for="txtMoeda">Moeda: </label>
                                                                    <div class="input-group">
                                                                        <input type="text" class="input-default focus form-control validate" id="txtMoeda" name="txtMoeda" placeholder="Moeda">
                                                                        <div class="input-group-append">
                                                                            <button class="btn bg-danger" id="btn-MoedaConsulta" name="btn-MoedaConsulta" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                                                            <button class="btn bg-danger" id="btn-limpa-Moeda" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>

                                                            <div class="row">
                                                                <div class="col-xl-3 col-12 form-group">
                                                                    <label data-error="wrong" class="labelGeral" data-success="right" for="txtHistorico">Histórico: </label>
                                                                    <div class="input-group">
                                                                        <input type="text" class="input-default focus form-control validate" id="txtHistorico" name="txtHistorico" placeholder="Histórico">
                                                                        <div class="input-group-append">
                                                                            <button class="btn bg-danger" id="btn-HistoricoConsulta" name="btn-HistoricoConsulta" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                                                            <button class="btn bg-danger" id="btn-limpa-Historico" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="col-xl-3 col-12 form-group">
                                                                    <label data-error="wrong" data-success="right" for="txtCliente">Cliente:</label>
                                                                    <div class="relative">
                                                                        <div class="input-group">
                                                                            <input type="text" class="input-default focus form-control" id="txtCliente" name="txtCliente" class="form-control" placeholder="Cliente">
                                                                            <div class="input-group-append">
                                                                                <button class="btn bg-danger" id="btn-ClienteConsulta" name="btn-ClienteConsulta" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                                                                <button class="btn bg-danger" id="btn-limpa-Cliente" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="col-xl-3 col-12 form-group">
                                                                    <label data-error="wrong" data-success="right" for="txtClasseGer">Classe Gerencial:</label>
                                                                    <div class="relative">
                                                                        <div class="input-group">
                                                                            <input type="text" class="input-default focus form-control" id="txtClasseGer" name="txtClasseGer" class="form-control" placeholder="Classe Gerencial">
                                                                            <div class="input-group-append">
                                                                                <button class="btn bg-danger" id="btn-ClasseGerConsulta" name="btn-ClasseGerConsulta" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                                                                <button class="btn bg-danger" id="btn-limpa-ClasseGer" type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="col-xl-3 col-12 form-group">
                                                                    <label data-error="wrong" class="labelGeral" data-success="right" for="txtOperacao">Operação</label>
                                                                    <div class="input-group">
                                                                        <select class="input-default focus form-control" data-dropdown-css-class="select2-danger" id="txtOperacao" class="custom-select focus">
                                                                            <option value="-">-</option>
                                                                            <option value="+">+</option>
                                                                        </select>
                                                                    </div>
                                                                </div>
                                                            </div>

                                                            <div class="row">
                                                                <div class="col-xl-3 col-12 form-group">
                                                                    <label data-error="wrong" class="labelGeral" data-success="right" for="txtTipo">Tipo: </label>
                                                                    <div class="input-group">
                                                                        <input type="text" class="input-default focus form-control validate" id="txtTipo" name="txtTipo" placeholder="Tipo">
                                                                    </div>
                                                                </div>
                                                                <div class="col-xl-3 col-12 form-group">
                                                                    <label data-error="wrong" data-success="right" for="txtEmpId">Emp. Id:</label>
                                                                    <div class="relative">
                                                                        <div class="input-group">
                                                                            <input type="text" class="input-default focus form-control" id="txtEmpId" name="txtEmpId" class="form-control" placeholder="Emp. Id">
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="col-xl-3 col-12 form-group mt-2 pr-2 pl-2 pt-1">
                                                                    <fieldset class="form border-Field">
                                                                        <legend class="textoBorda pb-0 mb-0">Tipo Antecipação</legend>
                                                                        <div class="d-flex">
                                                                            <div class="icheck-primary mr-4"><input type="radio" id="rdPagar" checked name="rdTipoAnte" value="1"><label class="labelCheck" for="rdPagar">Pagar</label></div>
                                                                            <div class="icheck-primary mr-4"><input type="radio" id="rdReceber" name="rdTipoAnte" value="2"><label class="labelCheck" for="rdReceber">Receber</label></div>
                                                                        </div>
                                                                    </fieldset>
                                                                </div>
                                                                <div class="col-xl-3 col-12 form-group">
                                                                    <label data-error="wrong" data-success="right" for="txtAntecipacao">Antecipação:</label>
                                                                    <div class="relative">
                                                                        <div class="input-group">
                                                                            <input type="text" disabled class="input-default focus form-control" id="txtAntecipacao" name="txtAntecipacao" class="form-control" placeholder="Antecipação">
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>

                                                            <div class="row">
                                                                <div class="col-md-12 col-12 form-group pl-2 pr-2">
                                                                    <label data-error="wrong" class="labelGeral" data-success="right" for="txtObs">Observação:</label>
                                                                    <div class="input-group">
                                                                        <textarea class="input-default focus form-control create" id="txtObs" name="txtObs" placeholder="Observação" rows="3" cols="50" style="resize: none;"></textarea>
                                                                    </div>
                                                                </div>
                                                            </div>

                                                            <div class="row">
                                                                <div class="col-md-6 col-12 text-left pr-0 pl-2">
                                                                    <div class="col-md-4 col-12 text-left pl-0">
                                                                        <label data-error="wrong" class="labelGeral" data-success="right" for="txtValorMoeda">Valor Moeda: </label>
                                                                        <div class="input-group">
                                                                            <input type="text" class="input-default focus form-control" id="txtValorMoeda" name="txtValorMoeda" class="form-control" placeholder="Valor Moeda">
                                                                        </div>
                                                                    </div>
                                                                    <div class="col-md-4 col-12 text-left pl-0">
                                                                        <label data-error="wrong" class="labelGeral" data-success="right" for="txtValorTaxa">Valor Taxa: </label>
                                                                        <div class="input-group">
                                                                            <input type="text" class="input-default focus form-control" id="txtValorTaxa" name="txtValorTaxa" class="form-control" placeholder="Valor Taxa">
                                                                        </div>
                                                                    </div>
                                                                    <div class="col-md-4 col-12 text-left pl-0 pr-2">
                                                                        <label data-error="wrong" class="labelGeral" data-success="right" for="txtValor">Valor: </label>
                                                                        <div class="input-group">
                                                                            <input type="text" class="input-default focus form-control" id="txtValor" name="txtValor" class="form-control" placeholder="Valor">
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-6 col-12 text-left pr-0 pl-2">
                                                                    <div class="col-md-4 col-12 text-left pl-0">
                                                                        <label data-error="wrong" class="labelGeral" data-success="right" for="txtLanctoConc">Lancto Conciliado: </label>
                                                                        <div class="input-group">
                                                                            <input type="text" disabled class="input-default focus form-control" id="txtLanctoConc" name="txtLanctoConc" class="form-control" placeholder="Lancto Conciliado">
                                                                        </div>
                                                                    </div>
                                                                    <div class="col-md-4 col-12 text-left pl-0">
                                                                        <label data-error="wrong" class="labelGeral" data-success="right" for="txtValorDoc">Valor Doc.: </label>
                                                                        <div class="input-group">
                                                                            <input type="text" disabled class="input-default focus form-control" id="txtValorDoc" name="txtValorDoc" class="form-control" placeholder="Valor Doc.">
                                                                        </div>
                                                                    </div>
                                                                    <div class="col-md-4 col-12 text-left pl-0 pr-2 mt-2 pt-1">
                                                                        <fieldset class="form border-Field p-0">
                                                                            <legend class="textoBorda pb-0 mb-0">Opção</legend>
                                                                            <div class="icheck-primary mr-2"><input type="checkbox" id="cbGeraContabil"><label class="labelCheck" for="cbGeraContabil"> Gera Contabilização</label></div>
                                                                        </fieldset>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>

                                                <!-- ////////////////////ACABA O A PRIMEIRA SECTION///////////////////////////// -->

                                                <div class="card card-header" role="tab" id="financeiro">
                                                    <a style="width:100%;" data-toggle="collapse" data-parent="#multiCollapseExample2" href="#multiCollapseExample2" aria-expanded="true" aria-controls="collapseOne1">
                                                        <div class="row">
                                                            <div style="max-width:20px;margin-top:auto; margin-bottom: auto" class="col-1">
                                                                <i class="fas fa-angle-right"></i>
                                                            </div>
                                                            <div class="col-11">
                                                                <h4 class="title-page">
                                                                    Financeiro
                                                                </h4>
                                                            </div>
                                                        </div>
                                                    </a>
                                                </div>

                                                <div class="collapse" id="multiCollapseExample2">
                                                    <div class="card card-body mt-2">
                                                        <div class="tab-pane fade show active" role="tabpanel" aria-labelledby="financeiro-tab">
                                                            <div class="pt-2 pb-2 form-row">
                                                                <div class="col-lg-12 table-responsive table-selecttable-lg">
                                                                    <table id="tabelaFinanceiro" class="table table-sm table-select table-hover" style="width: 100%; white-space: nowrap">
                                                                        <thead>
                                                                        </thead>
                                                                        <tbody>
                                                                        </tbody>
                                                                    </table>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>

                                                <!-- ////////////////////ACABA O A SEGUNDA SECTION///////////////////////////// -->

                                                <div class="card card-header d-none" role="tab" id="contabilidade">
                                                    <a style="width:100%;" data-toggle="collapse" data-parent="#multiCollapseExample3" href="#multiCollapseExample3" aria-expanded="true" aria-controls="collapseOne1">
                                                        <div class="row">
                                                            <div style="max-width:20px;margin-top:auto; margin-bottom: auto" class="col-1">
                                                                <i class="fas fa-angle-right"></i>
                                                            </div>
                                                            <div class="col-11">
                                                                <h4 class="title-page">
                                                                    Contabilidade
                                                                </h4>
                                                            </div>
                                                        </div>
                                                    </a>
                                                </div>

                                                <div class="collapse" id="multiCollapseExample3">
                                                    <div class="card card-body">
                                                        <div class="tab-pane fade show active" role="tabpanel" aria-labelledby="contabilidade-tab">
                                                            <div class="pt-2 form-row">
                                                                <div class="col-lg-12 table-responsive table-selecttable-lg">
                                                                    <table id="tabelaContabilidade" class="table table-sm table-select table-hover" style="width: 100%; white-space: nowrap">
                                                                        <thead>
                                                                        </thead>
                                                                        <tbody>
                                                                        </tbody>
                                                                    </table>
                                                                </div>
                                                                <button type="button" class="btn btn-primary btn-sisp mt-2 mb-2" id="btnContabil">Incluir/Alterar Contabilidade</button>
                                                            </div>
                                                            <h4 class="title-page mt-2">Rateio Centro de Custo</h4>
                                                            <div class="pt-2 form-row">
                                                                <div class="col-lg-12 table-responsive table-selecttable-lg">
                                                                    <table id="tabelaRateio" class="table table-sm table-select table-hover" style="width: 100%; white-space: nowrap">
                                                                        <thead>
                                                                        </thead>
                                                                        <tbody>
                                                                        </tbody>
                                                                    </table>
                                                                </div>
                                                                <button type="button" class="btn btn-primary btn-sisp mt-2 mb-2" id="btnRateio">Incluir/Alterar Rateio</button>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>

                                                <!-- ////////////////////ACABA O A TERCEIRA SECTION///////////////////////////// -->

                                                <!-- cabo os panel -->
                                                <input type="button" name="gravar" id="gravar" class="btn-sisp action-button" value="Gravar" />
                                                <button type="button" id="btnVoltar" style="font-size:15px;" class="btn-sisp action-button-previous" data-dismiss="modal">Voltar</button>
                                            </form>
                                        </div>
                                    </fieldset>
                                </div>
                            </div>
                        </div>
                    </div>
                </section>
            </div>
        </div>

        <div id="modal-contabil" class="modal" tabindex="-1" data-backdrop="static" role="dialog">
            <div class="modal-dialog modal-xl" role="document">
                <div class="modal-content" id="modalBody">
                    <div class="modal-header">
                        <h4 class="modal-title">Incluir Contabilização</h4>
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                    </div>
                    <div class="modal-body">
                        <div class="card card-body mt-2">
                            <div class="row">
                                <div class="col-xl-4 col-12 form-group">
                                    <label data-error="wrong" data-success="right" for="txtContaDebita">Debita:</label>
                                    <div class="relative">
                                        <div class="input-group">
                                            <input type="text" class="input-default focus form-control" disabled id="txtContaDebita" name="txtContaDebita" class="form-control" placeholder="Debita">
                                            <div class="input-group-append">
                                                <button class="btn bg-danger" id="btn-ContaDebitaConsulta" disabled name="btn-ContaDebitaConsulta" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                                <button class="btn bg-danger" id="btn-limpa-ContaDebita" disabled type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-xl-4 col-12 form-group">
                                    <label data-error="wrong" data-success="right" for="txtContaCredita">Credita:</label>
                                    <div class="relative">
                                        <div class="input-group">
                                            <input type="text" class="input-default focus form-control" disabled id="txtContaCredita" name="txtContaCredita" class="form-control" placeholder="Credita">
                                            <div class="input-group-append">
                                                <button class="btn bg-danger" id="btn-ContaCreditaConsulta" disabled name="btn-ContaCreditaConsulta" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                                <button class="btn bg-danger" id="btn-limpa-ContaCredita" disabled type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-xl-4 col-12 form-group">
                                    <label data-error="wrong" data-success="right" for="txtValorContabil">Valor:</label>
                                    <div class="relative">
                                        <div class="input-group">
                                            <input type="text" class="input-default focus form-control" disabled id="txtValorContabil" name="txtValorContabil" class="form-control" placeholder="Valor">
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div class="row">
                                <div class="col-md-12 col-12 form-group pl-2 pr-2">
                                    <label data-error="wrong" class="labelGeral" data-success="right" for="txtObsContabil">Observação:</label>
                                    <div class="input-group">
                                        <textarea class="input-default focus form-control create" disabled id="txtObsContabil" name="txtObsContabil" placeholder="Observação" rows="3" cols="50" style="resize: none;"></textarea>
                                    </div>
                                </div>
                            </div>

                            <div class="pt-2 form-row">
                                <div class="col-lg-12 table-responsive table-selecttable-lg">
                                    <table id="tabelaCadContabil" class="table table-sm table-select table-hover" style="width: 100%; white-space: nowrap">
                                        <thead>
                                        </thead>
                                        <tbody>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer justify-content-start">
                        <div class="row col-12 col-md-12 p-0">
                            <div class="col-9 col-md-9 d-flex justify-content-start">
                                <button class="btn btn-sisp mr-2" style="background-color: #218838; color:#fff" id="btnIncluirContabil">Incluir</button>
                                <button class="btn btn-primary btn-sisp mr-2" id="btnAlterarContabil">Alterar</button>
                                <button type="button" class="btn btn-danger btn-sisp mr-2" id="btnExcluirContabil">Excluir</button>

                                <button class="btn btn-primary btn-sisp mr-2 d-none" id="btnConfirmarContabil">Confirmar</button>
                                <button type="button" class="btn btn-danger btn-sisp d-none" id="btnDesistirContabil">Desistir</button>
                            </div>
                            <div class="col-3 col-md-3 d-flex justify-content-end">
                                <button type="button" class="btn bg-gradient-success btn-sisp ml-auto" data-dismiss="modal" id="btnConfirmarTotalContabil">Confirmar</button>
                                <button type="button" class="btn bg-gradient-danger btn-sisp ml-auto" data-dismiss="modal" id="btnDesistirTotalContabil">Desistir</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div id="modal-rateio" class="modal" tabindex="-1" data-backdrop="static" role="dialog">
            <div class="modal-dialog modal-xl" role="document">
                <div class="modal-content" id="modalBody">
                    <div class="modal-header">
                        <h4 class="modal-title">Incluir Rateio</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="card card-body mt-2">
                            <div class="row">
                                <div class="col-xl-4 col-12 form-group">
                                    <label data-error="wrong" data-success="right" for="txtCentroCusto">Centro de Custo:</label>
                                    <div class="relative">
                                        <div class="input-group">
                                            <input type="text" class="input-default focus form-control" disabled id="txtCentroCusto" name="txtCentroCusto" class="form-control" placeholder="Centro de Custo">
                                            <div class="input-group-append">
                                                <button class="btn bg-danger" id="btn-CentroCustoConsulta" disabled name="btn-CentroCustoConsulta" data-button="absolute" type="button"><i class="m-0 p-0 fas fa-search"></i></button>
                                                <button class="btn bg-danger" id="btn-limpa-CentroCusto" disabled type="button"><i class="m-0 p-0 fas fa-trash"></i></button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-xl-4 col-12 form-group">
                                    <label data-error="wrong" data-success="right" for="txtPercRateio">Perc.:</label>
                                    <div class="relative">
                                        <div class="input-group">
                                            <input type="text" class="input-default focus form-control" disabled id="txtPercRateio" name="txtPercRateio" class="form-control" placeholder="Perc.">
                                        </div>
                                    </div>
                                </div>
                                <div class="col-xl-4 col-12 form-group">
                                    <label data-error="wrong" data-success="right" for="txtValorRateio">Valor:</label>
                                    <div class="relative">
                                        <div class="input-group">
                                            <input type="text" class="input-default focus form-control" disabled id="txtValorRateio" name="txtValorRateio" class="form-control" placeholder="Valor">
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div class="pt-2 form-row">
                                <div class="col-lg-12 table-responsive table-selecttable-lg">
                                    <table id="tabelaCadRateio" class="table table-sm table-select table-hover" style="width: 100%; white-space: nowrap">
                                        <thead>
                                        </thead>
                                        <tbody>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer justify-content-start">
                        <div class="row col-12 col-md-12 p-0">
                            <div class="col-9 col-md-9 d-flex justify-content-start">
                                <button class="btn btn-sisp mr-2" style="background-color: #218838; color:#fff" id="btnIncluirRateio">Incluir</button>
                                <button class="btn btn-primary btn-sisp mr-2" id="btnAlterarRateio">Alterar</button>
                                <button type="button" class="btn btn-danger btn-sisp mr-2" id="btnExcluirRateio">Excluir</button>

                                <button class="btn btn-primary btn-sisp mr-2 d-none" id="btnConfirmarRateio">Confirmar</button>
                                <button type="button" class="btn btn-danger btn-sisp d-none" id="btnDesistirRateio">Desistir</button>
                            </div>
                            <div class="col-3 col-md-3 d-flex justify-content-end">
                                <button type="button" class="btn bg-gradient-success btn-sisp ml-auto" data-dismiss="modal" id="btnConfirmarTotalRateio">Confirmar</button>
                                <button type="button" class="btn bg-gradient-danger btn-sisp ml-auto" data-dismiss="modal" id="btnDesistirTotalRateio">Desistir</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

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

        <!-- Control Sidebar -->
        <aside class="control-sidebar control-sidebar-dark">
            <!-- Control sidebar content goes here -->
        </aside>
        <!-- /.control-sidebar -->
    </div>
    <!-- jQuery -->
    <script src="../plugins/jquery/jquery.min.js?versao=3.257.10.1"></script>
    <script src="../plugins/jquery-ui/jquery-ui.min.js?versao=3.257.10.1"></script>
    <script type="text/javascript" src="../dist/js/jquery.dataTables.js?versao=3.257.10.1"></script>
    <script type="text/javascript" src="../dist/js/dataTables.bootstrap4.min.js?versao=3.257.10.1"></script>
    <script src="../plugins/sweetalert2/sweetalert2.min.js?versao=3.257.10.1"></script>
    <script src="../plugins/toastr/toastr.min.js?versao=3.257.10.1"></script>
    <script>
        $.widget.bridge('uibutton', $.ui.button);
    </script>
    <script src="../plugins/bootstrap/js/bootstrap.bundle.min.js?versao=3.257.10.1"></script>
    <script src="../dist/js/adminlte.min.js?versao=3.257.10.1"></script>
    <script src="../dist/js/requisicoes.js?versao=3.257.10.1"></script>
    <script src="../dist/js/cliente/entidade.js?versao=3.257.10.1"></script>
    <script src="../dist/js/loadingoverlay.min.js?versao=3.257.10.1"></script>
    <script src="dist/js/valida_cpf_cnpj.js?versao=3.257.10.1"></script>
    <script src="../plugins/jquery-validation/jquery.validate.min.js?versao=3.257.10.1"></script>
    <script src="../dist/js/sisplan.js?versao=3.257.10.1"></script>
    <script src="../utils/funcoes.js?versao=3.257.10.1"></script>
    <script src="../utils/cookies.js?versao=3.257.10.1"></script>
    <script src="../dist/js/driver.min.js?versao=3.257.10.1"></script>
    <script src="../dist/js/dataTables.keyTable2.js?versao=3.257.10.1"></script>
    <script src="../dist/js/jquery.mask.min.js?versao=3.257.10.1"></script>
    <script src="../dist/js/jquery.maskMoney.min.js?versao=3.257.10.1"></script>
    <script type="text/javascript" src="../config.js?versao=3.257.10.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('MOVIMENTOBANCARIO');
            if (!temAcesso.resultado) {
                toastrAcesso(temAcesso, BASE_URI);
                return;
            }

            const permissaoUsuarioLogado = await permissaoAcessos("MOVIMENTOBANCARIO");

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


            const queryString = window.location.href;
            const parametros = queryString.split("/");
            const movimentobancario = parametros[parametros.length - 1];

            $(window).on("beforeunload", function(e) {
                // e.preventDefault();
                e.stopPropagation();
                deletaRegistro("MOVIMENTOBANCARIO", getCookie("usuario"), movimentobancario);
                return undefined;
            });

            sArquivo = `${BASE_URI}/pages/movimentobancario/cadastro_movimentobancario/movimentobancario.js?versao=3.257.10.1`;
            insereJavaScriptPagina(sArquivo);

            const nomeTela = ('<?php echo basename(__FILE__) ?>').replace('.php', '');
            habilitaCamposObrigatoriosTela(nomeTela);
        });
    </script>
</body>

</html>