Skip to content

Commit

Permalink
Form Cargo V 0.2Beta
Browse files Browse the repository at this point in the history
  • Loading branch information
hiltonbruce committed Jul 12, 2014
1 parent 1c12eec commit b18d696
Show file tree
Hide file tree
Showing 7 changed files with 116 additions and 63 deletions.
27 changes: 0 additions & 27 deletions classes/class_consulta.php

This file was deleted.

22 changes: 17 additions & 5 deletions controller/despesa.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
switch ($agenda) {
case '3':
require_once 'forms/ctapagar.php';//Contas a pagar
break;
break;
case '4'://Relatório COMADEP
$mesRelatorio .=$rolIgreja;
$dtRelatorio = data_extenso ($d.'/'.$m.'/'.$a);
Expand All @@ -131,17 +131,29 @@
require_once 'models/tes/relatorioComadep.php';
require_once ('views/saldosComadep.php');
require_once 'forms/tes/mesComadep.php';
break;
break;
case '5':
require_once 'models/cadagendapgto.php';//Agenda despesa
break;
break;
case '6':
- require_once 'views/agendarpgto.php';//Contas a pagar
break;
case '7':
- require_once 'forms/tes/folha.php';
- require_once 'forms/tes/folha.php';//Form p cadastrar cargos
break;
case '8':

//Recibos para de pgto
$pgtoDias = new tes_cargo();
$listaPgto = $pgtoDias->cargoIgreja($_POST['rolIgreja'],$_POST['idfunc'] );
$recLink='#';
$titTabela = 'Listagem para Pagamento';
print_r($listaPgto);
require_once 'models/tes/cadCargoIgreja.php';//Cadastrar Membro no Cargo despesa
break;
default:
;
break;
break;
}

} else {
Expand Down
24 changes: 3 additions & 21 deletions forms/autoCompletaMembro.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
<tbody>
<tr>
<td colspan="3"><label>Nome:</label>
<input type="text" name="nome" id="campo_estado" size="40%" class="form-control" autofocus="autofocus" />
<input type="hidden" name="escolha" value="adm/rest_busca.php">
</td><td> <label>Rol:</label> <input type="text" id="rol" name="rol"
<input type="text" name="nome" id="campo_estado" size="40%"
class="form-control" autofocus="autofocus" tabindex="<?PHP echo $ind++;?>" />
</td><td> <label>Rol:</label> <input type="text" id="rol" name="rol" tabindex="<?PHP echo $ind++;?>"
value="" class="form-control" placeholder="N&ordm; do membro na igreja" />
</td>
</tr>
Expand All @@ -20,24 +20,6 @@
</tr>
</tbody>
</table>
<script type="text/javascript">
new Autocomplete("campo_estado", function() {
this.setValue = function( fone, nome, celular, igreja, rol,cpf,rg ) {
$("#id_val").val(fone);
$("#estado_val").val(nome);
$("#cel").val(celular);
$("#igreja_val").val(igreja);
$("#rol").val(rol);
$("#cpf").val(cpf);
$("#rg").val(rg);
}
if ( this.isModified )
this.setValue("");
if ( this.value.length < 1 && this.isNotClick )
return ;
return "models/autoMembroCargos.php?q=" + this.value;
});
</script>



Expand Down
59 changes: 51 additions & 8 deletions forms/tes/folha.php
Original file line number Diff line number Diff line change
@@ -1,37 +1,80 @@
<form method="post" action="" name="" id="form1">&nbsp;
<?php
require_once 'forms/autoCompletaMembro.php';
?>
<table class="table">
<tbody>
<tr>
<td><label>CPF:</label>
<input type="text" name="cpf" id="cpf" class="form-control"></td>
<td><label>Igreja que congrega</label>
<input type="text" name="igreja" id="igreja_val" disabled="disabled" class="form-control">
<input type="hidden" name="escolha" value="controller/despesa.php">
<input type="hidden" name="age" value="8"></td>
<td><label>Fone: </label>
<input type="text" id="id_val" name="id" class="form-control" disabled="disabled" value="" /></td>
<td><label>Celular:</label>
<input type="text" id="cel" class="form-control" name="sigla" disabled="disabled" value="" /></td>
<td colspan="2"><label>Igreja que congrega</label>
<input type="text" name="igreja" id="igreja_val" disabled="disabled" class="form-control"></td>
</tr>
<tr>
<td><label>RG:</label>
<input type="text" name="rg" id="rg" class="form-control"></td>
<td><label>CPF:</label>
<input type="text" name="cpf" id="cpf" class="form-control"></td>
<td colspan="2"><label>Função:</label>

<td><label>Função:</label>
<?php
$bsccredor = new List_sele('funcao', 'descricao', 'idfunc');
$listaIgreja = $bsccredor->List_Selec(++$ind,$_GET['idfunc'],'class="form-control" required="required" ');
echo $listaIgreja;
?></td>
<td><label>Dia pgto:</label>
<input type="text" name="diapgto" id='dia' tabindex="<?PHP echo $ind++;?>" class="form-control" ></td>
<td>
<label>Fonte para pgto:</label>
<?php
$congr = new List_sele ("fontes", "discriminar", "fonte");
echo $congr->List_Selec (++$ind,$_GET['fonte'],' class="form-control"');
?>
</td>
</tr>
<tr>
<td><label>Igreja onde presta o serviço:</label><?php
$bsccredor = new List_sele('igreja', 'razao', 'rolIgreja');
$listaIgreja = $bsccredor->List_Selec(++$ind,$_GET['igreja'],'class="form-control" required="required" autofocus="autofocus" ');
echo $listaIgreja;
?></td>
<td></td>
<td></td>
<td></td>
<td>
<label>Hieraquia:</label>
<select name="hieraquia" id="" tabindex="<?PHP echo $ind++;?>" class="form-control" >
<option value=""></option>
<option value="1">Primeiro</option>
<option value="2">Segundo</option>
<option value="2">Terceiro</option>
<option value="4">Quarto</option>
</select></td>
<td>
<label>Valor:</label>
<input type="text" name="valor" tabindex="<?PHP echo $ind++;?>" class="form-control" ></td>
<td><label>&nbsp;</label> <input type="submit" name="Submit" value="Lançar..." class="btn btn-primary btn-sm"
tabindex="<?PHP echo ++$ind; ?>" /></td>
</tr>
</tbody>
</table>
</form>
<script type="text/javascript">
new Autocomplete("campo_estado", function() {
this.setValue = function( fone, nome, celular, igreja, rol,cpf,rg ) {
$("#id_val").val(fone);
$("#estado_val").val(nome);
$("#cel").val(celular);
$("#igreja_val").val(igreja);
$("#rol").val(rol);
$("#cpf").val(cpf);
$("#rg").val(rg);
}
if ( this.isModified )
this.setValue("");
if ( this.value.length < 1 && this.isNotClick )
return ;
return "models/autoMembroCargos.php?q=" + this.value;
});
</script>
4 changes: 2 additions & 2 deletions models/autoMembroCargos.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
$rg = $campo['rg'].' - '.$campo['orgao_expedidor'];
$cong = $cargo.' - '.htmlentities($campo['igreja'],ENT_QUOTES,'iso-8859-1');
$sigla = htmlentities($campo['celular'],ENT_QUOTES,'iso-8859-1');
$estado = addslashes($estado);
$html = preg_replace("/(" . $q . ")/i", "<span style=\"font-weight:bold\">\$1</span>", $estado);
$estado = $estado;
$html = preg_replace("/(" . $q . ")/i","<span style=\"font-weight:bold;\">\$1</span>",$estado);
echo "<li onselect=\"this.setText('$estado').setValue('$id','$endereco','$sigla','$cong','$rol','$cpf','$rg');\">$html ($sigla $cong)</li>\n";
}
if ($linhas>10) {
Expand Down
33 changes: 33 additions & 0 deletions models/tes/cadCargoIgreja.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<h1><img src="img/loading2.gif" width="30" height="30"></h1>
<?PHP
/**
* Joseilton Costa Bruce
*
* LICENÇA
*
* Please send an email
* to [email protected] so we can send you a copy immediately.
*
* @category Pessoal
* @package
* @subpackage
* @copyright Copyright (c) 2008-2009 Joseilton Costa Bruce (http://)
* @license http://
* Insere dados no banco do form cad_usuario.php na tabela:usuario
*/
controle ("tes");

$hist = $_SESSION['valid_user'].": ".$_SESSION['nome'];

$value = "'','".$_POST['idfunc']."','','1','".$_POST['rolIgreja']."','".$_POST['rol']."','',";
$value .= "'".$_POST['hieraquia']."','1','".$_POST['valor']."','".$_POST['diapgto']."','";
$value .= $_POST['fonte']."','".$hist."','NOW()'";

$dados = new insert ($value,'cargoigreja');
$dados->inserir();
echo "<h1>".mysql_insert_id()."</h>";//recupera o id do último insert no mysql

//echo "<script>location.href='./?escolha=controller/despesa.php&menu=top_tesouraria&age=7'; </script>";
echo "<a href='./?escolha=controller/despesa.php&menu=top_tesouraria&age=7'>Continuar...<a>";

?>
10 changes: 10 additions & 0 deletions models/tes/tes_cargo.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@ function dadosArray () {
function dadosCargo() {
return $this->arrayCargo;
}

function cargoIgreja($rolIgreja,$descricao) {
$cargoAtivo = array();
foreach ($this->arrayCargo as $chave => $valor) {
if ($valor['igreja']==$rolIgreja && $valor['descricao']==$descricao) {
$cargoAtivo [] = $valor;
}
}
return $cargoAtivo;
}

}
?>

0 comments on commit b18d696

Please sign in to comment.