Skip to content

Commit

Permalink
Imprimir saldos
Browse files Browse the repository at this point in the history
  • Loading branch information
hiltonbruce committed Jul 10, 2021
1 parent d53c028 commit c3272f3
Show file tree
Hide file tree
Showing 17 changed files with 330 additions and 53 deletions.
4 changes: 2 additions & 2 deletions css/print.css
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ h3 {
margin-right:9.5%;
}

a:link:after, a:visited:after {
/* a:link:after, a:visited:after {
content:"("attr(href)")";
font-size: 80%;
color:#555555;
background:#ffffff;
}
} */

.odd {
background-color:#F0F0F0;
Expand Down
22 changes: 13 additions & 9 deletions forms/tes/histFinanceiro.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,20 @@ class='btn btn-primary'>Listar Todas</button> </a>
</td>
<td>
<?php
if (!empty($_GET['ano'])) {
$dadoLink = 'tesouraria/receita.php?ano='.intval($_GET['ano']).'&fin=11&rec=18'.$mesLink;
?>
<p>&nbsp;</p>
<a href='<?php echo $dadoLink;?>' target="_blank">
<button class="btn btn-primary" ><span class="glyphicon glyphicon-print" aria-hidden="true"></span>
Imprimir</button></a>
<?php
}
// if (!empty($_GET['ano'])) {
// $dadoLink = 'tesouraria/receita.php?ano='.intval($_GET['ano']).'&fin=11&rec=18'.$mesLink;
?>
<!-- <p>&nbsp;</p> -->
<!-- <a href=' -->
<?php
// echo $dadoLink;
?>
<!-- ' target="_blank"> -->
<!-- <button class="btn btn-primary" ><span class="glyphicon glyphicon-print" aria-hidden="true"></span>
Imprimir</button></a> -->
<?php
// }
?>
</td>
</tr>
</table>
Expand Down
14 changes: 8 additions & 6 deletions help/tes/receitaImprimir.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
//imprimir entradas de todas as congrega��es - mensal
require_once '../help/tes/saldoIgrejas.php';
$nomeArquivo='../views/tesouraria/saldoIgrejas.php';
require_once '../views/modeloPrint.php';
break;
case '14':
//imprimir
Expand All @@ -30,7 +29,7 @@
case '16':
//Relatorio COMADEP
$idIgreja = intval($_GET['igreja']);
require_once '../help/tes/relatorioComadep.php';//Cabe�alho e informa��es da consulta
require_once '../help/tes/relatorioComadep.php';//Cabeçalho e informa��es da consulta
//$mesRelatorio .=$rolIgreja;
$dtRelatorio = data_extenso ($d.'/'.$m.'/'.$a);
require_once '../models/tes/relComadep.php';
Expand All @@ -46,7 +45,7 @@
$assinatura .= '1&ordm; Tesoureiro Geral: '.$tesArray['22']['1']['1']['nome'];
$assinatura .= '</div></div></h6>';
$titTabela = $congRelatorio.' &bull; Fluxo das Contas - '.$dtRelatorio;
require_once '../views/modeloPrint.php';
// require_once '../views/modeloPrint.php';
break;
case '17':
//Relatorio COMADEP
Expand Down Expand Up @@ -74,16 +73,19 @@
$dContas = new tes_contas();
$descCta = $dContas->ativosArray();
$colUm = '';//Primeira coluna do cabecalho
require_once '../views/tesouraria/cabTabFin.php';//Cabe�alho da tabela
// require_once '../views/modeloPrint.php';
if (!empty($_GET['mes']) && empty($_GET['igreja'])) {
require_once '../views/tesouraria/cabTabFinPrint.php';//Cabe�alho da tabela
//Lista financeira de todas as igreja com m�s espec�fico
require_once '../views/tesouraria/saldoMesFin.php';
$nomeArquivo = '../views/tesouraria/saldoMesFinPrint.php';
$tabThead = $nivelSem;
//require_once 'views/tesouraria/saldoIgrejas.php';
} else {
//Lista financeira da igreja com todos os meses
require_once '../views/tesouraria/cabTabFin.php';//Cabe�alho da tabela
$colUm = 'Per&iacute;odo';//Primeira coluna do cabecalho
require_once '../views/tesouraria/saldoMembros.php';
// echo "<h1>$colUm</h1>";
$nomeArquivo = '../views/tesouraria/saldoMembrosPrint.php';
}
break;
default:
Expand Down
19 changes: 10 additions & 9 deletions help/tes/receitaTela.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
//Opções de exibir na tela para o script /tesouraria/receita.php
//Op��es de exibir na tela para o script /tesouraria/receita.php
//$dtlanc = (empty($dtlanc)) ? date('d/m/Y'):$_GET['data'];
$assinatura = '';
if (empty($_GET['ano'])) {
Expand All @@ -23,9 +23,9 @@
case '1':
require_once 'forms/concluirdiz.php'; #Form fecha caixa
if (!empty($_GET['id'])) {
require_once('forms/tes/alteraPreLanc.php'); #Edita dizimo e ofertas pre-Lançamento
require_once('forms/tes/alteraPreLanc.php'); #Edita dizimo e ofertas pre-Lan�amento
} else {
require_once('forms/autodizimo.php'); #Form lançar dizimos e ofertas
require_once('forms/autodizimo.php'); #Form lan�ar dizimos e ofertas
}
break;
case '2':
Expand All @@ -34,16 +34,16 @@
break;
case '3':
require_once 'forms/concluirdiz.php';
require_once('forms/ofertaEBD.php'); #Form lançaar ofertas Esc Bíblica
require_once('forms/ofertaEBD.php'); #Form lan�aar ofertas Esc B�blica
break;
case '4':
require_once('forms/tes/lancarRec.php');
break;
case '5':
//$form = 'forms/tes/autoLancarDespesas.php';
$tabRelatorio = 'forms/tes/lancarTipoPlan.php'; #Form lançar despesas tipo planilha
$tabRelatorio = 'forms/tes/lancarTipoPlan.php'; #Form lan�ar despesas tipo planilha
break;
case '6': //Relatório COMADEP
case '6': //Relat�rio COMADEP
require_once 'help/tes/relatorioComadep.php';
//$mesRelatorio .=$rolIgreja;
$dtRelatorio = data_extenso($d . '/' . $m . '/' . $a);
Expand Down Expand Up @@ -86,13 +86,14 @@
$dContas = new tes_contas();
$descCta = $dContas->ativosArray();
$colUm = ''; //Primeira coluna do cabecalho
require_once 'views/tesouraria/cabTabFin.php'; //Cabe�alho da tabela
if (!empty($_GET['mes']) && empty($_GET['igreja'])) {
//Lista financeira de todas as igreja com m�s espec�fico
require_once 'views/tesouraria/cabTabFinPrint.php'; //Cabe�alho da tabela
require_once 'views/tesouraria/saldoMesFin.php';
$tabThead = $nivelSem;
//require_once 'views/tesouraria/saldoIgrejas.php';
} else {
require_once 'views/tesouraria/cabTabFin.php'; //Cabe�alho da tabela
//Lista financeira da igreja com todos os meses
$colUm = 'Per&iacute;odo'; //Primeira coluna do cabecalho
require_once 'views/tesouraria/saldoMembros.php';
Expand All @@ -109,7 +110,7 @@
require_once 'views/tesouraria/saldoCargos.php';
break;
case '21':
//Exibi lista de lançamentos
//Exibi lista de lan�amentos
require_once 'help/tes/varRelatorio.php';
require_once('forms/tes/relatorioLanc.php');
$tabRelatorio = 'views/tesouraria/tabRelatLanc.php';
Expand Down Expand Up @@ -148,7 +149,7 @@
$acessoCreditar = 871;

require_once('models/tes/comadapProv.php');
$referente = 'Contribuição convenção estadual, n/ mês';
$referente = 'Contribui��o conven��o estadual, n/ m�s';
$form = 'forms/tes/lancarApropriacao.php';
$tabRelatorio = 'forms/lancar.php';
break;
Expand Down
6 changes: 3 additions & 3 deletions help/tes/saldoIgrejas.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,17 @@
$colgroup = '<col id="igreja">';
$tabThead = '<tr><th scope="col">Igrejas</th>';
//rodap� da tabela
$footCong = '<tr id="subtotal"><td>Totais&nbsp;Congrega��es</td>';
$footCong = '<tr id="subtotal"><td>Totais&nbsp;Congregações</td>';
$tabFoot = '<tr id="total"><td>Totais</td>';

foreach(arrayMeses() as $mes => $meses) {
$colgroup .= '<col id="'.substr($meses, 0, 3).'">';
$tabThead .= '<th scope="col" class="centro">'.substr($meses, 0, 3).'</th>';
$tabThead .= '<th scope="col" class="text-center">'.substr($meses, 0, 3).'</th>';
$footCong .= '<td id="moeda">'.number_format($totalMes[(int)$mes]-$totSedeMes[(int)$mes],2,',','.').'</td>';
$tabFoot .= '<td id="moeda">'.number_format($totalMes[(int)$mes],2,',','.').'</td>';
}
$colgroup .= '<col id="Total">';
$tabThead .= '<th scope="col" class="centro">Total</th></tr>';
$tabThead .= '<th scope="col" class="text-center">Total</th></tr>';
$footCong .= '<td id="moeda">'.number_format($totalGeral-$totSede,2,',','.').'</td></tr>';
$tabFoot .= '<td id="moeda">'.number_format($totalGeral,2,',','.').'</td></tr>';
$tabFoot = $footCong.$tabFoot ;
Expand Down
21 changes: 15 additions & 6 deletions models/tes/histFinIgreja.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,17 @@
$queryLista .= 'FROM dizimooferta WHERE lancamento<>"0" AND DATE_FORMAT(data,"%c%Y")';
$queryLista .= '="'.$mes.$ano.'" ORDER BY igreja,anorefer,mesrefer ';
$lista = mysql_query($queryLista);
//Logica para montar o conjunto de variáveis para compor a tabelar a seguir
require_once 'help/tes/histFinanceiroIgreja.php';
//Logica para montar o conjunto de vari�veis para compor a tabelar a seguir
// require_once 'help/tes/histFinanceiroIgreja.php';

if (file_exists('help/tes/histFinanceiroIgreja.php')) {
require_once 'help/tes/histFinanceiroIgreja.php';//Tabela com saldos por igreja e semanal
} elseif (file_exists('../help/tes/histFinanceiroIgreja.php')) {
// echo '<h1> saldoMesFinPrint.php </h1>';
require_once '../help/tes/histFinanceiroIgreja.php';//Tabela com saldos por igreja e semanal
}


//echo "<h1> ** $ano **</h1>";
$ano = ($ano=='') ? date('Y'):$ano;
//$ano = 2013;
Expand All @@ -26,7 +35,7 @@
$linha='';
//print_r($igrejas->Arrayigreja());
foreach ($igrejas->Arrayigreja() as $cont => $igrejaDados) {
$bgcolor = $cor ? 'style="background:#ffffff"' : 'style="background:#d0d0d0"';
$bgcolor = $cor ? 'style="background:#d0d0d0"' : 'style="background:#d0d0d0"';
$dz = 'dizimos'."$cont$ano";
$of = 'ofertaCultos'."$cont$ano";
$ofm = 'ofertaMissoes'."$cont$ano";
Expand All @@ -38,7 +47,7 @@
$ofCampanha = 'ofertaCampanha'."$cont$ano";
$ofExtra = 'ofertaExtra'."$cont$ano";
$subTotal= $$dz+$$ofExtra+$$of;//Total do dizimo + Ofertas Extras + ofertas + votos dos cultos
//Soma da coluna para linha Sub-total das congregações Sem a Sede
//Soma da coluna para linha Sub-total das congrega��es Sem a Sede
if ($cont!='1') {
$totDizAno += $$dz;
$totOfertaExtraAno += $$ofExtra;
Expand Down Expand Up @@ -87,7 +96,7 @@
$subTotalSem = $$dizSem+$$ofExtraSem+$$ofSem;
$ofOpSem = $subTotalSem+$$ofsSem+$$ofmocSem+$$ofiSem+$$ofeSem;

$nivel1Sem .= '<tr><td><strong>'.$i.'&ordf;&nbsp; Sem</strong></td>';
$nivel1Sem .= '<tr class=""><td>'.$i.'&ordf;&nbsp; Sem</td>';
$nivel1Sem .= '<td id="moeda">'.number_format($$dizSem,2,',','.').'</td>';
$nivel1Sem .= '<td id="moeda">'.number_format($$ofExtraSem,2,',','.').'</td>';
$nivel1Sem .= '<td id="moeda">'.number_format($$ofSem,2,',','.').'</td>';
Expand All @@ -104,7 +113,7 @@
$nivel1Sem .= '</tr>';
}
$nivel1 .= $nivelSem.$nivel1Sem;
$nivel1Sem = '';//Limpa a variável para o próximo mês
$nivel1Sem = '';//Limpa a vari�vel para o pr�ximo m�s
$nivel1 .= '</tbody>';
$cor = !$cor;
}
Expand Down
11 changes: 9 additions & 2 deletions models/tes/histFinMembro.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
//$ano = 2014;
switch ($hisFinanceiro) {
case 1:
//Listagem para historico finaceiro das contribuições dos membros
//Listagem para historico finaceiro das contribui��es dos membros
$query = 'SELECT *,mesrefer AS mes,anorefer ';
$query .= 'AS ano FROM dizimooferta WHERE lancamento<>"0" AND rol="'.$bsc_rol.'" ';
$query .= 'AND credito!="803" ORDER BY anorefer,mesrefer';
Expand All @@ -35,7 +35,14 @@

$lista = mysql_query($query);
//Logica para montar o conjunto de vari�veis para compor a tabelar a seguir
require_once 'help/tes/histFinanceiroMembro.php';
// require_once 'help/tes/histFinanceiroMembro.php';
if (file_exists('help/tes/histFinanceiroMembro.php')) {
require_once 'help/tes/histFinanceiroMembro.php';//Tabela com saldos por igreja e semanal
} elseif (file_exists('../help/tes/histFinanceiroMembro.php')) {
// echo '<h1> saldoMesFinPrint.php </h1>';
require_once '../help/tes/histFinanceiroMembro.php';//Tabela com saldos por igreja e semanal
}

//echo "<h1> ** $ano **</h1>";
$ano = ($ano=='') ? date('Y'):$ano;
//$ano = 2013;
Expand Down
2 changes: 1 addition & 1 deletion tesouraria/receita.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
if ($rec>'12' && $rec<'20') {
session_start();
if ($_SESSION["setor"]=="2" || $_SESSION["setor"]>"50" || $_SESSION["setor"]==1){
require "../help/impressao.php";//Include de fun��es, classes e conex�es com o BD
require "../help/impressao.php";//Include de funções, classes e conex�es com o BD
if ($idIgreja==0) {
$igrejaSelecionada = $igSede;
//$igLanc = $igrejaSelecionada;
Expand Down
6 changes: 3 additions & 3 deletions tesouraria/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ body {
text-decoration: underline
}

a:link:after, a:visited:after {
/* a:link:after, a:visited:after {
content:"("attr(href)")";
font-size: 80%;
color:#555555;
}
} */

#footer a:link { color: #636466; text-decoration: underline }
#footer a:visited { }
Expand Down Expand Up @@ -127,7 +127,7 @@ h1{
h4 { color: #a12621; font-weight: normal; margin-bottom: 5px; padding-top: 0; padding-left: 20px; }
h5 { color: #a12621; font-size: 0.5em; font-weight: normal; text-align: center; margin: 5px 0 10px; padding: 10px 0 0; }
a { color: #e7790e; font-size: 0.9em; text-decoration: underline }
a:link { color: #e7790e; font-size: 1em; text-decoration: underline }
a:link { color: #030303; font-size: 1em; }
a:active { color: #800000 }
p{font-size: 0.9em; margin-bottom: 5px; padding: 5px 10px 5px 5px; text-align:justify;}

Expand Down
5 changes: 2 additions & 3 deletions views/saldosComadep.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,11 @@
}
?>
</tbody>
<tfoot>
<tfoot>
<?php
echo '<tr id="total">';
echo '<tdid="moeda" ></td>';
echo '<td colspan="3" class="text-right">Movimento do per&iacute;odo <span class="glyphicon glyphicon-arrow-right" aria-hidden="true"></span>';
echo 'R$ '.number_format($debito,2,',','.').'</td>';
echo '<td colspan="3" class="text-right"></td>';
echo '<td colspan="2" id="moeda" ></td></tr>';
?>
</tfoot>
Expand Down
6 changes: 1 addition & 5 deletions views/tesouraria/cabTabFin.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@
<span data-toggle="tooltip" data-placement="top" title="Total das Receitas Operacionais" >
Operac</span>
</th>
<th class="text-center">
<span data-toggle="tooltip" data-placement="top" title="Total das Receitas N&atilde;o Operacionais" >
Out&nbsp;Rec</span>
</th>
<th class="text-center">Campanhas</th>
<th class="text-center">Miss&otilde;es</th>
<th class="text-center">Total</th>
Expand All @@ -42,7 +38,7 @@
<col id="Operacional">
<col id="Outras&nbsp;Receitas">
<col id="Campanhas">
<col id="Missões">
<col id="Miss�es">
<col id="Total">
';
?>
48 changes: 48 additions & 0 deletions views/tesouraria/cabTabFinPrint.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?PHP
$nivelSem = '
<tr class="success">
<th class="text-center">'.$colUm.'</th>
<th class="text-center">
<span data-toggle="tooltip" data-placement="top" title="D&iacute;zimos e Votos">D&iacute;z/Vot</span>
</th>
<th class="text-center">
<span data-toggle="tooltip" data-placement="top" title="Ofertas Extras" >Extra</span>
</th>
<th class="text-center">Ofertas</th>
<th class="text-center">Sub-Total</th>
<th class="text-center">
<span data-toggle="tooltip" data-placement="top" title="Contribui&ccedil;&otilde;es em C&iacute;rculos de Or&ccedil;&otilde;es" >
Senhoras</span>
</th>
<th class="text-center">Jovens</th>
<th class="text-center">Infantil</th>
<th class="text-center">Ensino</th>
<th class="text-center">
<span data-toggle="tooltip" data-placement="top" title="Total das Receitas Operacionais" >
Operac</span>
</th>
<th class="text-center">
<span data-toggle="tooltip" data-placement="top" title="Total das Receitas N&atilde;o Operacionais" >
Out&nbsp;Rec</span>
</th>
<th class="text-center">Campanhas</th>
<th class="text-center">Miss&otilde;es</th>
<th class="text-center">Total</th>
</tr>';
$colgroup = '
<col id="'.$colUm.'">
<col id="D&iacute;z/Vot">
<col id="Extras">
<col id="Ofertas">
<col id="Sub-Total">
<col id="Senhoras">
<col id="Jovens">
<col id="Infantil">
<col id="Ensino">
<col id="Operacional">
<col id="Outras&nbsp;Receitas">
<col id="Campanhas">
<col id="Miss�es">
<col id="Total">
';
?>
2 changes: 1 addition & 1 deletion views/tesouraria/saldoIgrejas.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
if ($_GET['rec']!='13') {
echo '<a href="'.$linkImpressao.'&ano='.$ano.'" ';
echo 'target="_black" title="Imprimir demonstrativo">';
echo '<button class="btn btn-default glyphicon glyphicon-print"> </button></a>&nbsp;';
echo '<button class="btn btn-success "> <i class="glyphicon glyphicon-print"></i> Imprimir </button> </a>&nbsp;';
$imprimir = '';
}else {
$imprimir = '<script type="text/javascript">window.print();</script>';
Expand Down
Loading

0 comments on commit c3272f3

Please sign in to comment.