<?php $__env->startSection('scripts'); ?>
    <script src="<?php echo e(URL::asset('js/views/financeiro/movimento.js?1234567')); ?>"></script>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('titulo'); ?>
    MOVIMENTO FINANCEIRO - <?php echo e(Auth::user()->Unidade->getTitulo()); ?>

<?php $__env->stopSection(); ?>

<?php $__env->startSection('pagina'); ?>
    

<div class="content-wrapper">
    <input type="hidden" id="hdnUsuario" name="idusuario"   data="<?php echo e(Auth::user()->getId()); ?>"/>
    <input type="hidden" id="hdnId"      name="id"          data=""/>
    <!-- <input type="hidden" id="hdnUnidade" name="unidade"     data="<?php echo e(Auth::user()->getUnidade()); ?>"/> -->
    <input type="hidden" id="hdnDatarec" name="hdndatarec" data=""/>
    <input type="hidden" id="hdnDatamov" name="hdndatamov" data=""/>
    <input type="hidden" id="hdnCidade"     name="hdncidade"    data=""/>
    

    <div class="container-fluid mt-2">
        
        <div id="cadastro" class="card mt-2" style="display: none; background-color:#fff; color:#056367; border-radius: 20px 0px 20px 0px;">
            
            <?php echo csrf_field(); ?>
            
            <div class="card-body">
                <div class="row" style="padding-right: 2px;">
                    <div class="col-md-6">
                        <h4 style="color:#056367;"><i class="fas fa-comment-dollar"></i> Movimento do Financeiro</h4>
                    </div>
                    <div class="col-md-6">
                        <div class="col text-right">
                            <button id="btnVoltar" type="button" class="btn btn-secondary" aria-label="Left Align" >
                                <i class="fas fa-arrow-left"></i> Voltar
                            </button>

                            <button id="btnSalvar" type="button" data="" class="btn btn-success" aria-label="Left Align" >
                                <i class="fas fa-save"></i> Salvar
                            </button>

                            <button id="btnNovoC" type="button" class="btn btn-primary" aria-label="Left Align" >
                                <i class="fas fa-plus-circle"></i> Novo
                            </button>
                            
                        </div>
                    </div>
                </div>

                <hr></hr>

                <div class="row" >
                    <div class="col-md-12">
                        <label id="txtDescricao_label" for="txtDescricao"  class="col-form-label text-md-left">Descrição <span style="color: #ff0000;">*</span></label>
                        <input id="txtDescricao" class="form-control" name="descricao" type="text" maxlength="200" value="" required/>
                    </div>
                </div>
                <div class="row" >
                    <div class="col-md-2">
                        <label id="txtDatamov_label" for="txtDatamov"  class="col-form-label text-md-left">Data Mov</label>
                        <input id="txtDatamov" class="form-control" name="datamov" type="text" maxlength="10" value="" />
                    </div>
                    <div class="col-md-2">
                        <label id="txtDatarec_label" for="txtDatarec" class="col-form-label text-md-left">Data Rec/Pag <span style="color: #ff0000;">*</span></label>
                        <input id="txtDatarec" class="form-control" name="datarec" onKeyUp="mascara_data(this)" type="text" maxlength="10" value="" />
                    </div>
                    <div class="col col-lg-2 col-12 text-left">
                        <label for="cbStatus" class="col-form-label text-md-left">Status <span style="color: #ff0000;">*</span></label>
                        <br/>
                        <select id="cbStatus" class="form-control">
                            <option value="" selected>...Selecione</option>
                            <option value="1">RECEBIDO</option>
                            <option value="2">A RECEBER</option>
                            <option value="3">PAGO</option>
                            <option value="4">A PAGAR</option>
                        </select>
                    </div>
                    <div class="col col-lg-4 col-12 text-left">
                        <label for="cbContafin" class="col-form-label text-md-left">Conta Financeira <span style="color: #ff0000;">*</span></label>
                        <br/>
                        <select id="cbContafin" class="form-control">
                           
                        </select>
                    </div>
                    <div class="col-md-2">
                        <label id="txtDoc_label" for="txtDoc"  class="col-form-label text-md-left">Doc</label>
                        <input id="txtDoc" class="form-control" name="doc" type="text" maxlength="100" value="" />
                    </div>
                </div>
                <div class="row" >
                    <div class="col-md-2">
                        <label id="txtValor_label" for="txtValor"  class="col-form-label text-md-left">Valor <span style="color: #ff0000;">*</span></label>
                        <input id="txtValor" class="form-control"  onkeyup="calcula()"  name="valor" type="text" maxlength="10" value="" />
                    </div>
                    <div class="col-md-2">
                        <label id="txtJuros_label" for="txtJuros"  class="col-form-label text-md-left">Juros</label>
                        <input id="txtJuros" class="form-control"  onkeyup="calcula()" name="juros" type="text" maxlength="10" value="" />
                    </div>
                    <div class="col-md-2">
                        <label id="txtMulta_label" for="txtMulta"  class="col-form-label text-md-left">Multa</label>
                        <input id="txtMulta" class="form-control"  onkeyup="calcula()" name="multa" type="text" maxlength="10" value="" />
                    </div>
                    <div class="col-md-2">
                        <label id="txtDesconto_label" for="txtDesconto"  class="col-form-label text-md-left">Desconto</label>
                        <input id="txtDesconto" class="form-control"  onkeyup="calcula()" name="desconto" type="text" maxlength="10" value="" />
                    </div>
                    <div class="col-md-2">
                        <label id="txtTotal_label" for="txtTotal"  class="col-form-label text-md-left">Valor Total</label>
                        <input id="txtTotal" class="form-control" name="total" type="text" maxlength="10" value="" />
                    </div>
                    <div class="col col-lg-2 col-12 text-left">
                        <label for="cbForma" class="col-form-label text-md-left">Forma Pgto/Rec <span style="color: #ff0000;">*</span></label>
                        <br/>
                        <select id="cbForma" class="form-control">
                            <option value="">...Selecione</option>
                            <option value="BO">BOLETO</option>
                            <option value="CC">CARTÃO CRÉDITO</option>
                            <option value="CD">CARTÃO DÉBITO</option>
                            <option value="DC">DÉBITO EM CONTA</option>
                            <option value="DN">ESPÉCIE</option>
                            <option value="PX">PIX</option>
                            <option value="TB">TRANSFERÊNCIA</option>
                        </select>
                    </div>
                </div>
                <div class="row" >
                    <div class="col col-lg-4 col-12 text-left">
                        <label for="cbFunc_label" class="col-form-label text-md-left">Colaborador</label>
                        <br/>
                        <select id="cbFunc" class="form-control">
                           
                        </select>
                    </div>

                    <div class="col col-lg-4 col-12 text-left">
                        <label for="cbConta" class="col-form-label text-md-left">Conta Custo <span style="color: #ff0000;">*</span></label>
                        <br/>
                        <select id="cbConta" class="form-control">
                           
                        </select>
                    </div>
                    <div class="col col-lg-4 col-12 text-left">
                        <label for="cbCCusto" class="col-form-label text-md-left">Centro de Custos <span style="color: #ff0000;">*</span></label>
                        <br/>
                        <select id="cbCCusto" class="form-control">
                           
                        </select>
                    </div>
                </div>
                <div class="row" >
                    
                    <div class="col col-lg-4 col-12 text-left">
                        <label for="cbPessoaLabel" class="col-form-label text-md-left">Cliente/Fornecedor <span style="color: #ff0000;">*</span></label>
                        <br/>
                        <select id="cbPessoa" class="form-control">
                           
                        </select>
                        <input id="txtNomeFornec" class="form-control" name="nome" type="text" maxlength="50" style="background: #ffffb3;" value=""/>
                    </div>
                    <div class="col-md-1">
                        <div class="col text-left">
                            <label id="botao_label" for="botao" class="col-form-label text-md-left">&nbsp;</label><br>
                            <button id="btnNovoFornec" type="button" class="btn btn-primary" aria-label="Left Align" >
                                <i class="fas fa-plus"></i>
                            </button>
                            <button id="btnSalvarFornec" type="button" class="btn btn-success" aria-label="Left Align" >
                                <i class="fas fa-check"></i>
                            </button>
                            <button id="btnVoltarFornec" type="button" class="btn btn-default" aria-label="Left Align" >
                                <i class="fas fa-arrow-left"></i>
                            </button>
                        </div>
                    </div>
                    <div class="col-md-6">
                        <label id="txtObs_label" for="txtDoc"  class="col-form-label text-md-left">Observação</label>
                        <textarea id="txtObs" name="txtObs" style="width: 100%" rows="4" maxlength="200"></textarea>
                    </div>
                    <div class="col-md-1">
                        <label id="txtExcluido_label" for="txtAtivo"  class="col-form-label text-md-left">Excluído?</label>
                        <br/>
                        <label class="switch">
                            <input id="cbExcluido"  type="checkbox" data-off-color="danger" data-on-text="1" data-off-text="0">
                            <span class="slider round"></span>
                        </label>
                    </div>
                </div>

                <div class="row" style="padding-right: 2px;">
                    <div class="col-md-4">
                        <div class="col text-left">
                            <label id="txtLegenda_label" for="txtLegenda"  ><span style="color: #ff0000;">( * )</span> Campos obrigatórios</label>
                        </div>
                    </div>

                    <div class="col-md-8">
                        <div class="col text-right">
                            <button id="btnVoltar2" type="button" class="btn btn-secondary" aria-label="Left Align" >
                                <i class="fas fa-arrow-left"></i> Voltar
                            </button>

                            <button id="btnSalvar2" type="button" data="" class="btn btn-success" aria-label="Left Align" >
                                <i class="fas fa-save"></i> Salvar
                            </button>

                            <button id="btnNovoC2" type="button" class="btn btn-primary" aria-label="Left Align" >
                                <i class="fas fa-plus-circle"></i> Novo
                            </button>
                            
                        </div>
                    </div>
                </div>

            </div>
            
        </div>

        <div id="lista" class="card mt-2" style="background-color:#fff; color:#056367; border-radius: 20px 0px 20px 0px;">
            <div class="card-body">
                <div class="row" style="padding-bottom: 5px; padding-right: 2px;">
                    <div class="col-md-6">
                        <h4 style="color:#056367;"><i class="fas fa-comment-dollar"></i> Movimento do Financeiro</h4>
                    </div>
                </div>
                <div class="row" >
                    <div class="col col-lg-2 col-12 text-left">
                        <label for="cbStatusPesq" class="col-form-label text-md-left">Mês</label>
                        <br/>
                        <select id="cbMes" class="form-control">
                            <option value="" selected>...Todos</option>
                            <option value="1">JANEIRO</option>
                            <option value="2">FEVEREIRO</option>
                            <option value="3">MARÇO</option>
                            <option value="4">ABRIL</option>
                            <option value="5">MAIO</option>
                            <option value="6">JUNHO</option>
                            <option value="7">JULHO</option>
                            <option value="8">AGOSTO</option>
                            <option value="9">SETEMBRO</option>
                            <option value="10">OUTUBRO</option>
                            <option value="11">NOVEMBRO</option>
                            <option value="12">DEZEMBRO</option>
                            
                        </select>
                    </div>
                    <div class="col col-lg-1 col-12 text-left">
                        <label for="cbAno" class="col-form-label text-md-left">Ano</label>
                        <br/>
                        <select id="cbAno" class="form-control">
                            <option value="" selected>...Selecione</option>
                            <option value="2021">2021</option>
                            <option value="2022">2022</option>
                            <option value="2023">2023</option>
                            <option value="2024">2024</option>
                            <option value="2025">2025</option>
                            <option value="2026">2026</option>
                            <option value="2027">2027</option>
                            <option value="2028">2028</option>
                            <option value="2029">2029</option>
                            <option value="2030">2030</option>
                            <option value="2031">2031</option>
                            
                        </select>
                    </div>
                    <div class="col col-lg-2 col-12 text-left">
                        <label for="cbStatusPesq" class="col-form-label text-md-left">Status</label>
                        <br/>
                        <select id="cbStatusPesq" class="form-control">
                            <option value="" selected>...Todos</option>
                            <option value="1">RECEBIDO</option>
                            <option value="2">A RECEBER</option>
                            <option value="3">PAGO</option>
                            <option value="4">A PAGAR</option>
                        </select>
                    </div>
                    <div class="col col-lg-3 col-12 text-left">
                        <label id="txtBusca_label" for="txtBusca"  class="col-form-label text-md-left">Busca <span style="color: #C0C0C0;">Enter</span></label>
                        <input id="txtBusca" class="form-control" name="busca" type="text" maxlength="50" value="" style="background-color: #ffffb3;" title="Digite palavra para buscar e dê [Enter]"/>
                    </div>
                    <div class="col-md-4 text-right">
                        <label id="txtPesquisar_label" for="txtNome"  class="col-form-label text-md-left">&nbsp;</label><br>
                        <button id="btnPesquisar" type="button" class="btn btn-secondary" aria-label="Left Align" >
                            <i class="fas fa-search"></i> Pesquisar
                        </button>
                        <button id="btnNovo" type="button" class="btn btn-primary" aria-label="Left Align" >
                            <i class="fas fa-plus-circle"></i> Novo
                        </button>
                    </div>
                </div>
                <div class="row mt-2" >
                    <div class="col panel panel-primary table-responsive">

                        <table id="tbMov" class="table table-striped table-bordered text-left ">
                            <thead  style="background-color:#404040; color: #ccc; font-weight: bold;">
                                <tr>
                                    <th>Descrição</th>
                                    <th></th>
                                </tr>
                            </thead>
                            <tbody>
                                

                            </tbody>
                        </table>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


<script>

    function mascara_data(campo) {
        if (campo.value.length == 2) {
            campo.value += '/';
        }
        if (campo.value.length == 5) {
            campo.value += '/';
        }
    }

    function mascara_hora(campo) {
        if (campo.value.length == 2) {
            campo.value += ':';
        }
    }

    function mascara_letra(campo) {
        if (campo.value == '-') {
            campo.value += '';
        }
        if (campo.value == '=') {
            campo.value += '';
        }
    
    }

</script>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>