Commit 8e986c2a112b58ba2548524d472a9bd2826632fb
1 parent
1610df4f
Exists in
master
Atualização
Showing
31 changed files
with
3831 additions
and
619 deletions
Show diff stats
gestaoPatrimonial/fontes/PHP/patrimonio/classes/mapeamento/FPatrimonioDepreciacaoAutomatica.class.php
... | ... | @@ -37,24 +37,25 @@ class FPatrimonioDepreciacaoAutomatica extends Persistente |
37 | 37 | parent::Persistente(); |
38 | 38 | } |
39 | 39 | |
40 | - public function executaFuncao($stParametros,$boTransacao = "") | |
40 | + public function executaFuncao(&$rsRecordSet, $stParametros, $boTransacao = "") | |
41 | 41 | { |
42 | 42 | $obErro = new Erro; |
43 | 43 | $obConexao = new Conexao; |
44 | + $rsRecordSet = new RecordSet; | |
44 | 45 | |
45 | 46 | $stSql = $this->montaExecutaFuncao($stParametros); |
46 | 47 | $this->setDebug($stSql); |
47 | - $obErro = $obConexao->executaSQL($rsRecordset,$stSql, $boTransacao ); | |
48 | - | |
48 | + $obErro = $obConexao->executaSQL( $rsRecordSet, $stSql, $boTransacao ); | |
49 | + | |
49 | 50 | return $obErro; |
50 | 51 | } |
51 | 52 | |
52 | 53 | public function montaExecutaFuncao($stParametros) |
53 | 54 | { |
54 | - $stSql = " SELECT patrimonio.fn_depreciacao_automatica(".$stParametros.") as valor \r\n"; | |
55 | + $stSql = " SELECT * FROM patrimonio.fn_depreciacao_automatica(".$stParametros."); "; | |
55 | 56 | |
56 | 57 | return $stSql; |
57 | 58 | } |
58 | 59 | } |
59 | 60 | |
60 | 61 | -?> |
62 | +?> | |
61 | 63 | \ No newline at end of file | ... | ... |
gestaoPatrimonial/fontes/PHP/patrimonio/classes/mapeamento/FPatrimonioReavaliacaoDepreciacaoAutomatica.class.php
0 → 100644
... | ... | @@ -0,0 +1,61 @@ |
1 | +<?php | |
2 | +/* | |
3 | + ********************************************************************************** | |
4 | + * * | |
5 | + * @package URBEM CNM - Soluções em Gestão Pública * | |
6 | + * @copyright (c) 2013 Confederação Nacional de Municípos * | |
7 | + * @author Confederação Nacional de Municípios * | |
8 | + * * | |
9 | + * O URBEM CNM é um software livre; você pode redistribuí-lo e/ou modificá-lo sob * | |
10 | + * os termos da Licença Pública Geral GNU conforme publicada pela Fundação do * | |
11 | + * Software Livre (FSF - Free Software Foundation); na versão 2 da Licença. * | |
12 | + * * | |
13 | + * Este programa é distribuído na expectativa de que seja útil, porém, * | |
14 | + * SEM NENHUMA GARANTIA; nem mesmo a garantia implícita de COMERCIABILIDADE OU * | |
15 | + * ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. Consulte a Licença Pública Geral do GNU * | |
16 | + * para mais detalhes. * | |
17 | + * * | |
18 | + * Você deve ter recebido uma cópia da Licença Pública Geral do GNU "LICENCA.txt" * | |
19 | + * com este programa; se não, escreva para a Free Software Foundation Inc., * | |
20 | + * no endereço 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * | |
21 | + * * | |
22 | + ********************************************************************************** | |
23 | +*/ | |
24 | +?> | |
25 | +<?php | |
26 | + | |
27 | +include_once '../../../../../../gestaoAdministrativa/fontes/PHP/framework/include/valida.inc.php'; | |
28 | + | |
29 | +class FPatrimonioReavaliacaoDepreciacaoAutomatica extends Persistente | |
30 | +{ | |
31 | + /** | |
32 | + * Método Construtor | |
33 | + * @access Private | |
34 | + */ | |
35 | + public function FPatrimonioReavaliacaoDepreciacaoAutomatica() | |
36 | + { | |
37 | + parent::Persistente(); | |
38 | + } | |
39 | + | |
40 | + public function recuperaReavaliacao(&$rsRecordSet, $stParametros = "", $boTransacao = "") | |
41 | + { | |
42 | + $obErro = new Erro; | |
43 | + $obConexao = new Conexao; | |
44 | + $rsRecordSet = new RecordSet; | |
45 | + | |
46 | + $stSql = $this->montaRecuperaReavaliacao($stParametros); | |
47 | + $this->setDebug($stSql); | |
48 | + $obErro = $obConexao->executaSQL( $rsRecordSet, $stSql, $boTransacao ); | |
49 | + | |
50 | + return $obErro; | |
51 | + } | |
52 | + | |
53 | + public function montaRecuperaReavaliacao($stParametros) | |
54 | + { | |
55 | + $stSql = " SELECT * FROM patrimonio.fn_reavaliacao_depreciacao_automatica(".$stParametros."); "; | |
56 | + | |
57 | + return $stSql; | |
58 | + } | |
59 | +} | |
60 | + | |
61 | +?> | ... | ... |
gestaoPatrimonial/fontes/PHP/patrimonio/instancias/bem/FLDepreciacaoAutomatica.php
... | ... | @@ -115,7 +115,7 @@ $obIntExercicio->setReadOnly(true); |
115 | 115 | //cria um novo formulario |
116 | 116 | $obForm = new Form; |
117 | 117 | $obForm->setAction ($pgProc); |
118 | -$obForm->setTarget ("oculto"); | |
118 | +$obForm->setTarget ("telaPrincipal"); | |
119 | 119 | |
120 | 120 | //Cria o hidden da acao |
121 | 121 | $obHdnAcao = new Hidden; | ... | ... |
gestaoPatrimonial/fontes/PHP/patrimonio/instancias/bem/OCManterBem.php
... | ... | @@ -29,7 +29,7 @@ |
29 | 29 | * @author Analista: Gelson W. Gonçalves |
30 | 30 | * @author Desenvolvedor: Henrique Boaventura |
31 | 31 | |
32 | - * $Id: OCManterBem.php 61522 2015-01-29 18:33:35Z carlos.silva $ | |
32 | + * $Id: OCManterBem.php 62852 2015-06-29 20:56:46Z arthur $ | |
33 | 33 | |
34 | 34 | */ |
35 | 35 | |
... | ... | @@ -687,14 +687,14 @@ case 'montaListaReavaliacoes': |
687 | 687 | $inCodReavaliacao = 0; |
688 | 688 | $inCodBem = $_REQUEST['inCodBem']; |
689 | 689 | $inVidaUtilReavaliacao = $_REQUEST['inVidaUtilReavaliacao']; |
690 | - $flValorBemReavaliacao = $_REQUEST['flValorBemReavaliacao']; | |
690 | + $flValorBemReavaliacao = floatval(str_replace(",",".",str_replace(".", "", $_REQUEST['flValorBemReavaliacao']))); | |
691 | 691 | $stMotivoReavaliacao = $_REQUEST['stMotivoReavaliacao']; |
692 | - | |
692 | + | |
693 | 693 | if ($dtReavaliacao === '') { |
694 | 694 | $obErro->setDescricao('Campo Data da Reavaliação inválido!'); |
695 | 695 | } elseif (substr($dtReavaliacao,0,6) <= $dtUltimaDepreciacao) { |
696 | 696 | $obErro->setDescricao('Campo Data da Reavaliação deve ser maior que a competência da última depreciação!'); |
697 | - } elseif ($dtUltimaReavaliacao > $dtReavaliacao) { | |
697 | + } elseif (intval($dtUltimaReavaliacao) > intval($dtReavaliacao)) { | |
698 | 698 | $obErro->setDescricao('Campo Data da Reavaliação deve ser maior que a última Reavaliação informada!'); |
699 | 699 | } elseif ($dtAquisicao > $dtReavaliacao) { |
700 | 700 | $obErro->setDescricao('Campo Data da Reavaliação deve ser maior que a Data de Aquisição do Bem!'); |
... | ... | @@ -721,10 +721,11 @@ case 'montaListaReavaliacoes': |
721 | 721 | 'inCodBem' => $inCodBem, |
722 | 722 | 'dtReavaliacao' => $_REQUEST['dtReavaliacao'], |
723 | 723 | 'inVidaUtilReavaliacao' => $inVidaUtilReavaliacao, |
724 | - 'flValorBemReavaliacao' => str_replace(',','.',str_replace('.','',$flValorBemReavaliacao)), | |
724 | + 'flValorBemReavaliacao' => $flValorBemReavaliacao, | |
725 | 725 | 'stMotivoReavaliacao' => $stMotivoReavaliacao, |
726 | 726 | 'inserir' => 'true', |
727 | 727 | ); |
728 | + | |
728 | 729 | Sessao::write('dtUltimaReavaliacao',$_REQUEST['dtReavaliacao']); |
729 | 730 | Sessao::write('arReavaliacao',$arReavaliacao); |
730 | 731 | } | ... | ... |
gestaoPatrimonial/fontes/PHP/patrimonio/instancias/bem/PRDepreciacaoAutomatica.php
... | ... | @@ -26,7 +26,9 @@ |
26 | 26 | |
27 | 27 | include_once '../../../../../../gestaoAdministrativa/fontes/PHP/pacotes/FrameworkHTML.inc.php'; |
28 | 28 | include_once '../../../../../../gestaoAdministrativa/fontes/PHP/framework/include/cabecalho.inc.php'; |
29 | +include_once '../../../../../../gestaoAdministrativa/fontes/PHP/pacotes/FrameworkBirt.inc.php'; | |
29 | 30 | include_once ( CAM_GP_PAT_MAPEAMENTO."FPatrimonioDepreciacaoAutomatica.class.php" ); |
31 | +include_once ( CAM_GP_PAT_MAPEAMENTO."FPatrimonioReavaliacaoDepreciacaoAutomatica.class.php" ); | |
30 | 32 | include_once ( CAM_GF_CONT_MAPEAMENTO."TContabilidadeLancamentoDepreciacao.class.php" ); |
31 | 33 | include_once ( CAM_GP_PAT_MAPEAMENTO."TPatrimonioDepreciacao.class.php" ); |
32 | 34 | include_once ( CAM_GP_PAT_MAPEAMENTO."TPatrimonioDepreciacaoAnulada.class.php" ); |
... | ... | @@ -97,7 +99,7 @@ switch ($stAcao) { |
97 | 99 | } |
98 | 100 | |
99 | 101 | if (!$obErro->ocorreu()) { |
100 | - SistemaLegado::alertaAviso($pgFilt."?".Sessao::getId()."&stAcao=".$stAcao,"Bens anulados com sucesso até a competência: ".str_pad($_REQUEST['inCompetencia'],2,'0',STR_PAD_LEFT).'/'.$_REQUEST['inExercicio'],"$stAcao","aviso", Sessao::getId(), "../"); | |
102 | + SistemaLegado::alertaAviso($pgFilt."?".Sessao::getId()."&stAcao=".$stAcao,"Bens anulados com sucesso até a competência: ".str_pad($request->get("inCompetencia"),2,'0',STR_PAD_LEFT).'/'.$_REQUEST['inExercicio'],"$stAcao","aviso", Sessao::getId(), "../"); | |
101 | 103 | } else { |
102 | 104 | SistemaLegado::exibeAviso(urlencode($obErro->getDescricao()),"n_incluir","erro"); |
103 | 105 | } |
... | ... | @@ -106,14 +108,15 @@ switch ($stAcao) { |
106 | 108 | SistemaLegado::exibeAviso(urlencode($obErro->getDescricao()),"n_incluir","erro"); |
107 | 109 | } |
108 | 110 | |
109 | - }else{ | |
111 | + }else{ | |
112 | + | |
110 | 113 | $obErro = $obTPatrimonioDepreciacao->recuperaMaxCompetenciaDepreciada($rsMaxCompetenciaDepreciada); |
111 | 114 | |
112 | 115 | $stFiltroDepreciacao = "\n WHERE competencia = '".$inMesCompetenciaFiltro."'"; |
113 | 116 | $obErro = $obTPatrimonioDepreciacao->recuperaMaxCodDepreciacao($rsMaxDepreciacao, $stFiltroDepreciacao ); |
114 | 117 | $obErro = $obTPatrimonioDepreciacaoAnulada->recuperaMaxCodDepreciacaoAnulada($rsMaxAnulada, $stFiltroDepreciacao ); |
115 | 118 | |
116 | - $stFiltroAnterior = "\n WHERE competencia = '".($request->get("inExercicio").str_pad($_REQUEST['inCompetencia'],2,'0',STR_PAD_LEFT) - 1)."'"; | |
119 | + $stFiltroAnterior = "\n WHERE competencia = '".($request->get("inExercicio").str_pad($request->get("inCompetencia"),2,'0',STR_PAD_LEFT) - 1)."'"; | |
117 | 120 | $obErro = $obTPatrimonioDepreciacao->recuperaMaxCodDepreciacao($rsMaxDepreciacaoAnterior, $stFiltroAnterior); |
118 | 121 | $obErro = $obTPatrimonioDepreciacaoAnulada->recuperaMaxCodDepreciacaoAnulada($rsMaxAnuladaAnterior, $stFiltroAnterior); |
119 | 122 | $obErro = $obTPatrimonioDepreciacaoAnulada->recuperaMaxCompetenciaAnulada($rsMxCompetenciaAnterior, $stFiltroAnterior); |
... | ... | @@ -139,22 +142,50 @@ switch ($stAcao) { |
139 | 142 | $obErro->setDescricao("A competência selecionada não pode ser maior que ".$stProximaCompetencia); |
140 | 143 | |
141 | 144 | // Não pode ser maior que a competência logada do sistema. |
142 | - } elseif (((int) $_REQUEST['inExercicio'] == date('Y') && (int) $_REQUEST['inCompetencia'] > date('m')) || ((int) $_REQUEST['inExercicio'] != date('Y'))) { | |
145 | + } elseif (((int) $request->get("inExercicio") == date('Y') && (int) $request->get("inCompetencia") > date('m')) || ((int) $request->get("inExercicio") != date('Y'))) { | |
143 | 146 | $obErro->setDescricao("A competência selecionada não pode ser maior que a atual do sistema!"); |
144 | 147 | |
145 | 148 | } else { |
146 | 149 | $obFPAtrimonioDepreciacaoAutomatica = new FPatrimonioDepreciacaoAutomatica; |
147 | - | |
148 | - $stParametros = '\''.$_REQUEST['inExercicio'].'\','; | |
149 | - $stParametros .= '\''.str_pad($_REQUEST['inCompetencia'],2,'0',STR_PAD_LEFT).'\','; | |
150 | + $obFPAtrimonioReavaliacaoDepreciacaoAutomatica = new FPatrimonioReavaliacaoDepreciacaoAutomatica; | |
151 | + | |
152 | + $stParametros = '\''.$request->get("inExercicio").'\','; | |
153 | + $stParametros .= '\''.str_pad($request->get("inCompetencia"),2,'0',STR_PAD_LEFT).'\','; | |
150 | 154 | $stParametros .= 'null,null,null,'; |
151 | - $stParametros .= '\''.($_REQUEST['stMotivo'] ? $_REQUEST['stMotivo'] : 'Depreciação Automática').''; | |
155 | + $stParametros .= '\''.($request->get("stMotivo") ? $request->get("stMotivo") : 'Depreciação Automática').''; | |
152 | 156 | |
153 | - $obErro = $obFPAtrimonioDepreciacaoAutomatica->executaFuncao($stParametros,$boTransacao); | |
157 | + // Verifica quais bens comprados antes do exercicio corrente, precisam de reavaliação para serem depreciados | |
158 | + $obErro = $obFPAtrimonioReavaliacaoDepreciacaoAutomatica->recuperaReavaliacao($rsReavaliacao, $stParametros, $boTransacao); | |
159 | + | |
160 | + if ($rsReavaliacao->getNumLinhas() > 0 ){ | |
161 | + SistemaLegado::LiberaFrames(true,true); | |
162 | + SistemaLegado::exibeAviso(urlencode("Existem bens a serem reavaliados até a competência ".str_pad($request->get("inCompetencia"),2,'0',STR_PAD_LEFT).'/'.$_REQUEST['inExercicio']),"n_incluir","erro"); | |
163 | + | |
164 | + $preview = new PreviewBirt(3,6,24); | |
165 | + $preview->setVersaoBirt( '2.5.0' ); | |
166 | + | |
167 | + $preview->setTitulo('Log de Reavaliação de Depreciação'); | |
168 | + $preview->setNomeArquivo('log_depreciacao_'.sistemaLegado::mesExtensoBR($request->get("inCompetencia"))."_".$request->get("inExercicio")); | |
169 | + | |
170 | + $preview->addParametro( 'exercicio' , Sessao::getExercicio() ); | |
171 | + $preview->addParametro( 'stExercicio' , Sessao::getExercicio() ); | |
172 | + $preview->addParametro( 'stMes' , str_pad($request->get("inCompetencia"),2,'0',STR_PAD_LEFT) ); | |
173 | + $preview->addParametro( 'stMesExtenso', sistemaLegado::mesExtensoBR($request->get("inCompetencia")) ); | |
174 | + $preview->addParametro( 'stMotivo' , "Reavaliação de Depreciação" ); | |
175 | + $preview->addParametro( 'stCabecalho' , "Log de Depreciação ".sistemaLegado::mesExtensoBR($request->get("inCompetencia"))." de ".$request->get("inExercicio") ); | |
176 | + | |
177 | + $preview->preview(); | |
178 | + | |
179 | + //Parar o processamento e carregar o relatório | |
180 | + die; | |
181 | + } else { | |
182 | + $obErro = $obFPAtrimonioDepreciacaoAutomatica->executaFuncao($rsDepreciacao, $stParametros, $boTransacao); | |
183 | + } | |
184 | + | |
154 | 185 | } |
155 | - | |
186 | + | |
156 | 187 | if (!$obErro->ocorreu()) { |
157 | - SistemaLegado::alertaAviso($pgFilt."?".Sessao::getId()."&stAcao=".$stAcao,"Bens depreciados com sucesso até a competência: ".str_pad($_REQUEST['inCompetencia'],2,'0',STR_PAD_LEFT).'/'.$_REQUEST['inExercicio'],"$stAcao","aviso", Sessao::getId(), "../"); | |
188 | + SistemaLegado::alertaAviso($pgFilt."?".Sessao::getId()."&stAcao=".$stAcao,"Bens depreciados com sucesso até a competência: ".str_pad($request->get("inCompetencia"),2,'0',STR_PAD_LEFT).'/'.$_REQUEST['inExercicio'],"$stAcao","aviso", Sessao::getId(), "../"); | |
158 | 189 | } else { |
159 | 190 | SistemaLegado::exibeAviso(urlencode($obErro->getDescricao()),"n_incluir","erro"); |
160 | 191 | } |
... | ... | @@ -168,6 +199,7 @@ switch ($stAcao) { |
168 | 199 | break; |
169 | 200 | } |
170 | 201 | |
202 | +SistemaLegado::mudaFramePrincipal($pgFilt); | |
171 | 203 | SistemaLegado::LiberaFrames(true,true); |
172 | 204 | |
173 | 205 | ?> |
174 | 206 | \ No newline at end of file | ... | ... |
gestaoPatrimonial/fontes/PLPGSQL/patrimonio/fn_depreciacao_automatica.plsql
... | ... | @@ -21,12 +21,31 @@ |
21 | 21 | ********************************************************************************** |
22 | 22 | */ |
23 | 23 | |
24 | +/* | |
25 | +CREATE TYPE depreciacao_automatica AS ( | |
26 | + cod_bem INTEGER | |
27 | + , descricao VARCHAR | |
28 | + , dt_incorporacao DATE | |
29 | + , dt_aquisicao DATE | |
30 | + , competencia_incorporacao TEXT | |
31 | + , vl_bem NUMERIC | |
32 | + , quota_depreciacao_anual NUMERIC | |
33 | + , quota_depreciacao_anual_acelerada NUMERIC | |
34 | + , depreciacao_acelerada BOOLEAN | |
35 | + , cod_plano INTEGER | |
36 | + , cod_reavaliacao INTEGER | |
37 | + , dt_reavaliacao DATE | |
38 | + , vida_util INTEGER | |
39 | + , motivo VARCHAR | |
40 | +); | |
41 | +*/ | |
42 | + | |
24 | 43 | CREATE OR REPLACE FUNCTION patrimonio.fn_depreciacao_automatica(stExercicio VARCHAR, |
25 | 44 | stCompetencia VARCHAR, |
26 | 45 | inCodNatureza INTEGER, |
27 | 46 | inCodGrupo INTEGER, |
28 | 47 | inCodEspecie INTEGER, |
29 | - stMotivo VARCHAR) RETURNS VOID | |
48 | + stMotivo VARCHAR) RETURNS SETOF depreciacao_automatica | |
30 | 49 | AS $$ DECLARE |
31 | 50 | |
32 | 51 | stQuery VARCHAR; |
... | ... | @@ -89,6 +108,7 @@ arCompetencia := STRING_TO_ARRAY(stCompetencia,','); |
89 | 108 | stQuery := ' SELECT bem.cod_bem |
90 | 109 | , bem.descricao |
91 | 110 | , COALESCE(reavaliacao.dt_reavaliacao,bem.dt_incorporacao,bem.dt_aquisicao) AS dt_incorporacao |
111 | + , bem.dt_aquisicao | |
92 | 112 | , TO_CHAR(COALESCE(reavaliacao.dt_reavaliacao,bem.dt_incorporacao,bem.dt_aquisicao),''YYYYMM'' ) AS competencia_incorporacao |
93 | 113 | , COALESCE(reavaliacao.vl_reavaliacao, bem.vl_bem ) AS vl_bem |
94 | 114 | , CASE WHEN bem.quota_depreciacao_anual > 0 |
... | ... | @@ -112,6 +132,8 @@ stQuery := ' SELECT bem.cod_bem |
112 | 132 | ON especie.cod_natureza = bem.cod_natureza |
113 | 133 | AND especie.cod_grupo = bem.cod_grupo |
114 | 134 | AND especie.cod_especie = bem.cod_especie |
135 | + -- Não pode depreciar bens adquiridos após a competencia da depreciação | |
136 | + AND to_char(bem.dt_aquisicao, ''YYYYMM'')::INTEGER <= '|| stExercicio || stCompetencia ||' | |
115 | 137 | |
116 | 138 | INNER JOIN patrimonio.grupo |
117 | 139 | ON grupo.cod_natureza = especie.cod_natureza |
... | ... | @@ -295,6 +317,9 @@ FOR rcBens IN EXECUTE stQuery LOOP |
295 | 317 | EXIT WHEN vlBem = 0; |
296 | 318 | |
297 | 319 | END LOOP; |
320 | + | |
321 | + RETURN next rcBens; | |
322 | + | |
298 | 323 | END LOOP; |
299 | 324 | |
300 | 325 | IF boPlanoAtivoExercicio = false THEN | ... | ... |
gestaoPatrimonial/fontes/PLPGSQL/patrimonio/fn_reavaliacao_depreciacao_automatica.plsql
0 → 100644
... | ... | @@ -0,0 +1,204 @@ |
1 | +/* | |
2 | + ********************************************************************************** | |
3 | + * * | |
4 | + * @package URBEM CNM - Soluções em Gestão Pública * | |
5 | + * @copyright (c) 2013 Confederação Nacional de Municípos * | |
6 | + * @author Confederação Nacional de Municípios * | |
7 | + * * | |
8 | + * O URBEM CNM é um software livre; você pode redistribuí-lo e/ou modificá-lo sob * | |
9 | + * os termos da Licença Pública Geral GNU conforme publicada pela Fundação do * | |
10 | + * Software Livre (FSF - Free Software Foundation); na versão 2 da Licença. * | |
11 | + * * | |
12 | + * Este programa é distribuído na expectativa de que seja útil, porém, * | |
13 | + * SEM NENHUMA GARANTIA; nem mesmo a garantia implícita de COMERCIABILIDADE OU * | |
14 | + * ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. Consulte a Licença Pública Geral do GNU * | |
15 | + * para mais detalhes. * | |
16 | + * * | |
17 | + * Você deve ter recebido uma cópia da Licença Pública Geral do GNU "LICENCA.txt" * | |
18 | + * com este programa; se não, escreva para a Free Software Foundation Inc., * | |
19 | + * no endereço 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * | |
20 | + * * | |
21 | + ********************************************************************************** | |
22 | +*/ | |
23 | +/* | |
24 | + | |
25 | +CREATE TYPE reavaliacao_depreciacao_automatica AS ( | |
26 | + cod_bem INTEGER | |
27 | + , descricao VARCHAR | |
28 | + , dt_incorporacao DATE | |
29 | + , dt_aquisicao DATE | |
30 | + , competencia_incorporacao TEXT | |
31 | + , vl_bem NUMERIC | |
32 | + , quota_depreciacao_anual NUMERIC | |
33 | + , quota_depreciacao_anual_acelerada NUMERIC | |
34 | + , depreciacao_acelerada BOOLEAN | |
35 | + , cod_plano INTEGER | |
36 | + , cod_reavaliacao INTEGER | |
37 | + , dt_reavaliacao DATE | |
38 | + , vida_util INTEGER | |
39 | + , motivo VARCHAR | |
40 | +); | |
41 | + | |
42 | +*/ | |
43 | +CREATE OR REPLACE FUNCTION patrimonio.fn_reavaliacao_depreciacao_automatica( stExercicio VARCHAR, | |
44 | + stCompetencia VARCHAR, | |
45 | + inCodNatureza INTEGER, | |
46 | + inCodGrupo INTEGER, | |
47 | + inCodEspecie INTEGER, | |
48 | + stMotivo VARCHAR ) RETURNS SETOF reavaliacao_depreciacao_automatica | |
49 | +AS $$ DECLARE | |
50 | + | |
51 | + stQuery VARCHAR; | |
52 | + vlValorMinimoDepreciacao NUMERIC(14,2); | |
53 | + inCompetenciaDepreciacao INTEGER; | |
54 | + arDatas VARCHAR[]; | |
55 | + | |
56 | + rcConfiguracao RECORD; | |
57 | + rcReavaliacao RECORD; | |
58 | + | |
59 | +BEGIN | |
60 | + | |
61 | + -- Recupera a data final do mês | |
62 | + arDatas := publico.mes(stExercicio, stCompetencia::INTEGER); | |
63 | + | |
64 | +stQuery := 'SELECT parametro | |
65 | + , valor | |
66 | + FROM administracao.configuracao | |
67 | + WHERE parametro IN (''valor_minimo_depreciacao'',''competencia_depreciacao'',''substituir_depreciacao'') | |
68 | + AND exercicio = '|| quote_literal(stExercicio) ||' | |
69 | + AND cod_modulo = 6'; | |
70 | + | |
71 | +EXECUTE stQuery INTO rcConfiguracao; | |
72 | + | |
73 | +FOR rcConfiguracao IN EXECUTE stQuery LOOP | |
74 | + IF rcConfiguracao.parametro = 'valor_minimo_depreciacao' THEN | |
75 | + vlValorMinimoDepreciacao := rcConfiguracao.valor::NUMERIC; | |
76 | + ELSEIF rcConfiguracao.parametro = 'competencia_depreciacao' THEN | |
77 | + inCompetenciaDepreciacao := rcConfiguracao.valor::INTEGER; | |
78 | + END IF; | |
79 | +END LOOP; | |
80 | + | |
81 | +-- RECUPERA OS BENS QUE POSSUEM PLANO RELACIONADO | |
82 | +stQuery := ' | |
83 | +CREATE TEMPORARY TABLE tmp_bem_depreciacao AS ( | |
84 | + SELECT bem.cod_bem | |
85 | + , bem.descricao | |
86 | + , COALESCE(reavaliacao.dt_reavaliacao,bem.dt_incorporacao,bem.dt_aquisicao) AS dt_incorporacao | |
87 | + , bem.dt_aquisicao | |
88 | + , TO_CHAR(COALESCE(reavaliacao.dt_reavaliacao,bem.dt_incorporacao,bem.dt_aquisicao),''YYYYMM'' ) AS competencia_incorporacao | |
89 | + , COALESCE(reavaliacao.vl_reavaliacao, bem.vl_bem ) AS vl_bem | |
90 | + , CASE WHEN bem.quota_depreciacao_anual > 0 | |
91 | + THEN bem.quota_depreciacao_anual | |
92 | + ELSE grupo.depreciacao | |
93 | + END AS quota_depreciacao_anual | |
94 | + , bem.quota_depreciacao_anual_acelerada | |
95 | + , bem.depreciacao_acelerada | |
96 | + , CASE WHEN bem_plano_depreciacao.cod_plano IS NOT NULL | |
97 | + THEN bem_plano_depreciacao.cod_plano | |
98 | + ELSE grupo_plano_depreciacao.cod_plano | |
99 | + END AS cod_plano | |
100 | + , reavaliacao.cod_reavaliacao | |
101 | + , reavaliacao.dt_reavaliacao | |
102 | + , reavaliacao.vida_util | |
103 | + , reavaliacao.motivo | |
104 | + | |
105 | + FROM patrimonio.bem | |
106 | + | |
107 | + INNER JOIN patrimonio.especie | |
108 | + ON especie.cod_natureza = bem.cod_natureza | |
109 | + AND especie.cod_grupo = bem.cod_grupo | |
110 | + AND especie.cod_especie = bem.cod_especie | |
111 | + | |
112 | + INNER JOIN patrimonio.grupo | |
113 | + ON grupo.cod_natureza = especie.cod_natureza | |
114 | + AND grupo.cod_grupo = especie.cod_grupo | |
115 | + | |
116 | + INNER JOIN patrimonio.natureza | |
117 | + ON natureza.cod_natureza = grupo.cod_natureza | |
118 | + | |
119 | + LEFT JOIN patrimonio.grupo_plano_depreciacao | |
120 | + ON grupo_plano_depreciacao.cod_grupo = grupo.cod_grupo | |
121 | + AND grupo_plano_depreciacao.cod_natureza = grupo.cod_natureza | |
122 | + AND grupo_plano_depreciacao.exercicio = '|| quote_literal(stExercicio) ||' | |
123 | + | |
124 | + LEFT JOIN ( SELECT cod_bem | |
125 | + , MAX(timestamp) AS timestamp | |
126 | + , exercicio | |
127 | + FROM patrimonio.bem_plano_depreciacao | |
128 | + WHERE bem_plano_depreciacao.exercicio = '|| quote_literal(stExercicio) ||' | |
129 | + GROUP BY cod_bem, exercicio | |
130 | + ) AS ultimo_plano_bem_depreciacao | |
131 | + ON bem.cod_bem = ultimo_plano_bem_depreciacao.cod_bem | |
132 | + | |
133 | + LEFT JOIN patrimonio.bem_plano_depreciacao | |
134 | + ON ultimo_plano_bem_depreciacao.cod_bem = bem_plano_depreciacao.cod_bem | |
135 | + AND ultimo_plano_bem_depreciacao.timestamp = bem_plano_depreciacao.timestamp | |
136 | + AND ultimo_plano_bem_depreciacao.exercicio = bem_plano_depreciacao.exercicio | |
137 | + AND bem_plano_depreciacao.exercicio = '|| quote_literal(stExercicio) ||' | |
138 | + | |
139 | + LEFT JOIN ( SELECT MAX(cod_reavaliacao) AS cod_reavaliacao | |
140 | + , cod_bem | |
141 | + FROM patrimonio.reavaliacao | |
142 | + GROUP BY cod_bem | |
143 | + ) AS ultima_reavaliacao | |
144 | + ON bem.cod_bem = ultima_reavaliacao.cod_bem | |
145 | + | |
146 | + LEFT JOIN patrimonio.reavaliacao | |
147 | + ON ultima_reavaliacao.cod_reavaliacao = reavaliacao.cod_reavaliacao | |
148 | + AND ultima_reavaliacao.cod_bem = reavaliacao.cod_bem | |
149 | + | |
150 | + WHERE bem.depreciavel = true | |
151 | + AND NOT EXISTS ( SELECT 1 | |
152 | + FROM patrimonio.bem_baixado | |
153 | + WHERE bem_baixado.cod_bem = bem.cod_bem ) | |
154 | + AND grupo_plano_depreciacao.exercicio = '|| quote_literal(stExercicio) ||' | |
155 | + OR bem_plano_depreciacao.exercicio = '|| quote_literal(stExercicio); | |
156 | + | |
157 | + IF inCodNatureza IS NOT NULL THEN | |
158 | + stQuery := stQuery||' AND bem.cod_natureza = '||inCodNatureza; | |
159 | + END IF; | |
160 | + | |
161 | + IF inCodGrupo IS NOT NULL THEN | |
162 | + stQuery := stQuery||' AND bem.cod_grupo = '||inCodGrupo; | |
163 | + END IF; | |
164 | + | |
165 | + IF inCodEspecie IS NOT NULL THEN | |
166 | + stQuery := stQuery||' AND bem.cod_especie = '||inCodEspecie; | |
167 | + END IF; | |
168 | + | |
169 | + IF vlValorMinimoDepreciacao IS NOT NULL THEN | |
170 | + stQuery := stQuery||' AND bem.vl_bem >= '||vlValorMinimoDepreciacao; | |
171 | + END IF; | |
172 | + | |
173 | + stQuery := stQuery|| ' )'; | |
174 | + | |
175 | + EXECUTE stQuery; | |
176 | + | |
177 | +stQuery := ' | |
178 | + SELECT tmp_bem_depreciacao.* | |
179 | + | |
180 | + FROM tmp_bem_depreciacao | |
181 | + WHERE TO_CHAR(tmp_bem_depreciacao.dt_aquisicao, ''YYYY'') < ' || quote_literal(stExercicio) || ' | |
182 | + AND NOT EXISTS ( | |
183 | + SELECT 1 | |
184 | + FROM patrimonio.reavaliacao | |
185 | + | |
186 | + WHERE reavaliacao.cod_bem = tmp_bem_depreciacao.cod_bem | |
187 | + AND TO_CHAR(reavaliacao.dt_reavaliacao, ''YYYY'') = ' || quote_literal(stExercicio) || ' | |
188 | + AND reavaliacao.dt_reavaliacao BETWEEN TO_DATE('|| quote_literal( arDatas[0] ) || ', ''DD/MM/YYYY'') AND TO_DATE('|| quote_literal( arDatas[1] ) ||', ''DD/MM/YYYY'') | |
189 | + /* Recupera todos as reavaliações, inclusive dos meses anteriores e não somente a última, devido a sequencia dos meses depreciados. | |
190 | + AND reavaliacao.cod_reavaliacao = (SELECT MAX(reavaliacao.cod_reavaliacao) | |
191 | + FROM patrimonio.reavaliacao | |
192 | + WHERE reavaliacao.cod_bem = tmp_bem_depreciacao.cod_bem ) */ | |
193 | + ) '; | |
194 | + | |
195 | + FOR rcReavaliacao IN EXECUTE stQuery | |
196 | + LOOP | |
197 | + RETURN next rcReavaliacao; | |
198 | + END LOOP; | |
199 | + | |
200 | + DROP TABLE tmp_bem_depreciacao; | |
201 | + | |
202 | +RETURN; | |
203 | +END; | |
204 | +$$ LANGUAGE 'plpgsql'; | |
0 | 205 | \ No newline at end of file | ... | ... |
gestaoPatrimonial/fontes/RPT/patrimonio/report/design/logReavaliacao.rptdesign
0 → 100644
... | ... | @@ -0,0 +1,475 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.23" id="1"> | |
3 | + <property name="comments">Copyright (c) 2007 <<Your Company Name here>></property> | |
4 | + <property name="createdBy">Eclipse BIRT Designer Version 4.4.0.v201405191524 Build <4.4.0.v20140606-1451></property> | |
5 | + <property name="units">in</property> | |
6 | + <text-property name="displayName">Template Urbem Retrato</text-property> | |
7 | + <property name="layoutPreference">auto layout</property> | |
8 | + <list-property name="libraries"> | |
9 | + <structure> | |
10 | + <property name="fileName">../../../../../../gestaoAdministrativa/fontes/RPT/framework/library/urbem_221.rptlibrary</property> | |
11 | + <property name="namespace">urbem_221</property> | |
12 | + </structure> | |
13 | + </list-property> | |
14 | + <parameters> | |
15 | + <scalar-parameter name="term_user" id="6666"> | |
16 | + <property name="valueType">static</property> | |
17 | + <property name="dataType">string</property> | |
18 | + <property name="distinct">true</property> | |
19 | + <property name="paramType">simple</property> | |
20 | + <property name="controlType">text-box</property> | |
21 | + <structure name="format"> | |
22 | + <property name="category">Unformatted</property> | |
23 | + </structure> | |
24 | + </scalar-parameter> | |
25 | + <scalar-parameter name="exercicio" id="186"> | |
26 | + <property name="hidden">true</property> | |
27 | + <property name="valueType">static</property> | |
28 | + <property name="isRequired">false</property> | |
29 | + <property name="dataType">string</property> | |
30 | + <property name="distinct">true</property> | |
31 | + <property name="paramType">simple</property> | |
32 | + <property name="controlType">text-box</property> | |
33 | + <structure name="format"> | |
34 | + <property name="category">Unformatted</property> | |
35 | + </structure> | |
36 | + </scalar-parameter> | |
37 | + <scalar-parameter name="cod_acao" id="187"> | |
38 | + <property name="hidden">true</property> | |
39 | + <property name="valueType">static</property> | |
40 | + <property name="isRequired">false</property> | |
41 | + <property name="dataType">string</property> | |
42 | + <property name="distinct">true</property> | |
43 | + <property name="paramType">simple</property> | |
44 | + <property name="controlType">text-box</property> | |
45 | + <structure name="format"> | |
46 | + <property name="category">Unformatted</property> | |
47 | + </structure> | |
48 | + </scalar-parameter> | |
49 | + <scalar-parameter name="db_conn_url" id="189"> | |
50 | + <property name="hidden">true</property> | |
51 | + <property name="valueType">static</property> | |
52 | + <property name="isRequired">false</property> | |
53 | + <property name="dataType">string</property> | |
54 | + <property name="distinct">true</property> | |
55 | + <simple-property-list name="defaultValue"> | |
56 | + <value type="constant">jdbc:postgresql://172.16.30.4:5432/ga_mariana_1809_1910_1</value> | |
57 | + </simple-property-list> | |
58 | + <property name="paramType">simple</property> | |
59 | + <property name="controlType">text-box</property> | |
60 | + <structure name="format"> | |
61 | + <property name="category">Unformatted</property> | |
62 | + </structure> | |
63 | + </scalar-parameter> | |
64 | + <scalar-parameter name="entidade" id="1123"> | |
65 | + <property name="valueType">static</property> | |
66 | + <property name="isRequired">false</property> | |
67 | + <property name="dataType">integer</property> | |
68 | + <property name="distinct">true</property> | |
69 | + <property name="paramType">simple</property> | |
70 | + <property name="controlType">text-box</property> | |
71 | + <structure name="format"> | |
72 | + <property name="category">Unformatted</property> | |
73 | + </structure> | |
74 | + </scalar-parameter> | |
75 | + <scalar-parameter name="stMotivo" id="6937"> | |
76 | + <property name="valueType">static</property> | |
77 | + <property name="dataType">string</property> | |
78 | + <property name="distinct">true</property> | |
79 | + <list-property name="selectionList"/> | |
80 | + <property name="paramType">simple</property> | |
81 | + <property name="controlType">text-box</property> | |
82 | + <structure name="format"> | |
83 | + <property name="category">Unformatted</property> | |
84 | + </structure> | |
85 | + </scalar-parameter> | |
86 | + <scalar-parameter name="stMes" id="6941"> | |
87 | + <property name="valueType">static</property> | |
88 | + <property name="dataType">string</property> | |
89 | + <property name="distinct">true</property> | |
90 | + <list-property name="selectionList"/> | |
91 | + <property name="paramType">simple</property> | |
92 | + <property name="controlType">text-box</property> | |
93 | + <structure name="format"> | |
94 | + <property name="category">Unformatted</property> | |
95 | + </structure> | |
96 | + </scalar-parameter> | |
97 | + <scalar-parameter name="stCabecalho" id="7042"> | |
98 | + <property name="valueType">static</property> | |
99 | + <property name="dataType">string</property> | |
100 | + <property name="distinct">true</property> | |
101 | + <list-property name="selectionList"/> | |
102 | + <property name="paramType">simple</property> | |
103 | + <property name="controlType">text-box</property> | |
104 | + <structure name="format"> | |
105 | + <property name="category">Unformatted</property> | |
106 | + </structure> | |
107 | + </scalar-parameter> | |
108 | + <scalar-parameter name="stMesExtenso" id="7048"> | |
109 | + <property name="valueType">static</property> | |
110 | + <property name="dataType">string</property> | |
111 | + <property name="distinct">true</property> | |
112 | + <list-property name="selectionList"/> | |
113 | + <property name="paramType">simple</property> | |
114 | + <property name="controlType">text-box</property> | |
115 | + <structure name="format"> | |
116 | + <property name="category">Unformatted</property> | |
117 | + </structure> | |
118 | + </scalar-parameter> | |
119 | + <scalar-parameter name="stExercicio" id="7049"> | |
120 | + <property name="valueType">static</property> | |
121 | + <property name="dataType">string</property> | |
122 | + <property name="distinct">true</property> | |
123 | + <list-property name="selectionList"/> | |
124 | + <property name="paramType">simple</property> | |
125 | + <property name="controlType">text-box</property> | |
126 | + <structure name="format"> | |
127 | + <property name="category">Unformatted</property> | |
128 | + </structure> | |
129 | + </scalar-parameter> | |
130 | + </parameters> | |
131 | + <data-sources> | |
132 | + <oda-data-source extensionID="org.eclipse.birt.report.data.oda.jdbc" name="postgres" id="1147" | |
133 | + extends="urbem_221.postgres"> | |
134 | + <property name="odaDriverClass">org.postgresql.Driver</property> | |
135 | + <property name="odaURL">jdbc:postgresql://[ip]:[port]/[data_base]</property> | |
136 | + <property name="odaUser">birt</property> | |
137 | + <encrypted-property name="odaPassword" encryptionID="base64">NmM0Mzk0MmJjY2U0MzA3ZjA4NTc1ZjhlODM4YWUzZWY=</encrypted-property> | |
138 | + </oda-data-source> | |
139 | + </data-sources> | |
140 | + <data-sets> | |
141 | + <oda-data-set extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet" name="dsReavaliacaoDepreciacao" id="6881"> | |
142 | + <list-property name="columnHints"/> | |
143 | + <list-property name="parameters"> | |
144 | + <structure> | |
145 | + <property name="name">exercicio</property> | |
146 | + <property name="paramName">exercicio</property> | |
147 | + <property name="nativeName"></property> | |
148 | + <property name="dataType">string</property> | |
149 | + <property name="nativeDataType">0</property> | |
150 | + <property name="position">1</property> | |
151 | + <property name="isOptional">false</property> | |
152 | + <property name="isInput">true</property> | |
153 | + <property name="isOutput">false</property> | |
154 | + </structure> | |
155 | + <structure> | |
156 | + <property name="name">mes</property> | |
157 | + <property name="paramName">stMes</property> | |
158 | + <property name="nativeName"></property> | |
159 | + <property name="dataType">string</property> | |
160 | + <property name="nativeDataType">0</property> | |
161 | + <property name="position">2</property> | |
162 | + <property name="isOptional">false</property> | |
163 | + <property name="isInput">true</property> | |
164 | + <property name="isOutput">false</property> | |
165 | + </structure> | |
166 | + <structure> | |
167 | + <property name="name">motivo</property> | |
168 | + <property name="paramName">stMotivo</property> | |
169 | + <property name="nativeName"></property> | |
170 | + <property name="dataType">string</property> | |
171 | + <property name="nativeDataType">0</property> | |
172 | + <property name="position">3</property> | |
173 | + <property name="isOptional">false</property> | |
174 | + <property name="isInput">true</property> | |
175 | + <property name="isOutput">false</property> | |
176 | + </structure> | |
177 | + </list-property> | |
178 | + <structure name="cachedMetaData"/> | |
179 | + <property name="dataSource">postgres</property> | |
180 | + <list-property name="resultSet"/> | |
181 | + <xml-property name="queryText"><![CDATA[SELECT cod_bem | |
182 | + , INITCAP(descricao) AS descricao | |
183 | + , dt_aquisicao | |
184 | + , vl_bem | |
185 | + FROM patrimonio.fn_reavaliacao_depreciacao_automatica(?,?,null,null,null,?);]]></xml-property> | |
186 | + </oda-data-set> | |
187 | + </data-sets> | |
188 | + <styles> | |
189 | + <style name="crosstab" id="4"> | |
190 | + <property name="borderBottomColor">#CCCCCC</property> | |
191 | + <property name="borderBottomStyle">solid</property> | |
192 | + <property name="borderBottomWidth">1pt</property> | |
193 | + <property name="borderLeftColor">#CCCCCC</property> | |
194 | + <property name="borderLeftStyle">solid</property> | |
195 | + <property name="borderLeftWidth">1pt</property> | |
196 | + <property name="borderRightColor">#CCCCCC</property> | |
197 | + <property name="borderRightStyle">solid</property> | |
198 | + <property name="borderRightWidth">1pt</property> | |
199 | + <property name="borderTopColor">#CCCCCC</property> | |
200 | + <property name="borderTopStyle">solid</property> | |
201 | + <property name="borderTopWidth">1pt</property> | |
202 | + </style> | |
203 | + <style name="crosstab-cell" id="5"> | |
204 | + <property name="borderBottomColor">#CCCCCC</property> | |
205 | + <property name="borderBottomStyle">solid</property> | |
206 | + <property name="borderBottomWidth">1pt</property> | |
207 | + <property name="borderLeftColor">#CCCCCC</property> | |
208 | + <property name="borderLeftStyle">solid</property> | |
209 | + <property name="borderLeftWidth">1pt</property> | |
210 | + <property name="borderRightColor">#CCCCCC</property> | |
211 | + <property name="borderRightStyle">solid</property> | |
212 | + <property name="borderRightWidth">1pt</property> | |
213 | + <property name="borderTopColor">#CCCCCC</property> | |
214 | + <property name="borderTopStyle">solid</property> | |
215 | + <property name="borderTopWidth">1pt</property> | |
216 | + </style> | |
217 | + <style name="NewStyle" id="1148"> | |
218 | + <property name="fontFamily">sans-serif</property> | |
219 | + <property name="fontSize">8pt</property> | |
220 | + </style> | |
221 | + </styles> | |
222 | + <page-setup> | |
223 | + <simple-master-page name="Simple MasterPage" id="2"> | |
224 | + <property name="type">a4</property> | |
225 | + <property name="orientation">portrait</property> | |
226 | + <property name="topMargin">0.3in</property> | |
227 | + <property name="leftMargin">0.15in</property> | |
228 | + <property name="bottomMargin">0.21in</property> | |
229 | + <property name="rightMargin">0.1in</property> | |
230 | + <page-footer> | |
231 | + <grid name="rodape" id="1146" extends="urbem_221.rodape"> | |
232 | + <overridden-values> | |
233 | + <ref-entry baseId="180" id="180"/> | |
234 | + <ref-entry baseId="181" id="181"/> | |
235 | + <ref-entry baseId="182" id="182"/> | |
236 | + <ref-entry baseId="183" name="NewText2" id="183"/> | |
237 | + </overridden-values> | |
238 | + </grid> | |
239 | + </page-footer> | |
240 | + </simple-master-page> | |
241 | + </page-setup> | |
242 | + <body> | |
243 | + <grid name="cabecalho1" id="6954" extends="urbem_221.cabecalho"> | |
244 | + <overridden-values> | |
245 | + <ref-entry baseId="1051" id="6955"/> | |
246 | + <ref-entry baseId="1052" id="6956"/> | |
247 | + <ref-entry baseId="1053" id="6957"/> | |
248 | + <ref-entry baseId="1054" id="6958"/> | |
249 | + <ref-entry baseId="1055" id="6959"/> | |
250 | + <ref-entry baseId="725" name="NewText6122" id="6960"/> | |
251 | + <ref-entry baseId="1144" name="NewText61211" id="6961"/> | |
252 | + <ref-entry baseId="1056" id="6962"/> | |
253 | + <ref-entry baseId="1061" name="NewGrid4" id="6963"/> | |
254 | + <ref-entry baseId="1062" id="6964"/> | |
255 | + <ref-entry baseId="1063" id="6965"/> | |
256 | + <ref-entry baseId="1064" id="6966"/> | |
257 | + <ref-entry baseId="1102" name="NewData12" id="6967"/> | |
258 | + <ref-entry baseId="1137" name="NewData61" id="6968"/> | |
259 | + <ref-entry baseId="1065" id="6969"/> | |
260 | + <ref-entry baseId="1066" id="6970"/> | |
261 | + <ref-entry baseId="1103" name="NewData13" id="6971"/> | |
262 | + <ref-entry baseId="1138" name="NewData71" id="6972"/> | |
263 | + <ref-entry baseId="1067" id="6973"/> | |
264 | + <ref-entry baseId="1068" id="6974"/> | |
265 | + <ref-entry baseId="1105" name="NewData21" id="6975"/> | |
266 | + <ref-entry baseId="1139" name="NewData81" id="6976"/> | |
267 | + <ref-entry baseId="1069" id="6977"/> | |
268 | + <ref-entry baseId="1070" id="6978"/> | |
269 | + <ref-entry baseId="1106" name="NewData31" id="6979"/> | |
270 | + <ref-entry baseId="1140" name="NewData91" id="6980"/> | |
271 | + <ref-entry baseId="1071" id="6981"/> | |
272 | + <ref-entry baseId="1072" id="6982"/> | |
273 | + <ref-entry baseId="1107" name="NewData41" id="6983"/> | |
274 | + <ref-entry baseId="1141" name="NewData101" id="6984"/> | |
275 | + <ref-entry baseId="1073" id="6985"/> | |
276 | + <ref-entry baseId="1074" id="6986"/> | |
277 | + <ref-entry baseId="1108" name="NewData51" id="6987"/> | |
278 | + <ref-entry baseId="1143" name="NewData111" id="6988"/> | |
279 | + <ref-entry baseId="1057" id="6989"/> | |
280 | + <ref-entry baseId="1075" name="NewGrid11" id="6990"/> | |
281 | + <ref-entry baseId="1076" id="6991"/> | |
282 | + <ref-entry baseId="1077" id="6992"/> | |
283 | + <ref-entry baseId="1078" id="6993"/> | |
284 | + <ref-entry baseId="1109" name="NewGrid32" id="6994"/> | |
285 | + <ref-entry baseId="1110" id="6995"/> | |
286 | + <ref-entry baseId="1111" id="6996"/> | |
287 | + <ref-entry baseId="1112" id="6997"/> | |
288 | + <ref-entry baseId="1113" id="6998"/> | |
289 | + <ref-entry baseId="735" name="NewData12121" id="6999"/> | |
290 | + <ref-entry baseId="1114" id="7000"/> | |
291 | + <ref-entry baseId="744" name="NewData14121" id="7001"/> | |
292 | + <ref-entry baseId="1079" id="7002"/> | |
293 | + <ref-entry baseId="1080" id="7003"/> | |
294 | + <ref-entry baseId="1115" name="NewGrid311" id="7004"/> | |
295 | + <ref-entry baseId="1116" id="7005"/> | |
296 | + <ref-entry baseId="1117" id="7006"/> | |
297 | + <ref-entry baseId="1118" id="7007"/> | |
298 | + <ref-entry baseId="1119" id="7008"/> | |
299 | + <ref-entry baseId="747" name="NewData13121" id="7009"/> | |
300 | + <ref-entry baseId="1120" id="7010"/> | |
301 | + <ref-entry baseId="756" name="NewData1521" id="7011"/> | |
302 | + <ref-entry baseId="1081" id="7012"/> | |
303 | + <ref-entry baseId="1082" id="7013"/> | |
304 | + <ref-entry baseId="759" name="NewData11121" id="7014"/> | |
305 | + <ref-entry baseId="1083" id="7015"/> | |
306 | + <ref-entry baseId="1084" id="7016"/> | |
307 | + <ref-entry baseId="762" name="NewData1621" id="7017"> | |
308 | + <property name="resultSetColumn">exercicio</property> | |
309 | + <list-property name="boundDataColumns"> | |
310 | + <structure> | |
311 | + <property name="name">exercicio</property> | |
312 | + <expression name="expression" type="javascript">params["stCabecalho"]</expression> | |
313 | + <property name="dataType">string</property> | |
314 | + <property name="allowExport">true</property> | |
315 | + </structure> | |
316 | + </list-property> | |
317 | + </ref-entry> | |
318 | + <ref-entry baseId="1085" id="7018"/> | |
319 | + <ref-entry baseId="1086" id="7019"/> | |
320 | + <ref-entry baseId="1087" name="NewGrid21" id="7020"/> | |
321 | + <ref-entry baseId="1088" id="7021"/> | |
322 | + <ref-entry baseId="1089" id="7022"/> | |
323 | + <ref-entry baseId="1090" id="7023"/> | |
324 | + <ref-entry baseId="1091" id="7024"/> | |
325 | + <ref-entry baseId="1092" id="7025"/> | |
326 | + <ref-entry baseId="1093" id="7026"/> | |
327 | + <ref-entry baseId="1094" id="7027"/> | |
328 | + <ref-entry baseId="1095" id="7028"/> | |
329 | + <ref-entry baseId="765" name="NewText721" id="7029"/> | |
330 | + <ref-entry baseId="1096" id="7030"/> | |
331 | + <ref-entry baseId="767" name="NewText1121" id="7031"/> | |
332 | + <ref-entry baseId="1097" id="7032"/> | |
333 | + <ref-entry baseId="776" name="NewLabel2122" id="7033"/> | |
334 | + <ref-entry baseId="1098" id="7034"/> | |
335 | + <ref-entry baseId="778" name="NewAutoText11" id="7035"/> | |
336 | + <ref-entry baseId="1099" id="7036"/> | |
337 | + <ref-entry baseId="1101" name="NewLabel21211" id="7037"/> | |
338 | + <ref-entry baseId="1100" id="7038"/> | |
339 | + <ref-entry baseId="782" name="NewAutoText2" id="7039"/> | |
340 | + </overridden-values> | |
341 | + </grid> | |
342 | + <text-data id="7047"> | |
343 | + <property name="fontFamily">sans-serif</property> | |
344 | + <property name="fontWeight">bold</property> | |
345 | + <property name="textAlign">left</property> | |
346 | + <expression name="valueExpr">'Bens não depreciados por falta de reavaliação na competência ' + params["stMesExtenso"] + ' de ' + params["stExercicio"] ;</expression> | |
347 | + <property name="contentType">html</property> | |
348 | + </text-data> | |
349 | + <label id="7045"/> | |
350 | + <table id="6697"> | |
351 | + <property name="width">190mm</property> | |
352 | + <property name="dataSet">dsReavaliacaoDepreciacao</property> | |
353 | + <list-property name="boundDataColumns"> | |
354 | + <structure> | |
355 | + <property name="name">descricao</property> | |
356 | + <expression name="expression" type="javascript">dataSetRow["descricao"];</expression> | |
357 | + <property name="dataType">string</property> | |
358 | + <property name="allowExport">true</property> | |
359 | + </structure> | |
360 | + <structure> | |
361 | + <property name="name">cod_bem</property> | |
362 | + <expression name="expression" type="javascript">dataSetRow['cod_bem']</expression> | |
363 | + <property name="dataType">integer</property> | |
364 | + <property name="allowExport">true</property> | |
365 | + </structure> | |
366 | + <structure> | |
367 | + <property name="name">dt_aquisicao</property> | |
368 | + <expression name="expression" type="javascript">dataSetRow['dt_aquisicao']</expression> | |
369 | + <property name="dataType">date</property> | |
370 | + <property name="allowExport">true</property> | |
371 | + </structure> | |
372 | + <structure> | |
373 | + <property name="name">vl_bem</property> | |
374 | + <expression name="expression" type="javascript">dataSetRow['vl_bem']</expression> | |
375 | + <property name="dataType">decimal</property> | |
376 | + <property name="allowExport">true</property> | |
377 | + </structure> | |
378 | + </list-property> | |
379 | + <column id="6710"> | |
380 | + <property name="width">0.8854166666666666in</property> | |
381 | + </column> | |
382 | + <column id="6711"> | |
383 | + <property name="width">3.1145833333333335in</property> | |
384 | + </column> | |
385 | + <column id="6712"/> | |
386 | + <column id="6895"/> | |
387 | + <header> | |
388 | + <row id="6698"> | |
389 | + <property name="backgroundColor">#F5F5F5</property> | |
390 | + <cell id="6699"> | |
391 | + <label id="6901"> | |
392 | + <property name="fontFamily">sans-serif</property> | |
393 | + <property name="fontWeight">bold</property> | |
394 | + <property name="textAlign">center</property> | |
395 | + <text-property name="text">Código</text-property> | |
396 | + </label> | |
397 | + </cell> | |
398 | + <cell id="6700"> | |
399 | + <property name="textAlign">left</property> | |
400 | + <label id="6903"> | |
401 | + <property name="fontFamily">sans-serif</property> | |
402 | + <property name="fontWeight">bold</property> | |
403 | + <text-property name="text">Descrição</text-property> | |
404 | + </label> | |
405 | + </cell> | |
406 | + <cell id="6701"> | |
407 | + <label id="6904"> | |
408 | + <property name="fontFamily">sans-serif</property> | |
409 | + <property name="fontWeight">bold</property> | |
410 | + <property name="textAlign">center</property> | |
411 | + <text-property name="text">Data de aquisição</text-property> | |
412 | + </label> | |
413 | + </cell> | |
414 | + <cell id="6892"> | |
415 | + <label id="6905"> | |
416 | + <property name="fontFamily">sans-serif</property> | |
417 | + <property name="fontWeight">bold</property> | |
418 | + <property name="textAlign">center</property> | |
419 | + <text-property name="text">Valor do bem</text-property> | |
420 | + </label> | |
421 | + </cell> | |
422 | + </row> | |
423 | + </header> | |
424 | + <detail> | |
425 | + <row id="6702"> | |
426 | + <cell id="6703"> | |
427 | + <data id="6898"> | |
428 | + <property name="fontFamily">sans-serif</property> | |
429 | + <property name="fontSize">8pt</property> | |
430 | + <property name="textAlign">center</property> | |
431 | + <property name="resultSetColumn">cod_bem</property> | |
432 | + </data> | |
433 | + </cell> | |
434 | + <cell id="6704"> | |
435 | + <data id="6897"> | |
436 | + <property name="fontFamily">sans-serif</property> | |
437 | + <property name="fontSize">8pt</property> | |
438 | + <property name="resultSetColumn">descricao</property> | |
439 | + </data> | |
440 | + </cell> | |
441 | + <cell id="6705"> | |
442 | + <data id="6899"> | |
443 | + <property name="fontFamily">sans-serif</property> | |
444 | + <property name="fontSize">8pt</property> | |
445 | + <property name="textAlign">center</property> | |
446 | + <property name="resultSetColumn">dt_aquisicao</property> | |
447 | + </data> | |
448 | + </cell> | |
449 | + <cell id="6893"> | |
450 | + <data id="6900"> | |
451 | + <property name="fontFamily">sans-serif</property> | |
452 | + <property name="fontSize">8pt</property> | |
453 | + <structure name="numberFormat"> | |
454 | + <property name="category">Currency</property> | |
455 | + <property name="pattern">#,##0.00{RoundingMode=HALF_UP}</property> | |
456 | + <property name="locale">pt_BR</property> | |
457 | + </structure> | |
458 | + <property name="textAlign">center</property> | |
459 | + <structure name="toc"/> | |
460 | + <property name="resultSetColumn">vl_bem</property> | |
461 | + </data> | |
462 | + </cell> | |
463 | + </row> | |
464 | + </detail> | |
465 | + <footer> | |
466 | + <row id="6706"> | |
467 | + <cell id="6707"/> | |
468 | + <cell id="6708"/> | |
469 | + <cell id="6709"/> | |
470 | + <cell id="6894"/> | |
471 | + </row> | |
472 | + </footer> | |
473 | + </table> | |
474 | + </body> | |
475 | +</report> | ... | ... |
... | ... | @@ -0,0 +1,89 @@ |
1 | +/* | |
2 | + ********************************************************************************** | |
3 | + * * | |
4 | + * @package URBEM CNM - Soluções em Gestão Pública * | |
5 | + * @copyright (c) 2013 Confederação Nacional de Municípos * | |
6 | + * @author Confederação Nacional de Municípios * | |
7 | + * * | |
8 | + * O URBEM CNM é um software livre; você pode redistribuí-lo e/ou modificá-lo sob * | |
9 | + * os termos da Licença Pública Geral GNU conforme publicada pela Fundação do * | |
10 | + * Software Livre (FSF - Free Software Foundation); na versão 2 da Licença. * | |
11 | + * * | |
12 | + * Este programa é distribuído na expectativa de que seja útil, porém, * | |
13 | + * SEM NENHUMA GARANTIA; nem mesmo a garantia implícita de COMERCIABILIDADE OU * | |
14 | + * ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. Consulte a Licença Pública Geral do GNU * | |
15 | + * para mais detalhes. * | |
16 | + * * | |
17 | + * Você deve ter recebido uma cópia da Licença Pública Geral do GNU "LICENCA.txt" * | |
18 | + * com este programa; se não, escreva para a Free Software Foundation Inc., * | |
19 | + * no endereço 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * | |
20 | + * * | |
21 | + ********************************************************************************** | |
22 | +*/ | |
23 | +/* | |
24 | +* | |
25 | +* Script de DDL e DML | |
26 | +* | |
27 | +* Versao 2.04.1 | |
28 | +* | |
29 | +* Fabio Bertoldi - 20150630 | |
30 | +* | |
31 | +*/ | |
32 | + | |
33 | +---------------- | |
34 | +-- Ticket #23005 | |
35 | +---------------- | |
36 | + | |
37 | +INSERT | |
38 | + INTO administracao.relatorio | |
39 | + ( cod_gestao | |
40 | + , cod_modulo | |
41 | + , cod_relatorio | |
42 | + , nom_relatorio | |
43 | + , arquivo | |
44 | + ) | |
45 | +VALUES | |
46 | + ( 3 | |
47 | + , 6 | |
48 | + , 24 | |
49 | + , 'Relatório de Reavaliação de Depreciação' | |
50 | + , 'logReavaliacao.rptdesign' | |
51 | + ); | |
52 | + | |
53 | + | |
54 | +DROP FUNCTION patrimonio.fn_depreciacao_automatica(VARCHAR, VARCHAR, INTEGER, INTEGER, INTEGER, VARCHAR); | |
55 | + | |
56 | +CREATE TYPE depreciacao_automatica AS ( | |
57 | + cod_bem INTEGER | |
58 | + , descricao VARCHAR | |
59 | + , dt_incorporacao DATE | |
60 | + , dt_aquisicao DATE | |
61 | + , competencia_incorporacao TEXT | |
62 | + , vl_bem NUMERIC | |
63 | + , quota_depreciacao_anual NUMERIC | |
64 | + , quota_depreciacao_anual_acelerada NUMERIC | |
65 | + , depreciacao_acelerada BOOLEAN | |
66 | + , cod_plano INTEGER | |
67 | + , cod_reavaliacao INTEGER | |
68 | + , dt_reavaliacao DATE | |
69 | + , vida_util INTEGER | |
70 | + , motivo VARCHAR | |
71 | +); | |
72 | + | |
73 | +CREATE TYPE reavaliacao_depreciacao_automatica AS ( | |
74 | + cod_bem INTEGER | |
75 | + , descricao VARCHAR | |
76 | + , dt_incorporacao DATE | |
77 | + , dt_aquisicao DATE | |
78 | + , competencia_incorporacao TEXT | |
79 | + , vl_bem NUMERIC | |
80 | + , quota_depreciacao_anual NUMERIC | |
81 | + , quota_depreciacao_anual_acelerada NUMERIC | |
82 | + , depreciacao_acelerada BOOLEAN | |
83 | + , cod_plano INTEGER | |
84 | + , cod_reavaliacao INTEGER | |
85 | + , dt_reavaliacao DATE | |
86 | + , vida_util INTEGER | |
87 | + , motivo VARCHAR | |
88 | +); | |
89 | + | ... | ... |
gestaoPrestacaoContas/fontes/PHP/TCEMG/classes/mapeamento/2014/TTCEMGConsideracaoArquivo.class.php
... | ... | @@ -33,7 +33,7 @@ |
33 | 33 | * @package URBEM |
34 | 34 | * @subpackage |
35 | 35 | |
36 | - $Id: TTCEMGConsideracaoArquivo.class.php 62269 2015-04-15 18:28:39Z franver $ | |
36 | + $Id: TTCEMGConsideracaoArquivo.class.php 62857 2015-06-30 13:53:56Z franver $ | |
37 | 37 | */ |
38 | 38 | |
39 | 39 | include_once '../../../../../../gestaoAdministrativa/fontes/PHP/framework/include/valida.inc.php'; |
... | ... | @@ -106,6 +106,7 @@ class TTCEMGConsideracaoArquivo extends Persistente |
106 | 106 | |
107 | 107 | WHERE CAD.periodo = '".$this->getDado('mes')."' |
108 | 108 | AND CAD.cod_entidade IN(".$this->getDado('entidade').") |
109 | + AND CAD.modulo_sicom = '".$this->getDado('modulo_sicom')."' | |
109 | 110 | |
110 | 111 | ORDER BY consideracao_arquivo.cod_arquivo"; |
111 | 112 | return $stSql; | ... | ... |
gestaoPrestacaoContas/fontes/PHP/TCEMG/classes/mapeamento/2015/TTCEMGArquivoMensalIDE.class.php
... | ... | @@ -2,30 +2,30 @@ |
2 | 2 | /* |
3 | 3 | ********************************************************************************** |
4 | 4 | * * |
5 | - * @package URBEM CNM - Solu›es em Gest‹o Pœblica * | |
6 | - * @copyright (c) 2013 Confedera‹o Nacional de Munic’pos * | |
7 | - * @author Confedera‹o Nacional de Munic’pios * | |
5 | + * @package URBEM CNM - Soluções em Gestão Pública * | |
6 | + * @copyright (c) 2013 Confederação Nacional de MunicÃpos * | |
7 | + * @author Confederação Nacional de MunicÃpios * | |
8 | 8 | * * |
9 | - * Este programa Ž software livre; voc pode redistribu’-lo e/ou modific‡-lo sob * | |
10 | - * os termos da Licena Pœblica Geral GNU conforme publicada pela Free Software * | |
11 | - * Foundation; tanto a vers‹o 2 da Licena, como (a seu critŽrio) qualquer vers‹o * | |
9 | + * O URBEM CNM é um software livre; você pode redistribuÃ-lo e/ou modificá-lo sob * | |
10 | + * os termos da Licença Pública Geral GNU conforme publicada pela Fundação do * | |
11 | + * Software Livre (FSF - Free Software Foundation); na versão 2 da Licença. * | |
12 | 12 | * * |
13 | - * Este programa Ž distribu’do na expectativa de que seja œtil, porŽm, * | |
14 | - * SEM NENHUMA GARANTIA; nem mesmo a garantia impl’cita de COMERCIABILIDADE OU * | |
15 | - * ADEQUA‚ÌO A UMA FINALIDADE ESPECêFICA. Consulte a Licena Pœblica Geral do GNU * | |
13 | + * Este programa é distribuÃdo na expectativa de que seja útil, porém, * | |
14 | + * SEM NENHUMA GARANTIA; nem mesmo a garantia implÃcita de COMERCIABILIDADE OU * | |
15 | + * ADEQUAÇÃO A UMA FINALIDADE ESPECÃFICA. Consulte a Licença Pública Geral do GNU * | |
16 | 16 | * para mais detalhes. * |
17 | 17 | * * |
18 | - * Voc deve ter recebido uma c—pia da Licena Pœblica Geral do GNU junto com * | |
19 | - * este programa; se n‹o, escreva para a Free Software Foundation, Inc., no * | |
20 | - * endereo 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. * | |
18 | + * Você deve ter recebido uma cópia da Licença Pública Geral do GNU "LICENCA.txt" * | |
19 | + * com este programa; se não, escreva para a Free Software Foundation Inc., * | |
20 | + * no endereço 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * | |
21 | 21 | * * |
22 | 22 | ********************************************************************************** |
23 | 23 | */ |
24 | 24 | ?> |
25 | 25 | <?php |
26 | 26 | /** |
27 | - * Classe de mapeamento do arquivo CVC.inc.php | |
28 | - * Data de Cria‹o: 27/01/2014 | |
27 | + * Classe de mapeamento do arquivo TTCEMGArquivoMensalIDE.class.php | |
28 | + * Data de Criação : 27/01/2014 | |
29 | 29 | |
30 | 30 | * @author Analista: Sergio |
31 | 31 | * @author Desenvolvedor: Lisiane Morais |
... | ... | @@ -33,7 +33,7 @@ |
33 | 33 | * @package URBEM |
34 | 34 | * @subpackage Mapeamento |
35 | 35 | |
36 | - $Id: TTCEMGArquivoMensalIDE.class.php 62269 2015-04-15 18:28:39Z franver $ | |
36 | + $Id: TTCEMGArquivoMensalIDE.class.php 62857 2015-06-30 13:53:56Z franver $ | |
37 | 37 | |
38 | 38 | */ |
39 | 39 | ... | ... |
gestaoPrestacaoContas/fontes/PHP/TCEMG/classes/mapeamento/2015/TTCEMGConsideracaoArquivo.class.php
... | ... | @@ -33,7 +33,7 @@ |
33 | 33 | * @package URBEM |
34 | 34 | * @subpackage |
35 | 35 | |
36 | - $Id: TTCEMGConsideracaoArquivo.class.php 62269 2015-04-15 18:28:39Z franver $ | |
36 | + $Id: TTCEMGConsideracaoArquivo.class.php 62857 2015-06-30 13:53:56Z franver $ | |
37 | 37 | */ |
38 | 38 | |
39 | 39 | include_once '../../../../../../gestaoAdministrativa/fontes/PHP/framework/include/valida.inc.php'; |
... | ... | @@ -106,7 +106,7 @@ class TTCEMGConsideracaoArquivo extends Persistente |
106 | 106 | |
107 | 107 | WHERE CAD.periodo = '".$this->getDado('mes')."' |
108 | 108 | AND CAD.cod_entidade IN(".$this->getDado('entidade').") |
109 | - | |
109 | + AND CAD.modulo_sicom = '".$this->getDado('modulo_sicom')."' | |
110 | 110 | ORDER BY consideracao_arquivo.cod_arquivo"; |
111 | 111 | return $stSql; |
112 | 112 | } | ... | ... |
gestaoPrestacaoContas/fontes/PHP/TCEMG/classes/mapeamento/TTCEMGConsideracaoArquivoDescricao.class.php
... | ... | @@ -33,7 +33,7 @@ |
33 | 33 | * @package URBEM |
34 | 34 | * @subpackage |
35 | 35 | |
36 | - $Id: TTCEMGConsideracaoArquivoDescricao.class.php 61375 2015-01-12 18:30:45Z arthur $ | |
36 | + $Id: TTCEMGConsideracaoArquivoDescricao.class.php 62857 2015-06-30 13:53:56Z franver $ | |
37 | 37 | */ |
38 | 38 | |
39 | 39 | include_once '../../../../../../gestaoAdministrativa/fontes/PHP/framework/include/valida.inc.php'; |
... | ... | @@ -47,13 +47,14 @@ class TTCEMGConsideracaoArquivoDescricao extends Persistente |
47 | 47 | $this->setTabela("tcemg.consideracao_arquivo_descricao"); |
48 | 48 | |
49 | 49 | $this->setCampoCod('cod_arquivo'); |
50 | - $this->setComplementoChave('periodo,cod_entidade,exercicio'); | |
50 | + $this->setComplementoChave('periodo,cod_entidade,exercicio,modulo_sicom'); | |
51 | 51 | |
52 | - $this->AddCampo('cod_arquivo' ,'integer' ,true,'' ,true ,true); | |
53 | - $this->AddCampo('periodo' ,'integer' ,true,'' ,false,false); | |
54 | - $this->AddCampo('cod_entidade','integer' ,true,'' ,false,false); | |
55 | - $this->AddCampo('exercicio' ,'char' ,true,'' ,false,false); | |
56 | - $this->AddCampo('descricao' ,'varchar' ,false,'"300"',false,false); | |
52 | + $this->AddCampo('cod_arquivo' ,'integer' , true,'' , true ,true); | |
53 | + $this->AddCampo('periodo' ,'integer' , true,'' ,false,false); | |
54 | + $this->AddCampo('cod_entidade','integer' , true,'' ,false,false); | |
55 | + $this->AddCampo('exercicio' ,'char' , true,'' ,false,false); | |
56 | + $this->AddCampo('descricao' ,'varchar' ,false,'"300"',false,false); | |
57 | + $this->AddCampo('modulo_sicom','varchar' , true,'10' ,true,false); | |
57 | 58 | } |
58 | 59 | |
59 | 60 | public function recuperaDescricaoArquivos(&$rsRecordSet, $stFiltro, $boTransacao = "") |
... | ... | @@ -98,49 +99,58 @@ class TTCEMGConsideracaoArquivoDescricao extends Persistente |
98 | 99 | |
99 | 100 | public function montaInsereNovosArquivosPeriodo() |
100 | 101 | { |
101 | - $stSql = " | |
102 | - INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (01,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '' ); | |
103 | - INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (02,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '' ); | |
104 | - INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (03,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '' ); | |
105 | - INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (04,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '' ); | |
106 | - INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (05,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '' ); | |
107 | - INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (06,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '' ); | |
108 | - INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (07,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '' ); | |
109 | - INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (08,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '' ); | |
110 | - INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (09,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '' ); | |
111 | - INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (10,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '' ); | |
112 | - INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (11,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '' ); | |
113 | - INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (12,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '' ); | |
114 | - INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (13,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '' ); | |
115 | - INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (14,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '' ); | |
116 | - INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (15,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '' ); | |
117 | - INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (16,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '' ); | |
118 | - INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (17,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '' ); | |
119 | - INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (18,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '' ); | |
120 | - INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (19,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '' ); | |
121 | - INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (20,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '' ); | |
122 | - INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (21,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '' ); | |
123 | - INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (22,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '' ); | |
124 | - INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (23,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '' ); | |
125 | - INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (24,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '' ); | |
126 | - INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (25,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '' ); | |
127 | - INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (26,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '' ); | |
128 | - INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (27,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '' ); | |
129 | - INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (28,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '' ); | |
130 | - INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (29,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '' ); | |
131 | - INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (30,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '' ); | |
132 | - INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (31,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '' ); | |
133 | - INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (32,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '' ); | |
134 | - INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (33,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '' ); | |
135 | - INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (34,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '' ); | |
136 | - INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (35,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '' ); | |
137 | - INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (36,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '' ); | |
138 | - INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (37,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '' ); | |
139 | - INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (38,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '' ); | |
140 | - INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (39,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '' ); | |
141 | - INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (40,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '' ); | |
142 | - INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (41,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '' ); | |
143 | - "; | |
102 | + if ( $this->getDado('modulo_sicom') == 'mensal') { | |
103 | + $stSql = " | |
104 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (01,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
105 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (02,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
106 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (03,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
107 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (04,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
108 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (05,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
109 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (06,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
110 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (07,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
111 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (08,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
112 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (09,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
113 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (10,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
114 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (11,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
115 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (12,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
116 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (13,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
117 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (14,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
118 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (15,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
119 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (16,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
120 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (17,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
121 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (18,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
122 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (19,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
123 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (20,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
124 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (21,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
125 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (22,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
126 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (23,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
127 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (24,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
128 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (25,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
129 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (26,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
130 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (27,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
131 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (28,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
132 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (29,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
133 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (30,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
134 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (31,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
135 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (32,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
136 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (33,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
137 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (34,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
138 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (35,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
139 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (36,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
140 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (37,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
141 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (38,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
142 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (39,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
143 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (40,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
144 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (41,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
145 | + "; | |
146 | + } | |
147 | + if ( $this->getDado('modulo_sicom') == 'balancete') { | |
148 | + $stSql = " | |
149 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES ( 1,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
150 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (41,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
151 | + INSERT INTO tcemg.consideracao_arquivo_descricao VALUES (42,".$this->getDado('periodo').",".$this->getDado('cod_entidade').",".$this->getDado('exercicio').", '', '".$this->getDado('modulo_sicom')."' ); | |
152 | + "; | |
153 | + } | |
144 | 154 | |
145 | 155 | return $stSql; |
146 | 156 | } |
... | ... | @@ -149,7 +159,3 @@ class TTCEMGConsideracaoArquivoDescricao extends Persistente |
149 | 159 | |
150 | 160 | } |
151 | 161 | ?> |
152 | - | |
153 | - | |
154 | - | |
155 | - | ... | ... |
gestaoPrestacaoContas/fontes/PHP/TCEMG/instancias/configuracao/FMManterConsideracao.php
... | ... | @@ -31,7 +31,7 @@ |
31 | 31 | * @author Desenvolvedor: Lisiane Morais |
32 | 32 | * |
33 | 33 | * @ignore |
34 | - * $Id: FMManterConsideracao.php 59612 2014-09-02 12:00:51Z gelson $ | |
34 | + * $Id: FMManterConsideracao.php 62857 2015-06-30 13:53:56Z franver $ | |
35 | 35 | * $Date: $ |
36 | 36 | * $Author: $ |
37 | 37 | * $Rev: $ |
... | ... | @@ -89,6 +89,15 @@ $obITextBoxSelectEntidadeGeral->setNull(false); |
89 | 89 | $obITextBoxSelectEntidadeGeral->obSelect->obEvento->setOnChange(" limpaSpan();"); |
90 | 90 | $obITextBoxSelectEntidadeGeral->obTextBox->obEvento->setOnChange(" limpaSpan();"); |
91 | 91 | |
92 | +$obSlcTipoExportacao = new Select(); | |
93 | +$obSlcTipoExportacao->setRotulo("Módulo de exportação"); | |
94 | +$obSlcTipoExportacao->setId('stTipoExportacao'); | |
95 | +$obSlcTipoExportacao->setNull(false); | |
96 | +$obSlcTipoExportacao->setName('stTipoExportacao'); | |
97 | +$obSlcTipoExportacao->addOption('mensal','Acompanhamento Mesal'); | |
98 | +$obSlcTipoExportacao->addOption('balancete','Balancete Contabil'); | |
99 | +$obSlcTipoExportacao->obEvento->setOnChange(" document.getElementById('inMes').value = ''; "); | |
100 | + | |
92 | 101 | $obPeriodoMes = new Mes; |
93 | 102 | $obPeriodoMes->obMes->setId ('inMes'); |
94 | 103 | $obPeriodoMes->setExercicio ( Sessao::getExercicio() ); |
... | ... | @@ -104,6 +113,7 @@ $obFormulario->addTitulo ( "Considerações por arquivo" ); |
104 | 113 | $obFormulario->addHidden ( $obHdnCtrl ); |
105 | 114 | $obFormulario->addHidden ( $obHdnAcao ); |
106 | 115 | $obFormulario->addComponente ( $obITextBoxSelectEntidadeGeral ); |
116 | +$obFormulario->addComponente ( $obSlcTipoExportacao ); | |
107 | 117 | $obFormulario->addComponente ( $obPeriodoMes ); |
108 | 118 | $obFormulario->addSpan ( $obSpnCodigos); |
109 | 119 | ... | ... |
gestaoPrestacaoContas/fontes/PHP/TCEMG/instancias/configuracao/OCManterConsideracao.php
... | ... | @@ -30,7 +30,7 @@ |
30 | 30 | * @author Desenvolvedor: Evandro Melos |
31 | 31 | * |
32 | 32 | * @ignore |
33 | - * $Id: OCManterConsideracao.php 59612 2014-09-02 12:00:51Z gelson $ | |
33 | + * $Id: OCManterConsideracao.php 62857 2015-06-30 13:53:56Z franver $ | |
34 | 34 | * $Date: $ |
35 | 35 | * $Author: $ |
36 | 36 | * $Rev: $ |
... | ... | @@ -61,9 +61,11 @@ function montaSpanCodigos(){ |
61 | 61 | $inCodEntidade = $request->get('inCodEntidade'); |
62 | 62 | $inMes = $request->get('inMes'); |
63 | 63 | $stExercicio = Sessao::getExercicio(); |
64 | - | |
64 | + $stTipoExportacao = $request->get('stTipoExportacao'); | |
65 | + | |
65 | 66 | $stFiltro = " WHERE cod_entidade = ".$inCodEntidade; |
66 | 67 | $stFiltro .= " AND periodo = ".$inMes; |
68 | + $stFiltro .= " AND modulo_sicom = '".$stTipoExportacao."'"; | |
67 | 69 | $stFiltro .= " AND exercicio = '".$stExercicio."'"; |
68 | 70 | |
69 | 71 | //Lista de códigos cadastrados para cada entidade |
... | ... | @@ -73,7 +75,8 @@ function montaSpanCodigos(){ |
73 | 75 | //se não existir arquivos para aquela entidade naquele periodo e exercicio cria novos arquivos em branco |
74 | 76 | if ($rsConsideracao->getNumLinhas() < 1) { |
75 | 77 | $TTCEMGConsideracaoArquivoDescricao->setDado('cod_entidade',$inCodEntidade); |
76 | - $TTCEMGConsideracaoArquivoDescricao->setDado('periodo' ,$inMes); | |
78 | + $TTCEMGConsideracaoArquivoDescricao->setDado('periodo' ,$inMes ); | |
79 | + $TTCEMGConsideracaoArquivoDescricao->setDado('modulo_sicom', $stTipoExportacao ); | |
77 | 80 | $TTCEMGConsideracaoArquivoDescricao->setDado('exercicio' ,"'".$stExercicio."'"); |
78 | 81 | $TTCEMGConsideracaoArquivoDescricao->insereNovosArquivosPeriodo($boTransacao); |
79 | 82 | $TTCEMGConsideracaoArquivoDescricao->recuperaDescricaoArquivos($rsConsideracao, $stFiltro, $boTransacao); | ... | ... |
gestaoPrestacaoContas/fontes/PHP/TCEMG/instancias/configuracao/PRManterConsideracao.php
... | ... | @@ -33,7 +33,7 @@ |
33 | 33 | * @package URBEM |
34 | 34 | * @subpackage |
35 | 35 | |
36 | - $Id: PRManterConsideracao.php 59612 2014-09-02 12:00:51Z gelson $ | |
36 | + $Id: PRManterConsideracao.php 62857 2015-06-30 13:53:56Z franver $ | |
37 | 37 | */ |
38 | 38 | |
39 | 39 | include_once '../../../../../../gestaoAdministrativa/fontes/PHP/pacotes/FrameworkHTML.inc.php'; |
... | ... | @@ -60,9 +60,10 @@ switch ($stAcao) { |
60 | 60 | if ($arCodigo[0]=='stConsideracao') { |
61 | 61 | $stConsideracao = $_REQUEST['stConsideracao_'.$arCodigo[1]."_".$arCodigo[2]]; |
62 | 62 | $TTCEMGConsideracaoArquivoDescricao->setDado('cod_arquivo' , $arCodigo[1] ); |
63 | - $TTCEMGConsideracaoArquivoDescricao->setDado('periodo' , $request->get('inMes') ); | |
63 | + $TTCEMGConsideracaoArquivoDescricao->setDado('periodo' , (int)$request->get('inMes') ); | |
64 | 64 | $TTCEMGConsideracaoArquivoDescricao->setDado('cod_entidade', $request->get('inCodEntidade') ); |
65 | 65 | $TTCEMGConsideracaoArquivoDescricao->setDado('exercicio' , Sessao::getExercicio() ); |
66 | + $TTCEMGConsideracaoArquivoDescricao->setDado('modulo_sicom', $request->get('stTipoExportacao') ); | |
66 | 67 | $TTCEMGConsideracaoArquivoDescricao->setDado('descricao' , $stConsideracao ); |
67 | 68 | |
68 | 69 | $TTCEMGConsideracaoArquivoDescricao->recuperaPorChave($rsRecordSet); | ... | ... |
gestaoPrestacaoContas/fontes/PHP/TCEMG/instancias/layout_arquivos/acompanhamentoMesal/2014/CONSID.csv.inc.php
... | ... | @@ -31,10 +31,10 @@ |
31 | 31 | * @author Desenvolvedor: Franver Sarmento de Moraes |
32 | 32 | * |
33 | 33 | * @ignore |
34 | - * $Id: CONSID.csv.inc.php 62269 2015-04-15 18:28:39Z franver $ | |
35 | - * $Date: 2015-04-15 15:28:39 -0300 (Qua, 15 Abr 2015) $ | |
34 | + * $Id: CONSID.csv.inc.php 62857 2015-06-30 13:53:56Z franver $ | |
35 | + * $Date: 2015-06-30 10:53:56 -0300 (Ter, 30 Jun 2015) $ | |
36 | 36 | * $Author: franver $ |
37 | - * $Rev: 62269 $ | |
37 | + * $Rev: 62857 $ | |
38 | 38 | * |
39 | 39 | */ |
40 | 40 | /** |
... | ... | @@ -45,9 +45,10 @@ include_once CAM_GPC_TCEMG_MAPEAMENTO.Sessao::getExercicio()."/TTCEMGConsideraca |
45 | 45 | $rsRecuperaConsid10 = new RecordSet(); |
46 | 46 | |
47 | 47 | $obTTCEMGConsideracaoArquivo = new TTCEMGConsideracaoArquivo(); |
48 | -$obTTCEMGConsideracaoArquivo->setDado('exercicio', Sessao::getExercicio()); | |
49 | -$obTTCEMGConsideracaoArquivo->setDado('entidade' , $stEntidades); | |
50 | -$obTTCEMGConsideracaoArquivo->setDado('mes' , $stMes); | |
48 | +$obTTCEMGConsideracaoArquivo->setDado('exercicio' , Sessao::getExercicio()); | |
49 | +$obTTCEMGConsideracaoArquivo->setDado('entidade' , $stEntidades); | |
50 | +$obTTCEMGConsideracaoArquivo->setDado('mes' , $stMes); | |
51 | +$obTTCEMGConsideracaoArquivo->setDado('modulo_sicom','mensal'); | |
51 | 52 | |
52 | 53 | //10 – Considerações |
53 | 54 | $obTTCEMGConsideracaoArquivo->recuperaConsid($rsRecuperaConsid10); | ... | ... |
gestaoPrestacaoContas/fontes/PHP/TCEMG/instancias/layout_arquivos/acompanhamentoMesal/2015/CONSID.csv.inc.php
... | ... | @@ -31,10 +31,10 @@ |
31 | 31 | * @author Desenvolvedor: Franver Sarmento de Moraes |
32 | 32 | * |
33 | 33 | * @ignore |
34 | - * $Id: CONSID.csv.inc.php 62269 2015-04-15 18:28:39Z franver $ | |
35 | - * $Date: 2015-04-15 15:28:39 -0300 (Qua, 15 Abr 2015) $ | |
34 | + * $Id: CONSID.csv.inc.php 62857 2015-06-30 13:53:56Z franver $ | |
35 | + * $Date: 2015-06-30 10:53:56 -0300 (Ter, 30 Jun 2015) $ | |
36 | 36 | * $Author: franver $ |
37 | - * $Rev: 62269 $ | |
37 | + * $Rev: 62857 $ | |
38 | 38 | * |
39 | 39 | */ |
40 | 40 | /** |
... | ... | @@ -45,10 +45,10 @@ include_once CAM_GPC_TCEMG_MAPEAMENTO.Sessao::getExercicio()."/TTCEMGConsideraca |
45 | 45 | $rsRecuperaConsid10 = new RecordSet(); |
46 | 46 | |
47 | 47 | $obTTCEMGConsideracaoArquivo = new TTCEMGConsideracaoArquivo(); |
48 | -$obTTCEMGConsideracaoArquivo->setDado('exercicio', Sessao::getExercicio()); | |
49 | -$obTTCEMGConsideracaoArquivo->setDado('entidade' , $stEntidades); | |
50 | -$obTTCEMGConsideracaoArquivo->setDado('mes' , $stMes); | |
51 | - | |
48 | +$obTTCEMGConsideracaoArquivo->setDado('exercicio' , Sessao::getExercicio()); | |
49 | +$obTTCEMGConsideracaoArquivo->setDado('entidade' , $stEntidades); | |
50 | +$obTTCEMGConsideracaoArquivo->setDado('mes' , $stMes); | |
51 | +$obTTCEMGConsideracaoArquivo->setDado('modulo_sicom','mensal'); | |
52 | 52 | //10 – Considerações |
53 | 53 | $obTTCEMGConsideracaoArquivo->recuperaConsid($rsRecuperaConsid10); |
54 | 54 | ... | ... |
gestaoPrestacaoContas/fontes/PHP/TCMGO/classes/mapeamento/TTCMGOAberturaLicitacao.class.php
... | ... | @@ -271,26 +271,30 @@ class TTCMGOAberturaLicitacao extends Persistente |
271 | 271 | ) |
272 | 272 | |
273 | 273 | GROUP BY tipo_registro |
274 | - , cod_orgao | |
275 | - , cod_unidade | |
276 | - , num_processo_licitatorio | |
277 | - , licitacao.exercicio | |
278 | - , modalidade.cod_modalidade | |
279 | - , sw_processo.timestamp | |
280 | - , edital.dt_aprovacao_juridico | |
281 | - , edital.num_edital | |
282 | - , edital.exercicio | |
283 | - , criterio_julgamento.cod_criterio | |
284 | - , tipo_objeto.cod_tipo_objeto | |
285 | - , objeto.descricao | |
286 | - , mapa.cod_tipo_licitacao | |
287 | - , fornecedor.tipo | |
288 | - , contrato.inicio_execucao | |
289 | - , contrato.fim_execucao | |
290 | - , licitacao.cod_licitacao | |
291 | - , licitacao.cod_modalidade | |
292 | - , licitacao.cod_entidade | |
293 | - , convidados.nrm_convidado | |
274 | + , cod_orgao | |
275 | + , cod_unidade | |
276 | + , licitacao.exercicio | |
277 | + , num_processo_licitatorio | |
278 | + , cod_modalidade_licitacao | |
279 | + , num_modalidade | |
280 | + , natureza_procedimento | |
281 | + , dt_abertura | |
282 | + , dt_edital_convite | |
283 | + , dt_edital_publicacao_do | |
284 | + , dt_recebimento_doc | |
285 | + , tipo_licitacao | |
286 | + , natureza_objeto | |
287 | + , objeto | |
288 | + , regime_execucao_obras | |
289 | + , num_convidado | |
290 | + , clausula_prorrogacao | |
291 | + , undade_medida_prazo_execucao | |
292 | + , prazo_execucao | |
293 | + , forma_pagamento | |
294 | + , citerio_aceitabilidade | |
295 | + , desconto_tabela | |
296 | + , licitacao.cod_licitacao | |
297 | + , licitacao.cod_modalidade | |
294 | 298 | |
295 | 299 | ORDER BY licitacao.cod_licitacao |
296 | 300 | , licitacao.cod_modalidade |
... | ... | @@ -346,75 +350,75 @@ class TTCMGOAberturaLicitacao extends Persistente |
346 | 350 | |
347 | 351 | FROM licitacao.licitacao |
348 | 352 | |
349 | - JOIN licitacao.participante | |
353 | + INNER JOIN licitacao.participante | |
350 | 354 | ON participante.cod_licitacao = licitacao.cod_licitacao |
351 | 355 | AND participante.cod_modalidade = licitacao.cod_modalidade |
352 | 356 | AND participante.cod_entidade = licitacao.cod_entidade |
353 | 357 | AND participante.exercicio = licitacao.exercicio |
354 | 358 | |
355 | - JOIN compras.mapa | |
359 | + INNER JOIN compras.mapa | |
356 | 360 | ON mapa.exercicio = licitacao.exercicio_mapa |
357 | 361 | AND mapa.cod_mapa = licitacao.cod_mapa |
358 | 362 | |
359 | - JOIN compras.mapa_solicitacao | |
363 | + INNER JOIN compras.mapa_solicitacao | |
360 | 364 | ON mapa_solicitacao.exercicio = mapa.exercicio |
361 | 365 | AND mapa_solicitacao.cod_mapa = mapa.cod_mapa |
362 | 366 | |
363 | - JOIN compras.mapa_item | |
367 | + INNER JOIN compras.mapa_item | |
364 | 368 | ON mapa_item.exercicio = mapa_solicitacao.exercicio |
365 | 369 | AND mapa_item.cod_entidade = mapa_solicitacao.cod_entidade |
366 | 370 | AND mapa_item.cod_solicitacao = mapa_solicitacao.cod_solicitacao |
367 | 371 | AND mapa_item.cod_mapa = mapa_solicitacao.cod_mapa |
368 | 372 | AND mapa_item.exercicio_solicitacao = mapa_solicitacao.exercicio_solicitacao |
369 | 373 | |
370 | - JOIN compras.solicitacao_item | |
374 | + INNER JOIN compras.solicitacao_item | |
371 | 375 | ON solicitacao_item.exercicio = mapa_item.exercicio_solicitacao |
372 | 376 | AND solicitacao_item.cod_entidade = mapa_item.cod_entidade |
373 | 377 | AND solicitacao_item.cod_solicitacao = mapa_item.cod_solicitacao |
374 | 378 | AND solicitacao_item.cod_centro = mapa_item.cod_centro |
375 | 379 | AND solicitacao_item.cod_item = mapa_item.cod_item |
376 | 380 | |
377 | - JOIN compras.solicitacao_item_dotacao | |
381 | + INNER JOIN compras.solicitacao_item_dotacao | |
378 | 382 | ON solicitacao_item_dotacao.exercicio = solicitacao_item.exercicio |
379 | 383 | AND solicitacao_item_dotacao.cod_entidade = solicitacao_item.cod_entidade |
380 | 384 | AND solicitacao_item_dotacao.cod_solicitacao = solicitacao_item.cod_solicitacao |
381 | 385 | AND solicitacao_item_dotacao.cod_centro = solicitacao_item.cod_centro |
382 | 386 | AND solicitacao_item_dotacao.cod_item = solicitacao_item.cod_item |
383 | 387 | |
384 | - JOIN orcamento.despesa | |
388 | + INNER JOIN orcamento.despesa | |
385 | 389 | ON despesa.exercicio = solicitacao_item_dotacao.exercicio |
386 | 390 | AND despesa.cod_despesa = solicitacao_item_dotacao.cod_despesa |
387 | 391 | |
388 | - JOIN compras.mapa_cotacao | |
392 | + INNER JOIN compras.mapa_cotacao | |
389 | 393 | ON mapa_cotacao.exercicio_mapa = mapa.exercicio |
390 | 394 | AND mapa_cotacao.cod_mapa = mapa.cod_mapa |
391 | 395 | |
392 | - JOIN compras.cotacao | |
396 | + INNER JOIN compras.cotacao | |
393 | 397 | ON cotacao.exercicio = mapa_cotacao.exercicio_cotacao |
394 | 398 | AND cotacao.cod_cotacao = mapa_cotacao.cod_cotacao |
395 | 399 | |
396 | - JOIN compras.cotacao_item | |
400 | + INNER JOIN compras.cotacao_item | |
397 | 401 | ON cotacao_item.exercicio = cotacao.exercicio |
398 | 402 | AND cotacao_item.cod_cotacao = cotacao.cod_cotacao |
399 | 403 | AND cotacao_item.cod_item = mapa_item.cod_item |
400 | 404 | |
401 | - JOIN almoxarifado.catalogo_item | |
405 | + INNER JOIN almoxarifado.catalogo_item | |
402 | 406 | ON catalogo_item.cod_item = cotacao_item.cod_item |
403 | 407 | |
404 | - JOIN administracao.unidade_medida | |
408 | + INNER JOIN administracao.unidade_medida | |
405 | 409 | ON unidade_medida.cod_grandeza = catalogo_item.cod_grandeza |
406 | 410 | AND unidade_medida.cod_unidade = catalogo_item.cod_unidade |
407 | 411 | |
408 | - JOIN compras.julgamento | |
412 | + INNER JOIN compras.julgamento | |
409 | 413 | ON julgamento.exercicio = cotacao.exercicio |
410 | 414 | AND julgamento.cod_cotacao = cotacao.cod_cotacao |
411 | 415 | |
412 | - JOIN compras.julgamento_item | |
416 | + INNER JOIN compras.julgamento_item | |
413 | 417 | ON julgamento_item.exercicio = julgamento.exercicio |
414 | 418 | AND julgamento_item.cod_cotacao = julgamento.cod_cotacao |
415 | 419 | AND julgamento_item.cod_item = mapa_item.cod_item |
416 | 420 | |
417 | - JOIN licitacao.homologacao | |
421 | + INNER JOIN licitacao.homologacao | |
418 | 422 | ON homologacao.cod_licitacao = licitacao.cod_licitacao |
419 | 423 | AND homologacao.cod_modalidade = licitacao.cod_modalidade |
420 | 424 | AND homologacao.cod_entidade = licitacao.cod_entidade |
... | ... | @@ -432,10 +436,10 @@ class TTCMGOAberturaLicitacao extends Persistente |
432 | 436 | AND homologacao.lote = homologacao_anulada.lote |
433 | 437 | ) IS NULL |
434 | 438 | |
435 | - JOIN sw_cgm AS responsavel | |
439 | + INNER JOIN sw_cgm AS responsavel | |
436 | 440 | ON responsavel.numcgm = participante.numcgm_representante |
437 | 441 | |
438 | - JOIN ( SELECT num_documento, numcgm, tipo_documento | |
442 | + INNER JOIN ( SELECT num_documento, numcgm, tipo_documento | |
439 | 443 | FROM ( |
440 | 444 | SELECT cpf AS num_documento |
441 | 445 | , numcgm |
... | ... | @@ -484,8 +488,7 @@ class TTCMGOAberturaLicitacao extends Persistente |
484 | 488 | |
485 | 489 | public function montaRecuperaExportacao12() |
486 | 490 | { |
487 | - $stSql = " | |
488 | - SELECT 12 AS tipo_registro | |
491 | + $stSql = " SELECT 12 AS tipo_registro | |
489 | 492 | , LPAD(''||despesa.num_orgao,2, '0') AS cod_orgao |
490 | 493 | , LPAD(''||despesa.num_unidade,2, '0') AS cod_unidade |
491 | 494 | , licitacao.exercicio AS exercicio_licitacao |
... | ... | @@ -493,79 +496,80 @@ class TTCMGOAberturaLicitacao extends Persistente |
493 | 496 | , mapa_item.lote AS num_lote |
494 | 497 | , mapa_item.cod_item AS num_item |
495 | 498 | , remove_acentos(REPLACE(REPLACE(catalogo_item.descricao,Chr('216'),'diametro'),Chr('8221'),'\"'))::VARCHAR(250) AS descricao_item |
499 | + , despesa.cod_despesa as elemento_despesa | |
496 | 500 | , (mapa_item.vl_total / mapa_item.quantidade)::numeric(14,2) AS vl_item |
497 | - | |
501 | + | |
498 | 502 | FROM licitacao.licitacao |
499 | 503 | |
500 | - JOIN licitacao.participante | |
504 | + INNER JOIN licitacao.participante | |
501 | 505 | ON participante.cod_licitacao = licitacao.cod_licitacao |
502 | 506 | AND participante.cod_modalidade = licitacao.cod_modalidade |
503 | 507 | AND participante.cod_entidade = licitacao.cod_entidade |
504 | 508 | AND participante.exercicio = licitacao.exercicio |
505 | 509 | |
506 | - JOIN compras.mapa | |
510 | + INNER JOIN compras.mapa | |
507 | 511 | ON mapa.exercicio = licitacao.exercicio_mapa |
508 | 512 | AND mapa.cod_mapa = licitacao.cod_mapa |
509 | 513 | |
510 | - JOIN compras.mapa_solicitacao | |
514 | + INNER JOIN compras.mapa_solicitacao | |
511 | 515 | ON mapa_solicitacao.exercicio = mapa.exercicio |
512 | 516 | AND mapa_solicitacao.cod_mapa = mapa.cod_mapa |
513 | 517 | |
514 | - JOIN compras.mapa_item | |
518 | + INNER JOIN compras.mapa_item | |
515 | 519 | ON mapa_item.exercicio = mapa_solicitacao.exercicio |
516 | 520 | AND mapa_item.cod_entidade = mapa_solicitacao.cod_entidade |
517 | 521 | AND mapa_item.cod_solicitacao = mapa_solicitacao.cod_solicitacao |
518 | 522 | AND mapa_item.cod_mapa = mapa_solicitacao.cod_mapa |
519 | 523 | AND mapa_item.exercicio_solicitacao = mapa_solicitacao.exercicio_solicitacao |
520 | 524 | |
521 | - JOIN compras.solicitacao_item | |
525 | + INNER JOIN compras.solicitacao_item | |
522 | 526 | ON solicitacao_item.exercicio = mapa_item.exercicio_solicitacao |
523 | 527 | AND solicitacao_item.cod_entidade = mapa_item.cod_entidade |
524 | 528 | AND solicitacao_item.cod_solicitacao = mapa_item.cod_solicitacao |
525 | 529 | AND solicitacao_item.cod_centro = mapa_item.cod_centro |
526 | 530 | AND solicitacao_item.cod_item = mapa_item.cod_item |
527 | 531 | |
528 | - JOIN compras.solicitacao_item_dotacao | |
532 | + INNER JOIN compras.solicitacao_item_dotacao | |
529 | 533 | ON solicitacao_item_dotacao.exercicio = solicitacao_item.exercicio |
530 | 534 | AND solicitacao_item_dotacao.cod_entidade = solicitacao_item.cod_entidade |
531 | 535 | AND solicitacao_item_dotacao.cod_solicitacao = solicitacao_item.cod_solicitacao |
532 | 536 | AND solicitacao_item_dotacao.cod_centro = solicitacao_item.cod_centro |
533 | 537 | AND solicitacao_item_dotacao.cod_item = solicitacao_item.cod_item |
534 | 538 | |
535 | - JOIN orcamento.despesa | |
539 | + INNER JOIN orcamento.despesa | |
536 | 540 | ON despesa.exercicio = solicitacao_item_dotacao.exercicio |
537 | 541 | AND despesa.cod_despesa = solicitacao_item_dotacao.cod_despesa |
538 | 542 | |
539 | - JOIN compras.mapa_cotacao | |
543 | + INNER JOIN compras.mapa_cotacao | |
540 | 544 | ON mapa_cotacao.exercicio_mapa = mapa.exercicio |
541 | 545 | AND mapa_cotacao.cod_mapa = mapa.cod_mapa |
542 | 546 | |
543 | - JOIN compras.cotacao | |
547 | + INNER JOIN compras.cotacao | |
544 | 548 | ON cotacao.exercicio = mapa_cotacao.exercicio_cotacao |
545 | 549 | AND cotacao.cod_cotacao = mapa_cotacao.cod_cotacao |
546 | 550 | |
547 | - JOIN compras.cotacao_item | |
551 | + INNER JOIN compras.cotacao_item | |
548 | 552 | ON cotacao_item.exercicio = cotacao.exercicio |
549 | 553 | AND cotacao_item.cod_cotacao = cotacao.cod_cotacao |
550 | 554 | AND cotacao_item.cod_item = mapa_item.cod_item |
551 | 555 | |
552 | - JOIN almoxarifado.catalogo_item | |
556 | + INNER JOIN almoxarifado.catalogo_item | |
553 | 557 | ON catalogo_item.cod_item = cotacao_item.cod_item |
554 | 558 | |
555 | - JOIN administracao.unidade_medida | |
559 | + INNER JOIN administracao.unidade_medida | |
556 | 560 | ON unidade_medida.cod_grandeza = catalogo_item.cod_grandeza |
557 | 561 | AND unidade_medida.cod_unidade = catalogo_item.cod_unidade |
558 | 562 | |
559 | - JOIN compras.julgamento | |
563 | + INNER JOIN compras.julgamento | |
560 | 564 | ON julgamento.exercicio = cotacao.exercicio |
561 | 565 | AND julgamento.cod_cotacao = cotacao.cod_cotacao |
562 | 566 | |
563 | - JOIN compras.julgamento_item | |
567 | + INNER JOIN compras.julgamento_item | |
564 | 568 | ON julgamento_item.exercicio = julgamento.exercicio |
565 | 569 | AND julgamento_item.cod_cotacao = julgamento.cod_cotacao |
566 | 570 | AND julgamento_item.cod_item = mapa_item.cod_item |
567 | 571 | |
568 | - JOIN licitacao.homologacao | |
572 | + INNER JOIN licitacao.homologacao | |
569 | 573 | ON homologacao.cod_licitacao = licitacao.cod_licitacao |
570 | 574 | AND homologacao.cod_modalidade = licitacao.cod_modalidade |
571 | 575 | AND homologacao.cod_entidade = licitacao.cod_entidade |
... | ... | @@ -583,10 +587,10 @@ class TTCMGOAberturaLicitacao extends Persistente |
583 | 587 | AND homologacao.lote = homologacao_anulada.lote |
584 | 588 | ) IS NULL |
585 | 589 | |
586 | - JOIN sw_cgm AS responsavel | |
590 | + INNER JOIN sw_cgm AS responsavel | |
587 | 591 | ON responsavel.numcgm = participante.numcgm_representante |
588 | 592 | |
589 | - JOIN ( SELECT num_documento, numcgm, tipo_documento | |
593 | + INNER JOIN ( SELECT num_documento, numcgm, tipo_documento | |
590 | 594 | FROM ( |
591 | 595 | SELECT cpf AS num_documento |
592 | 596 | , numcgm |
... | ... | @@ -617,7 +621,7 @@ class TTCMGOAberturaLicitacao extends Persistente |
617 | 621 | AND licitacao_anulada.exercicio = licitacao.exercicio |
618 | 622 | ) |
619 | 623 | |
620 | - GROUP BY 1,2,3,4,5,6,7,8,9 | |
624 | + GROUP BY 1,2,3,4,5,6,7,8,9,10 | |
621 | 625 | ORDER BY num_processo_licitatorio "; |
622 | 626 | |
623 | 627 | return $stSql; |
... | ... | @@ -650,6 +654,8 @@ class TTCMGOAberturaLicitacao extends Persistente |
650 | 654 | , despesa.cod_despesa AS elemento_despesa |
651 | 655 | , orcamento.recuperaEstruturalDespesa(despesa.cod_conta, despesa.exercicio, 2, TRUE, FALSE) AS subelemento |
652 | 656 | , recurso.cod_fonte AS cod_fonte_recursos |
657 | + , mapa_item_dotacao.cod_item as num_item | |
658 | + , mapa_item_dotacao.lote AS num_lote | |
653 | 659 | , SUM(mapa_item_dotacao.vl_dotacao)::numeric(14,2) AS vl_recurso |
654 | 660 | |
655 | 661 | FROM licitacao.licitacao |
... | ... | @@ -809,6 +815,8 @@ class TTCMGOAberturaLicitacao extends Persistente |
809 | 815 | , despesa.cod_despesa |
810 | 816 | , subelemento |
811 | 817 | , recurso.cod_fonte |
818 | + , num_item | |
819 | + , num_lote | |
812 | 820 | |
813 | 821 | ORDER BY num_processo_licitatorio |
814 | 822 | , cod_unidade "; | ... | ... |
gestaoPrestacaoContas/fontes/PHP/TCMGO/classes/mapeamento/TTCMGOAtivoPermanenteCreditos.class.php
... | ... | @@ -33,7 +33,7 @@ |
33 | 33 | * @package URBEM |
34 | 34 | * @subpackage Mapeamento |
35 | 35 | |
36 | - $Id: TTCMGOAtivoPermanenteCreditos.class.php 62759 2015-06-16 18:00:15Z jean $ | |
36 | + $Id: TTCMGOAtivoPermanenteCreditos.class.php 62845 2015-06-29 13:16:59Z jean $ | |
37 | 37 | |
38 | 38 | * Casos de uso: uc-06.04.00 |
39 | 39 | */ |
... | ... | @@ -74,22 +74,22 @@ class TTCMGOAtivoPermanenteCreditos extends TContabilidadeBalancoFinanceiro |
74 | 74 | ,* |
75 | 75 | FROM |
76 | 76 | tcmgo.ativo_permanente_creditos ( '" .$this->getDado( 'exercicio' ) . "'::VARCHAR |
77 | - , ' cod_entidade IN ( " . $this->getDado ( 'stEntidades' ) ." ) and cod_estrutural like ''1.2%'' '::VARCHAR | |
77 | + , ' cod_estrutural ilike ''1.2%'' '::VARCHAR | |
78 | 78 | ,'".$stDataIni."'::VARCHAR |
79 | 79 | ,'".$stDataFim."'::VARCHAR |
80 | 80 | ,'".$this->getDado ( 'stEntidades' )."'::VARCHAR |
81 | 81 | ) |
82 | 82 | as retorno ( cod_estrutural varchar |
83 | - ,nivel integer | |
84 | - ,nom_conta varchar | |
85 | - ,num_orgao VARCHAR | |
86 | - ,cod_unidade VARCHAR | |
87 | - ,vl_saldo_anterior numeric | |
88 | - ,vl_saldo_debitos numeric | |
89 | - ,vl_saldo_creditos numeric | |
90 | - ,vl_saldo_atual numeric | |
91 | - ,nom_sistema varchar | |
92 | - ,tipo_lancamento integer | |
83 | + ,nivel INTEGER | |
84 | + ,nom_conta VARCHAR | |
85 | + ,num_orgao INTEGER | |
86 | + ,cod_unidade INTEGER | |
87 | + ,vl_saldo_anterior NUMERIC | |
88 | + ,vl_saldo_debitos NUMERIC | |
89 | + ,vl_saldo_creditos NUMERIC | |
90 | + ,vl_saldo_atual NUMERIC | |
91 | + ,nom_sistema VARCHAR | |
92 | + ,tipo_lancamento INTEGER | |
93 | 93 | ) |
94 | 94 | where vl_saldo_anterior <> 0 |
95 | 95 | or vl_saldo_debitos <> 0 | ... | ... |
gestaoPrestacaoContas/fontes/PHP/TCMGO/instancias/exportacao/ABL.inc.php
... | ... | @@ -33,10 +33,10 @@ |
33 | 33 | * @author Desenvolvedor: Franver Sarmento de Moraes |
34 | 34 | |
35 | 35 | * @ignore |
36 | - * $Id: ABL.inc.php 62729 2015-06-12 14:33:19Z jean $ | |
37 | - * $Rev: 62729 $ | |
38 | - * $Author: jean $ | |
39 | - * $Date: 2015-06-12 11:33:19 -0300 (Sex, 12 Jun 2015) $ | |
36 | + * $Id: ABL.inc.php 62848 2015-06-29 16:28:40Z evandro $ | |
37 | + * $Rev: 62848 $ | |
38 | + * $Author: evandro $ | |
39 | + * $Date: 2015-06-29 13:28:40 -0300 (Seg, 29 Jun 2015) $ | |
40 | 40 | |
41 | 41 | */ |
42 | 42 | |
... | ... | @@ -242,154 +242,154 @@ if ( count($rsRecordSetABL10->getElementos()) > 0) { |
242 | 242 | $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("nro_sequencial"); |
243 | 243 | $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("NUMERICO_ZEROS_ESQ"); |
244 | 244 | $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(6); |
245 | - } | |
246 | - } | |
247 | 245 | |
248 | - $stChave12 = ''; | |
249 | - foreach ($rsRecordSetABL12->getElementos() as $arABL12) { | |
250 | - //$inCount++; | |
251 | - //$stChave12 = $arABL12['cod_orgao'].$arABL12['cod_unidade'].$arABL12['exercicio_licitacao'].$arABL12['num_processo_licitatorio'].$arABL12['num_lote'].$arABL12['num_item']; | |
252 | - $stChave12 = $arABL12['cod_orgao'].$arABL12['cod_unidade'].$arABL12['exercicio_licitacao'].$arABL12['num_processo_licitatorio']; | |
253 | - | |
254 | - if ($stChave11 == $arABL12['cod_orgao'].$arABL12['cod_unidade'].$arABL12['exercicio_licitacao'].$arABL12['num_processo_licitatorio'].$arABL12['num_lote'].$arABL12['num_item']){ | |
255 | - | |
256 | - $arABL12['nro_sequencial'] = ++$inCount; | |
257 | - | |
258 | - $rsBloco = 'rsBloco_'.$inCount; | |
259 | - unset($$rsBloco); | |
260 | - $$rsBloco = new RecordSet(); | |
261 | - $$rsBloco->preenche(array($arABL12)); | |
262 | - | |
263 | - $obExportador->roUltimoArquivo->addBloco( $$rsBloco ); | |
264 | - $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("tipo_registro"); | |
265 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("NUMERICO_ZEROS_ESQ"); | |
266 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(2); | |
267 | - | |
268 | - $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("cod_orgao"); | |
269 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("CARACTER_ESPACOS_DIR"); | |
270 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(2); | |
271 | - | |
272 | - $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("cod_unidade"); | |
273 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("CARACTER_ESPACOS_DIR"); | |
274 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(2); | |
275 | - | |
276 | - $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("exercicio_licitacao"); | |
277 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("NUMERICO_ZEROS_ESQ"); | |
278 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(4); | |
279 | - | |
280 | - $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("num_processo_licitatorio"); | |
281 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("CARACTER_ESPACOS_DIR"); | |
282 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(12); | |
283 | - | |
284 | - $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("num_lote"); | |
285 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("NUMERICO_ZEROS_ESQ"); | |
286 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(4); | |
287 | - | |
288 | - $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("num_item"); | |
289 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("NUMERICO_ZEROS_ESQ"); | |
290 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(4); | |
291 | - | |
292 | - $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("descricao_item"); | |
293 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("CARACTER_ESPACOS_DIR"); | |
294 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(250); | |
295 | - | |
296 | - $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("vl_item"); | |
297 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("NUMERICO_ZEROS_ESQ"); | |
298 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(13); | |
299 | - | |
300 | - $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("brancos"); | |
301 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("CARACTER_ESPACOS_DIR"); | |
302 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(735); | |
303 | - | |
304 | - $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("nro_sequencial"); | |
305 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("NUMERICO_ZEROS_ESQ"); | |
306 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(6); | |
246 | + $stChave12 = ''; | |
247 | + foreach ($rsRecordSetABL12->getElementos() as $arABL12) { | |
248 | + //$inCount++; | |
249 | + //$stChave12 = $arABL12['cod_orgao'].$arABL12['cod_unidade'].$arABL12['exercicio_licitacao'].$arABL12['num_processo_licitatorio'].$arABL12['num_lote'].$arABL12['num_item']; | |
250 | + $stChave12 = $arABL12['cod_orgao'].$arABL12['cod_unidade'].$arABL12['exercicio_licitacao'].$arABL12['num_processo_licitatorio'].$arABL12['num_lote'].$arABL12['num_item'].$arABL12['elemento_despesa']; | |
251 | + | |
252 | + if ($stChave11 == $arABL12['cod_orgao'].$arABL12['cod_unidade'].$arABL12['exercicio_licitacao'].$arABL12['num_processo_licitatorio'].$arABL12['num_lote'].$arABL12['num_item']){ | |
253 | + | |
254 | + $arABL12['nro_sequencial'] = ++$inCount; | |
255 | + | |
256 | + $rsBloco = 'rsBloco_'.$inCount; | |
257 | + unset($$rsBloco); | |
258 | + $$rsBloco = new RecordSet(); | |
259 | + $$rsBloco->preenche(array($arABL12)); | |
260 | + | |
261 | + $obExportador->roUltimoArquivo->addBloco( $$rsBloco ); | |
262 | + $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("tipo_registro"); | |
263 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("NUMERICO_ZEROS_ESQ"); | |
264 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(2); | |
265 | + | |
266 | + $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("cod_orgao"); | |
267 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("CARACTER_ESPACOS_DIR"); | |
268 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(2); | |
269 | + | |
270 | + $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("cod_unidade"); | |
271 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("CARACTER_ESPACOS_DIR"); | |
272 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(2); | |
273 | + | |
274 | + $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("exercicio_licitacao"); | |
275 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("NUMERICO_ZEROS_ESQ"); | |
276 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(4); | |
277 | + | |
278 | + $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("num_processo_licitatorio"); | |
279 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("CARACTER_ESPACOS_DIR"); | |
280 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(12); | |
281 | + | |
282 | + $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("num_lote"); | |
283 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("NUMERICO_ZEROS_ESQ"); | |
284 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(4); | |
285 | + | |
286 | + $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("num_item"); | |
287 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("NUMERICO_ZEROS_ESQ"); | |
288 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(4); | |
289 | + | |
290 | + $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("descricao_item"); | |
291 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("CARACTER_ESPACOS_DIR"); | |
292 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(250); | |
293 | + | |
294 | + $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("vl_item"); | |
295 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("NUMERICO_ZEROS_ESQ"); | |
296 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(13); | |
297 | + | |
298 | + $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("brancos"); | |
299 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("CARACTER_ESPACOS_DIR"); | |
300 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(735); | |
301 | + | |
302 | + $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("nro_sequencial"); | |
303 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("NUMERICO_ZEROS_ESQ"); | |
304 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(6); | |
307 | 305 | |
308 | - } | |
309 | - } | |
310 | 306 | |
311 | - $stChave13 = ''; | |
312 | - foreach ($rsRecordSetABL13->getElementos() as $arABL13) { | |
313 | - //$inCount++; | |
314 | - //$stChave13 = $arABL13['cod_orgao'].$arABL13['cod_unidade'].$arABL13['exercicio_licitacao'].$arABL13['num_processo_licitatorio'].$arABL12['num_lote'].$arABL12['num_item']; | |
315 | - | |
316 | - if ($stChave12 == $arABL13['cod_orgao'].$arABL13['cod_unidade'].$arABL13['exercicio_licitacao'].$arABL13['num_processo_licitatorio']){ | |
317 | - | |
318 | - $arABL13['nro_sequencial'] = ++$inCount; | |
319 | - | |
320 | - $rsBloco = 'rsBloco_'.$inCount; | |
321 | - unset($$rsBloco); | |
322 | - $$rsBloco = new RecordSet(); | |
323 | - $$rsBloco->preenche(array($arABL13)); | |
324 | - | |
325 | - $obExportador->roUltimoArquivo->addBloco( $$rsBloco ); | |
326 | - $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("tipo_registro"); | |
327 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("NUMERICO_ZEROS_ESQ"); | |
328 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(2); | |
329 | - | |
330 | - $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("cod_orgao"); | |
331 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("CARACTER_ESPACOS_DIR"); | |
332 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(2); | |
333 | - | |
334 | - $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("cod_unidade"); | |
335 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("CARACTER_ESPACOS_DIR"); | |
336 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(2); | |
337 | - | |
338 | - $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("exercicio_licitacao"); | |
339 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("NUMERICO_ZEROS_ESQ"); | |
340 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(4); | |
341 | - | |
342 | - $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("num_processo_licitatorio"); | |
343 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("CARACTER_ESPACOS_DIR"); | |
344 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(12); | |
345 | - | |
346 | - $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("cod_funcao"); | |
347 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("NUMERICO_ZEROS_ESQ"); | |
348 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(2); | |
349 | - | |
350 | - $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("cod_subfuncao"); | |
351 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("NUMERICO_ZEROS_ESQ"); | |
352 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(3); | |
353 | - | |
354 | - $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("cod_programa"); | |
355 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("NUMERICO_ZEROS_ESQ"); | |
356 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(4); | |
357 | - | |
358 | - $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("natureza_acao"); | |
359 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("NUMERICO_ZEROS_ESQ"); | |
360 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(1); | |
361 | - | |
362 | - $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("num_proj_atividade"); | |
363 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("NUMERICO_ZEROS_ESQ"); | |
364 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(3); | |
365 | - | |
366 | - $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("elemento_despesa"); | |
367 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("NUMERICO_ZEROS_ESQ"); | |
368 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(6); | |
369 | - | |
370 | - $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("subelemento"); | |
371 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("NUMERICO_ZEROS_ESQ"); | |
372 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(2); | |
373 | - | |
374 | - $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("cod_fonte_recurso"); | |
375 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("NUMERICO_ZEROS_ESQ"); | |
376 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(6); | |
377 | - | |
378 | - $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("vl_recurso"); | |
379 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("VALOR_ZEROS_ESQ"); | |
380 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(13); | |
381 | - | |
382 | - $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("brancos"); | |
383 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("CARACTER_ESPACOS_DIR"); | |
384 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(966); | |
385 | - | |
386 | - $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("nro_sequencial"); | |
387 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("NUMERICO_ZEROS_ESQ"); | |
388 | - $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(6); | |
389 | - } | |
390 | - } | |
391 | - } | |
392 | -} | |
307 | + $stChave13 = ''; | |
308 | + foreach ($rsRecordSetABL13->getElementos() as $arABL13) { | |
309 | + //$inCount++; | |
310 | + $stChave13 = $arABL13['cod_orgao'].$arABL13['cod_unidade'].$arABL13['exercicio_licitacao'].$arABL13['num_processo_licitatorio'].$arABL13['num_lote'].$arABL13['num_item'].$arABL13['elemento_despesa']; | |
311 | + | |
312 | + if ($stChave12 == $stChave13){ | |
313 | + | |
314 | + $arABL13['nro_sequencial'] = ++$inCount; | |
315 | + | |
316 | + $rsBloco = 'rsBloco_'.$inCount; | |
317 | + unset($$rsBloco); | |
318 | + $$rsBloco = new RecordSet(); | |
319 | + $$rsBloco->preenche(array($arABL13)); | |
320 | + | |
321 | + $obExportador->roUltimoArquivo->addBloco( $$rsBloco ); | |
322 | + $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("tipo_registro"); | |
323 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("NUMERICO_ZEROS_ESQ"); | |
324 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(2); | |
325 | + | |
326 | + $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("cod_orgao"); | |
327 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("CARACTER_ESPACOS_DIR"); | |
328 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(2); | |
329 | + | |
330 | + $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("cod_unidade"); | |
331 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("CARACTER_ESPACOS_DIR"); | |
332 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(2); | |
333 | + | |
334 | + $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("exercicio_licitacao"); | |
335 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("NUMERICO_ZEROS_ESQ"); | |
336 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(4); | |
337 | + | |
338 | + $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("num_processo_licitatorio"); | |
339 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("CARACTER_ESPACOS_DIR"); | |
340 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(12); | |
341 | + | |
342 | + $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("cod_funcao"); | |
343 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("NUMERICO_ZEROS_ESQ"); | |
344 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(2); | |
345 | + | |
346 | + $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("cod_subfuncao"); | |
347 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("NUMERICO_ZEROS_ESQ"); | |
348 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(3); | |
349 | + | |
350 | + $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("cod_programa"); | |
351 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("NUMERICO_ZEROS_ESQ"); | |
352 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(4); | |
353 | + | |
354 | + $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("natureza_acao"); | |
355 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("NUMERICO_ZEROS_ESQ"); | |
356 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(1); | |
357 | + | |
358 | + $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("num_proj_atividade"); | |
359 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("NUMERICO_ZEROS_ESQ"); | |
360 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(3); | |
361 | + | |
362 | + $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("elemento_despesa"); | |
363 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("NUMERICO_ZEROS_ESQ"); | |
364 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(6); | |
365 | + | |
366 | + $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("subelemento"); | |
367 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("NUMERICO_ZEROS_ESQ"); | |
368 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(2); | |
369 | + | |
370 | + $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("cod_fonte_recurso"); | |
371 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("NUMERICO_ZEROS_ESQ"); | |
372 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(6); | |
373 | + | |
374 | + $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("vl_recurso"); | |
375 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("VALOR_ZEROS_ESQ"); | |
376 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(13); | |
377 | + | |
378 | + $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("brancos"); | |
379 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("CARACTER_ESPACOS_DIR"); | |
380 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(966); | |
381 | + | |
382 | + $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("nro_sequencial"); | |
383 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTipoDado("NUMERICO_ZEROS_ESQ"); | |
384 | + $obExportador->roUltimoArquivo->roUltimoBloco->roUltimaColuna->setTamanhoFixo(6); | |
385 | + }//if registro 13 | |
386 | + }//foreach registro 13 | |
387 | + }//if registro 12 | |
388 | + }//foreach registro 12 | |
389 | + }//if registro 11 | |
390 | + }//foreach registro 11 | |
391 | + }//foreach registro 10 | |
392 | +}//if registro 10 | |
393 | 393 | |
394 | 394 | //tipo99 |
395 | 395 | $arTemp[0] = array( 'tipo_registro'=> 99, 'brancos'=> '', 'nro_sequencial' => $i+1 ); | ... | ... |
gestaoPrestacaoContas/fontes/PHP/TCMGO/instancias/exportacao/APC.inc.php
... | ... | @@ -31,10 +31,10 @@ |
31 | 31 | |
32 | 32 | * @ignore |
33 | 33 | |
34 | - $Revision: 62759 $ | |
34 | + $Revision: 62845 $ | |
35 | 35 | $Name$ |
36 | 36 | $Author: jean $ |
37 | - $Date: 2015-06-16 15:00:15 -0300 (Ter, 16 Jun 2015) $ | |
37 | + $Date: 2015-06-29 10:16:59 -0300 (Seg, 29 Jun 2015) $ | |
38 | 38 | |
39 | 39 | * Casos de uso: uc-06.04.00 |
40 | 40 | */ |
... | ... | @@ -62,15 +62,19 @@ Revision 1.1 2007/05/18 16:02:16 bruce |
62 | 62 | $obTMapeamento->recuperaRegistro10($rsRegistro10); |
63 | 63 | |
64 | 64 | $i = 1; |
65 | + $arRegistro = array(); | |
66 | + | |
65 | 67 | foreach ($rsRegistro10->arElementos as $stChave) { |
66 | - $rsRegistro10->arElementos[$i]['numero_registro'] = $i; | |
67 | - $rsRegistro10->arElementos[$i]['tipo_registro'] = 10; | |
68 | - $rsRegistro10->arElementos[$i]['vl_cancelamento'] = 0; | |
69 | - $rsRegistro10->arElementos[$i]['vl_encampacao'] = 0; | |
68 | + $stChave['numero_registro'] = $i; | |
69 | + $stChave['tipo_registro'] = 10; | |
70 | + $stChave['vl_cancelamento'] = 0.00; | |
71 | + $stChave['vl_encampacao'] = 0.00; | |
72 | + $arRegistro[] = $stChave; | |
70 | 73 | $i++; |
71 | 74 | } |
75 | + | |
76 | + $rsRegistro10->preenche($arRegistro); | |
72 | 77 | |
73 | - | |
74 | 78 | $obExportador->roUltimoArquivo->addBloco($rsRegistro10); |
75 | 79 | |
76 | 80 | $obExportador->roUltimoArquivo->roUltimoBloco->addColuna("tipo_registro"); | ... | ... |
gestaoPrestacaoContas/fontes/PLPGSQL/TCMGO/ativoPermanenteCreditos.plsql
... | ... | @@ -26,10 +26,10 @@ |
26 | 26 | * URBEM Soluções de Gestão Pública Ltda |
27 | 27 | * www.urbem.cnm.org.br |
28 | 28 | * |
29 | -* $Revision: 62759 $ | |
29 | +* $Revision: 62845 $ | |
30 | 30 | * $Name$ |
31 | 31 | * $Author: jean $ |
32 | -* $Date: 2015-06-16 15:00:15 -0300 (Ter, 16 Jun 2015) $ | |
32 | +* $Date: 2015-06-29 10:16:59 -0300 (Seg, 29 Jun 2015) $ | |
33 | 33 | * |
34 | 34 | * Casos de uso: uc-02.02.11 |
35 | 35 | */ |
... | ... | @@ -65,11 +65,21 @@ DECLARE |
65 | 65 | stDtInicial ALIAS FOR $3; |
66 | 66 | stDtFinal ALIAS FOR $4; |
67 | 67 | stCodEntidades ALIAS FOR $5; |
68 | + | |
68 | 69 | stSql VARCHAR := ''; |
69 | 70 | stSqlComplemento VARCHAR := ''; |
71 | + stNomEntidade VARCHAR := ''; | |
72 | + stCodEntidadesAux VARCHAR := ''; | |
73 | + arCodEntidade VARCHAR[]; | |
74 | + arNomEntidade VARCHAR; | |
75 | + | |
70 | 76 | reRegistro RECORD; |
71 | 77 | arRetorno NUMERIC[]; |
78 | + | |
72 | 79 | BEGIN |
80 | + | |
81 | + arCodEntidade := string_to_array(stCodEntidades,','); | |
82 | + | |
73 | 83 | stSql := 'CREATE TEMPORARY TABLE tmp_debito AS |
74 | 84 | SELECT * |
75 | 85 | FROM ( |
... | ... | @@ -113,6 +123,7 @@ BEGIN |
113 | 123 | AND la.tipo = lo.tipo |
114 | 124 | AND la.cod_entidade = lo.cod_entidade |
115 | 125 | AND pa.exercicio = ' || quote_literal(stExercicio) || ' |
126 | + AND cd.cod_entidade IN (' || stCodEntidades || ') | |
116 | 127 | ORDER BY pc.cod_estrutural |
117 | 128 | ) as tabela |
118 | 129 | WHERE |
... | ... | @@ -162,6 +173,7 @@ BEGIN |
162 | 173 | AND la.tipo = lo.tipo |
163 | 174 | AND la.cod_entidade = lo.cod_entidade |
164 | 175 | AND pa.exercicio = ' || quote_literal(stExercicio) || ' |
176 | + AND cc.cod_entidade IN (' || stCodEntidades || ') | |
165 | 177 | ORDER BY pc.cod_estrutural |
166 | 178 | ) as tabela |
167 | 179 | WHERE |
... | ... | @@ -201,80 +213,85 @@ BEGIN |
201 | 213 | |
202 | 214 | CREATE UNIQUE INDEX unq_totaliza ON tmp_totaliza (cod_estrutural varchar_pattern_ops, oid_temp); |
203 | 215 | |
204 | - stSql :=' SELECT | |
205 | - pc.cod_estrutural | |
206 | - ,publico.fn_nivel(pc.cod_estrutural) as nivel | |
207 | - ,pc.nom_conta | |
208 | - ,( | |
209 | - SELECT SUBSTRING(valor,1,2) | |
210 | - FROM administracao.configuracao_entidade | |
211 | - WHERE cod_entidade = valor_lancamento.cod_entidade | |
212 | - AND exercicio = ''' || stExercicio || ''' | |
213 | - AND cod_modulo = 42 | |
214 | - )::VARCHAR AS num_orgao | |
215 | - ,( | |
216 | - SELECT SUBSTRING(valor,3,2) | |
217 | - FROM administracao.configuracao_entidade | |
218 | - WHERE cod_entidade = valor_lancamento.cod_entidade | |
219 | - AND exercicio = ''' || stExercicio || ''' | |
220 | - AND cod_modulo = 42 | |
221 | - )::VARCHAR AS cod_unidade | |
222 | - ,0.00 as vl_saldo_anterior | |
223 | - ,0.00 as vl_saldo_debitos | |
224 | - ,0.00 as vl_saldo_creditos | |
225 | - ,0.00 as vl_saldo_atual | |
226 | - ,sc.nom_sistema | |
227 | - ,ba.tipo_lancamento | |
228 | - FROM | |
229 | - contabilidade.plano_conta as pc | |
230 | - | |
231 | - INNER JOIN contabilidade.sistema_contabil as sc | |
232 | - ON pc.cod_sistema = sc.cod_sistema | |
233 | - AND pc.exercicio = sc.exercicio | |
234 | - | |
235 | - INNER JOIN contabilidade.plano_analitica as c_pa | |
236 | - ON c_pa.cod_conta = pc.cod_conta | |
237 | - AND c_pa.exercicio = pc.exercicio | |
238 | - | |
239 | - LEFT JOIN tcmgo.balanco_apcaaaa as ba | |
240 | - ON ba.cod_plano = c_pa.cod_plano | |
241 | - AND ba.exercicio = c_pa.exercicio | |
242 | - | |
243 | - INNER JOIN (SELECT exercicio, cod_entidade, tipo, cod_lote, sequencia, tipo_valor, cod_plano | |
244 | - FROM contabilidade.conta_credito | |
245 | - UNION | |
246 | - SELECT exercicio, cod_entidade, tipo, cod_lote, sequencia, tipo_valor, cod_plano | |
247 | - FROM contabilidade.conta_debito | |
248 | - ) AS contas | |
249 | - ON contas.cod_plano = c_pa.cod_plano | |
250 | - AND contas.exercicio = c_pa.exercicio | |
251 | - | |
252 | - INNER JOIN contabilidade.valor_lancamento | |
253 | - ON valor_lancamento.cod_entidade = contas.cod_entidade | |
254 | - AND valor_lancamento.exercicio = contas.exercicio | |
255 | - AND valor_lancamento.tipo = contas.tipo | |
256 | - AND valor_lancamento.cod_lote = contas.cod_lote | |
257 | - AND valor_lancamento.sequencia = contas.sequencia | |
258 | - AND valor_lancamento.tipo_valor = contas.tipo_valor | |
259 | - | |
260 | - WHERE pc.exercicio = ' || quote_literal(stExercicio) || ' | |
261 | - | |
262 | - ORDER BY sc.nom_sistema, pc.cod_estrutural | |
263 | - '; | |
264 | - | |
265 | - FOR reRegistro IN EXECUTE stSql | |
266 | - LOOP | |
267 | - arRetorno := contabilidade.fn_totaliza_balancete_verificacao( publico.fn_mascarareduzida(reRegistro.cod_estrutural) , stDtInicial, stDtFinal); | |
268 | - reRegistro.vl_saldo_anterior := arRetorno[1]; | |
269 | - reRegistro.vl_saldo_debitos := arRetorno[2]; | |
270 | - reRegistro.vl_saldo_creditos := arRetorno[3]; | |
271 | - reRegistro.vl_saldo_atual := arRetorno[4]; | |
272 | - IF ( reRegistro.vl_saldo_anterior <> 0.00 ) OR | |
273 | - ( reRegistro.vl_saldo_debitos <> 0.00 ) OR | |
274 | - ( reRegistro.vl_saldo_creditos <> 0.00 ) | |
275 | - THEN | |
276 | - RETURN NEXT reRegistro; | |
277 | - END IF; | |
216 | + | |
217 | +-- Faz as consultas para cada entidade | |
218 | + --------------------------------------- | |
219 | + FOR i IN 1..ARRAY_UPPER(arCodEntidade,1) LOOP | |
220 | + | |
221 | + stSql :=' SELECT | |
222 | + pc.cod_estrutural | |
223 | + ,publico.fn_nivel(pc.cod_estrutural) as nivel | |
224 | + ,pc.nom_conta | |
225 | + ,unidade.num_orgao AS cod_orgao | |
226 | + ,unidade.num_unidade AS cod_unidade | |
227 | + ,0.00 as vl_saldo_anterior | |
228 | + ,0.00 as vl_saldo_debitos | |
229 | + ,0.00 as vl_saldo_creditos | |
230 | + ,0.00 as vl_saldo_atual | |
231 | + ,sc.nom_sistema | |
232 | + ,ba.tipo_lancamento | |
233 | + FROM | |
234 | + contabilidade.plano_conta as pc | |
235 | + | |
236 | + INNER JOIN contabilidade.sistema_contabil as sc | |
237 | + ON pc.cod_sistema = sc.cod_sistema | |
238 | + AND pc.exercicio = sc.exercicio | |
239 | + | |
240 | + INNER JOIN contabilidade.plano_analitica as c_pa | |
241 | + ON c_pa.cod_conta = pc.cod_conta | |
242 | + AND c_pa.exercicio = pc.exercicio | |
243 | + | |
244 | + LEFT JOIN tcmgo.balanco_apcaaaa as ba | |
245 | + ON ba.cod_plano = c_pa.cod_plano | |
246 | + AND ba.exercicio = c_pa.exercicio | |
247 | + | |
248 | + INNER JOIN (SELECT exercicio, cod_entidade, tipo, cod_lote, sequencia, tipo_valor, cod_plano | |
249 | + FROM contabilidade.conta_credito | |
250 | + UNION | |
251 | + SELECT exercicio, cod_entidade, tipo, cod_lote, sequencia, tipo_valor, cod_plano | |
252 | + FROM contabilidade.conta_debito | |
253 | + ) AS contas | |
254 | + ON contas.cod_plano = c_pa.cod_plano | |
255 | + AND contas.exercicio = c_pa.exercicio | |
256 | + | |
257 | + INNER JOIN contabilidade.valor_lancamento | |
258 | + ON valor_lancamento.cod_entidade = contas.cod_entidade | |
259 | + AND valor_lancamento.exercicio = contas.exercicio | |
260 | + AND valor_lancamento.tipo = contas.tipo | |
261 | + AND valor_lancamento.cod_lote = contas.cod_lote | |
262 | + AND valor_lancamento.sequencia = contas.sequencia | |
263 | + AND valor_lancamento.tipo_valor = contas.tipo_valor | |
264 | + | |
265 | + INNER JOIN tcmgo.configuracao_orgao_unidade | |
266 | + ON configuracao_orgao_unidade.cod_entidade = contas.cod_entidade | |
267 | + AND configuracao_orgao_unidade.exercicio = contas.exercicio | |
268 | + | |
269 | + INNER JOIN orcamento.unidade | |
270 | + ON unidade.exercicio = configuracao_orgao_unidade.exercicio | |
271 | + AND unidade.num_orgao = configuracao_orgao_unidade.num_orgao | |
272 | + AND unidade.num_unidade = configuracao_orgao_unidade.num_unidade | |
273 | + | |
274 | + | |
275 | + WHERE pc.exercicio = ' || quote_literal(stExercicio) || ' | |
276 | + | |
277 | + ORDER BY sc.nom_sistema, pc.cod_estrutural | |
278 | + '; | |
279 | + | |
280 | + FOR reRegistro IN EXECUTE stSql | |
281 | + LOOP | |
282 | + arRetorno := contabilidade.fn_totaliza_balancete_verificacao( publico.fn_mascarareduzida(reRegistro.cod_estrutural) , stDtInicial, stDtFinal); | |
283 | + reRegistro.vl_saldo_anterior := arRetorno[1]; | |
284 | + reRegistro.vl_saldo_debitos := arRetorno[2]; | |
285 | + reRegistro.vl_saldo_creditos := arRetorno[3]; | |
286 | + reRegistro.vl_saldo_atual := arRetorno[4]; | |
287 | + | |
288 | + IF ( reRegistro.vl_saldo_anterior <> 0.00 ) OR | |
289 | + ( reRegistro.vl_saldo_debitos <> 0.00 ) OR | |
290 | + ( reRegistro.vl_saldo_creditos <> 0.00 ) | |
291 | + THEN | |
292 | + RETURN NEXT reRegistro; | |
293 | + END IF; | |
294 | + END LOOP; | |
278 | 295 | END LOOP; |
279 | 296 | |
280 | 297 | DROP INDEX unq_totaliza; | ... | ... |
gestaoPrestacaoContas/fontes/SQL/GPC_2041.sql
... | ... | @@ -315,3 +315,18 @@ CREATE TABLE tcmgo.configuracao_orgao_unidade( |
315 | 315 | ); |
316 | 316 | GRANT ALL ON tcmgo.configuracao_orgao_unidade TO urbem; |
317 | 317 | |
318 | + | |
319 | +---------------- | |
320 | +-- Ticket #23072 | |
321 | +---------------- | |
322 | + | |
323 | +ALTER TABLE tcemg.consideracao_arquivo_descricao ADD COLUMN modulo_sicom VARCHAR(10); | |
324 | +UPDATE tcemg.consideracao_arquivo_descricao SET modulo_sicom = 'mensal'; | |
325 | +ALTER TABLE tcemg.consideracao_arquivo_descricao ALTER COLUMN modulo_sicom SET NOT NULL; | |
326 | + | |
327 | +ALTER TABLE tcemg.consideracao_arquivo_descricao DROP CONSTRAINT pk_consideracao_arquivo_descricao; | |
328 | +ALTER TABLE tcemg.consideracao_arquivo_descricao ADD CONSTRAINT pk_consideracao_arquivo_descricao | |
329 | + PRIMARY KEY (cod_arquivo, periodo, cod_entidade, exercicio, modulo_sicom); | |
330 | + | |
331 | +INSERT INTO tcemg.consideracao_arquivo VALUES (42, 'BALANCETE'); | |
332 | + | ... | ... |
gestaoRH/fontes/PHP/folhaPagamento/instancias/ferias/OCManterRegistroEventoFerias.php
... | ... | @@ -259,6 +259,7 @@ function montaListaEventos($arEventos) |
259 | 259 | break; |
260 | 260 | } |
261 | 261 | $arEvento['nuQuantidadeEvento'] = ($arEvento['nuQuantidadeParcelasEvento'] != "" ? number_format($arEvento['nuQuantidadeEvento'])."/".$arEvento['nuQuantidadeParcelasEvento'] : $arEvento['nuQuantidadeEvento']); |
262 | + $arEvento['stCampoNomEvento'] = 'inCodigoEvento'; | |
262 | 263 | $arEventos[$inIndex] = $arEvento; |
263 | 264 | } |
264 | 265 | $rsEventos = new Recordset; |
... | ... | @@ -325,6 +326,7 @@ function montaListaEventos($arEventos) |
325 | 326 | $obLista->ultimaAcao->setLink( "JavaScript:executaFuncaoAjax('montaAlterarEvento');"); |
326 | 327 | $obLista->ultimaAcao->addCampo("1","inId"); |
327 | 328 | $obLista->ultimaAcao->addCampo("2","inCodigoEvento"); |
329 | + $obLista->ultimaAcao->addCampo("3","stCampoNomEvento"); | |
328 | 330 | $obLista->commitAcao(); |
329 | 331 | |
330 | 332 | $obLista->addAcao(); | ... | ... |
gestaoRH/fontes/PHP/pessoal/instancias/pensionista/FMManterPensionistaAbaInformacoes.php
... | ... | @@ -306,7 +306,7 @@ if ($stAcao == "alterar") { |
306 | 306 | if ($stAcao == "alterar") { |
307 | 307 | include_once ( CAM_GRH_PES_NEGOCIO."RPessoalRescisaoContrato.class.php" ); |
308 | 308 | $obRPessoalRescisaoContrato = new RPessoalRescisaoContrato(); |
309 | -SistemaLegado::mostraVar($_REQUEST); | |
309 | + | |
310 | 310 | if ($obRPessoalRescisaoContrato->desabilitarDataRescisaoPensionista($_REQUEST['inCodContratoPensionista'])) { |
311 | 311 | $obDtaEncerramentoBeneficio->setReadOnly ( true ); |
312 | 312 | } | ... | ... |
gestaoRH/fontes/PHP/pessoal/instancias/pensionista/PRManterPensionista.php
... | ... | @@ -92,22 +92,31 @@ $obTPessoalContratoPensionistaProcessao->obTPessoalContratoPensionista = &$ |
92 | 92 | $obTPessoalContratoPensionistaContaSalario->obTPessoalContratoPensionista = &$obTPessoalContratoPensionista; |
93 | 93 | $obTPessoalAtributoContratoPensionista->obTPessoalContratoPensionista = &$obTPessoalContratoPensionista; |
94 | 94 | |
95 | + | |
96 | + | |
95 | 97 | switch ($stAcao) { |
96 | 98 | case "incluir": |
97 | - Sessao::setTrataExcecao(true); | |
99 | + $boFlagTransacao = false; | |
100 | + $obTransacao = new Transacao; | |
101 | + $obTransacao->begin(); | |
102 | + $boTransacao = $obTransacao->getTransacao(); | |
103 | + $obErro = new Erro(); | |
104 | + $obErro = $obTransacao->abreTransacao( $boFlagTransacao, $boTransacao ); | |
105 | + | |
98 | 106 | $obTPessoalContrato->proximoCod( $inCodContrato ); |
99 | 107 | $obTPessoalContrato->setDado("registro" ,($_POST['inContratoPensionista'])?$_POST['inContratoPensionista'] : $_REQUEST['inCodContratoPensionista']); |
100 | 108 | $obTPessoalContrato->setDado("cod_contrato",$inCodContrato); |
101 | - $obTPessoalContrato->inclusao(); | |
109 | + $obTPessoalContrato->inclusao($boTransacao); | |
110 | + | |
102 | 111 | $stFiltro = " WHERE registro = ".$_POST['inContrato']; |
103 | - $obTPessoalContrato->recuperaTodos($rsContrato,$stFiltro); | |
112 | + $obTPessoalContrato->recuperaTodos($rsContrato,$stFiltro,'',$boTransacao); | |
104 | 113 | $obTPessoalPensionista->setDado("cod_contrato_cedente" ,$rsContrato->getCampo("cod_contrato")); |
105 | 114 | $obTPessoalPensionista->setDado("numcgm" ,$_POST['inCGM']); |
106 | 115 | $obTPessoalPensionista->setDado("cod_grau" ,$_POST['inCodGrauParentesco']); |
107 | 116 | $obTPessoalPensionista->setDado("cod_profissao" ,$_POST['inCodProfissao']); |
108 | - $obTPessoalPensionista->inclusao(); | |
117 | + $obTPessoalPensionista->inclusao($boTransacao); | |
109 | 118 | if ($_REQUEST['inSiglaCID'] != "") { |
110 | - $inCodCID = SistemaLegado::pegaDado('cod_cid', 'pessoal.cid',' WHERE sigla = '."'".$_REQUEST['inSiglaCID']."'"); | |
119 | + $inCodCID = SistemaLegado::pegaDado('cod_cid', 'pessoal.cid',' WHERE sigla = '."'".$_REQUEST['inSiglaCID']."'",$boTransacao); | |
111 | 120 | $obTPessoalPensionistaCid->setDado("cod_cid" ,$inCodCID); |
112 | 121 | } |
113 | 122 | |
... | ... | @@ -115,7 +124,7 @@ switch ($stAcao) { |
115 | 124 | $obTPessoalPensionistaCid->setDado("data_laudo" ,$_REQUEST['dtDataLaudo']); |
116 | 125 | } |
117 | 126 | if ($_REQUEST['dtDataLaudo'] != "" || $_REQUEST['inSiglaCID'] != "") { |
118 | - $obTPessoalPensionistaCid->inclusao(); | |
127 | + $obTPessoalPensionistaCid->inclusao($boTransacao); | |
119 | 128 | } |
120 | 129 | |
121 | 130 | $obTPessoalContratoPensionista->setDado("cod_dependencia" ,$_POST['inCodTipoDependencia']); |
... | ... | @@ -124,21 +133,21 @@ switch ($stAcao) { |
124 | 133 | $obTPessoalContratoPensionista->setDado("dt_inicio_beneficio" ,$_POST['dtInicioBeneficio']); |
125 | 134 | $obTPessoalContratoPensionista->setDado("dt_encerramento" ,$_POST['dtEncerramentoBeneficio']); |
126 | 135 | $obTPessoalContratoPensionista->setDado("motivo_encerramento" ,$_POST['stMotivoEncerramento']); |
127 | - $obTPessoalContratoPensionista->inclusao(); | |
136 | + $obTPessoalContratoPensionista->inclusao($boTransacao); | |
128 | 137 | $obTPessoalContratoPensionistaOrgao->setDado("cod_orgao",$_POST["hdnUltimoOrgaoSelecionado"]); |
129 | - $obTPessoalContratoPensionistaOrgao->inclusao(); | |
138 | + $obTPessoalContratoPensionistaOrgao->inclusao($boTransacao); | |
130 | 139 | foreach ($_POST as $stCampo=>$stValor) { |
131 | 140 | if ( substr($stCampo,0,16) == "inCodPrevidencia" ) { |
132 | 141 | $arPrevidencia = explode("_",$stCampo); |
133 | 142 | $obTPessoalContratoPensionistaPrevidencia->setDado("cod_previdencia",$arPrevidencia[2]); |
134 | - $obTPessoalContratoPensionistaPrevidencia->inclusao(); | |
143 | + $obTPessoalContratoPensionistaPrevidencia->inclusao($boTransacao); | |
135 | 144 | } |
136 | 145 | } |
137 | 146 | if ($_POST['stChaveProcesso'] != "") { |
138 | 147 | $arChaveProcesso = explode("/",$_POST['stChaveProcesso']); |
139 | 148 | $obTPessoalContratoPensionistaProcessao->setDado("ano_exercicio",$arChaveProcesso[1]); |
140 | 149 | $obTPessoalContratoPensionistaProcessao->setDado("cod_processo",$arChaveProcesso[0] ); |
141 | - $obTPessoalContratoPensionistaProcessao->inclusao(); | |
150 | + $obTPessoalContratoPensionistaProcessao->inclusao($boTransacao); | |
142 | 151 | } |
143 | 152 | $obTMONBanco = new TMONBanco; |
144 | 153 | $stFiltro = " WHERE num_banco = '".$_POST['inCodBancoTxt']."'"; |
... | ... | @@ -146,12 +155,12 @@ switch ($stAcao) { |
146 | 155 | $stFiltro = " WHERE num_agencia = '".$_POST['stNumAgenciaTxt']."'"; |
147 | 156 | |
148 | 157 | $obTMONAgencia = new TMONAgencia; |
149 | - $obTMONAgencia->recuperaTodos($rsAgencia,$stFiltro); | |
158 | + $obTMONAgencia->recuperaTodos($rsAgencia,$stFiltro,'',$boTransacao); | |
150 | 159 | |
151 | 160 | $obTPessoalContratoPensionistaContaSalario->setDado("cod_banco",$rsBanco->getCampo("cod_banco")); |
152 | 161 | $obTPessoalContratoPensionistaContaSalario->setDado("cod_agencia",$rsAgencia->getCampo("cod_agencia")); |
153 | 162 | $obTPessoalContratoPensionistaContaSalario->setDado("nr_conta",$_POST['stNumConta']); |
154 | - $obTPessoalContratoPensionistaContaSalario->inclusao(); | |
163 | + $obTPessoalContratoPensionistaContaSalario->inclusao($boTransacao); | |
155 | 164 | $obAtributos = new MontaAtributos; |
156 | 165 | $obAtributos->setName ( "Atributo_" ); |
157 | 166 | $obAtributos->recuperaVetor( $arChave ); |
... | ... | @@ -168,23 +177,30 @@ switch ($stAcao) { |
168 | 177 | $obRCadastroDinamico->setCodCadastro(7); |
169 | 178 | $obRCadastroDinamico->obRModulo->setCodModulo ( 22 ); |
170 | 179 | $obRCadastroDinamico->setChavePersistenteValores( $arChaveAtributoCandidato ); |
171 | - $obRCadastroDinamico->salvarValores(); | |
172 | - Sessao::encerraExcecao(); | |
180 | + $obRCadastroDinamico->salvarValores($boTransacao); | |
173 | 181 | $stMensagem = "Pensionista cadastrado com sucesso."; |
174 | 182 | sistemaLegado::alertaAviso($pgFilt,$stMensagem ,"incluir","aviso", Sessao::getId(), "../"); |
183 | + $obTransacao->fechaTransacao( $boFlagTransacao, $boTransacao, $obErro, $obTPessoalPensionista ); | |
175 | 184 | break; |
176 | 185 | case "alterar": |
177 | - Sessao::setTrataExcecao(true); | |
186 | + //Abre uma transacao para salvar na auditoria os dados da alteracao | |
187 | + $boFlagTransacao = false; | |
188 | + $obTransacao = new Transacao; | |
189 | + $obTransacao->begin(); | |
190 | + $boTransacao = $obTransacao->getTransacao(); | |
191 | + $obErro = new Erro(); | |
192 | + $obErro = $obTransacao->abreTransacao( $boFlagTransacao, $boTransacao ); | |
193 | + | |
178 | 194 | $obTPessoalPensionista->setDado("cod_pensionista" ,$_POST['inCodPensionista']); |
179 | 195 | $obTPessoalPensionista->setDado("cod_contrato_cedente" ,$_POST['inCodContratoServidor']); |
180 | 196 | $obTPessoalPensionista->setDado("numcgm" ,$_POST['inCGM']); |
181 | 197 | $obTPessoalPensionista->setDado("cod_grau" ,$_POST['inCodGrauParentesco']); |
182 | 198 | $obTPessoalPensionista->setDado("cod_profissao" ,$_POST['inCodProfissao']); |
183 | - $obTPessoalPensionista->alteracao(); | |
199 | + $obTPessoalPensionista->alteracao($boTransacao); | |
184 | 200 | if ($_POST['inCodCID'] != "") { |
185 | 201 | $obTPessoalPensionistaCid->setDado("cod_cid" ,$_POST['inCodCID']); |
186 | 202 | $inCodCID = SistemaLegado::pegaDado('cod_cid', 'pessoal.pensionista_cid', |
187 | - ' WHERE cod_pensionista = '.$obTPessoalPensionista->getDado("cod_pensionista"). " and cod_contrato_cedente = ".$obTPessoalPensionista->getDado("cod_contrato_cedente")); | |
203 | + ' WHERE cod_pensionista = '.$obTPessoalPensionista->getDado("cod_pensionista"). " and cod_contrato_cedente = ".$obTPessoalPensionista->getDado("cod_contrato_cedente"),$boTransacao); | |
188 | 204 | //if (empty($inCodCID)) { |
189 | 205 | // $obTPessoalPensionistaCid->inclusao(); |
190 | 206 | // } else { |
... | ... | @@ -196,9 +212,9 @@ switch ($stAcao) { |
196 | 212 | } |
197 | 213 | if ($_POST['dtDataLaudo'] != "" || $_POST['inCodCID'] != "") { |
198 | 214 | if (empty($inCodCID)) { |
199 | - $obTPessoalPensionistaCid->inclusao(); | |
215 | + $obTPessoalPensionistaCid->inclusao($boTransacao); | |
200 | 216 | } else { |
201 | - $obTPessoalPensionistaCid->alteracao(); | |
217 | + $obTPessoalPensionistaCid->alteracao($boTransacao); | |
202 | 218 | } |
203 | 219 | } |
204 | 220 | |
... | ... | @@ -209,21 +225,21 @@ switch ($stAcao) { |
209 | 225 | $obTPessoalContratoPensionista->setDado("dt_inicio_beneficio" ,$_POST['dtInicioBeneficio']); |
210 | 226 | $obTPessoalContratoPensionista->setDado("dt_encerramento" ,$_POST['dtEncerramentoBeneficio']); |
211 | 227 | $obTPessoalContratoPensionista->setDado("motivo_encerramento" ,$_POST['stMotivoEncerramento']); |
212 | - $obTPessoalContratoPensionista->alteracao(); | |
228 | + $obTPessoalContratoPensionista->alteracao($boTransacao); | |
213 | 229 | $stFiltro = " AND contrato_pensionista_orgao.cod_contrato = ".$_POST['inCodContratoPensionista']; |
214 | - $obTPessoalContratoPensionistaOrgao->recuperaRelacionamento($rsPensionistaOrgao,$stFiltro); | |
230 | + $obTPessoalContratoPensionistaOrgao->recuperaRelacionamento($rsPensionistaOrgao,$stFiltro,'',$boTransacao); | |
215 | 231 | if ( $rsPensionistaOrgao->getCampo("cod_orgao") != $_POST["hdnUltimoOrgaoSelecionado"] ) { |
216 | 232 | $obTPessoalContratoPensionistaOrgao->setDado("cod_orgao",$_POST["hdnUltimoOrgaoSelecionado"]); |
217 | - $obTPessoalContratoPensionistaOrgao->inclusao(); | |
233 | + $obTPessoalContratoPensionistaOrgao->inclusao($boTransacao); | |
218 | 234 | } |
219 | 235 | $boPrevidenciaExclusao = true; |
220 | 236 | foreach ($_POST as $stCampo=>$stValor) { |
221 | 237 | $stFiltro = " WHERE cod_contrato = ".$_POST['inCodContratoPensionista']; |
222 | - $obTPessoalContratoPensionistaPrevidencia->recuperaTodos($rsContratoPensionistaPrevidencia,$stFiltro); | |
238 | + $obTPessoalContratoPensionistaPrevidencia->recuperaTodos($rsContratoPensionistaPrevidencia,$stFiltro,'',$boTransacao); | |
223 | 239 | if ( substr($stCampo,0,16) == "inCodPrevidencia") { |
224 | 240 | $arPrevidencia = explode("_",$stCampo); |
225 | 241 | $obTPessoalContratoPensionistaPrevidencia->setDado("cod_previdencia",$arPrevidencia[2]); |
226 | - $obTPessoalContratoPensionistaPrevidencia->inclusao(); | |
242 | + $obTPessoalContratoPensionistaPrevidencia->inclusao($boTransacao); | |
227 | 243 | $boPrevidenciaExclusao = false; |
228 | 244 | } |
229 | 245 | } |
... | ... | @@ -231,32 +247,32 @@ switch ($stAcao) { |
231 | 247 | $obTPessoalContratoPensionistaPrevidencia->setDado("cod_contrato",$rsContratoPensionistaPrevidencia->getCampo("cod_contrato")); |
232 | 248 | $obTPessoalContratoPensionistaPrevidencia->setDado("cod_previdencia",$rsContratoPensionistaPrevidencia->getCampo("cod_previdencia")); |
233 | 249 | $obTPessoalContratoPensionistaPrevidencia->setDado("bo_excluido",true); |
234 | - $obTPessoalContratoPensionistaPrevidencia->inclusao(); | |
250 | + $obTPessoalContratoPensionistaPrevidencia->inclusao($boTransacao); | |
235 | 251 | } |
236 | 252 | if ($_POST['stChaveProcesso'] != "") { |
237 | 253 | $arChaveProcesso = explode("/",$_POST['stChaveProcesso']); |
238 | 254 | $obTPessoalContratoPensionistaProcessao->setDado("ano_exercicio",$arChaveProcesso[1]); |
239 | 255 | $obTPessoalContratoPensionistaProcessao->setDado("cod_processo",$arChaveProcesso[0] ); |
240 | - $obTPessoalContratoPensionistaProcessao->alteracao(); | |
256 | + $obTPessoalContratoPensionistaProcessao->alteracao($boTransacao); | |
241 | 257 | } |
242 | 258 | $stFiltro = " AND contrato_pensionista_conta_salario.cod_contrato = ".$_POST['inCodContratoPensionista']; |
243 | - $obTPessoalContratoPensionistaContaSalario->recuperaRelacionamento($rsContaSalario,$stFiltro); | |
259 | + $obTPessoalContratoPensionistaContaSalario->recuperaRelacionamento($rsContaSalario,$stFiltro,'',$boTransacao); | |
244 | 260 | if( $rsContaSalario->getCampo("num_agencia") != $_POST['stNumAgenciaTxt'] |
245 | 261 | or $rsContaSalario->getCampo("num_banco") != $_POST['inCodBancoTxt'] |
246 | 262 | or $rsContaSalario->getCampo("nr_conta") != $_POST['stNumConta'] ){ |
247 | 263 | $obTMONBanco = new TMONBanco; |
248 | 264 | $stFiltro = " WHERE num_banco = '".$_POST['inCodBancoTxt']."'"; |
249 | - $obTMONBanco->recuperaTodos($rsBanco,$stFiltro); | |
265 | + $obTMONBanco->recuperaTodos($rsBanco,$stFiltro,'',$boTransacao); | |
250 | 266 | |
251 | 267 | $stFiltro = " WHERE num_agencia = '".$_POST['stNumAgenciaTxt']."'"; |
252 | 268 | $stFiltro .= " AND cod_banco = ".$rsBanco->getCampo("cod_banco"); |
253 | 269 | $obTMONAgencia = new TMONAgencia; |
254 | - $obTMONAgencia->recuperaTodos($rsAgencia,$stFiltro); | |
270 | + $obTMONAgencia->recuperaTodos($rsAgencia,$stFiltro,'',$boTransacao); | |
255 | 271 | |
256 | 272 | $obTPessoalContratoPensionistaContaSalario->setDado("cod_banco",$rsBanco->getCampo("cod_banco")); |
257 | 273 | $obTPessoalContratoPensionistaContaSalario->setDado("cod_agencia",$rsAgencia->getCampo("cod_agencia")); |
258 | 274 | $obTPessoalContratoPensionistaContaSalario->setDado("nr_conta",$_POST['stNumConta']); |
259 | - $obTPessoalContratoPensionistaContaSalario->inclusao(); | |
275 | + $obTPessoalContratoPensionistaContaSalario->inclusao($boTransacao); | |
260 | 276 | } |
261 | 277 | $obAtributos = new MontaAtributos; |
262 | 278 | $obAtributos->setName ( "Atributo_" ); |
... | ... | @@ -274,20 +290,19 @@ switch ($stAcao) { |
274 | 290 | $obRCadastroDinamico->setCodCadastro(7); |
275 | 291 | $obRCadastroDinamico->obRModulo->setCodModulo ( 22 ); |
276 | 292 | $obRCadastroDinamico->setChavePersistenteValores( $arChaveAtributoCandidato ); |
277 | - $obRCadastroDinamico->alterarValores(); | |
293 | + $obRCadastroDinamico->alterarValores($boTransacao); | |
278 | 294 | |
279 | 295 | // Se a pensionista já tem rescisão de contrato com opção para calculo, resgata valor da data de rescisão |
280 | - $dataRescisaoContrato = SistemaLegado::pegaDado("dt_rescisao", "pessoal.contrato_pensionista_caso_causa", "WHERE cod_contrato = ".$_REQUEST['inCodContratoPensionista']); | |
296 | + $dataRescisaoContrato = SistemaLegado::pegaDado("dt_rescisao", "pessoal.contrato_pensionista_caso_causa", "WHERE cod_contrato = ".$_REQUEST['inCodContratoPensionista'],$boTransacao); | |
281 | 297 | $dataRescisaoContrato = SistemaLegado::dataToBr($dataRescisaoContrato); |
282 | 298 | // Caso sua data de encerramento tenha sido alterada e possua rescisão, é necessário excluir seus antigos valores de calculo |
283 | 299 | if (!empty($dataRescisaoContrato)) { |
284 | 300 | if ($dataRescisaoContrato != $obTPessoalContratoPensionista->getDado("dt_encerramento")) { |
285 | 301 | $obRPessoalRescisaoContrato->obRPessoalContrato->setCodContrato( $_POST['inCodContratoPensionista'] ); |
286 | - $obRPessoalRescisaoContrato->excluirRescisaoContratoPensionista(); | |
302 | + $obRPessoalRescisaoContrato->excluirRescisaoContratoPensionista($boTransacao); | |
287 | 303 | } |
288 | 304 | } |
289 | 305 | |
290 | - Sessao::encerraExcecao(); | |
291 | 306 | |
292 | 307 | // Caso tenha marcado opção de Rescisão de contrato encaminhará para a tela de rescindir para que sejam calculados os valores |
293 | 308 | if ($_REQUEST['boCalculoPensao'] == 'true') { |
... | ... | @@ -308,17 +323,24 @@ switch ($stAcao) { |
308 | 323 | $stMensagem = "Pensionista alterado com sucesso."; |
309 | 324 | sistemaLegado::alertaAviso($pgList,$stMensagem ,"incluir","aviso", Sessao::getId(), "../"); |
310 | 325 | } |
326 | + $obTransacao->fechaTransacao( $boFlagTransacao, $boTransacao, $obErro, $obTPessoalPensionista ); | |
311 | 327 | |
312 | 328 | break; |
313 | 329 | case "excluir": |
314 | - $obErro = false; | |
315 | - //Início da verificação da exclusão do pensionista | |
316 | 330 | include_once ( CAM_GRH_FOL_MAPEAMENTO."TFolhaPagamentoConcessaoDecimo.class.php" ); |
317 | 331 | include_once ( CAM_GRH_FOL_MAPEAMENTO."TFolhaPagamentoContratoServidorComplementar.class.php" ); |
318 | 332 | include_once ( CAM_GRH_FOL_MAPEAMENTO."TFolhaPagamentoContratoServidorPeriodo.class.php" ); |
319 | 333 | include_once ( CAM_GRH_FOL_MAPEAMENTO."TFolhaPagamentoDescontoExternoIRRF.class.php" ); |
320 | 334 | include_once ( CAM_GRH_FOL_MAPEAMENTO."TFolhaPagamentoDescontoExternoPrevidencia.class.php" ); |
321 | - | |
335 | + | |
336 | + $boFlagTransacao = false; | |
337 | + $obTransacao = new Transacao; | |
338 | + // $obTransacao->begin(); | |
339 | + $boTransacao = $obTransacao->getTransacao(); | |
340 | + $obErro = new Erro(); | |
341 | + $obErro = $obTransacao->abreTransacao( $boFlagTransacao, $boTransacao ); | |
342 | + | |
343 | + //Início da verificação da exclusão do pensionista | |
322 | 344 | $arTabelasVerificacao = array( "TFolhaPagamentoConcessaoDecimo", |
323 | 345 | "TFolhaPagamentoContratoServidorComplementar", |
324 | 346 | "TFolhaPagamentoContratoServidorPeriodo", |
... | ... | @@ -328,38 +350,35 @@ switch ($stAcao) { |
328 | 350 | |
329 | 351 | $stFiltro = " WHERE cod_contrato = ".$_GET['inCodContratoPensionista']; |
330 | 352 | foreach ($arTabelasVerificacao as $stTabela) { |
331 | - if ($obErro == false) { | |
332 | - $obTVerificacaoExclusao = new $stTabela; | |
333 | - $obTVerificacaoExclusao->recuperaTodos($rsVerificacao,$stFiltro,"",$boTransacao); | |
334 | - if ($rsVerificacao->getNumLinhas() > 0) { | |
335 | - $obErro = true; | |
336 | - break; | |
337 | - } | |
353 | + $obTVerificacaoExclusao = new $stTabela; | |
354 | + $obTVerificacaoExclusao->recuperaTodos($rsVerificacao,$stFiltro,"",$boTransacao); | |
355 | + if ($rsVerificacao->getNumLinhas() > 0) { | |
356 | + $stMensagem = "Exclusão não permitida, pensionista possui histórico de dados no sistema."; | |
357 | + sistemaLegado::alertaAviso($pgList,$stMensagem ,"","error", Sessao::getId(), "../"); | |
358 | + $obErro->setDescricao($stMensagem); | |
359 | + break; | |
338 | 360 | } |
339 | 361 | } |
340 | 362 | //Fim da verificação da exclusão do pensionista |
341 | - | |
342 | - if ($obErro == true) { | |
343 | - $stMensagem = "Exclusão não permitida, pensionista possui histórico de dados no sistema."; | |
344 | - sistemaLegado::alertaAviso($pgList,$stMensagem ,"","aviso", Sessao::getId(), "../"); | |
345 | - } else { | |
346 | - Sessao::setTrataExcecao(true); | |
347 | - $obTPessoalPensionista->setDado("cod_pensionista", $_GET['inCodPensionista']); | |
348 | - $obTPessoalPensionista->setDado("cod_contrato_cedente", $_GET['inCodContratoServidor']); | |
349 | - $obTPessoalContratoPensionista->setDado("cod_contrato",$_GET['inCodContratoPensionista']); | |
350 | - $obTPessoalContratoPensionistaOrgao->exclusao(); | |
351 | - $obTPessoalContratoPensionistaProcessao->exclusao(); | |
352 | - $obTPessoalContratoPensionistaPrevidencia->exclusao(); | |
353 | - $obTPessoalContratoPensionistaContaSalario->exclusao(); | |
354 | - $obTPessoalAtributoContratoPensionista->exclusao(); | |
355 | - $obTPessoalContratoPensionista->exclusao(); | |
356 | - $obTPessoalPensionistaCid->exclusao(); | |
357 | - $obTPessoalPensionista->exclusao(); | |
358 | - $obTPessoalContrato->exclusao(); | |
359 | - Sessao::encerraExcecao(); | |
360 | - $stMensagem = "Pensionista excluído com sucesso."; | |
361 | - sistemaLegado::alertaAviso($pgList,$stMensagem ,"incluir","aviso", Sessao::getId(), "../"); | |
363 | + | |
364 | + if(!$obErro->ocorreu()) { | |
365 | + $obTPessoalPensionista->setDado("cod_pensionista", $_GET['inCodPensionista']); | |
366 | + $obTPessoalPensionista->setDado("cod_contrato_cedente", $_GET['inCodContratoServidor']); | |
367 | + $obTPessoalContratoPensionista->setDado("cod_contrato",$_GET['inCodContratoPensionista']); | |
368 | + $obTPessoalContratoPensionistaOrgao->exclusao($boTransacao); | |
369 | + $obTPessoalContratoPensionistaProcessao->exclusao($boTransacao); | |
370 | + $obTPessoalContratoPensionistaPrevidencia->exclusao($boTransacao); | |
371 | + $obTPessoalContratoPensionistaContaSalario->exclusao($boTransacao); | |
372 | + $obTPessoalAtributoContratoPensionista->exclusao($boTransacao); | |
373 | + $obTPessoalContratoPensionista->exclusao($boTransacao); | |
374 | + $obTPessoalPensionistaCid->exclusao($boTransacao); | |
375 | + $obTPessoalPensionista->exclusao($boTransacao); | |
376 | + $obTPessoalContrato->exclusao($boTransacao); | |
377 | + $stMensagem = "Pensionista excluído com sucesso."; | |
378 | + sistemaLegado::alertaAviso($pgList,$stMensagem ,"incluir","aviso", Sessao::getId(), "../"); | |
379 | + $obTransacao->fechaTransacao( $boFlagTransacao, $boTransacao, $obErro, $obTPessoalPensionista ); | |
362 | 380 | } |
363 | 381 | break; |
364 | 382 | } |
383 | + | |
365 | 384 | ?> | ... | ... |
gestaoRH/fontes/RPT/folhaPagamento/report/design/contraCheque.rptdesign
... | ... | @@ -3,6 +3,7 @@ |
3 | 3 | <property name="createdBy">Eclipse BIRT Designer Version 4.4.0.v201405191524 Build <4.4.0.v20140606-1451></property> |
4 | 4 | <html-property name="description">Template para o formato A4 retrato</html-property> |
5 | 5 | <property name="units">in</property> |
6 | + <method name="initialize"><![CDATA[params['query'] = this.queryText;]]></method> | |
6 | 7 | <text-property name="displayName">Template Urbem Retrato</text-property> |
7 | 8 | <property name="bidiLayoutOrientation">ltr</property> |
8 | 9 | <list-property name="libraries"> |
... | ... | @@ -310,101 +311,68 @@ |
310 | 311 | </parameters> |
311 | 312 | <data-sources> |
312 | 313 | <oda-data-source extensionID="org.eclipse.birt.report.data.oda.jdbc" name="postgres" id="1150" |
313 | - extends="urbem_250.postgres"> | |
314 | - </oda-data-source> | |
314 | + extends="urbem_250.postgres"/> | |
315 | 315 | </data-sources> |
316 | 316 | <data-sets> |
317 | 317 | <oda-data-set extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet" name="cabecalho" id="210"> |
318 | - <list-property name="parameters"> | |
319 | - <structure> | |
320 | - <property name="name">exercicio</property> | |
321 | - <property name="paramName">exercicio</property> | |
322 | - <property name="dataType">string</property> | |
323 | - <property name="position">1</property> | |
324 | - <property name="isInput">true</property> | |
325 | - <property name="isOutput">false</property> | |
326 | - </structure> | |
327 | - <structure> | |
328 | - <property name="name">exercicio2</property> | |
329 | - <property name="paramName">exercicio</property> | |
330 | - <property name="dataType">string</property> | |
331 | - <property name="position">2</property> | |
332 | - <property name="isInput">true</property> | |
333 | - <property name="isOutput">false</property> | |
334 | - </structure> | |
335 | - <structure> | |
336 | - <property name="name">param_1</property> | |
337 | - <property name="paramName">periodoMovimentacao</property> | |
338 | - <property name="nativeName"></property> | |
339 | - <property name="dataType">integer</property> | |
340 | - <property name="nativeDataType">4</property> | |
341 | - <property name="position">3</property> | |
342 | - <property name="isOptional">false</property> | |
343 | - <property name="isInput">true</property> | |
344 | - <property name="isOutput">false</property> | |
345 | - </structure> | |
346 | - <structure> | |
347 | - <property name="name">param_2</property> | |
348 | - <property name="paramName">exercicio</property> | |
349 | - <property name="dataType">string</property> | |
350 | - <property name="position">4</property> | |
351 | - <property name="isInput">true</property> | |
352 | - <property name="isOutput">false</property> | |
353 | - </structure> | |
354 | - </list-property> | |
318 | + <list-property name="columnHints"/> | |
319 | + <list-property name="parameters"/> | |
355 | 320 | <structure name="cachedMetaData"/> |
321 | + <method name="beforeOpen"><![CDATA[this.queryText = "SELECT \n"; | |
322 | +this.queryText += " ( SELECT \n"; | |
323 | +this.queryText += " valor\n"; | |
324 | +this.queryText += " FROM administracao.configuracao\n"; | |
325 | +this.queryText += " WHERE cod_modulo = 2\n"; | |
326 | +this.queryText += " AND parametro = 'nom_prefeitura'\n"; | |
327 | +this.queryText += " AND exercicio = '"+params['exercicio']+"'\n"; | |
328 | +this.queryText += " ) AS prefeitura\n"; | |
329 | +this.queryText += " , ( SELECT \n"; | |
330 | +this.queryText += " valor\n"; | |
331 | +this.queryText += " FROM administracao.configuracao\n"; | |
332 | +this.queryText += " WHERE cod_modulo = 2\n"; | |
333 | +this.queryText += " AND parametro = 'cnpj'\n"; | |
334 | +this.queryText += " AND exercicio = '"+params['exercicio']+"'\n"; | |
335 | +this.queryText += " ) AS cnpj\n"; | |
336 | +this.queryText += " , ( SELECT \n"; | |
337 | +this.queryText += " to_char(dt_inicial, 'MM/YYYY')\n"; | |
338 | +this.queryText += " FROM folhapagamento"+params['entidade']+".periodo_movimentacao\n"; | |
339 | +this.queryText += " WHERE cod_periodo_movimentacao = '"+params['periodoMovimentacao']+"'\n"; | |
340 | +this.queryText += " ) AS periodo\n"; | |
341 | +this.queryText += " ,( SELECT \n"; | |
342 | +this.queryText += " '../../../../../../gestaoAdministrativa/fontes/PHP/framework/temas/padrao/imagens/' || valor AS logotipo\n"; | |
343 | +this.queryText += " FROM administracao.configuracao\n"; | |
344 | +this.queryText += " WHERE parametro = 'logotipo'\n"; | |
345 | +this.queryText += " AND exercicio = '"+params['exercicio']+"'\n"; | |
346 | +this.queryText += " ) AS logotipo\n"; | |
347 | + | |
348 | +//params["query"] = this.queryText;]]></method> | |
356 | 349 | <property name="dataSource">postgres</property> |
357 | - <xml-property name="queryText"><![CDATA[SELECT | |
358 | - ( SELECT | |
359 | - valor | |
360 | - FROM administracao.configuracao | |
361 | - WHERE cod_modulo = 2 | |
362 | - AND parametro = 'nom_prefeitura' | |
363 | - AND exercicio = ? | |
364 | - ) AS prefeitura | |
365 | - , ( SELECT | |
366 | - valor | |
367 | - FROM administracao.configuracao | |
368 | - WHERE cod_modulo = 2 | |
369 | - AND parametro = 'cnpj' | |
370 | - AND exercicio = ? | |
371 | - ) AS cnpj | |
372 | - , ( SELECT | |
373 | - to_char(dt_inicial, 'MM/YYYY') | |
374 | - FROM folhapagamento.periodo_movimentacao | |
375 | - WHERE cod_periodo_movimentacao = ? | |
376 | - ) AS periodo | |
377 | - ,( SELECT | |
378 | - '../../../../../../gestaoAdministrativa/fontes/PHP/framework/temas/padrao/imagens/' || valor AS logotipo | |
379 | - FROM administracao.configuracao | |
380 | - WHERE parametro = 'logotipo' | |
381 | - AND exercicio = ? | |
382 | - ) AS logotipo | |
383 | - | |
384 | - | |
385 | - | |
386 | - ]]></xml-property> | |
350 | + <list-property name="resultSet"/> | |
351 | + <xml-property name="queryText"><![CDATA[select | |
352 | +from ]]></xml-property> | |
387 | 353 | <xml-property name="designerValues"><![CDATA[<?xml version="1.0" encoding="UTF-8"?> |
388 | 354 | <model:DesignValues xmlns:design="http://www.eclipse.org/datatools/connectivity/oda/design" xmlns:model="http://www.eclipse.org/birt/report/model/adapter/odaModel"> |
389 | - <Version>1.0</Version> | |
390 | - <design:DataSetParameters> | |
391 | - <design:parameterDefinitions> | |
392 | - <design:inOutMode>In</design:inOutMode> | |
393 | - <design:attributes> | |
394 | - <design:identifier> | |
395 | - <design:name></design:name> | |
396 | - <design:position>3</design:position> | |
397 | - </design:identifier> | |
398 | - <design:nativeDataTypeCode>4</design:nativeDataTypeCode> | |
399 | - <design:precision>0</design:precision> | |
400 | - <design:scale>0</design:scale> | |
401 | - <design:nullability>Unknown</design:nullability> | |
402 | - </design:attributes> | |
403 | - <design:inputAttributes> | |
404 | - <design:elementAttributes/> | |
405 | - </design:inputAttributes> | |
406 | - </design:parameterDefinitions> | |
407 | - </design:DataSetParameters> | |
355 | + <Version>2.0</Version> | |
356 | + <DataSetParameters> | |
357 | + <parameter> | |
358 | + <design:ParameterDefinition> | |
359 | + <design:inOutMode>In</design:inOutMode> | |
360 | + <design:attributes> | |
361 | + <design:identifier> | |
362 | + <design:name></design:name> | |
363 | + <design:position>3</design:position> | |
364 | + </design:identifier> | |
365 | + <design:nativeDataTypeCode>4</design:nativeDataTypeCode> | |
366 | + <design:precision>0</design:precision> | |
367 | + <design:scale>0</design:scale> | |
368 | + <design:nullability>Unknown</design:nullability> | |
369 | + </design:attributes> | |
370 | + <design:inputAttributes> | |
371 | + <design:elementAttributes/> | |
372 | + </design:inputAttributes> | |
373 | + </design:ParameterDefinition> | |
374 | + </parameter> | |
375 | + </DataSetParameters> | |
408 | 376 | <design:ResultSets derivedMetaData="true"> |
409 | 377 | <design:resultSetDefinitions> |
410 | 378 | <design:resultSetColumns> |
... | ... | @@ -1266,7 +1234,7 @@ this.queryText = this.queryText + " , funcao_especialidade "; |
1266 | 1234 | this.queryText = this.queryText + " , cbo "; |
1267 | 1235 | this.queryText = this.queryText + " , dt_admissao "; |
1268 | 1236 | this.queryText = this.queryText + " , cod_periodo_movimentacao "; |
1269 | -this.queryText = this.queryText + " , orgao "; | |
1237 | +this.queryText = this.queryText + " , SUBSTR(orgao,1,30) AS orgao"; | |
1270 | 1238 | this.queryText = this.queryText + " , local "; |
1271 | 1239 | this.queryText = this.queryText + " , mes_nascimento "; |
1272 | 1240 | this.queryText = this.queryText + " , inOffSet "; |
... | ... | @@ -1308,7 +1276,7 @@ if (params["codConfiguracao"] == '2'){ |
1308 | 1276 | } |
1309 | 1277 | |
1310 | 1278 | if (params["codConfiguracao"] == '3'){ |
1311 | - params["descTipoFolha"] = "Folha Décimo"; | |
1279 | + params["descTipoFolha"] = "Folha 13º Salário"; | |
1312 | 1280 | } |
1313 | 1281 | |
1314 | 1282 | if (params["codConfiguracao"] == '4'){ | ... | ... |
gestaoTributaria/fontes/PHP/arrecadacao/classes/boletos/RCarneDividaRefis2015MataSaoJoao.class.php
0 → 100644
... | ... | @@ -0,0 +1,2272 @@ |
1 | +<?php | |
2 | +/* | |
3 | + ********************************************************************************** | |
4 | + * * | |
5 | + * @package URBEM CNM - Soluções em Gestão Pública * | |
6 | + * @copyright (c) 2013 Confederação Nacional de Municípos * | |
7 | + * @author Confederação Nacional de Municípios * | |
8 | + * * | |
9 | + * O URBEM CNM é um software livre; você pode redistribuí-lo e/ou modificá-lo sob * | |
10 | + * os termos da Licença Pública Geral GNU conforme publicada pela Fundação do * | |
11 | + * Software Livre (FSF - Free Software Foundation); na versão 2 da Licença. * | |
12 | + * * | |
13 | + * Este programa é distribuído na expectativa de que seja útil, porém, * | |
14 | + * SEM NENHUMA GARANTIA; nem mesmo a garantia implícita de COMERCIABILIDADE OU * | |
15 | + * ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. Consulte a Licença Pública Geral do GNU * | |
16 | + * para mais detalhes. * | |
17 | + * * | |
18 | + * Você deve ter recebido uma cópia da Licença Pública Geral do GNU "LICENCA.txt" * | |
19 | + * com este programa; se não, escreva para a Free Software Foundation Inc., * | |
20 | + * no endereço 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * | |
21 | + * * | |
22 | + ********************************************************************************** | |
23 | +*/ | |
24 | +?> | |
25 | +<?php | |
26 | +/** | |
27 | + * Carnê Divida Refis para Mata de Sao Joao 2015 | |
28 | + * Data de criação : 29/06/2015 | |
29 | + * @author Analista: Fábio Bertoldi | |
30 | + * @author Programador: Fernando Piccini Cercato | |
31 | + * @package URBEM | |
32 | + *Caso de uso: uc-05.03.11 | |
33 | + *Caso de uso: uc-05.04.03 | |
34 | +*/ | |
35 | + | |
36 | +include_once ( CAM_GT_ARR_CLASSES."boletos/RCodigoBarraFebrabanCompensacaoBB-Anexo5.class.php" ); | |
37 | +include_once ( CAM_GT_ARR_NEGOCIO."RARRCarne.class.php" ); | |
38 | +include_once ( CAM_GT_ARR_NEGOCIO."RARRConfiguracao.class.php" ); | |
39 | +include_once ( CAM_GA_ADM_MAPEAMENTO."TAdministracaoConfiguracao.class.php" ); | |
40 | +include_once ( CAM_GT_DAT_MAPEAMENTO."TDATDividaAtiva.class.php" ); | |
41 | +include_once '../../../../../../gestaoAdministrativa/fontes/PHP/pacotes/FrameworkPDF.inc.php'; | |
42 | + | |
43 | +define ('FPDF_FONTPATH','font/'); | |
44 | + | |
45 | +class RProtocolo extends fpdf | |
46 | +{ | |
47 | + /* Labels */ | |
48 | + public $Titulo1 = 'P M MATA DE SÃO JOÃO'; | |
49 | + public $Titulo2 = ''; | |
50 | + public $lblContribuinte = 'CONTRIBUINTE'; | |
51 | + public $lblInscricao = 'INSCRIÇÃO IMOB.'; | |
52 | + public $lblCtmDci = 'CTM/DCI'; | |
53 | + public $lblLogradouro = 'CÓDIGO LOGRADOURO'; | |
54 | + public $lblDistrito = 'DIST.'; | |
55 | + public $lblCt = 'CT'; | |
56 | + public $lblCa = 'CA'; | |
57 | + public $lblDtProcesso = 'DATA PROCESSAMENTO'; | |
58 | + public $lblLocalizacao = 'LOCALIZAÇÃO DO IMÓVEL'; | |
59 | + public $lblTerreno = 'ÁREA DO TERRENO'; | |
60 | + public $lblEdificada = 'ÁREA EDIFICADA'; | |
61 | + public $lblUtilizacaoIm = 'UTILIZAÇÃO DO IMÓVEL'; | |
62 | + public $lblTributo = 'TRIBUTO DÍVIDA ATIVA'; | |
63 | + public $lblNroPlanta = 'Nº DA PLANTA'; | |
64 | + public $lblExercicio = 'EXERCÍCIO'; | |
65 | + public $lblVlTribReal = 'VALOR TRIBUTÁVEL - REAL'; | |
66 | + public $lblImpAnualReal = 'IMPOSTO - REAL'; | |
67 | + public $lblObservacao = 'OBSERVAÇÃO'; | |
68 | + public $lblLimpAnualRl = 'TX. COLETA LIXO ANUAL - REAL'; | |
69 | + public $lblTotalAnualRl = 'TOTAL ANUAL - REAL'; | |
70 | + public $lblReferencia = 'REFERÊNCIA'; | |
71 | + public $lblTxAverbacao = 'ALIQUOTA'; | |
72 | + public $lblUrbem = 'URBEM - Soluções Integradas de Administração Municipal - www.urbem.cnm.org.br'; | |
73 | + public $lblTotalLancado = 'TOTAL LANÇADO'; | |
74 | + | |
75 | + /* Variaveis */ | |
76 | + public $Imagem; | |
77 | + public $stNomCgm; | |
78 | + public $stRua; | |
79 | + public $stNumero; | |
80 | + public $stComplemento; | |
81 | + public $stCidade; | |
82 | + public $stUf; | |
83 | + public $stCep; | |
84 | + public $inInscricao; | |
85 | + public $inInscricaoDivida; | |
86 | + public $inCtmDci; | |
87 | + public $inCodLogradouro; | |
88 | + public $inDistrito; | |
89 | + public $inCt; | |
90 | + public $inCa; | |
91 | + public $dtProcessamento; | |
92 | + public $flAreaTerreno; | |
93 | + public $flAreaEdificada; | |
94 | + public $stUtilizacaoImovel; | |
95 | + public $stTributo; | |
96 | + public $stTributo2; | |
97 | + public $stTributo3; | |
98 | + public $flValorTributoReal; | |
99 | + public $flImpostoAnualReal; | |
100 | + public $flTotalAnualReal; | |
101 | + public $stObservacao; | |
102 | + public $flTaxaLimpezaAnual; | |
103 | + public $inReferencia; | |
104 | + public $inNumeroPlanta; | |
105 | + public $stQuadro1; | |
106 | + public $stQuadro2; | |
107 | + public $stQuadro3; | |
108 | + public $stExercicio; | |
109 | + public $stNomBairro; | |
110 | + public $stLoginUsuario; | |
111 | + public $stCodUsuario; | |
112 | + public $stEnderecoEntrega; | |
113 | + public $flTxAverbacao; | |
114 | + public $flTotalLancado; | |
115 | + public $inTamY = 30; | |
116 | + public $stAdquirente; | |
117 | + | |
118 | + /* setters */ | |
119 | + public function setImagem($valor) { $this->Imagem = $valor; } | |
120 | + public function setNomCgm($valor) { $this->stNomCgm = $valor; } | |
121 | + public function setRua($valor) { $this->stRua = $valor; } | |
122 | + public function setNumero($valor) { $this->stNumero = $valor; } | |
123 | + public function setComplemento($valor) { $this->stComplemento = $valor; } | |
124 | + public function setCidade($valor) { $this->stCidade = $valor; } | |
125 | + public function setUf($valor) { $this->stUf = $valor; } | |
126 | + public function setCep($valor) { $this->stCep = $valor; } | |
127 | + public function setInscricao($valor) { $this->inInscricao = $valor; } | |
128 | + public function setCtmDci($valor) { $this->inCtmDci = $valor; } | |
129 | + public function setCodLogradouro($valor) { $this->inCodLogradouro = $valor; } | |
130 | + public function setDistrito($valor) { $this->inDistrito = $valor; } | |
131 | + public function setCt($valor) { $this->inCt = $valor; } | |
132 | + public function setCa($valor) { $this->inCa = $valor; } | |
133 | + public function setProcessamento($valor) { $this->dtProcessamento = $valor; } | |
134 | + public function setAreaTerreno($valor) { $this->flAreaTerreno = $valor; } | |
135 | + public function setAreaEdificada($valor) { $this->flAreaEdificada = $valor; } | |
136 | + public function setUtilizacaoImovel($valor) { $this->stUtilizacaoImovel = $valor; } | |
137 | + public function setTributo($valor) { $this->stTributo = $valor; } | |
138 | + public function setTributo2($valor) { $this->stTributo2 = $valor; } | |
139 | + public function setTributo3($valor) { $this->stTributo3 = $valor; } | |
140 | + public function setValorTributoReal($valor) { $this->flValorTributoReal = $valor; } | |
141 | + public function setImpostoAnualReal($valor) { $this->flImpostoAnualReal = $valor; } | |
142 | + public function setObservacao($valor) { $this->stObservacao = $valor; } | |
143 | + public function setTaxaLimpezaAnual($valor) { $this->flTaxaLimpezaAnual = $valor; } | |
144 | + public function setValorAnualReal($valor) { $this->flValorAnualReal = $valor; } | |
145 | + public function setReferencia($valor) { $this->inReferencia = $valor; } | |
146 | + public function setNumeroPlanta($valor) { $this->inNumeroPlanta = $valor; } | |
147 | + public function setQuadro1($valor) { $this->stQuadro1 = $valor; } | |
148 | + public function setQuadro2($valor) { $this->stQuadro2 = $valor; } | |
149 | + public function setQuadro3($valor) { $this->stQuadro3 = $valor; } | |
150 | + public function setExercicio($valor) { $this->stExercicio = $valor; } | |
151 | + public function setNomBairro($valor) { $this->stNomBairro = $valor; } | |
152 | + public function setLoginUsuario($valor) { $this->stLoginUsuario = $valor; } | |
153 | + public function setCodUsuario($valor) { $this->stCodUsuario = $valor; } | |
154 | + public function setEndEntrega($valor) { $this->stEnderecoEntrega = $valor; } | |
155 | + public function setTotalLancado($valor) { $this->flTotalLancado = $valor; } | |
156 | + | |
157 | + /* getters */ | |
158 | + public function getImagem() { return $this->Imagem ; } | |
159 | + public function getNomCgm() { return $this->stNomCgm ; } | |
160 | + public function getRua() { return $this->stRua ; } | |
161 | + public function getNumero() { return $this->stNumero ; } | |
162 | + public function getComplemento() { return $this->stComplemento ; } | |
163 | + public function getCidade() { return $this->stCidade ; } | |
164 | + public function getUf() { return $this->stUf ; } | |
165 | + public function getCep() { return $this->stCep ; } | |
166 | + public function getInscricao() { return $this->inInscricao ; } | |
167 | + public function getCtmDci() { return $this->inCtmDci ; } | |
168 | + public function getCodLogradouro() { return $this->inCodLogradouro ; } | |
169 | + public function getDistrito() { return $this->inDistrito ; } | |
170 | + public function getCt() { return $this->inCt ; } | |
171 | + public function getCa() { return $this->inCa ; } | |
172 | + public function getProcessamento() { return $this->dtProcessamento ; } | |
173 | + public function getAreaTerreno() { return $this->flAreaTerreno ; } | |
174 | + public function getAreaEdificada() { return $this->flAreaEdificada ; } | |
175 | + public function getUtilizacaoImovel() { return $this->stUtilizacaoImovel ; } | |
176 | + public function getTributo() { return $this->stTributo ; } | |
177 | + public function getValorTributoReal() { return $this->flValorTributoReal ; } | |
178 | + public function getImpostoAnualReal() { return $this->flImpostoAnualReal ; } | |
179 | + public function getObservacao() { return $this->stObservacao ; } | |
180 | + public function getTaxaLimpezaAnual() { return $this->flTaxaLimpezaAnual ; } | |
181 | + public function getValorAnualReal() { return $this->flValorAnualReal ; } | |
182 | + public function getReferencia() { return $this->inReferencia ; } | |
183 | + public function getNumeroPlanta() { return $this->inNumeroPlanta ; } | |
184 | + public function getQuadro1() { return $this->stQuadro1 ; } | |
185 | + public function getQuadro2() { return $this->stQuadro2 ; } | |
186 | + public function getQuadro3() { return $this->stQuadro3 ; } | |
187 | + public function getExercicio() { return $this->stExercicio ; } | |
188 | + public function getNomBairro() { return $this->stNomBairro ; } | |
189 | + public function getLoginUsuario() { return $this->stLoginUsuario ; } | |
190 | + public function getCodUsuario() { return $this->stCodUsuario ; } | |
191 | + public function getEndEntrega() { return $this->stEnderecoEntrega ; } | |
192 | + public function getTotalLancado() { return $this->flTotalLancado ; } | |
193 | + | |
194 | + public function defineCodigoBarras($xpos, $ypos, $code, $basewidth = 0.7, $height = 10) | |
195 | + { | |
196 | + //global $pdf; | |
197 | + $wide = $basewidth; | |
198 | + $narrow = $basewidth / 2 ; | |
199 | + | |
200 | + // wide/narrow codes for the digits | |
201 | + $barChar['0'] = 'nnwwn'; | |
202 | + $barChar['1'] = 'wnnnw'; | |
203 | + $barChar['2'] = 'nwnnw'; | |
204 | + $barChar['3'] = 'wwnnn'; | |
205 | + $barChar['4'] = 'nnwnw'; | |
206 | + $barChar['5'] = 'wnwnn'; | |
207 | + $barChar['6'] = 'nwwnn'; | |
208 | + $barChar['7'] = 'nnnww'; | |
209 | + $barChar['8'] = 'wnnwn'; | |
210 | + $barChar['9'] = 'nwnwn'; | |
211 | + $barChar['A'] = 'nn'; | |
212 | + $barChar['Z'] = 'wn'; | |
213 | + | |
214 | + // add leading zero if code-length is odd | |
215 | + if (strlen($code) % 2 != 0) { | |
216 | + $code = '0' . $code; | |
217 | + } | |
218 | + | |
219 | + $this->SetFont('Arial','',10); | |
220 | + $this->SetFillColor(0); | |
221 | + | |
222 | + // add start and stop codes | |
223 | + $code = 'AA'.strtolower($code).'ZA'; | |
224 | + | |
225 | + for ($i=0; $i<strlen($code); $i=$i+2) { | |
226 | + // choose next pair of digits | |
227 | + $charBar = $code{$i}; | |
228 | + $charSpace = $code{$i+1}; | |
229 | + // check whether it is a valid digit | |
230 | + if (!isset($barChar[$charBar])) { | |
231 | + $this->Error('Invalid character in barcode: '.$charBar); | |
232 | + } | |
233 | + if (!isset($barChar[$charSpace])) { | |
234 | + $this->Error('Invalid character in barcode: '.$charSpace); | |
235 | + } | |
236 | + // create a wide/narrow-sequence (first digit=bars, second digit=spaces) | |
237 | + $seq = ''; | |
238 | + for ($s=0; $s<strlen($barChar[$charBar]); $s++) { | |
239 | + $seq .= $barChar[$charBar]{$s} . $barChar[$charSpace]{$s}; | |
240 | + } | |
241 | + for ($bar=0; $bar<strlen($seq); $bar++) { | |
242 | + // set lineWidth depending on value | |
243 | + if ($seq{$bar} == 'n') { | |
244 | + $lineWidth = $narrow; | |
245 | + } else { | |
246 | + $lineWidth = $wide; | |
247 | + } | |
248 | + // draw every second value, because the second digit of the pair is represented by the spaces | |
249 | + if ($bar % 2 == 0) { | |
250 | + $this->Rect($xpos, $ypos, $lineWidth, $height, 'F'); | |
251 | + } | |
252 | + $xpos += $lineWidth; | |
253 | + } | |
254 | + } | |
255 | + } | |
256 | + | |
257 | + /* configura a pagina de carne */ | |
258 | + public function configuraProtocolo() | |
259 | + { | |
260 | + $this->open(); | |
261 | + $this->setTextColor(0); | |
262 | + $this->addPage(); | |
263 | + $this->setLeftMargin(0); | |
264 | + $this->setTopMargin(0); | |
265 | + $this->SetLineWidth(0.01); | |
266 | + } | |
267 | + | |
268 | + /* layout do protocolo */ | |
269 | + public function drawProtocolo() | |
270 | + { | |
271 | + if ( Sessao::read( 'itbi_observacao' ) == 'sim') { | |
272 | + $this->lblVlTribReal = 'VALOR TRIBUTÁVEL'; | |
273 | + //$this->lblImpAnualReal = 'IMPOSTO ANUAL'; | |
274 | + $this->lblImpAnualReal = 'IMPOSTO - REAL'; | |
275 | + //$this->lblTotalAnualRl = 'TOTAL ANUAL'; | |
276 | + $this->lblTotalAnualRl = 'TOTAL - REAL'; | |
277 | + | |
278 | + } | |
279 | + | |
280 | + $this->setLoginUsuario ( Sessao::read( 'nomCgm' ) ); | |
281 | + $this->setCodUsuario ( Sessao::read('numCgm') ); | |
282 | + | |
283 | + $this->setFont('Arial','',10); | |
284 | + | |
285 | + //thisfineCodigoBarras(10,50,'816100000016143532732003601232006101100000000016'); | |
286 | + | |
287 | + /* retangula mais externo */ | |
288 | + $this->Rect( 7, 8+$this->inTamY, 196, 82); | |
289 | + | |
290 | + /* linhas horizontais maiores */ | |
291 | + $this->Line( 7, 27+$this->inTamY, 203, 27+$this->inTamY ); | |
292 | + $this->Line( 7, 47+$this->inTamY, 203, 47+$this->inTamY ); | |
293 | + $this->Line( 7, 62+$this->inTamY, 203, 62+$this->inTamY ); | |
294 | + $this->Line( 7, 71+$this->inTamY, 203, 71+$this->inTamY ); | |
295 | + | |
296 | + /* linhas horizontais menores */ | |
297 | + $this->Line( 115, 33.65+$this->inTamY, 203, 33.65+$this->inTamY ); | |
298 | + $this->Line( 115, 40.3+$this->inTamY , 203, 40.3+$this->inTamY ); | |
299 | + $this->Line( 115, 54.5+$this->inTamY, 203, 54.5+$this->inTamY ); | |
300 | + $this->Line( 115, 80+$this->inTamY, 203, 80+$this->inTamY ); | |
301 | + | |
302 | + /* linhas verticais */ | |
303 | + $this->Line( 33 , 62+$this->inTamY , 33 , 71+$this->inTamY ); | |
304 | + $this->Line( 58 , 62+$this->inTamY , 58 , 71+$this->inTamY ); | |
305 | + $this->Line( 85 , 62+$this->inTamY , 85 , 71+$this->inTamY ); | |
306 | + $this->Line( 115, 27+$this->inTamY , 115, 90+$this->inTamY ); | |
307 | + $this->Line( 162, 40.3+$this->inTamY , 162, 90+$this->inTamY ); | |
308 | + | |
309 | + $this->Line( 152, 40.3+$this->inTamY , 152, 47+$this->inTamY ); | |
310 | + $this->Line( 142, 40.3+$this->inTamY , 142, 47+$this->inTamY ); | |
311 | + $this->Line( 172, 40.3+$this->inTamY , 172, 47+$this->inTamY ); | |
312 | + | |
313 | + /* brazao */ | |
314 | + if ($this->Imagem) { | |
315 | + $stExt = substr( $this->Imagem, strlen($this->Imagem)-3, strlen($this->Imagem) ); | |
316 | + $this->Image( $this->Imagem, 8, 9+$this->inTamY, 25, 16.5, $stExt ); | |
317 | + } | |
318 | + | |
319 | + /* labels fixos */ | |
320 | + $this->setFont('Arial','B',13); // fonte do primeiro titulo | |
321 | + $this->Text ( 60, 17+$this->inTamY, $this->Titulo1 ); | |
322 | + | |
323 | + $this->setFont('Arial','B',11); // fonte do titulo menor | |
324 | + $this->Text ( 65, 22+$this->inTamY, $this->Titulo2 ); | |
325 | + | |
326 | + $this->setFont('Arial','B',6); // fonte dos labels dos dados | |
327 | + if ( Sessao::read( 'itbi_observacao' ) == 'sim') { | |
328 | + $this->Text ( 8 , 29.5+$this->inTamY, 'ADQUIRENTE' ); | |
329 | + $this->setFont('Arial','B',10); | |
330 | + $this->Text ( 95 , 26+$this->inTamY , 'ITIV' ); | |
331 | + $this->setFont('Arial','B',6); | |
332 | + } else { | |
333 | + $this->Text ( 8 , 29.5, $this->lblContribuinte ); | |
334 | + } | |
335 | + $this->Text ( 115.5, 29.5+$this->inTamY, $this->lblInscricao ); | |
336 | + $this->Text ( 115.5, 36+$this->inTamY , $this->lblCtmDci ); | |
337 | + $this->Text ( 115.5, 42.5+$this->inTamY, $this->lblLogradouro ); | |
338 | + $this->Text ( 143 , 42.5+$this->inTamY, $this->lblDistrito ); | |
339 | + $this->Text ( 153 , 42.5+$this->inTamY, $this->lblCt ); | |
340 | + $this->Text ( 163 , 42.5+$this->inTamY, $this->lblCa ); | |
341 | + $this->Text ( 173 , 42.5+$this->inTamY, $this->lblDtProcesso ); | |
342 | + | |
343 | + $this->Text ( 8 , 49.5+$this->inTamY, $this->lblLocalizacao ); | |
344 | + $this->Text ( 115.5, 49.5+$this->inTamY, $this->lblTerreno ); | |
345 | + $this->Text ( 163 , 49.5+$this->inTamY, $this->lblEdificada ); | |
346 | + $this->Text ( 115.5, 57+$this->inTamY , $this->lblUtilizacaoIm ); | |
347 | + $this->Text ( 163 , 57+$this->inTamY , $this->lblTributo ); | |
348 | + | |
349 | + $this->Text ( 8 , 64+$this->inTamY , $this->lblNroPlanta ); | |
350 | + $this->Text ( 86 , 64+$this->inTamY , $this->lblExercicio ); | |
351 | + $this->Text ( 115.5, 64+$this->inTamY , $this->lblVlTribReal ); | |
352 | + $this->Text ( 163 , 64+$this->inTamY , $this->lblImpAnualReal ); | |
353 | + | |
354 | + if ( Sessao::read( 'itbi_observacao' ) == 'sim') { | |
355 | + $this->Text ( 8 , 73+$this->inTamY ,"REQUERIMENTO DE I.T.I.V." ); | |
356 | + } else { | |
357 | + $this->Text ( 8 , 73 , $this->lblObservacao ); | |
358 | + } | |
359 | + if ( Sessao::read( 'itbi_observacao' ) == 'sim') { | |
360 | + $this->Text ( 115.5, 73+$this->inTamY , "TAXA DE EXPEDIENTE" ); | |
361 | + } else { | |
362 | + $this->Text ( 115.5, 73 , $this->lblLimpAnualRl ); | |
363 | + } | |
364 | + if ( Sessao::read( 'itbi_observacao' ) == 'sim') { | |
365 | + $this->Text ( 163 , 73+$this->inTamY , $this->lblTxAverbacao ); | |
366 | + $this->Text ( 163 , 82+$this->inTamY , $this->lblTotalAnualRl ); | |
367 | + } else { | |
368 | + $this->Text ( 163 , 73 , $this->lblTotalAnualRl ); | |
369 | + $this->Text ( 163 , 82 , $this->lblTotalLancado ); | |
370 | + } | |
371 | + | |
372 | + if ( Sessao::read( 'itbi_observacao' ) == 'sim') { | |
373 | + //$this->Text ( 115.5, 82+$this->inTamY , 'MULTA DE MORA' ); | |
374 | + } else { | |
375 | + $this->Text ( 115.5, 82 , $this->lblReferencia ); | |
376 | + } | |
377 | + | |
378 | + $this->setFont('Arial','' , 5 ); | |
379 | + $this->Text ( 8 , 92+$this->inTamY , $this->lblUrbem ); | |
380 | + | |
381 | + if ($this->stLoginUsuario != "" && $this->stCodUsuario != "") { | |
382 | + $this->Text ( 115.5, 92+$this->inTamY , $this->stCodUsuario." - ".$this->stLoginUsuario ); | |
383 | + } | |
384 | + | |
385 | + /* Fim do layout do quadrado superior */ | |
386 | + } | |
387 | + | |
388 | + /* Posicionamento das variáveis */ | |
389 | + public function posicionaVariaveisProtocolo() | |
390 | + { | |
391 | + $this->setFont('Arial', 'b', 7 ); | |
392 | + if ( !Sessao::read( 'itbi_observacao' ) ) { | |
393 | + $this->Text ( 8 , 34+$this->inTamY , strtoupper($this->stNomCgm) ); | |
394 | + } else { | |
395 | + require_once(CAM_GT_ARR_MAPEAMENTO."TARRImovelVVenal.class.php"); | |
396 | + $obImovelVVenal = new TARRImovelVVenal; | |
397 | + $filtro = "and inscricao_municipal = ".$this->inInscricao; | |
398 | + $obImovelVVenal->recuperaMensagemItbi($rsItbi,$filtro); | |
399 | + $this->stAdquirente = $rsItbi->getCampo('adquirinte'); | |
400 | + | |
401 | + $this->Text ( 8 , 34+$this->inTamY , strtoupper($this->stAdquirente) ); | |
402 | + } | |
403 | + // array com dados do endereço; | |
404 | + $arEnd = explode('|*|',$this->stEnderecoEntrega); | |
405 | + $this->Text ( 8 , 37.5+$this->inTamY , strtoupper($arEnd[0].' '.$arEnd[1])); | |
406 | + $this->Text ( 8 , 41+$this->inTamY , strtoupper($arEnd[2]." - ".$arEnd[3]) ); | |
407 | + $this->Text ( 8 , 44.5+$this->inTamY , strtoupper($arEnd[6].' '.$arEnd[5].' CEP:'.$arEnd[4]) ); | |
408 | + | |
409 | + $this->Text ( 156 , 32+$this->inTamY , strtoupper($this->inInscricao) ); | |
410 | + $this->Text ( 145 , 37.5+$this->inTamY , strtoupper($this->inCtmDci) ); | |
411 | + $this->Text ( 122 , 46+$this->inTamY , strtoupper($this->inCodLogradouro) ); | |
412 | + $this->Text ( 145 , 46+$this->inTamY , strtoupper($this->inDistrito) ); | |
413 | + $this->Text ( 155 , 46+$this->inTamY , strtoupper($this->inCt) ); | |
414 | + $this->Text ( 165 , 46+$this->inTamY , strtoupper($this->inCa) ); | |
415 | + $this->Text ( 180 , 46+$this->inTamY , strtoupper($this->dtProcessamento) ); | |
416 | + | |
417 | + $this->Text ( 8 , 54+$this->inTamY , strtoupper($this->stRua.' '.$this->stNumero) ); | |
418 | + $this->Text ( 8 , 58+$this->inTamY , strtoupper($this->stComplemento." - ".$this->stNomBairro) ); | |
419 | + $this->Text ( 145 , 52.5+$this->inTamY , strtoupper($this->flAreaTerreno) ); | |
420 | + $this->Text ( 185 , 52.5+$this->inTamY , strtoupper($this->flAreaEdificada) ); | |
421 | + | |
422 | + $this->Text ( 130 , 60.5+$this->inTamY , strtoupper($this->stUtilizacaoImovel) ); | |
423 | + $this->setFont('Arial', 'b' , 6 ); | |
424 | + $this->Text ( 165 , 60.5+$this->inTamY , strtoupper(substr($this->stTributo,0,28)) ); | |
425 | + $this->Text ( 165 , 68.5+$this->inTamY , strtoupper(substr($this->stTributo2,0,28)) ); | |
426 | + $this->setFont('Arial', 'b', 7 ); | |
427 | + $this->Text ( 90 , 68+$this->inTamY , strtoupper($this->stExercicio) ); | |
428 | +// $this->Text ( 8 , 76.5 , strtoupper($this->stObservacao)); | |
429 | + | |
430 | + // Observacao | |
431 | + // 3 linhas de observacao | |
432 | + if ( Sessao::read( 'itbi_observacao' ) == 'sim') { | |
433 | + require_once(CAM_GT_ARR_MAPEAMENTO."TARRImovelVVenal.class.php"); | |
434 | + $obImovelVVenal = new TARRImovelVVenal; | |
435 | + $filtro = "and inscricao_municipal = ".$this->inInscricao; | |
436 | + $obImovelVVenal->recuperaMensagemItbi($rsItbi,$filtro); | |
437 | + $rsItbi->addFormatacao ('base_calculo','NUMERIC_BR'); | |
438 | + $rsItbi->addFormatacao ('valor_financiado','NUMERIC_BR'); | |
439 | + $rsItbi->addFormatacao ('valor_pactuado','NUMERIC_BR'); | |
440 | + //$stObsL1 = "Adquirinte : ".$rsItbi->getCampo('adquirinte'); | |
441 | + //$stObsL2 = "Transmitente : ".$rsItbi->getCampo('transmitente'); | |
442 | + $stObsL3 = "Base de Calculo : ".$rsItbi->getCampo('base_calculo')." ITIV: ".$this->flImpostoAnualReal; | |
443 | + $stObsL4 = "Valor Financiado : ".$rsItbi->getCampo('valor_financiado'); | |
444 | + //$stObsL5 = "Valor Pactuado : ".$rsItbi->getCampo('valor_pactuado'); | |
445 | + $stObsL5 = "Natureza de Transferência: ".$rsItbi->getCampo('cod_natureza')." - ".$rsItbi->getCampo('descricao'); | |
446 | + if ( $rsItbi->getCampo('cod_processo') ) | |
447 | + $stObsL7 = "Processo : ".$rsItbi->getCampo('cod_processo')."/".$rsItbi->getCampo('exercicio'); | |
448 | + | |
449 | + $this->Text ( 8 , 75.5+$this->inTamY , $stObsL3 ); | |
450 | + $this->Text ( 8 , 78+$this->inTamY , $stObsL4 ); | |
451 | + $this->Text ( 8 , 80.5+$this->inTamY , $stObsL5 ); | |
452 | + $this->Text ( 8 , 83+$this->inTamY , $stObsL6 ); | |
453 | + $this->Text ( 8 , 85.5 +$this->inTamY, $stObsL7 ); | |
454 | +// $this->Text ( 8 , 88 , $stObsL6 ); | |
455 | +// $this->Text ( 70 , 73 , $stObsL7 ); | |
456 | + // coloca atributo TRANSMITENTE no cabeçaho | |
457 | + $this->Text ( 8 , 34+$this->inTamY , strtoupper($rsItbi->getCampo('transmitente') )); | |
458 | + | |
459 | + } else { | |
460 | + $stObs = str_replace("\n"," ",$this->stObservacao); | |
461 | + $this->Text ( 8 , 76.5+$this->inTamY , substr($stObs,0 ,70 )); | |
462 | + $this->Text ( 8 , 79+$this->inTamY , substr($stObs,70 ,70 )); | |
463 | + $this->Text ( 8 , 81.5+$this->inTamY , substr($stObs,140 ,70 )); | |
464 | + $this->Text ( 8 , 84+$this->inTamY , substr($stObs,210 ,70 )); | |
465 | + $this->Text ( 8 , 86.5+$this->inTamY , substr($stObs,280 ,70 )); | |
466 | + } | |
467 | + // caso seja itbi, mostra o valor de base da calculo como valor tributavel | |
468 | + if ( Sessao::read( 'itbi_observacao' ) == 'sim') | |
469 | + $this->Text ( 145 , 68+$this->inTamY , $rsItbi->getCampo('base_calculo')); | |
470 | + else | |
471 | + $this->Text ( 145 , 68 , strtoupper($this->flValorTributoReal) ); | |
472 | + | |
473 | + $this->Text ( 183 , 68+$this->inTamY , strtoupper($this->flImpostoAnualReal ) ); | |
474 | + if ( Sessao::read( 'itbi_observacao' ) == 'sim') { | |
475 | + $this->Text ( 145 , 76.5+$this->inTamY , $rsItbi->getCampo('taxa') ); | |
476 | + $this->Text ( 145 , 85.5+$this->inTamY , $rsItbi->getCampo('multa') ); | |
477 | + $this->Text ( 183 , 76.5+$this->inTamY , $this->flTxAverbacao ); | |
478 | + } else { | |
479 | + $this->Text ( 145 , 76.5 , strtoupper($this->flTaxaLimpezaAnual) ); | |
480 | + } | |
481 | + if ( Sessao::read( 'itbi_observacao' ) == 'sim') { | |
482 | + $vlrTaxa = str_replace(',','.',str_replace('.','',$rsItbi->getCampo('taxa'))); | |
483 | + $vlrImp = str_replace(',','.',str_replace('.','',$this->flValorAnualReal)); | |
484 | + $vlrAnual = $vlrImp+$vlrTaxa; | |
485 | + | |
486 | + //$this->Text ( 183 , 85.5+$this->inTamY , number_format($vlrAnual,2,',','.') ); | |
487 | + $this->Text ( 183 , 85.5+$this->inTamY , $this->flImpostoAnualReal); //number_format($this->flImpostoAnualReal,2,',','.') ); | |
488 | + } else { | |
489 | + $this->Text ( 183 , 76.5 , strtoupper($this->flValorAnualReal) ); | |
490 | + $this->Text ( 183 , 85.5 , number_format($this->flTotalLancado,2,',','.') ); | |
491 | + } | |
492 | + $this->Text ( 115.5 , 85.5+$this->inTamY , strtoupper($this->inReferencia) ); | |
493 | + //limpar memoria | |
494 | + unset($rsItbi,$obImovelVVenal); | |
495 | + } | |
496 | + /* Fim do posicionamento das variáveis */ | |
497 | + | |
498 | + /* gera o PDF */ | |
499 | + public function show() | |
500 | + { | |
501 | + $this->output('Carne.pdf','D'); | |
502 | + } | |
503 | + | |
504 | + /* adiciona nova pagina */ | |
505 | + public function novaPagina() | |
506 | + { | |
507 | + $this->addPage(); | |
508 | + } | |
509 | + /* | |
510 | + * Desenha informações complementares | |
511 | + */ | |
512 | + public function drawComplemento($x,$y) | |
513 | + { | |
514 | + ; | |
515 | + $this->setFont('Arial','',10); | |
516 | + | |
517 | + /* retangulos */ | |
518 | + $this->Rect( $x, $y, 92, 74 ); | |
519 | + $this->Rect( ($x+95), $y, 102, 74 ); | |
520 | + | |
521 | + $this->setFont('Arial','BU',8); | |
522 | + /* Cada nova linha sao mais 3.5 */ | |
523 | + /* esquerda */ | |
524 | + $this->Text ( ($x+5) , ($y+3.5) , strtoupper('REDE AUTORIZADA PARA ARRECADAÇÃO VENCIMENTO DO') ); | |
525 | + $this->Text ( ($x+40) , ($y+7) , strtoupper('IPTU-2006') ); | |
526 | + | |
527 | + $this->setFont('Arial','',8); | |
528 | + $this->Text ( ($x+7) , ($y+12) , strtoupper('BRADESCO - BANCO DO BRASIL - BANESPA - BCN -') ); | |
529 | + $this->Text ( ($x+6) , ($y+15.5) , strtoupper('BANERJ - CAIXA ECONOMICA - HSBC - ITAU -REAL -') ); | |
530 | + $this->Text ( ($x+5) , ($y+19) , strtoupper('UNIBANCO - CASAS LOTÉRICAS - SUPERMERCADOS') ); | |
531 | + $this->Text ( ($x+25) , ($y+22.5), strtoupper('CREDENCIADOS - BANCO POSTAL') ); | |
532 | + | |
533 | + $this->setFont('Arial','BU',8); | |
534 | + $this->Text ( ($x+30) , ($y+26) , strtoupper('FORMA DE PAGAMENTO') ); | |
535 | + | |
536 | + $this->setFont('Arial','',8); | |
537 | + $this->Text ( ($x+9) , ($y+31) , strtoupper('AGÊNCIA BANCÁRIA INTERNET TELEFONE REDE AUTO') ); | |
538 | + $this->Text ( ($x+32) , ($y+34.5) , strtoupper('ATENDIMENTO(24h)') ); | |
539 | + $this->setFont('Arial','',6); | |
540 | + $this->Text ( ($x+2) , ($y+38) , 'Dependendo dos serviços disponibilizados pelo Banco escolhido para efetuar o pagamento' ) ; | |
541 | +// $this->Text ( ($x+35) , ($y+41.5), 'efetuar o pagamento') ; | |
542 | + | |
543 | + // direita | |
544 | + $this->setFont('Arial','BU',8); | |
545 | + $x +=92; | |
546 | + $this->Text ( ($x+12) , ($y+3.5) , strtoupper('FATORES DE ATUALIZAÇÃO APÓS O VENCIMENTO') ); | |
547 | + $this->setFont('Arial','',8); | |
548 | + $this->Text ( ($x+5) , ($y+12) , 'MULTA: 5% no primeiro mês ou fração' ); | |
549 | + $this->Text ( ($x+5) , ($y+15.5) , ' 10% no segundo mês ou fração' ); | |
550 | + $this->Text ( ($x+5) , ($y+19) , ' 15% no terceiro mês ou fração' ); | |
551 | + $this->Text ( ($x+5) , ($y+22.5) , ' 20% a partir do quarto mês ou fração' ); | |
552 | + $this->Text ( ($x+5) , ($y+26) , 'JUROS: ' ); | |
553 | + $this->Text ( ($x+5) , ($y+29.5) , ' 1% ao mês ou fração, a partir do mês' ); | |
554 | + $this->Text ( ($x+5) , ($y+33) , ' subsequente ao Vencimento ' ); | |
555 | + | |
556 | + $this->setFont('Arial','BU',8); | |
557 | + $this->Text ( ($x+26) , ($y+38) , strtoupper('INFORMAÇÕES COMPLEMENTARES') ); | |
558 | + | |
559 | + $this->setFont('Arial','',8); | |
560 | + $this->Text ( ($x+5) , ($y+45) , '- A segunda via do carnê poderá ser obtida via internet,ou na') ; | |
561 | + $this->Text ( ($x+5) , ($y+48.5), ' Secretaria de fazenda, Rua 16 de Março, 183 - Centro.') ; | |
562 | + $this->Text ( ($x+5) , ($y+52) , '- Quando o pagamento ultrapassar o dia de vencimento previsto ') ; | |
563 | + $this->Text ( ($x+5) , ($y+55.5), 'no carnê, o IPTU será devido com os acréscimos legais') ; | |
564 | + $this->Text ( ($x+5) , ($y+59) , '- Ao receber o carnê do IPTU o contribuinte deverá verificar ') ; | |
565 | + $this->Text ( ($x+5) , ($y+63) , ' se os dados estão corretos, e em caso de alguma divergência,') ; | |
566 | + $this->Text ( ($x+5) , ($y+66.5), ' apresentar sua reclamação antes do vencimento da primeira') ; | |
567 | + $this->Text ( ($x+5) , ($y+70) , ' Cota Única, garantindo seus direitos') ; | |
568 | + | |
569 | + } | |
570 | +} | |
571 | + | |
572 | +class RCarneDiversosPetropolis extends RProtocolo | |
573 | +{ | |
574 | + /* labels */ | |
575 | + public $lblTitulo1 = 'MATA DE SÃO JOÃO - Sec. de Adm. e Fin.'; | |
576 | + public $lblTitulo2 = 'IPTU'; | |
577 | + public $lblExercicio = 'EXERCÍCIO'; | |
578 | + public $lblInscricao = 'INSCRIÇÃO'; | |
579 | + public $lblInscricaoDivida = 'INSC. DIV.'; | |
580 | + public $lblCodDivida = 'CÓD. DÍVIDA'; | |
581 | + public $lblTributo = 'TRIBUTO DÍVIDA ATIVA'; | |
582 | + public $lblParcela = 'PARCELA'; | |
583 | + public $lblReferencia = 'REFERÊNCIA'; | |
584 | + public $lblDataProcessamento = 'DATA PROCESSAMENTO'; | |
585 | + public $lblVencimento = 'VENCIMENTO'; | |
586 | + public $lblValorCotaUnica = 'VALOR COTA ÚNICA'; | |
587 | + public $lblContribuinte = 'CONTRIBUINTE'; | |
588 | + public $lblData = 'DATA'; | |
589 | + public $lblCorrecao = 'CORREÇÃO'; | |
590 | + public $lblMonetaria = 'MONET(%)'; | |
591 | + public $lblObs = 'OBSERVAÇÃO'; | |
592 | + | |
593 | + public $lblMulta = '(+) MULTA DE MORA'; | |
594 | + public $lblMultaI = '(+) MULTA DE INFRAÇÃO'; | |
595 | + public $lblJuros = '(+) JUROS DE MORA'; | |
596 | + public $lblOutros = '(+) ATUALIZAÇÃO MONETÁRIA'; | |
597 | + | |
598 | + public $lblValorParcela = 'VALOR PARCELA'; | |
599 | + public $lblReal = '(REAL)'; | |
600 | + public $lblNumeracao = 'NOSSO NÚMERO'; | |
601 | + public $lblNumeroAcordo = 'COBRANÇA'; | |
602 | + | |
603 | + public $lblValorPrincipal = "(=) VALOR PRINCIPAL"; | |
604 | + public $lblValorTotal = "(=) TOTAL"; | |
605 | + | |
606 | + /* variaveis */ | |
607 | + public $ImagemCarne; | |
608 | + public $stExercicio; | |
609 | + public $inInscricao; | |
610 | + public $inAcordo; | |
611 | + public $inCodDivida; | |
612 | + public $stTributo; | |
613 | + public $stTributoAbrev; | |
614 | + public $stTributoAbrev2; | |
615 | + public $stTributoAbrev3; | |
616 | + public $stParcela; | |
617 | + public $inReferencia; | |
618 | + public $dtProcessamento; | |
619 | + public $dtVencimento; | |
620 | + public $dtVencimentof1; | |
621 | + public $dtVencimentof2; | |
622 | + public $dtVencimentof3; | |
623 | + public $flValorCotaUnica; | |
624 | + public $flValor; | |
625 | + public $flValorf1; | |
626 | + public $flValorf2; | |
627 | + public $flValorf3; | |
628 | + public $stNomCgm; | |
629 | + public $stBarCode; | |
630 | + public $boParcelaUnica; | |
631 | + public $stObservacaoL1; | |
632 | + public $stObservacaoL2; | |
633 | + public $stObservacaoL3; | |
634 | + public $stObsVencimento; // = "Não receber após o vencimento."; | |
635 | + public $stNumeracao; | |
636 | + public $flValorMulta = '0,00'; | |
637 | + public $flValorJuros = '0,00'; | |
638 | + public $flValorMultaJuros = '0,00'; | |
639 | + public $flValorOutros = '0,00'; | |
640 | + public $flValorTotal = '0,00'; | |
641 | + public $stCarteira = '000/000'; | |
642 | + public $stEspecieDoc = 'OU(Outros)'; | |
643 | + public $stEspecie = 'REAL'; | |
644 | + public $stAceite = 'N'; | |
645 | + public $stDataProcessamento = '01/10/2009'; | |
646 | + public $stAgenciaCodCedente = '001-1/001'; | |
647 | + public $stLocalPagamento = 'Pagável em qualquer banco até o vencimento'; | |
648 | + public $stCedente = 'Prefeitura Municipal de Mata de São João'; | |
649 | + public $stDataDocumento = '01/10/2009'; | |
650 | + public $stQuantidade = "200"; | |
651 | + public $tamY = 0.93; | |
652 | + | |
653 | + /* setters */ | |
654 | + public function setImagemCarne($valor) { $this->ImagemCarne = $valor; } | |
655 | + public function setExercicio($valor) { $this->stExercicio = $valor; } | |
656 | + public function setInAcordo($valor) { $this->inAcordo = $valor; } | |
657 | + public function setInscricaoDivida($valor) { $this->inInscricaoDivida= $valor; } | |
658 | + public function setInscricao($valor) { $this->inInscricao = $valor; } | |
659 | + public function setCodDivida($valor) { $this->inCodDivida = $valor; } | |
660 | + public function setTributo($valor) { $this->stTributo = $valor; } | |
661 | + public function setTributoAbrev($valor) { $this->stTributoAbrev = $valor; } | |
662 | + public function setTributoAbrev2($valor) { $this->stTributoAbrev2 = $valor; } | |
663 | + public function setTributoAbrev3($valor) { $this->stTributoAbrev3 = $valor; } | |
664 | + public function setParcela($valor) { $this->stParcela = $valor; } | |
665 | + public function setReferencia($valor) { $this->inReferencia = $valor; } | |
666 | + public function setProcessamento($valor) { $this->dtProcessamento = $valor; } | |
667 | + public function setVencimento($valor) { $this->dtVencimento = $valor; } | |
668 | + public function setVencimento1($valor) { $this->dtVencimentof1 = $valor; } | |
669 | + public function setVencimento2($valor) { $this->dtVencimentof2 = $valor; } | |
670 | + public function setVencimento3($valor) { $this->dtVencimentof3 = $valor; } | |
671 | + public function setValorCotaUnica($valor) { $this->flValorCotaUnica = $valor; } | |
672 | + public function setValor($valor) { $this->flValor = $valor; } | |
673 | + public function setValor1($valor) { $this->flValorf1 = $valor; } | |
674 | + public function setValor2($valor) { $this->flValorf2 = $valor; } | |
675 | + public function setValor3($valor) { $this->flValorf3 = $valor; } | |
676 | + public function setNomCgm($valor) { $this->stNomCgm = $valor; } | |
677 | + public function setBarCode($valor) { $this->stBarCode = $valor; } | |
678 | + public function setLinhaCode($valor) { $this->stLinhaCode = $valor; } | |
679 | + public function setParcelaUnica($valor) { $this->boParcelaUnica = $valor; } | |
680 | + public function setObservacaoL1($valor) { $this->stObservacaoL1 = $valor; } | |
681 | + public function setObservacaoL2($valor) { $this->stObservacaoL2 = $valor; } | |
682 | + public function setObservacaoL3($valor) { $this->stObservacaoL3 = $valor; } | |
683 | + public function setObsVencimento($valor) { $this->stObsVencimento = $valor; } | |
684 | + public function setNumeracao($valor) { $this->stNumeracao = $valor; } | |
685 | + public function setValorTotal($valor) { $this->flValorTotal = $valor; } | |
686 | + | |
687 | + /* getters */ | |
688 | + public function getImagemCarne() { return $this->ImagemCarne ; } | |
689 | + public function getExercicio() { return $this->stExercicio ; } | |
690 | + public function getInscricao() { return $this->inInscricao ; } | |
691 | + public function getCodDivida() { return $this->inCodDivida ; } | |
692 | + public function getTributo() { return $this->stTributo ; } | |
693 | + public function getTributoAbrev() { return $this->stTributoAbrev ; } | |
694 | + public function getParcela() { return $this->stParcela ; } | |
695 | + public function getReferencia() { return $this->inReferencia ; } | |
696 | + public function getProcessamento() { return $this->dtProcessamento ; } | |
697 | + public function getVencimento() { return $this->dtVencimento ; } | |
698 | + public function getVencimento1() { return $this->dtVencimentof1 ; } | |
699 | + public function getVencimento2() { return $this->dtVencimentof2 ; } | |
700 | + public function getVencimento3() { return $this->dtVencimentof3 ; } | |
701 | + public function getValorCotaUnica() { return $this->flValorCotaUnica ; } | |
702 | + public function getValor() { return $this->flValor ; } | |
703 | + public function getValor1() { return $this->flValorf1 ; } | |
704 | + public function getValor2() { return $this->flValorf2 ; } | |
705 | + public function getValor3() { return $this->flValorf3 ; } | |
706 | + public function getNomCgm() { return $this->stNomCgm ; } | |
707 | + public function getBarCode() { return $this->stBarCode ; } | |
708 | + public function getLinhaCode() { return $this->stLinhaCode ; } | |
709 | + public function getParcelaUnica() { return $this->boParcelaUnica ; } | |
710 | + public function getObservacaoL1() { return $this->stObservacaoL1 ; } | |
711 | + public function getObservacaoL2() { return $this->stObservacaoL2 ; } | |
712 | + public function getObservacaoL3() { return $this->stObservacaoL3 ; } | |
713 | + public function getObsVencimento() { return $this->stObsVencimento ; } | |
714 | + public function getNumeracao() { return $this->stNumeracao ; } | |
715 | + | |
716 | + /* configura carne */ | |
717 | + public function configuraCarne() | |
718 | + { | |
719 | + $this->open(); | |
720 | + $this->setTextColor(0); | |
721 | + $this->addPage(); | |
722 | + $this->setLeftMargin(0); | |
723 | + $this->setTopMargin(0); | |
724 | + $this->SetLineWidth(0.01); | |
725 | + } | |
726 | + | |
727 | + /* layout do carne */ | |
728 | + public function drawCarne($x, $y) | |
729 | + { | |
730 | + // truncar tributo | |
731 | + if ( !$this->stTributoAbrev ) | |
732 | + $this->stTributoAbrev = substr($this->stTributo,0,25); | |
733 | + | |
734 | + $this->stNomCgm = substr($this->stNomCgm ,0,80); | |
735 | + $this->setFont( 'Arial','',10 ); | |
736 | + | |
737 | + $inAlteracaoMata = 48; | |
738 | + | |
739 | + $stBB = "../../../../../../gestaoAdministrativa/fontes/PHP/framework/temas/padrao/imagens/bb.jpg"; | |
740 | + $stExt = substr( $stBB, strlen($stBB)-3, strlen($stBB) ); | |
741 | + $this->Image( $stBB, $x+28+$inAlteracaoMata, $y+(6*$this->tamY)+0.5, 35, 4, $stExt ); | |
742 | + | |
743 | + if ($this->ImagemCarne) { | |
744 | + $stExt = substr( $this->ImagemCarne, strlen($this->ImagemCarne)-3, strlen($this->ImagemCarne) ); | |
745 | + $this->Image( $this->ImagemCarne, $x, $y+6, 16, 9, $stExt ); | |
746 | + } | |
747 | + $this->setFillColor( 240 ); | |
748 | + $this->Rect( $x, $y+(41*$this->tamY), 48, 5*$this->tamY, 'DF' ); | |
749 | + // linhas horizontais | |
750 | + $this->Line( $x+27+$inAlteracaoMata, ($y+(11*$this->tamY)), (197+$x), ($y+(11*$this->tamY)) ); | |
751 | + | |
752 | + $this->Line( $x, ($y+(17*$this->tamY)), (25+$x)+$inAlteracaoMata, ($y+(17*$this->tamY)) ); | |
753 | + $this->Line( $x+27+$inAlteracaoMata, ($y+(17*$this->tamY)), (197+$x), ($y+(17*$this->tamY)) ); | |
754 | + | |
755 | + $this->Line( $x, ($y+(23*$this->tamY)), (25+$x)+$inAlteracaoMata, ($y+(23*$this->tamY)) ); | |
756 | + $this->Line( $x+27+$inAlteracaoMata, ($y+(23*$this->tamY)), (197+$x), ($y+(23*$this->tamY)) ); | |
757 | + | |
758 | + $this->Line( $x, ($y+(29*$this->tamY)), (25+$x)+$inAlteracaoMata, ($y+(29*$this->tamY)) ); | |
759 | + $this->Line( $x+27+$inAlteracaoMata, ($y+(29*$this->tamY)), (197+$x), ($y+(29*$this->tamY)) ); | |
760 | + | |
761 | + $this->Line( $x+48, ($y+(35*$this->tamY)), (25+$x)+$inAlteracaoMata, ($y+(35*$this->tamY)) ); | |
762 | + $this->Line( $x+27+$inAlteracaoMata, ($y+(35*$this->tamY)), (197+$x), ($y+(35*$this->tamY)) ); | |
763 | + | |
764 | + $this->Line( $x, ($y+(41*$this->tamY)), (25+$x)+$inAlteracaoMata, ($y+(41*$this->tamY)) ); | |
765 | + $this->Line( $x+158, ($y+(41*$this->tamY)), (197+$x), ($y+(41*$this->tamY)) ); | |
766 | + | |
767 | + $this->Line( $x, ($y+(46*$this->tamY)), (25+$x)+$inAlteracaoMata, ($y+(46*$this->tamY)) ); | |
768 | + $this->Line( $x+158, ($y+(46*$this->tamY)), (197+$x), ($y+(46*$this->tamY)) ); | |
769 | + | |
770 | + $this->Line( $x, ($y+(51*$this->tamY)), (25+$x)+$inAlteracaoMata, ($y+(51*$this->tamY)) ); | |
771 | + $this->Line( $x+158, ($y+(51*$this->tamY)), (197+$x), ($y+(51*$this->tamY)) ); | |
772 | + | |
773 | + $this->Line( $x, ($y+(56*$this->tamY)), (25+$x)+$inAlteracaoMata, ($y+(56*$this->tamY)) ); | |
774 | + $this->Line( $x+158, ($y+(57*$this->tamY)), (197+$x), ($y+(57*$this->tamY)) ); | |
775 | + | |
776 | + $this->Line( $x, ($y+(61*$this->tamY)), (25+$x)+$inAlteracaoMata, ($y+(61*$this->tamY)) ); | |
777 | + $this->Line( $x+27+$inAlteracaoMata, ($y+(63*$this->tamY)), (197+$x), ($y+(63*$this->tamY)) ); | |
778 | + | |
779 | + $this->Line( $x+27+$inAlteracaoMata, ($y+(75*$this->tamY)), (197+$x), ($y+(75*$this->tamY)) ); | |
780 | + | |
781 | + $this->Line( $x+128, ($y+(69*$this->tamY)), (197+$x), ($y+(69*$this->tamY)) ); | |
782 | + | |
783 | + // linhas verticais | |
784 | + $this->Line( $x+48, $y+(17*$this->tamY), $x+48, $y+(46*$this->tamY) ); //nova do canhotinho | |
785 | + $this->Line( $x+48, $y+(56*$this->tamY), $x+48, $y+(61*$this->tamY) ); //nova inscricao | |
786 | + | |
787 | + $this->Line( $x+66+$inAlteracaoMata, $y+(6*$this->tamY), 66+$x+$inAlteracaoMata, $y+(11*$this->tamY) ); | |
788 | + | |
789 | + $this->Line( $x+42+$inAlteracaoMata, $y+(23*$this->tamY), 42+$x+$inAlteracaoMata, $y+(35*$this->tamY) ); | |
790 | + $this->Line( $x+65+$inAlteracaoMata, $y+(23*$this->tamY), 65+$x+$inAlteracaoMata, $y+(35*$this->tamY) ); | |
791 | + $this->Line( $x+80+$inAlteracaoMata, $y+(23*$this->tamY), 80+$x+$inAlteracaoMata, $y+(35*$this->tamY) ); | |
792 | + $this->Line( $x+94+$inAlteracaoMata, $y+(23*$this->tamY), 94+$x+$inAlteracaoMata, $y+(35*$this->tamY) ); | |
793 | + | |
794 | + $this->Line( $x+80+$inAlteracaoMata, $y+(63*$this->tamY), 80+$x+$inAlteracaoMata, $y+(75*$this->tamY) ); | |
795 | + | |
796 | + //linhas verticalnosso numero parcela | |
797 | + $this->Line( $x+24, $y+(17*$this->tamY), 24+$x, $y+(29*$this->tamY) ); | |
798 | + | |
799 | + $this->Line( $x+158, $y+(11*$this->tamY), 158+$x, $y+(75*$this->tamY) ); | |
800 | + | |
801 | + $this->setFont ( 'Arial', 'B', 7 ); | |
802 | + $this->Text ( $x+38, $y+(11*$this->tamY), "MATA DE SÃO JOÃO" ); | |
803 | + $this->Text ( $x+38, $y+(13*$this->tamY)+0.5, "Sec. de Adm. e Fin." ); | |
804 | + $this->setFont ( 'Arial', 'B', 6 ); | |
805 | + $this->Text ( $x+38, $y+(16*$this->tamY), "DÍVIDA ATIVA REFIS " . Sessao::getExercicio() ); | |
806 | + | |
807 | + $this->setFont ( 'Arial', '', 6 ); | |
808 | + $this->Text ( $x, $y+(19*$this->tamY), "Nosso Número" ); | |
809 | + $this->Text ( $x, $y+(22*$this->tamY), $this->stNumeracao ); | |
810 | + | |
811 | + $this->Text ( $x+24.5, $y+(19*$this->tamY), "Parcela" ); | |
812 | + $this->Text ( $x+24.5, $y+(22*$this->tamY), $this->stParcela ); | |
813 | + | |
814 | + $this->Text ( $x, $y+(25*$this->tamY), "Insc. Div." ); | |
815 | + $this->Text ( $x, $y+(28*$this->tamY), $this->inInscricaoDivida ); | |
816 | + | |
817 | + $this->Text ( $x+24.5, $y+(25*$this->tamY), "Cobrança" ); | |
818 | + $this->Text ( $x+24.5, $y+(28*$this->tamY), $this->stNroCobrancaDA ); | |
819 | + | |
820 | + $this->Text ( $x, $y+(43*$this->tamY), "Vencimento" ); | |
821 | + $stVnc = str_replace( "\n\r", " ", "Não receber após o vencimento." ); | |
822 | + $this->setFont ( 'Arial', '', 5 ); | |
823 | + $this->Text ( $x, $y+(45*$this->tamY), $stVnc ); | |
824 | + $this->setFont ( 'Arial', '', 6 ); | |
825 | + | |
826 | + $this->Text ( $x+30, $y+(43*$this->tamY), $this->dtVencimento ); | |
827 | + | |
828 | + $this->setFont ( 'Arial', '', 5 ); | |
829 | + $this->Text ( $x, $y+(48*$this->tamY), "Multa de Mora 10% após o vencimento" ); | |
830 | + $this->Text ( $x, $y+(50*$this->tamY), "e Juros de Mora 1% = 0,033% ao dia" ); | |
831 | + | |
832 | + $this->setFont ( 'Arial', '', 4 ); | |
833 | + $this->Text ( $x, $y+(31*$this->tamY), "Tributo" ); | |
834 | + $stTrb = str_replace( "\n\r", " ", $this->stTributo ); | |
835 | + $this->Text ( $x, $y+(33*$this->tamY), substr( $stTrb, 0, 75 ) ); | |
836 | + $this->Text ( $x, $y+(35*$this->tamY), substr( $stTrb, 75, 75 ) ); | |
837 | + $this->Text ( $x, $y+(37*$this->tamY), substr( $stTrb, 150, 75 ) ); | |
838 | + $this->Text ( $x, $y+(39*$this->tamY), substr( $stTrb, 225, 75 ) ); | |
839 | + $this->Text ( $x, $y+(41*$this->tamY), substr( $stTrb, 300, 75 ) ); | |
840 | + | |
841 | + $this->setFont ( 'Arial', '', 6 ); | |
842 | + | |
843 | + $this->Text ( $x+48.5, $y+(19*$this->tamY), "(=) Valor Principal" ); | |
844 | + $this->Text ( $x+48.5, $y+(22*$this->tamY), $this->flValor ); | |
845 | + | |
846 | + $this->Text ( $x+48.5, $y+(25*$this->tamY), "(+) Multa de Mora" ); | |
847 | + $this->Text ( $x+48.5, $y+(28*$this->tamY), $this->flValorMulta ); | |
848 | + | |
849 | + $this->Text ( $x+48.5, $y+(31*$this->tamY), "(+) Juros de Mora" ); | |
850 | + $this->Text ( $x+48.5, $y+(34*$this->tamY), $this->flValorJuros ); | |
851 | + | |
852 | + $this->Text ( $x+48.5, $y+(37*$this->tamY), "(+) At. Monet." ); | |
853 | + $this->Text ( $x+48.5, $y+(40*$this->tamY), $this->flValorOutros ); | |
854 | + | |
855 | + $this->Text ( $x+48.5, $y+(43*$this->tamY), "(=) Total" ); | |
856 | + $this->Text ( $x+48.5, $y+(45*$this->tamY)+0.5, $this->flValorTotal ); | |
857 | + | |
858 | + $this->Text ( $x, $y+(63*$this->tamY), "Observação" ); | |
859 | + $this->Text ( $x+38, $y+(63*$this->tamY), "Via Contribuinte" ); | |
860 | + | |
861 | + $stObs = str_replace( "\n\r", " ", $this->stObservacao ); | |
862 | + for ($inY = 65,$inObs = 0;$inY<79;$inY += 2, $inObs +=65) { | |
863 | + $this->Text ( $x, $y+($inY*$this->tamY), substr( $stObs, $inObs, 65 ) ); | |
864 | + } | |
865 | + | |
866 | + $this->Text ( $x, $y+(53*$this->tamY), "Contribuinte" ); | |
867 | + $this->Text ( $x, $y+(55*$this->tamY), substr( $this->getNomCgm(), 0, 70 ) ); | |
868 | + | |
869 | + $this->Text ( $x, $y+(58*$this->tamY), "Endereço do Imóvel" ); | |
870 | + $this->Text ( $x, $y+(60*$this->tamY), substr( $this->getRua(), 0, 48 ) ); | |
871 | + | |
872 | + $this->Text ( $x+48.5, $y+(58*$this->tamY), "Inscrição" ); | |
873 | + $this->Text ( $x+48.5, $y+(60*$this->tamY), $this->inInscricao ); | |
874 | + | |
875 | + $this->setFont ( 'Arial', '', 6 ); | |
876 | + $this->Text ( $x+27+$inAlteracaoMata, $y+(13*$this->tamY), "Local de Pagamento" ); | |
877 | + $this->Text ( $x+27+$inAlteracaoMata, $y+(16*$this->tamY), $this->stLocalPagamento ); | |
878 | + | |
879 | + $this->Text ( $x+27+$inAlteracaoMata, $y+(19*$this->tamY), "Cedente" ); | |
880 | + $this->Text ( $x+27+$inAlteracaoMata, $y+(22*$this->tamY), $this->stCedente ); | |
881 | + | |
882 | + $this->Text ( $x+27+$inAlteracaoMata, $y+(25*$this->tamY), "Data do Doc." ); | |
883 | + $this->Text ( $x+27+$inAlteracaoMata, $y+(28*$this->tamY), $this->stDataDocumento ); | |
884 | + | |
885 | + $this->Text ( $x+27+$inAlteracaoMata, $y+(31*$this->tamY), "Uso do Banco" ); | |
886 | + | |
887 | + $stObs = str_replace( "\n\r", " ", str_pad($this->stObsVencimento,70,' ').$this->stObservacao ); | |
888 | + $stObs = str_pad( $stObs,((int) (strlen($stObs)/70)+1)*70,' '); | |
889 | + $stTrbInstrucoes = str_pad('Tributo',70,' '); | |
890 | + $stTrbInstrucoes = str_pad($stTrbInstrucoes,70,' ',STR_PAD_RIGHT); | |
891 | + $stTrb = str_replace(' ','',$stTrb); | |
892 | + $arTrb = explode(',',$stTrb); | |
893 | + | |
894 | + $inContTamanho = 1; | |
895 | + foreach ($arTrb AS $stTributoExerc) { | |
896 | + if (strlen($stTrbInstrucoes) + strlen($stTributoExerc) > $inContTamanho * 70 ) { | |
897 | + //ajuste para montar sem quebras no boleto | |
898 | + $stTrbInstrucoes = str_pad($stTrbInstrucoes,$inContTamanho * 70,' '); | |
899 | + $inContTamanho++; | |
900 | + } | |
901 | + $stTrbInstrucoes .= $stTributoExerc.", "; | |
902 | + } | |
903 | + $stTrbInstrucoes = substr($stTrbInstrucoes, 0, -2); | |
904 | + | |
905 | + $stObs.=$stTrbInstrucoes; | |
906 | + | |
907 | + $this->Text ( $x+27+$inAlteracaoMata, $y+(37*$this->tamY), "Instruções" ); | |
908 | + for ($inY = 40,$inObs = 0;$inY<58;$inY += 2, $inObs +=70) { | |
909 | + $this->Text ( $x+27+$inAlteracaoMata, $y+($inY*$this->tamY), substr( $stObs, $inObs, 70 ) ); | |
910 | + } | |
911 | + | |
912 | + $this->Text ( $x+27+$inAlteracaoMata, $y+(65*$this->tamY), "Sacado" ); | |
913 | + $this->Text ( $x+27+$inAlteracaoMata, $y+(67*$this->tamY), substr( $this->getNomCgm(), 0, 120 ) ); | |
914 | + $this->Text ( $x+27+$inAlteracaoMata, $y+(69*$this->tamY), substr($this->getRua(), 0, 53) ); | |
915 | + $this->Text ( $x+27+$inAlteracaoMata, $y+(71*$this->tamY), substr($this->getRua(), 53, 53) ); | |
916 | + $this->Text ( $x+27+$inAlteracaoMata, $y+(73*$this->tamY), substr($this->getRua(), 106, 53) ); | |
917 | + | |
918 | + $this->Text ( $x+128.5, $y+(65*$this->tamY), "Inscrição" ); | |
919 | + $this->Text ( $x+128.5, $y+(67*$this->tamY), $this->inInscricao ); | |
920 | + | |
921 | + $this->Text ( $x+128.5, $y+(71*$this->tamY), "Nº Acordo" ); | |
922 | + $this->Text ( $x+128.5, $y+(73*$this->tamY), $this->stNroCobrancaDA ); | |
923 | + | |
924 | + $this->Text ( $x+27+$inAlteracaoMata, $y+(74*$this->tamY)+0.5, "Sacador/Avalista" ); | |
925 | + | |
926 | + $this->Text ( $x+42.5+$inAlteracaoMata, $y+(25*$this->tamY), "Nosso Número" ); | |
927 | + $this->Text ( $x+42.5+$inAlteracaoMata, $y+(28*$this->tamY), $this->stNumeracao ); | |
928 | + | |
929 | + $this->Text ( $x+42.5+$inAlteracaoMata, $y+(31*$this->tamY), "Carteira" ); | |
930 | + $this->Text ( $x+42.5+$inAlteracaoMata, $y+(34*$this->tamY), $this->stCarteira ); | |
931 | + | |
932 | + $this->Text ( $x+65.5+$inAlteracaoMata, $y+(25*$this->tamY), "Espécie DOC" ); | |
933 | + $this->Text ( $x+65.5+$inAlteracaoMata, $y+(28*$this->tamY), $this->stEspecieDoc ); | |
934 | + | |
935 | + $this->Text ( $x+65.5+$inAlteracaoMata, $y+(31*$this->tamY), "Espécie" ); | |
936 | + $this->Text ( $x+65.5+$inAlteracaoMata, $y+(34*$this->tamY), $this->stEspecie ); | |
937 | + | |
938 | + $this->Text ( $x+80.5+$inAlteracaoMata, $y+(25*$this->tamY), "Aceite" ); | |
939 | + $this->Text ( $x+80.5+$inAlteracaoMata, $y+(28*$this->tamY), $this->stAceite ); | |
940 | + | |
941 | + $this->Text ( $x+80.5+$inAlteracaoMata, $y+(31*$this->tamY), "Quantidade" ); | |
942 | + $this->Text ( $x+80.5+$inAlteracaoMata, $y+(34*$this->tamY), $this->stQuantidade ); | |
943 | + | |
944 | + $this->Text ( $x+94.5+$inAlteracaoMata, $y+(25*$this->tamY), "Data de Proc." ); | |
945 | + $this->Text ( $x+94.5+$inAlteracaoMata, $y+(28*$this->tamY), $this->stDataProcessamento ); | |
946 | + | |
947 | + $this->Text ( $x+94.5+$inAlteracaoMata, $y+(31*$this->tamY), "Valor" ); | |
948 | + | |
949 | + $this->Text ( $x+158.5, $y+(13*$this->tamY), "Vencimento" ); | |
950 | + $this->Text ( $x+158.5, $y+(16*$this->tamY), $this->dtVencimento ); | |
951 | + | |
952 | + $this->Text ( $x+158.5, $y+(19*$this->tamY), "Agência/Código do Cedente" ); | |
953 | + $this->Text ( $x+158.5, $y+(22*$this->tamY), $this->stAgenciaCodCedente ); | |
954 | + | |
955 | + $this->Text ( $x+158.5, $y+(25*$this->tamY), "Nosso Número" ); | |
956 | + $this->Text ( $x+158.5, $y+(28*$this->tamY), $this->stNumeracao ); | |
957 | + | |
958 | + $this->Text ( $x+158.5, $y+(31*$this->tamY), "(=) Valor do Documento" ); | |
959 | + $this->Text ( $x+158.5, $y+(34*$this->tamY), $this->flValor ); | |
960 | + | |
961 | + $this->Text ( $x+158.5, $y+(37*$this->tamY), "(-) Desconto" ); | |
962 | + $this->Text ( $x+158.5, $y+(43*$this->tamY), "(-) Outras Deduções/Abatimento" ); | |
963 | + | |
964 | + $this->Text ( $x+158.5, $y+(48*$this->tamY), "(+) Mora/Multa/Juros" ); | |
965 | + $this->Text ( $x+158.5, $y+(50*$this->tamY)+0.5, $this->flValorMultaJuros ); | |
966 | + | |
967 | + $this->Text ( $x+158.5, $y+(53*$this->tamY), "(+) Outros Acréscimos" ); | |
968 | + $this->Text ( $x+158.5, $y+(56*$this->tamY), $this->flValorOutros ); | |
969 | + | |
970 | + $this->Text ( $x+158.5, $y+(59*$this->tamY), "(=) Valor Cobrado" ); | |
971 | + $this->Text ( $x+158.5, $y+(62*$this->tamY), $this->flValorTotal ); | |
972 | + | |
973 | + $this->Text ( $x+85.5+$inAlteracaoMata, $y+(79*$this->tamY), "Autenticação Mecânica - Ficha de Compensação . . . . . . . . . . . . . . ." ); | |
974 | + | |
975 | + $this->setFont ( 'Arial', 'B', 7 ); | |
976 | + $this->Text ( $x+68+$inAlteracaoMata, $y+(10*$this->tamY), "|001-9|" ); | |
977 | + | |
978 | + $this->Text ( $x+78+$inAlteracaoMata, $y+(10*$this->tamY), $this->stLinhaCode ); | |
979 | + $this->defineCodigoBarras( $x+31+$inAlteracaoMata, $y+(83*$this->tamY), $this->stBarCode ); | |
980 | + } | |
981 | + | |
982 | + /* adiciona nova pagina */ | |
983 | + public function novaPagina() | |
984 | + { | |
985 | + $this->addPage(); | |
986 | + } | |
987 | + | |
988 | + /* habilita e desabilita a quebra de pagina automatica */ | |
989 | + public function setQuebraPagina($valor) | |
990 | + { | |
991 | + $this->setAutoPageBreak( $valor, 1 ); | |
992 | + } | |
993 | + | |
994 | + /* picote entre os carnes */ | |
995 | + public function setPicote($x, $y, $firstPage = false) | |
996 | + { | |
997 | + for ($i=0;$i<=196;($i+=2)) { | |
998 | + $this->Line( ($x+$i), ($y+(102*$this->tamY)), ($x+$i+1), ($y+(102*$this->tamY)) ); | |
999 | + } | |
1000 | + | |
1001 | + for (($i=-3);$i<=106;($i+=2)) { | |
1002 | + $this->Line( ($x+74), ($y+($i*$this->tamY)), ($x+74), ($y+(($i+1)*$this->tamY)) ); | |
1003 | + } | |
1004 | + } | |
1005 | + | |
1006 | + /* mostra o pdf */ | |
1007 | + public function show($stNome = "Carne.pdf", $stOpcao="D") | |
1008 | + { | |
1009 | + $this->output($stNome,$stOpcao); | |
1010 | + } | |
1011 | +} | |
1012 | + | |
1013 | +class RCarneDadosCadastraisMataSaoJoao extends RCarneDiversosPetropolis | |
1014 | +{ | |
1015 | + public $stComposicaoCalculo; | |
1016 | + public $stNomePrefeitura; | |
1017 | + public $stSubTitulo; | |
1018 | + public $stExercicio; | |
1019 | + public $stContribuinte; | |
1020 | + public $stInscricaoImobiliaria; | |
1021 | + public $stInscricaoEconomica; | |
1022 | + public $stImpostoTaxa; | |
1023 | + public $stCodigoLogradouro; | |
1024 | + public $stNomeLogradouro; | |
1025 | + public $stComplemento; | |
1026 | + public $stQuadra; | |
1027 | + public $stLote; | |
1028 | + public $stDistrito; | |
1029 | + public $stRegiao; | |
1030 | + public $stCep; | |
1031 | + public $stCidade; | |
1032 | + public $stEstado; | |
1033 | + public $stNroCobrancaDA; | |
1034 | + public $stDataAcordo; | |
1035 | + public $stCondominio; | |
1036 | + public $stReducao; | |
1037 | + public $arDemonstrativoParcelas; | |
1038 | + public $arDetalhamentoInscricao; | |
1039 | + public $arVencimentosDemonstrativos; | |
1040 | + public $stCamLogo; | |
1041 | + public $stObservacoesComplementares; | |
1042 | + | |
1043 | + public function RCarneDadosCadastraisMataSaoJoao() | |
1044 | + { | |
1045 | + ; | |
1046 | + | |
1047 | + parent::RCarneDiversosPetropolis(); | |
1048 | + /** | |
1049 | + * Seta Informações Basicas da Prefeitura | |
1050 | + */ | |
1051 | + $this->stNomePrefeitura = 'PREFEITURA MUNICIPAL DE MATA DE SÃO JOÃO'; | |
1052 | + $this->stSubTitulo = 'Secretaria de Administração e Finanças'; | |
1053 | + $this->lblMulta = '(+) MULTA DE MORA'; | |
1054 | + $this->lblJuros = '(+) JUROS DE MORA'; | |
1055 | + $this->lblOutros = '(+) ATUALIZAÇÃO MONETÁRIA'; | |
1056 | + | |
1057 | + /** | |
1058 | + * Seta Configuração do PDF | |
1059 | + */ | |
1060 | + $this->open(); | |
1061 | + $this->setTextColor(0); | |
1062 | + $this->addPage(); | |
1063 | + $this->setLeftMargin(0); | |
1064 | + $this->setTopMargin(0); | |
1065 | + $this->SetLineWidth(0.01); | |
1066 | + include_once ( CAM_GA_ADM_MAPEAMENTO."TAdministracaoConfiguracao.class.php" ); | |
1067 | + $obTAdministracaoConfiguracao = new TAdministracaoConfiguracao; | |
1068 | + $stFiltro = " WHERE exercicio = '".Sessao::getExercicio()."' AND parametro = 'logotipo' "; | |
1069 | + $obTAdministracaoConfiguracao->recuperaTodos( $rsListaImagens, $stFiltro ); | |
1070 | + | |
1071 | + $stNomeImagem = $rsListaImagens->getCampo("valor"); | |
1072 | + $this->stCamLogo = '../../../../../../gestaoAdministrativa/fontes/PHP/framework/temas/padrao/imagens/'.$stNomeImagem; | |
1073 | + } | |
1074 | + public function desenhaCarne($x , $y) | |
1075 | + { | |
1076 | +$stComposição = | |
1077 | +" O B S E R V A Ç Õ E S I M P O R T A N T E S\n | |
1078 | + | |
1079 | +01) Após a quitação deste carnê o contribuinte ou o seu procurador (legalmente constituído) deverá comparecer ao setor para dar baixa no processo de parcelamento;\n | |
1080 | + | |
1081 | +02) Fica ressalvado o direito de a Secretaria Municipal de Administração e Finanças cobrar dívidas que forem apuradas de responsabilidade do Contribuinte identificado;\n | |
1082 | + | |
1083 | +03) O atraso no pagamento de 02 (duas) prestações anula o parcelamento inicial e obriga a inscrição do débito em dívida ativa ou, se nela já se encontra inscrito, sua remessa imediata à cobrança judicial;\n | |
1084 | + | |
1085 | +04) Para os débitos em execução fiscal, procurar o cartório cível para pagamento das custas cartorárias;\n | |
1086 | + | |
1087 | +05) Mantenha seus dados atualizados no cadastro fiscal do município (endereço para correspondência, Telefone de contato, e-mail, entre outros);\n | |
1088 | + | |
1089 | +06) A Coordenadoria Fazendária do Município é o órgão controlador do Setor de Registro e Cobrança da Dívida Ativa e do Setor de Tributos e Fiscalização, vinculado à Secretaria de Administração e Finanças - SECAF (Prefeitura Municipal de Mata de São João/BA);\n | |
1090 | + | |
1091 | +07) Quaisquer dúvidas favor entrar em contato com o Setor de Registro e Cobrança da Dívida Ativa (órgão vinculado ao Setor de Tributos e Fiscalização Fazendária), na Rua Antônio Luiz Garcez, nº 140, Centro - Centro Administrativo - Mata de São João/Ba. Tel/Fax: (71) 3635-1669 (71)9957-6798 ou e-mail: dividaativa.tributacao@pmsj.ba.gov.br. Acesse o nosso site e fique por dentro de todos os acontecimentos do município no endereço http://www.pmsj.ba.gov.br.\n | |
1092 | + | |
1093 | + P A G Á V E L E M Q U A L Q U E R B A N C O A T É O V E N C I M E N T O\n"; | |
1094 | + | |
1095 | + $inTamY = 1.15; | |
1096 | + | |
1097 | + $this->stComposicaoCalculo = $stComposição; | |
1098 | + $this->SetXY($x+10,$y+4); | |
1099 | + /* Inicializa Fonte*/ | |
1100 | + $this->setFont( 'Arial','',10 ); | |
1101 | + | |
1102 | + /** | |
1103 | + * Retangulos | |
1104 | + */ | |
1105 | + /* Retangulo da Composicação */ | |
1106 | + $this->Rect( $x, $y, 189, 72*$inTamY ); | |
1107 | + /* Retangulo Dados Cadastrais */ | |
1108 | + $this->Rect( $x, $y + (78*$inTamY) , 189, 69*$inTamY ); | |
1109 | + | |
1110 | + $this->Rect( $x, $y + (155*$inTamY) , 189, 69*$inTamY ); | |
1111 | + | |
1112 | + /* Composição do Calculo */ | |
1113 | + $this->setFont( 'Arial','',7 ); | |
1114 | + $this->setLeftMargin(10); | |
1115 | + $this->Write( 2.5 , $this->stComposicaoCalculo ); | |
1116 | + $this->setLeftMargin(0); | |
1117 | + | |
1118 | + /** | |
1119 | + * Montar Estrutura dos Dados Cadastrais | |
1120 | + */ | |
1121 | + | |
1122 | + /* Linhas Horizontais */ | |
1123 | + $this->Line( $x , $y + (90*$inTamY) , $x +189, $y + (90*$inTamY) ); | |
1124 | + $this->Line( $x , $y + (98*$inTamY) , $x +189, $y + (98*$inTamY) ); | |
1125 | + $this->Line( $x , $y + (103*$inTamY) , $x +189, $y + (103*$inTamY) ); | |
1126 | + $this->Line( $x , $y + (108*$inTamY) , $x +189, $y + (108*$inTamY) ); | |
1127 | + | |
1128 | + $this->Line( $x , $y + (117*$inTamY) , $x +134, $y + (117*$inTamY) ); | |
1129 | + $this->Line( $x , $y + (120*$inTamY) , $x +134, $y + (120*$inTamY) ); | |
1130 | + $this->Line( $x , $y + (123*$inTamY) , $x +134, $y + (123*$inTamY) ); | |
1131 | + $this->Line( $x , $y + (126*$inTamY) , $x +134, $y + (126*$inTamY) ); | |
1132 | + $this->Line( $x , $y + (129*$inTamY) , $x +134, $y + (129*$inTamY) ); | |
1133 | + $this->Line( $x , $y + (132*$inTamY) , $x +134, $y + (132*$inTamY) ); | |
1134 | + $this->Line( $x , $y + (135*$inTamY) , $x +134, $y + (135*$inTamY) ); | |
1135 | + $this->Line( $x , $y + (138*$inTamY) , $x +134, $y + (138*$inTamY) ); | |
1136 | + $this->Line( $x , $y + (141*$inTamY) , $x +134, $y + (141*$inTamY) ); | |
1137 | + | |
1138 | + for ($inZ=0; $inZ<61; $inZ+=3) { | |
1139 | + $this->Line( $x , $y + (($inZ+158)*$inTamY) , $x +134, $y + (($inZ+158)*$inTamY) ); | |
1140 | + } | |
1141 | + | |
1142 | + $this->Line( $x , $y + (144*$inTamY) , $x +134, $y + (144*$inTamY) ); | |
1143 | + | |
1144 | + /* Linhas Verticais */ | |
1145 | + /* Linha Ao lado do demonstrativo, aquela maior */ | |
1146 | + $this->Line( $x + 134 , $y + (155*$inTamY), $x + 134 , $y + (224*$inTamY)); | |
1147 | + $this->Line( $x + 15 , $y + (155*$inTamY), $x + 15 , $y + (218*$inTamY)); | |
1148 | + $this->Line( $x + 30 , $y + (155*$inTamY), $x + 30 , $y + (218*$inTamY));//era 28 | |
1149 | + $this->Line( $x + 21 , $y + (155*$inTamY), $x + 21 , $y + (218*$inTamY));//era 28 | |
1150 | + $this->Line( $x + 41 , $y + (155*$inTamY), $x + 41 , $y + (218*$inTamY)); | |
1151 | + $this->Line( $x + 54 , $y + (155*$inTamY), $x + 54 , $y + (218*$inTamY)); | |
1152 | + $this->Line( $x + 67 , $y + (155*$inTamY), $x + 67 , $y + (218*$inTamY)); | |
1153 | + $this->Line( $x + 78 , $y + (155*$inTamY), $x + 78 , $y + (218*$inTamY)); | |
1154 | + $this->Line( $x + 90 , $y + (155*$inTamY), $x + 90 , $y + (218*$inTamY)); | |
1155 | + $this->Line( $x + 102 , $y + (155*$inTamY), $x + 102 , $y + (224*$inTamY)); | |
1156 | + $this->Line( $x + 118 , $y + (155*$inTamY), $x + 118 , $y + (218*$inTamY)); | |
1157 | + | |
1158 | + $this->Line( $x + 134 , $y + (108*$inTamY), $x + 134 , $y + (147*$inTamY)); | |
1159 | + $this->Line( $x + 152 , $y + (111*$inTamY), $x + 152 , $y + (147*$inTamY)); | |
1160 | + $this->Line( $x + 171 , $y + (111*$inTamY), $x + 171 , $y + (147*$inTamY)); | |
1161 | + | |
1162 | + $this->Line( $x + 15 , $y + (111*$inTamY), $x + 15 , $y + (147*$inTamY)); | |
1163 | + $this->Line( $x + 30 , $y + (111*$inTamY), $x + 30 , $y + (147*$inTamY));//era 28 | |
1164 | + $this->Line( $x + 21 , $y + (111*$inTamY), $x + 21 , $y + (147*$inTamY));//era 28 | |
1165 | + $this->Line( $x + 41 , $y + (111*$inTamY), $x + 41 , $y + (147*$inTamY)); | |
1166 | + $this->Line( $x + 54 , $y + (111*$inTamY), $x + 54 , $y + (147*$inTamY)); | |
1167 | + $this->Line( $x + 67 , $y + (111*$inTamY), $x + 67 , $y + (147*$inTamY)); | |
1168 | + $this->Line( $x + 78 , $y + (111*$inTamY), $x + 78 , $y + (147*$inTamY)); | |
1169 | + $this->Line( $x + 90 , $y + (111*$inTamY), $x + 90 , $y + (147*$inTamY)); | |
1170 | + $this->Line( $x + 102 , $y + (111*$inTamY), $x + 102 , $y + (147*$inTamY)); //era o unico 147 os outros eram 141 | |
1171 | + $this->Line( $x + 118 , $y + (111*$inTamY), $x + 118 , $y + (147*$inTamY)); | |
1172 | + | |
1173 | + /* Linha 1*/ | |
1174 | + $this->Line( $x + 88 , $y + (78*$inTamY) , $x + 88 , $y + (90*$inTamY)); | |
1175 | + | |
1176 | + /* Linha 2*/ | |
1177 | + $this->Line( $x + 64 , $y + (90*$inTamY) , $x + 64 , $y + (98*$inTamY)); | |
1178 | + $this->Line( $x + 91 , $y + (90*$inTamY) , $x + 91 , $y + (98*$inTamY)); | |
1179 | + $this->Line( $x + 115 , $y + (90*$inTamY) , $x + 115 , $y + (98*$inTamY)); | |
1180 | + $this->Line( $x + 139 , $y + (90*$inTamY) , $x + 139 , $y + (98*$inTamY)); | |
1181 | + | |
1182 | + /* Linha 3*/ | |
1183 | + $this->Line( $x + 34 , $y + (98*$inTamY) , $x + 34 , $y + (103*$inTamY)); //5 | |
1184 | + $this->Line( $x + 105 , $y + (98*$inTamY) , $x + 105 , $y + (103*$inTamY)); | |
1185 | + $this->Line( $x + 160 , $y + (98*$inTamY) , $x + 160 , $y + (103*$inTamY)); | |
1186 | + | |
1187 | + /* Linha 4*/ | |
1188 | + $this->Line( $x + 25 , $y + (103*$inTamY) , $x + 25 , $y + (108*$inTamY)); //6 | |
1189 | + $this->Line( $x + 44 , $y + (103*$inTamY) , $x + 44 , $y + (108*$inTamY)); | |
1190 | + $this->Line( $x + 81 , $y + (103*$inTamY) , $x + 81 , $y + (108*$inTamY)); | |
1191 | + $this->Line( $x + 105 , $y + (103*$inTamY) , $x + 105 , $y + (108*$inTamY)); | |
1192 | + $this->Line( $x + 127 , $y + (103*$inTamY) , $x + 127 , $y + (108*$inTamY)); | |
1193 | + $this->Line( $x + 163 , $y + (103*$inTamY) , $x + 163 , $y + (108*$inTamY)); | |
1194 | + | |
1195 | + /** | |
1196 | + * Titulos dos Dados | |
1197 | + */ | |
1198 | + /* imagem*/ | |
1199 | + $stExt = substr( $this->stCamLogo, strlen($this->stCamLogo)-3, strlen($this->stCamLogo) ); | |
1200 | + $this->Image( $this->stCamLogo , $x+1 , $y+(79*$inTamY) , 10 , 10 , $stExt); | |
1201 | + /* dados */ | |
1202 | + $this->setFont( 'Arial','',14 ); | |
1203 | + $this->Text( $x+112 , $y+(84*$inTamY) , 'DÍVIDA ATIVA - REFIS' ); | |
1204 | + /* exercicio */ | |
1205 | + $this->setFont( 'Arial','',10 ); | |
1206 | + $this->Text( $x+122 , $y+(88*$inTamY) , 'EXERCÍCIO ' . $this->stExercicio ); | |
1207 | + | |
1208 | + $this->setFont( 'Arial','',5 ); | |
1209 | + $this->Text( $x+ 1 , $y+(92*$inTamY) , 'CONTRIBUINTE:' ); | |
1210 | + $this->Text( $x+ 65 , $y+(92*$inTamY) , 'CÓDIGO LOGRADOURO:' ); | |
1211 | + $this->Text( $x+ 92 , $y+(92*$inTamY) , 'INSCRIÇÃO IMOBILÍARIA:' ); | |
1212 | + $this->Text( $x+ 116 , $y+(92*$inTamY), 'INSCRIÇÃO ECONÔMICA:' ); | |
1213 | + $this->Text( $x+141 , $y+(92*$inTamY) , 'IMPOSTO / TAXA:' ); | |
1214 | + | |
1215 | + $this->setFont( 'Arial','',5 ); | |
1216 | + | |
1217 | + $this->Text( $x+ 1 , $y+(100*$inTamY) , 'NOME DO LOGRADOURO:' ); | |
1218 | + $this->Text( $x+ 35 , $y+(100*$inTamY) , 'COMPLEMENTO:' ); | |
1219 | + $this->Text( $x+ 106 , $y+(100*$inTamY) , 'Nº DA COBRANÇA DA DIVIDA ATIVA (Nº Acordo):' ); | |
1220 | + $this->Text( $x+ 162 , $y+(100*$inTamY) , 'DATA DO OCORDO:' ); | |
1221 | + | |
1222 | + $this->Text( $x+ 1 , $y+(105*$inTamY) , 'CONDOMÍNIO:' ); | |
1223 | + $this->Text( $x+ 26 , $y+(105*$inTamY) , 'QUADRA:' ); | |
1224 | + $this->Text( $x+ 45 , $y+(105*$inTamY) , 'LOTE:' ); | |
1225 | + $this->Text( $x+ 82 , $y+(105*$inTamY) , 'DISTRITO:' ); | |
1226 | + $this->Text( $x+ 106 , $y+(105*$inTamY) , 'REGIÃO:' ); | |
1227 | + $this->Text( $x+ 128 , $y+(105*$inTamY) , 'CEP:' ); | |
1228 | + $this->Text( $x+ 164 , $y+(105*$inTamY) , 'CIDADE / ESTADO:' ); | |
1229 | + | |
1230 | + $this->setFont( 'Arial','',5 ); | |
1231 | + $this->SetFillColor(240,240,240); | |
1232 | + $this->Rect( $x, $y+(108*$inTamY), 134, 3*$inTamY, 'DF' ); //2.2 | |
1233 | + $this->Text( $x+1 , $y+(110.2*$inTamY) , ' D A D O S D E C O M P O S I Ç Ã O D A D I V I D A A T I V A' ); | |
1234 | + $this->Rect( $x+134, $y+(108*$inTamY) , 55 , 3*$inTamY , 'DF'); | |
1235 | + $this->Text( $x+138 , $y+(110.2*$inTamY) , ' D E M O N S T R A T I V O D A S P A R C E L A S' ); | |
1236 | + | |
1237 | + $this->setFont( 'Arial','',4 ); | |
1238 | + $this->Text( $x+ 2 , $y+(113*$inTamY) , 'Nº de Inscrição' ); | |
1239 | + $this->Text( $x+ 2 , $y+(115*$inTamY) , 'Divida Ativa:' ); | |
1240 | + | |
1241 | + $this->Text( $x+ 16 , $y+(113*$inTamY) , 'Ano' ); | |
1242 | + $this->Text( $x+ 16 , $y+(115*$inTamY) , 'Devido:' ); | |
1243 | + | |
1244 | + $this->Text( $x+ 22 , $y+(113*$inTamY) , 'Imposto /' ); | |
1245 | + $this->Text( $x+ 22 , $y+(115*$inTamY) , 'Taxa:' ); | |
1246 | + | |
1247 | + $this->Text( $x+ 32 , $y+(113*$inTamY) , 'Valor Origem' ); | |
1248 | + $this->Text( $x+ 32 , $y+(115*$inTamY) , 'Devido:' ); | |
1249 | + | |
1250 | + $this->Text( $x+ 43 , $y+(113*$inTamY) , 'Multa de Mora:' ); | |
1251 | + | |
1252 | + $this->Text( $x+ 56 , $y+(113*$inTamY) , 'Juros de Mora:' ); | |
1253 | + | |
1254 | + $this->Text( $x+ 69 , $y+(113*$inTamY) , 'Juros de' ); | |
1255 | + $this->Text( $x+ 69 , $y+(115*$inTamY) , 'Parcelamento' ); | |
1256 | + | |
1257 | + $this->Text( $x+ 80 , $y+(113*$inTamY) , 'Honorários' ); | |
1258 | + $this->Text( $x+ 80 , $y+(115*$inTamY) , 'Advocatícios:' ); | |
1259 | + | |
1260 | + $this->Text( $x+ 91 , $y+(113*$inTamY) , 'At. Montetária' ); | |
1261 | + $this->Text( $x+ 91 , $y+(115*$inTamY) , '(IPCA-E):' ); | |
1262 | + | |
1263 | + $this->Text( $x+ 104 , $y+(113*$inTamY) , 'Multa de Infração:' ); | |
1264 | + $this->Text( $x+ 120 , $y+(113*$inTamY) , 'Valor Atualização' ); | |
1265 | + $this->Text( $x+ 120 , $y+(115*$inTamY) , 'a Pagar:' ); | |
1266 | + | |
1267 | + /* parcelas */ | |
1268 | + $this->setFont( 'Arial','', 4 ); | |
1269 | + for ($inX=1; $inX<17; $inX++) { | |
1270 | + if ($this->arVencimentosDemonstrativos[$inX-1]) | |
1271 | + $this->Text( $x+135 , $y+((112+($inX*2))*$inTamY) , $inX.') ' . $this->arVencimentosDemonstrativos[$inX-1] . ' ' . $this->arDemonstrativoParcelas[$inX-1] ); | |
1272 | + | |
1273 | + if ($this->arVencimentosDemonstrativos[$inX+15]) | |
1274 | + $this->Text( $x+153 , $y+((112+($inX*2))*$inTamY) , ($inX+16).') ' . $this->arVencimentosDemonstrativos[$inX+15] . ' ' . $this->arDemonstrativoParcelas[$inX+15] ); | |
1275 | + | |
1276 | + if ($this->arVencimentosDemonstrativos[$inX+31]) | |
1277 | + $this->Text( $x+172 , $y+((112+($inX*2))*$inTamY) , ($inX+32).') ' . $this->arVencimentosDemonstrativos[$inX+31] . ' ' . $this->arDemonstrativoParcelas[$inX+31] ); | |
1278 | + } | |
1279 | + | |
1280 | + $this->setFont( 'Arial','B',7 ); | |
1281 | + $this->Text( $x+14 , $y+(85*$inTamY) , "PREFEITURA MUNICIPAL DE MATA DE SÃO JOÃO" ); | |
1282 | + $this->setFont( 'Arial','',6 ); | |
1283 | + $this->Text( $x+14 , $y+(88*$inTamY) , "Secretaria de Administração e Finanças" ); | |
1284 | + | |
1285 | + $this->setFont( 'Arial','',5 ); | |
1286 | + $this->Text( $x+3 , $y+(220*$inTamY) , 'OBSERVAÇÕES COMPLEMENTARES:' ); | |
1287 | + | |
1288 | + $this->setFont('Arial','',4); | |
1289 | + $this->Text ( $x+2, $y+(226*$inTamY), 'Data de emissão: '.date("d/m/Y h:i:s")); | |
1290 | + | |
1291 | + /* contribuibte */ | |
1292 | + $this->Text( $x+ 2, $y+(96*$inTamY) , $this->stContribuinte ); | |
1293 | + | |
1294 | + /* codigo logradouro */ | |
1295 | + $this->Text( $x+68, $y+(96*$inTamY) , $this->stCodigoLogradouro ); | |
1296 | + | |
1297 | + /* inscricao imobiliaria */ | |
1298 | + $this->Text( $x+95, $y+(96*$inTamY) , $this->stInscricaoImobiliaria ); | |
1299 | + | |
1300 | + /* inscricao economica */ | |
1301 | + $this->Text( $x+118, $y+(96*$inTamY) , $this->stInscricaoEconomica ); | |
1302 | + | |
1303 | + /* imposto/taxa */ | |
1304 | + $arTMP = explode( ";", $this->stImpostoTaxa ); | |
1305 | + | |
1306 | + if ( count($arTMP)-1 >= 0 ) { | |
1307 | + $this->Text( $x+156, $y+(92*$inTamY) , $arTMP[count($arTMP)-1] ); | |
1308 | + for ( $inX=count($arTMP)-2; $inX>=0; $inX-- ) | |
1309 | + $this->Text( $x+144, $y+((94+((count($arTMP)-2)-$inX)*1.5)*$inTamY) , $arTMP[$inX] ); | |
1310 | + } | |
1311 | + | |
1312 | + /* nome do logradouro */ | |
1313 | + $this->Text( $x+2 , $y+(102*$inTamY) , $this->stNomeLogradouro ); | |
1314 | + | |
1315 | + /* complemento */ | |
1316 | + $this->Text( $x+36 , $y+(102*$inTamY) , $this->stComplemento ); | |
1317 | + | |
1318 | + /* numero da cobranca da divida ativa */ | |
1319 | + $this->Text( $x+ 108 , $y+(102*$inTamY) , $this->stNroCobrancaDA ); | |
1320 | + | |
1321 | + /*data do acordo */ | |
1322 | + $this->Text( $x+ 162 , $y+(102*$inTamY) , $this->stDataAcordo ); | |
1323 | + | |
1324 | + /* condominio */ | |
1325 | + $this->Text( $x+ 2 , $y+(107*$inTamY) , $this->stCondominio ); | |
1326 | + | |
1327 | + /* quadra */ | |
1328 | + $this->Text( $x+ 27 , $y+(107*$inTamY) , $this->stQuadra ); | |
1329 | + | |
1330 | + /* lote */ | |
1331 | + $this->Text( $x+ 46 , $y+(107*$inTamY) , $this->stLote ); | |
1332 | + | |
1333 | + /* distrito */ | |
1334 | + $this->Text( $x+ 82 , $y+(107*$inTamY) , $this->stDistrito ); | |
1335 | + | |
1336 | + /* regiao */ | |
1337 | + $this->Text( $x+109 , $y+(107*$inTamY) , $this->stRegiao ); | |
1338 | + | |
1339 | + /* cep */ | |
1340 | + $this->Text( $x+130 , $y+(107*$inTamY) , $this->stCep ); | |
1341 | + | |
1342 | + /* cidade/estado */ | |
1343 | + $this->Text( $x+165 , $y+(107*$inTamY) , $this->stCidade." / ".$this->stEstado ); | |
1344 | + | |
1345 | +//cada linha sao +3 | |
1346 | + $flTotalPagar = 0.00; | |
1347 | + for ($inX=0; $inX<10; $inX++) { | |
1348 | + $this->Text( $x+3 , $y+((119+($inX*3))*$inTamY) , $this->arDetalhamentoInscricao[$inX]["inscricao"] ); //numero de inscricao divida ativa | |
1349 | + $this->Text( $x+16 , $y+((119+($inX*3))*$inTamY) , $this->arDetalhamentoInscricao[$inX]["ano devido"] ); //ano devido | |
1350 | + $this->Text( $x+31 , $y+((119+($inX*3))*$inTamY) , $this->arDetalhamentoInscricao[$inX]["valor"] ); //valor origem devido | |
1351 | + | |
1352 | + $this->setFont('Arial','',3); | |
1353 | + $this->Text( $x+21 , $y+((119+($inX*3))*$inTamY) , substr($this->arDetalhamentoInscricao[$inX]["credito"], 0, 19) ); //credito original | |
1354 | + $this->setFont('Arial','',4); | |
1355 | + | |
1356 | + $this->Text( $x+44 , $y+((119+($inX*3))*$inTamY) , $this->arDetalhamentoInscricao[$inX]["multa"] ); //multa de mora | |
1357 | + $this->Text( $x+57 , $y+((119+($inX*3))*$inTamY) , $this->arDetalhamentoInscricao[$inX]['juros'] ); //juros de mora | |
1358 | + | |
1359 | + $this->Text( $x+70 , $y+((119+($inX*3))*$inTamY) , $this->arDetalhamentoInscricao[$inX]['juros2'] ); //juros 0,5 | |
1360 | + $this->Text( $x+81 , $y+((119+($inX*3))*$inTamY) , $this->arDetalhamentoInscricao[$inX]['honorario'] ); //honorarios advocaticios | |
1361 | + | |
1362 | + $this->Text( $x+95 , $y+((119+($inX*3))*$inTamY) , $this->arDetalhamentoInscricao[$inX]['atualizacao'] ); //atualizacao monetaria (ipca-e) | |
1363 | + $this->Text( $x+107 , $y+((119+($inX*3))*$inTamY) , $this->arDetalhamentoInscricao[$inX]['multa2'] ); //multa de infracao | |
1364 | + if ($this->arDetalhamentoInscricao[$inX]['valor2'] != "") { | |
1365 | + $this->Text( $x+124 , $y+((119+($inX*3))*$inTamY) , number_format($this->arDetalhamentoInscricao[$inX]['valor2'], 2, ',', '.' ) ); //valor atualizacao a pagar | |
1366 | + $flTotalPagar += $this->arDetalhamentoInscricao[$inX]['valor2']; | |
1367 | + } | |
1368 | + } | |
1369 | + | |
1370 | + for ( $inX=10; $inX<count($this->arDetalhamentoInscricao); $inX++ ) { | |
1371 | + $this->Text( $x+3 , $y+((127+($inX*3))*$inTamY) , $this->arDetalhamentoInscricao[$inX]["inscricao"] ); //numero de inscricao divida ativa | |
1372 | + $this->Text( $x+16 , $y+((127+($inX*3))*$inTamY) , $this->arDetalhamentoInscricao[$inX]["ano devido"] ); //ano devido | |
1373 | + $this->Text( $x+31 , $y+((127+($inX*3))*$inTamY) , $this->arDetalhamentoInscricao[$inX]["valor"] ); //valor origem devido | |
1374 | + | |
1375 | + $this->Text( $x+23 , $y+((127+($inX*3))*$inTamY) , $this->arDetalhamentoInscricao[$inX]["credito"] ); //credito original | |
1376 | + | |
1377 | + $this->Text( $x+44 , $y+((127+($inX*3))*$inTamY) , $this->arDetalhamentoInscricao[$inX]["multa"] ); //multa de mora | |
1378 | + $this->Text( $x+57 , $y+((127+($inX*3))*$inTamY) , $this->arDetalhamentoInscricao[$inX]['juros'] ); //juros de mora | |
1379 | + | |
1380 | + $this->Text( $x+70 , $y+((127+($inX*3))*$inTamY) , $this->arDetalhamentoInscricao[$inX]['juros2'] ); //juros 0,5 | |
1381 | + $this->Text( $x+81 , $y+((127+($inX*3))*$inTamY) , $this->arDetalhamentoInscricao[$inX]['honorario'] ); //honorarios advocaticios | |
1382 | + | |
1383 | + $this->Text( $x+95 , $y+((127+($inX*3))*$inTamY) , $this->arDetalhamentoInscricao[$inX]['atualizacao'] ); //atualizacao monetaria (ipca-e) | |
1384 | + $this->Text( $x+107 , $y+((127+($inX*3))*$inTamY) , $this->arDetalhamentoInscricao[$inX]['multa2'] ); //multa de infracao | |
1385 | + if ($this->arDetalhamentoInscricao[$inX]['valor2'] != "") { | |
1386 | + $this->Text( $x+124 , $y+((127+($inX*3))*$inTamY) , number_format($this->arDetalhamentoInscricao[$inX]['valor2'], 2, ',', '.' ) ); //valor atualizacao a pagar | |
1387 | + $flTotalPagar += $this->arDetalhamentoInscricao[$inX]['valor2']; | |
1388 | + } | |
1389 | + } | |
1390 | + | |
1391 | + $flTotalPagar -= $this->stReducao; | |
1392 | + | |
1393 | + $this->Text( $x+107 , $y+(220*$inTamY) , "Redução:" ); //multa de infracao | |
1394 | + $this->Text( $x+124 , $y+(220*$inTamY) , number_format($this->stReducao, 2, ',', '.' ) ); //valor atualizacao a pagar | |
1395 | + | |
1396 | + $this->Text( $x+107 , $y+(223*$inTamY) , "Total a pagar:" ); //multa de infracao | |
1397 | + $this->Text( $x+124 , $y+(223*$inTamY) , number_format($flTotalPagar, 2, ',', '.' ) ); //valor atualizacao a pagar | |
1398 | + | |
1399 | + $this->Text( $x+3 , $y+(222*$inTamY), substr($this->stObservacoesComplementares, 0, 150 ) ); | |
1400 | + $this->Text( $x+3 , $y+(224*$inTamY), substr($this->stObservacoesComplementares, 150, 150 ) ); | |
1401 | + } | |
1402 | + | |
1403 | + public function show($stNome = "Carne.pdf", $stOpcao="D") | |
1404 | + { | |
1405 | + $this->output($stNome,$stOpcao); | |
1406 | + } | |
1407 | +} | |
1408 | + | |
1409 | +class RCarneDividaRefis2015MataSaoJoao | |
1410 | +{ | |
1411 | +/* | |
1412 | + * @var Integer | |
1413 | + * @access Private | |
1414 | +*/ | |
1415 | +var $inHorizontal; | |
1416 | +/* | |
1417 | + * @var Integer | |
1418 | + * @access Private | |
1419 | +*/ | |
1420 | +var $inVertical; | |
1421 | +/* | |
1422 | + * @var Array | |
1423 | + * @access Private | |
1424 | +*/ | |
1425 | +var $arEmissao; | |
1426 | +/* | |
1427 | + * @var Object | |
1428 | + * @access Private | |
1429 | +*/ | |
1430 | +var $obBarra; | |
1431 | +/* | |
1432 | + * @var Array | |
1433 | + * @access Private | |
1434 | +*/ | |
1435 | +var $arBarra; | |
1436 | +/* | |
1437 | + * @var Boolean; | |
1438 | + * @access Private | |
1439 | +*/ | |
1440 | +var $boPulaPagina; | |
1441 | +/* | |
1442 | + * @var Object | |
1443 | + * @access Private | |
1444 | +*/ | |
1445 | +var $obRARRCarne; | |
1446 | +var $obRCarneDadosCadastrais; | |
1447 | +var $stLocal; | |
1448 | +var $boConsolidacao; | |
1449 | +var $stNumeracaoConsolidacao; | |
1450 | +var $dtVencimentoConsolidacao; | |
1451 | + | |
1452 | +/* setters */ | |
1453 | +function setHorizontal($valor) { $this->inHorizontal = $valor; } | |
1454 | +function setVertical($valor) { $this->inVertical = $valor; } | |
1455 | +function setEmissao($valor) { $this->arEmissao = $valor; } | |
1456 | +function setBarra($valor) { $this->obBarra = $valor; } | |
1457 | +function setArBarra($valor) { $this->arBarra = $valor; } | |
1458 | +function setPulaPagina($valor) { $this->boPulaPagina = $valor; } | |
1459 | +function setConsolidacao($valor) { $this->boConsolidacao = $valor; } | |
1460 | +function setVencimentoConsolidacao($valor) { $this->dtVencimentoConsolidacao = $valor; } | |
1461 | +function setNumeracaoConsolidacao($valor) { $this->stNumeracaoConsolidacao = $valor; } | |
1462 | + | |
1463 | +/* getters */ | |
1464 | +function getHorizontal() { return $this->inHorizontal; } | |
1465 | +function getVertical() { return $this->inVertical; } | |
1466 | +function getEmissao() { return $this->arEmissao; } | |
1467 | +function getBarra() { return $this->obBarra; } | |
1468 | +function getArBarra() { return $this->arBarra; } | |
1469 | +function getPulaPagina() { return $this->boPulaPagina; } | |
1470 | +function getConsolidacao() { return $this->boConsolidacao; } | |
1471 | +function getNumeracaoConsolidacao() { return $this->stNumeracaoConsolidacao; } | |
1472 | +function getVencimentoConsolidacao() { return $this->dtVencimentoConsolidacao; } | |
1473 | + | |
1474 | +/* | |
1475 | + * Metodo Construtor | |
1476 | + * @access Private | |
1477 | +*/ | |
1478 | +function RCarneDividaRefis2015MataSaoJoao($arEmissao, $horizontal = 7, $vertical = 95) | |
1479 | +{ | |
1480 | + $this->obRARRCarne = new RARRCarne; | |
1481 | + $this->arEmissao = $arEmissao; | |
1482 | + $this->inHorizontal = $horizontal; | |
1483 | + $this->inVertical = $vertical; | |
1484 | + $this->boConsolidacao = false; | |
1485 | + //$obRProtocolo = new RProtocolo; | |
1486 | + //$obRCarnePetropolis = new RCarnePetropolis; | |
1487 | +} | |
1488 | + | |
1489 | +function imprimirCarne($diffBaixa = FALSE) | |
1490 | +{ | |
1491 | + global $inCodFebraban; | |
1492 | + //--------------------- | |
1493 | + $this->obRARRConfiguracao = new RARRConfiguracao; | |
1494 | + $this->obRARRConfiguracao->setCodModulo ( 2 ); | |
1495 | + $this->obRARRConfiguracao->consultar(); | |
1496 | + $inCodFebraban = $this->obRARRConfiguracao->getCodFebraban(); | |
1497 | + unset($this->obRARRConfiguracao); | |
1498 | + | |
1499 | + $obTAdministracaoConfiguracao = new TAdministracaoConfiguracao; | |
1500 | + $stFiltro = " WHERE exercicio = '".Sessao::getExercicio()."' AND parametro = 'logotipo' "; | |
1501 | + $obTAdministracaoConfiguracao->recuperaTodos( $rsListaImagens, $stFiltro ); | |
1502 | + $stNomeImagem = $rsListaImagens->getCampo("valor"); | |
1503 | + | |
1504 | + $inSaltaPagina = ""; | |
1505 | + $this->obRCarnePetropolis = new RCarneDadosCadastraisMataSaoJoao(); | |
1506 | + $this->obRCarnePetropolis->stCamLogo = CAM_FW_TEMAS."imagens/".$stNomeImagem; | |
1507 | + $this->obRCarnePetropolis->lblTitulo1 = "MATA DE SÃO JOÃO - Sec. de Adm. e Fin."; | |
1508 | + | |
1509 | + $nuValorTotal = $nuValorNormal = $nuValorJuroNormal = $nuValorMultaNormal = 0.00; | |
1510 | + | |
1511 | + $stImposto = ""; | |
1512 | + | |
1513 | + foreach ($this->arEmissao as $valor => $chave) { | |
1514 | + /* imprimir duas folhas com dados cadastrais */ | |
1515 | + /* buscar informações para dados cadastrais*/ | |
1516 | + $stFiltro = " ddc.numcgm = ".$chave[0]['numcgm']." AND ap.cod_parcela = ".$chave[0]['cod_parcela']." \n"; | |
1517 | + $obTDATDividaAtiva = new TDATDividaAtiva; | |
1518 | + | |
1519 | + $rsListaCarne =new RecordSet(); | |
1520 | + $obTDATDividaAtiva->RecuperaCapaCarneDividaMataSaoJoao( $rsListaCarne, $stFiltro ); | |
1521 | + $rsListaCarne->ordena( "exercicio_original" ); | |
1522 | + $arDadosParcelas = array(); | |
1523 | + $inTotalParcelas = 0; | |
1524 | + if ( !$rsListaCarne->Eof() ) { | |
1525 | + $rsListaCarne->setPrimeiroElemento(); | |
1526 | + | |
1527 | + $this->obRCarnePetropolis->arDemonstrativoParcelas = array(); | |
1528 | + $this->obRCarnePetropolis->arVencimentosDemonstrativos = array(); | |
1529 | + $this->obRCarnePetropolis->arDetalhamentoInscricao = array(); | |
1530 | + $arInscricoesNaLista = array(); | |
1531 | + $arParcelasNaLista = array(); | |
1532 | + $inTotalParcelas = 0; | |
1533 | + $inTotalInscricoes = 0; | |
1534 | + $stImpostos = ""; | |
1535 | + $arExercicioImposto = array(); | |
1536 | + while ( !$rsListaCarne->Eof() ) { | |
1537 | + $boIncluirInscricao = true; | |
1538 | + for ($inD=0; $inD<$inTotalParcelas; $inD++) { | |
1539 | + if ( $arParcelasNaLista[$inD] == $rsListaCarne->getCampo("num_parcela") ) { | |
1540 | + $boIncluirInscricao = false; | |
1541 | + break; | |
1542 | + } | |
1543 | + } | |
1544 | + | |
1545 | + if ($boIncluirInscricao) { | |
1546 | + $this->obRCarnePetropolis->arDemonstrativoParcelas[] = $rsListaCarne->getCampo("vlr_parcela"); | |
1547 | + $this->obRCarnePetropolis->arVencimentosDemonstrativos[] = $rsListaCarne->getCampo("dt_vencimento_parcela"); | |
1548 | + $arParcelasNaLista[$inTotalParcelas] = $rsListaCarne->getCampo("num_parcela"); | |
1549 | + $inTotalParcelas++; | |
1550 | + } | |
1551 | + | |
1552 | + $boIncluirInscricao = true; | |
1553 | + for ($inD=0; $inD<$inTotalInscricoes; $inD++) { | |
1554 | + if ( $arInscricoesNaLista[$inD]["inscricao"] == $rsListaCarne->getCampo("cod_inscricao")."/".$rsListaCarne->getCampo("exercicio_da") ) { | |
1555 | + $boIncluirInscricao = false; | |
1556 | + break; | |
1557 | + } | |
1558 | + } | |
1559 | + | |
1560 | + if ($boIncluirInscricao) { | |
1561 | + $stFiltro = " dda.cod_inscricao = ".$rsListaCarne->getCampo("cod_inscricao")." AND dda.exercicio = '".$rsListaCarne->getCampo("exercicio_da")."' \n"; | |
1562 | + $obTDATDividaAtiva->setDado('judicial', Sessao::read("cobrancaJudicial")); | |
1563 | + $obTDATDividaAtiva->RecuperaValoresCapaCarneDividaRefis2009MataSaoJoao( $rsListaCarne2, $stFiltro ); | |
1564 | + | |
1565 | + $arTMP2 = explode( "/", $rsListaCarne2->getCampo("imposto_taxa") ); | |
1566 | + $arTMP = explode( ";", $arTMP2[0] ); | |
1567 | + $inPosInicial = count($arTMP); | |
1568 | + if ( ( $inPosInicial - 2 ) > 0 ) | |
1569 | + $inPosInicial -= 2; | |
1570 | + else | |
1571 | + $inPosInicial--; | |
1572 | + | |
1573 | + for ($inX=$inPosInicial; $inX>=0; $inX--) { | |
1574 | + if ($arTMP[$inX] != "" && $stImpostos!= "") { | |
1575 | + if (!preg_match($arTMP[$inX], $stImpostos)) { | |
1576 | + $stImpostos = $stImpostos.$arTMP[$inX].";"; | |
1577 | + } | |
1578 | + } | |
1579 | + } | |
1580 | + | |
1581 | + $arInscricoesNaLista[$inTotalInscricoes]["inscricao"] = $rsListaCarne->getCampo("cod_inscricao")."/".$rsListaCarne->getCampo("exercicio_da"); | |
1582 | + $this->obRCarnePetropolis->arDetalhamentoInscricao[$inTotalInscricoes]["inscricao"] = $rsListaCarne->getCampo("cod_inscricao")."/".$rsListaCarne->getCampo("exercicio_da"); | |
1583 | + $this->obRCarnePetropolis->arDetalhamentoInscricao[$inTotalInscricoes]["ano devido"] = $rsListaCarne->getCampo("exercicio_original"); | |
1584 | + if ($stImposto) { | |
1585 | + $stImposto .= ", ".$rsListaCarne->getCampo("exercicio_original"); | |
1586 | + }else | |
1587 | + $stImposto = $rsListaCarne->getCampo("exercicio_original"); | |
1588 | + | |
1589 | + $arImpostoRegistro = explode( ";", $rsListaCarne2->getCampo("imposto_taxa")); | |
1590 | + | |
1591 | + $arTeste[] = $rsListaCarne2->getCampo("imposto_taxa"); | |
1592 | + $inCountImposto = 0; | |
1593 | + foreach ($arImpostoRegistro AS $arRegistro) { | |
1594 | + $inCountImposto++; | |
1595 | + if ($inCountImposto%2==0) { | |
1596 | + $arDataGrupo = explode( "/", $arRegistro); | |
1597 | + $arExercicioImposto[trim($arDataGrupo[1])][trim($arCredito[0])] = trim($arCredito[0]).'/'.trim($arDataGrupo[1]).$arCredito[1]; | |
1598 | + } else { | |
1599 | + $arCredito = explode( "-", $arRegistro); | |
1600 | + } | |
1601 | + } | |
1602 | + $this->obRCarnePetropolis->arDetalhamentoInscricao[$inTotalInscricoes]["credito"] = $arImposto[0]; | |
1603 | + $this->obRCarnePetropolis->arDetalhamentoInscricao[$inTotalInscricoes]["valor"] = number_format($rsListaCarne2->getCampo("valor_origem_devido"), 2, ',', '.' ); | |
1604 | + $this->obRCarnePetropolis->arDetalhamentoInscricao[$inTotalInscricoes]["multa"] = number_format($rsListaCarne2->getCampo("multa_mora"), 2, ',', '.' ); | |
1605 | + $this->obRCarnePetropolis->arDetalhamentoInscricao[$inTotalInscricoes]["juros"] = number_format($rsListaCarne2->getCampo("juros_mora"), 2, ',', '.' ); | |
1606 | + $this->obRCarnePetropolis->arDetalhamentoInscricao[$inTotalInscricoes]["juros2"] = number_format($rsListaCarne2->getCampo("juros2_mora")-$rsListaCarne2->getCampo("juros_mora"), 2, ',', '.' ); | |
1607 | + if ($rsListaCarne2->getCampo("atualizacao2_mora") != "") { | |
1608 | + $this->obRCarnePetropolis->arDetalhamentoInscricao[$inTotalInscricoes]["honorario"] = number_format($rsListaCarne2->getCampo("atualizacao2_mora"), 2, ',', '.' ); | |
1609 | + } | |
1610 | + $this->obRCarnePetropolis->arDetalhamentoInscricao[$inTotalInscricoes]["atualizacao"] = number_format($rsListaCarne2->getCampo("atualizacao_mora"), 2, ',', '.' ); | |
1611 | + $this->obRCarnePetropolis->arDetalhamentoInscricao[$inTotalInscricoes]["multa2"] = number_format($rsListaCarne2->getCampo("multa2_mora"), 2, ',', '.' ); | |
1612 | + $arInscricoesNaLista[$inTotalInscricoes]["valor_total"] = $rsListaCarne2->getCampo("valor_origem_devido")+$rsListaCarne2->getCampo("multa_mora")+$rsListaCarne2->getCampo("multa2_mora")+$rsListaCarne2->getCampo("juros2_mora")+$rsListaCarne2->getCampo("atualizacao2_mora")+$rsListaCarne2->getCampo("atualizacao_mora"); | |
1613 | + | |
1614 | + $this->obRCarnePetropolis->arDetalhamentoInscricao[$inTotalInscricoes]["valor2"] = $arInscricoesNaLista[$inTotalInscricoes]["valor_total"]; | |
1615 | + $inTotalInscricoes++; | |
1616 | + } | |
1617 | + | |
1618 | + $rsListaCarne->proximo(); | |
1619 | + } | |
1620 | + } | |
1621 | + $stTributoExercicio = ''; | |
1622 | + $inContTamanho = 1; | |
1623 | + foreach ($arExercicioImposto AS $stTributoExerc => $arImposto) { | |
1624 | + foreach ($arImposto as $stimposto) { | |
1625 | + if (strlen($stTributoExercicio) + strlen($stimposto.'/'.$stTributoExerc) > $inContTamanho * 75 ) { | |
1626 | + //ajuste para montar sem quebras no boleto | |
1627 | + $stTributoExercicio = str_pad($stTributoExercicio,$inContTamanho * 75,' '); | |
1628 | + $inContTamanho++; | |
1629 | + } | |
1630 | + $stTributoExercicio .= $stimposto.'/'.$stTributoExerc.","; | |
1631 | + } | |
1632 | + } | |
1633 | + $stTributoExercicio = substr($stTributoExercicio,0,-1); | |
1634 | + $rsListaCarne->setPrimeiroElemento(); | |
1635 | + $this->obRCarnePetropolis->stObservacoesComplementares = (string) $rsListaCarne->getCampo("observacao"); | |
1636 | + $this->obRCarnePetropolis->stNomePrefeitura = 'PREFEITURA MUNICIPAL DE MATA DE SÃO JOÃO'; | |
1637 | + $this->obRCarnePetropolis->stSubTitulo = 'Secretaria de Administração e Finanças'; | |
1638 | + $this->obRCarnePetropolis->stExercicio = (string) Sessao::getExercicio(); | |
1639 | + $this->obRCarnePetropolis->stContribuinte = (string) $rsListaCarne2->getCampo("nom_cgm"); | |
1640 | + $this->obRCarnePetropolis->stCodigoLogradouro = (string) $rsListaCarne2->getCampo("cod_logradouro"); | |
1641 | + $this->obRCarnePetropolis->stNomeLogradouro = (string) $rsListaCarne2->getCampo("endereco"); | |
1642 | + $this->obRCarnePetropolis->stComplemento = (string) $rsListaCarne2->getCampo("complemento"); | |
1643 | + $this->obRCarnePetropolis->stQuadra = (string) $rsListaCarne2->getCampo("numero_quadra"); | |
1644 | + $this->obRCarnePetropolis->stLote = (string) $rsListaCarne2->getCampo("numero_lote"); | |
1645 | + $this->obRCarnePetropolis->stDistrito = (string) $rsListaCarne2->getCampo("distrito"); | |
1646 | + $this->obRCarnePetropolis->stRegiao = (string) $rsListaCarne2->getCampo("regiao"); | |
1647 | + $this->obRCarnePetropolis->stCep = (string) $rsListaCarne2->getCampo("cep"); | |
1648 | + $this->obRCarnePetropolis->stCidade = 'MATA DE SÃO JOÃO' ; | |
1649 | + $this->obRCarnePetropolis->stEstado = 'BAHIA' ; | |
1650 | + $this->obRCarnePetropolis->stCondominio = (string) $rsListaCarne2->getCampo("condominio"); | |
1651 | + $this->obRCarnePetropolis->stInscricaoImobiliaria = (string) $rsListaCarne->getCampo("inscricao_municipal"); | |
1652 | + $this->obRCarnePetropolis->stInscricaoEconomica = (string) $rsListaCarne->getCampo("inscricao_economica"); | |
1653 | + $this->obRCarnePetropolis->stImpostoTaxa = $stImpostos; | |
1654 | + $this->obRCarnePetropolis->stNroCobrancaDA = (string) $rsListaCarne->getCampo("numero_parcelamento")."/".$rsListaCarne->getCampo("exercicio_cobranca"); | |
1655 | + $this->obRCarnePetropolis->stDataAcordo = (string) $rsListaCarne->getCampo("dt_acordo"); | |
1656 | + $this->obRCarnePetropolis->stReducao = $rsListaCarne2->getCampo("total_reducao"); | |
1657 | + $this->obRCarnePetropolis->setInscricaoDivida ( $rsListaCarne->getCampo("cod_inscricao")."/".$rsListaCarne->getCampo("exercicio_da") ); | |
1658 | + | |
1659 | + include_once ( CAM_GT_ARR_MAPEAMENTO."TARRCarne.class.php" ); | |
1660 | + $stFiltro = " WHERE aivv.inscricao_municipal = ".$chave[0]['inscricao']; | |
1661 | + | |
1662 | + $obTARRCarne = new TARRCarne; | |
1663 | + $obTARRCarne->recuperaDadosIPTUMata( $rsListaCarne, $stFiltro, $chave[0]['cod_parcela'] ); | |
1664 | + $rsListaCarne->addFormatacao ('area_lote','NUMERIC_BR'); | |
1665 | + $rsListaCarne->addFormatacao ('vupt','NUMERIC_BR'); | |
1666 | + $rsListaCarne->addFormatacao ('vupc','NUMERIC_BR'); | |
1667 | + $rsListaCarne->addFormatacao ('venal_territorial_calculado','NUMERIC_BR'); | |
1668 | + $rsListaCarne->addFormatacao ('imposto_territorial','NUMERIC_BR'); | |
1669 | + $rsListaCarne->addFormatacao ('imposto_predial','NUMERIC_BR'); | |
1670 | + $rsListaCarne->addFormatacao ('area_imovel','NUMERIC_BR'); | |
1671 | + $rsListaCarne->addFormatacao ('venal_predial_calculado','NUMERIC_BR'); | |
1672 | + $rsListaCarne->addFormatacao ('aliquota','NUMERIC_BR'); | |
1673 | + $rsListaCarne->addFormatacao ('venal_total_calculado','NUMERIC_BR'); | |
1674 | + $rsListaCarne->addFormatacao ('valor_imposto','NUMERIC_BR'); | |
1675 | + $rsListaCarne->addFormatacao ('area_m2_limpeza_publica','NUMERIC_BR'); | |
1676 | + $rsListaCarne->addFormatacao ('valor_m2_limpeza_publica','NUMERIC_BR'); | |
1677 | + $rsListaCarne->addFormatacao ('taxa_limpeza_publica','NUMERIC_BR'); | |
1678 | + $rsListaCarne->addFormatacao ('valor_total_tributos','NUMERIC_BR'); | |
1679 | + $rsListaCarne->addFormatacao ('taxa_luz','NUMERIC_BR'); | |
1680 | + $rsListaCarne->addFormatacao ('valor_parcela','NUMERIC_BR'); | |
1681 | + | |
1682 | + $rsListaCarne->addFormatacao ('vupcd','NUMERIC_BR'); | |
1683 | + $rsListaCarne->addFormatacao ('area_total','NUMERIC_BR'); | |
1684 | + $rsListaCarne->addFormatacao ('valor_venal_construcao_descoberta','NUMERIC_BR'); | |
1685 | + $rsListaCarne->addFormatacao ('valor_venal_construcao_coberta','NUMERIC_BR'); | |
1686 | + $rsListaCarne->addFormatacao ('area_descoberta','NUMERIC_BR'); | |
1687 | + | |
1688 | + $this->obRCarnePetropolis->stReducao = $rsListaCarne2->getCampo("total_reducao"); | |
1689 | + | |
1690 | + $arDadosParcelas = array(); | |
1691 | + $inTotalParcelas = 0; | |
1692 | + if ( !$rsListaCarne->Eof() ) { | |
1693 | + $rsListaCarne->setPrimeiroElemento(); | |
1694 | + //$inCodCalculo = $rsListaCarne->getCampo("cod_calculo"); | |
1695 | + while ( !$rsListaCarne->Eof() ) { | |
1696 | + if ( $rsListaCarne->getCampo("nro_parcela") != "única" ) { | |
1697 | + $arDadosParcelas[] = array( "data" => $rsListaCarne->getCampo("vencimento_parcela"), | |
1698 | + "valor"=> $rsListaCarne->getCampo("valor_parcela") ); | |
1699 | + } else { | |
1700 | + $arDadosParcelas[0]["data"] = $rsListaCarne->getCampo("vencimento_parcela"); | |
1701 | + $arDadosParcelas[0]["valor"] = $rsListaCarne->getCampo("valor_parcela"); | |
1702 | + } | |
1703 | + | |
1704 | + $inTotalParcelas++; | |
1705 | + if ( $inTotalParcelas > 11 ) | |
1706 | + break; | |
1707 | + | |
1708 | + $rsListaCarne->proximo(); | |
1709 | + } | |
1710 | + | |
1711 | + } | |
1712 | + | |
1713 | + $rsListaCarne->setPrimeiroElemento(); | |
1714 | + | |
1715 | + /* setar todos os dados necessarios */ | |
1716 | + $this->obRCarnePetropolis->stVupcd = $rsListaCarne->getCampo("vupcd"); | |
1717 | + $this->obRCarnePetropolis->stValorVenalConstrucaoDescoberta = $rsListaCarne->getCampo("valor_venal_construcao_descoberta"); | |
1718 | + $this->obRCarnePetropolis->stValorVenalConstrucaoCoberta = $rsListaCarne->getCampo("valor_venal_construcao_coberta"); | |
1719 | + $this->obRCarnePetropolis->stValorVenalConstrucaoTotal = $rsListaCarne->getCampo("venal_predial_calculado"); //'10.800,00' ; | |
1720 | + $this->obRCarnePetropolis->stAreaConstruidaTotal = $rsListaCarne->getCampo("area_total"); | |
1721 | + $this->obRCarnePetropolis->stAreaUsoPrivativoDescoberta = $rsListaCarne->getCampo("area_descoberta"); | |
1722 | + | |
1723 | + $this->obRCarnePetropolis->stAreaUsoPrivativoTerreno = (string) $rsListaCarne->getCampo("area_lote"); //'114,52' ; | |
1724 | + $this->obRCarnePetropolis->stVupt = (string) $rsListaCarne->getCampo("vupt"); //'4,5' ; | |
1725 | + $this->obRCarnePetropolis->stVupc = (string) $rsListaCarne->getCampo("vupc"); //'180,00' ; | |
1726 | + $this->obRCarnePetropolis->stValorVenalTerreno = (string) $rsListaCarne->getCampo("venal_territorial_calculado"); //'526,50' ; | |
1727 | + $this->obRCarnePetropolis->stImpostoTerritorial = (string) $rsListaCarne->getCampo("imposto_territorial"); //'5,27' ; | |
1728 | + $this->obRCarnePetropolis->stAreaUsoPrivativoCoberta = (string) $rsListaCarne->getCampo("area_imovel"); //'50,00' ; | |
1729 | + $this->obRCarnePetropolis->stImpostoPredial = (string) $rsListaCarne->getCampo("imposto_predial"); //'108,00' ; | |
1730 | + $this->obRCarnePetropolis->stAliquota = (string) $rsListaCarne->getCampo("aliquota"); //'1,00 %' ; | |
1731 | + $this->obRCarnePetropolis->stValorVenalImovel = (string) $rsListaCarne->getCampo("venal_total_calculado"); //'11.326,50' ; | |
1732 | + $this->obRCarnePetropolis->stValorImposto = (string) $rsListaCarne->getCampo("valor_imposto"); //'113,27' ; | |
1733 | + $this->obRCarnePetropolis->stTipoUnidade = (string) $rsListaCarne->getCampo("categoria_utilizacao_imovel"); //'RESIDENCIAL'; | |
1734 | + $this->obRCarnePetropolis->stZona = (string) $rsListaCarne->getCampo("zona"); //'POPULAR' ; | |
1735 | + $this->obRCarnePetropolis->stAreaM2 = (string) $rsListaCarne->getCampo("area_m2_limpeza_publica"); //'11.656.220,00' ; | |
1736 | + $this->obRCarnePetropolis->stValorM2 = (string) $rsListaCarne->getCampo("valor_m2_limpeza_publica"); //'1,01' ; | |
1737 | + $this->obRCarnePetropolis->stValorTaxa = (string) $rsListaCarne->getCampo("taxa_limpeza_publica"); //'28,93' ; | |
1738 | + $this->obRCarnePetropolis->stValorTotalTributos = (string) $rsListaCarne->getCampo("valor_total_tributos"); //'162,20' ; | |
1739 | + $this->obRCarnePetropolis->stContribIlumPublica = (string) $rsListaCarne->getCampo("taxa_luz"); //'20,00'; | |
1740 | + // $this->obRCarnePetropolis->arDemonstrativoParcelas = array ( | |
1741 | + // 0 => $arDadosParcelas[0]["valor"], //'140,87', | |
1742 | + // 1 => $arDadosParcelas[1]["valor"], //'16,22' , | |
1743 | + // 2 => $arDadosParcelas[2]["valor"], //'16,22' , | |
1744 | + // 3 => $arDadosParcelas[3]["valor"], //'16,22' , | |
1745 | + // 4 => $arDadosParcelas[4]["valor"], //'16,22' , | |
1746 | + // 5 => $arDadosParcelas[5]["valor"], //'16,22' , | |
1747 | + // 6 => $arDadosParcelas[6]["valor"], //'16,22' , | |
1748 | + // 7 => $arDadosParcelas[7]["valor"], //'16,22' , | |
1749 | + // 8 => $arDadosParcelas[8]["valor"], //'16,22' , | |
1750 | + // 9 => $arDadosParcelas[9]["valor"], //'16,22' , | |
1751 | + // 10 => $arDadosParcelas[10]["valor"], //'16,22' | |
1752 | + // 11 => $arDadosParcelas[11]["valor"], //'16,22' | |
1753 | + // 12 => $arDadosParcelas[12]["valor"] //'16,22' | |
1754 | + // ) ; | |
1755 | + // $this->obRCarnePetropolis->arVencimentosDemonstrativos = array ( | |
1756 | + // 0 => $arDadosParcelas[0]["data"], //'05/02/2007', | |
1757 | + // 1 => $arDadosParcelas[1]["data"], //'05/02/2007' , | |
1758 | + // 2 => $arDadosParcelas[2]["data"], //'05/03/2007' , | |
1759 | + // 3 => $arDadosParcelas[3]["data"], //'05/04/2007' , | |
1760 | + // 4 => $arDadosParcelas[4]["data"], //'05/05/2007' , | |
1761 | + // 5 => $arDadosParcelas[5]["data"], //'05/06/2007' , | |
1762 | + // 6 => $arDadosParcelas[6]["data"], //'05/07/2007' , | |
1763 | + // 7 => $arDadosParcelas[7]["data"], //'05/08/2007' , | |
1764 | + // 8 => $arDadosParcelas[8]["data"], //'05/09/2007' , | |
1765 | + // 9 => $arDadosParcelas[9]["data"], //'05/10/2007' , | |
1766 | + // 10 => $arDadosParcelas[10]["data"], //'05/11/2007' | |
1767 | + // 11 => $arDadosParcelas[11]["data"], //'05/11/2007' | |
1768 | + // 12 => $arDadosParcelas[12]["data"] //'05/11/2007' | |
1769 | + // ) ; | |
1770 | + | |
1771 | + $this->obRCarnePetropolis->desenhaCarne(10,20); | |
1772 | + $this->obRCarnePetropolis->novaPagina(); | |
1773 | + | |
1774 | + $inSaltaPagina++; | |
1775 | + | |
1776 | + $this->obRCarnePetropolis->setImagem(CAM_FW_TEMAS."imagens/".$stNomeImagem ); //logoCarne.png" ); | |
1777 | + //limpando o stExercico para o filtro não ser afetado pelo loop | |
1778 | + $this->obRARRCarne->stExercicio = ''; | |
1779 | + $this->obRARRCarne->obRARRParcela->roRARRLancamento->setCodLancamento( $valor ); | |
1780 | + $this->obRARRCarne->inCodContribuinteInicial = $chave[0]["numcgm"]; | |
1781 | + $obErro = $this->obRARRCarne->reemitirCarneDiverso( $rsGeraCarneCabecalho ); | |
1782 | + $this->stExercicio = $rsGeraCarneCabecalho->getCampo( 'descricao' ); | |
1783 | + $this->obRARRCarne->stExercicio = $chave[0]["exercicio"]; | |
1784 | + if ( $obErro->ocorreu() ) { | |
1785 | + break; | |
1786 | + } | |
1787 | + $this->obRCarnePetropolis->setObservacaoL1 ('Créditos: '); | |
1788 | + | |
1789 | + $arrCodGrupo = explode('.', $rsGeraCarneCabecalho->getCampo( "cod_grupo" )); | |
1790 | + if (count($arrCodGrupo) == 1) { | |
1791 | + $stFiltroComp = " WHERE credito_grupo.cod_grupo = ".$rsGeraCarneCabecalho->getCampo( "cod_grupo" )." AND credito_grupo.ano_exercicio = '".$rsGeraCarneCabecalho->getCampo( "ano_exercicio" )."'"; | |
1792 | + } else { | |
1793 | + $stFiltroComp = " WHERE credito_grupo.cod_credito = ".$arrCodGrupo[0] | |
1794 | + ." AND credito_grupo.cod_natureza = ".$arrCodGrupo[1] | |
1795 | + ." AND credito_grupo.cod_genero = ".$arrCodGrupo[2] | |
1796 | + ." AND credito_grupo.cod_especie = ".$arrCodGrupo[3] | |
1797 | + ." AND credito_grupo.ano_exercicio = '".$rsGeraCarneCabecalho->getCampo( "exercicio" )."'"; | |
1798 | + } | |
1799 | + | |
1800 | + $obTARRCarne->retornaDadosCompensacao( $rsDadosCompensacao, $stFiltroComp ); | |
1801 | + | |
1802 | + $this->obRCarnePetropolis->stCarteira = $rsDadosCompensacao->getCampo("carteira"); | |
1803 | + $this->obRCarnePetropolis->stEspecieDoc = $rsDadosCompensacao->getCampo("especie_doc"); | |
1804 | + $this->obRCarnePetropolis->stEspecie = $rsDadosCompensacao->getCampo("especie"); | |
1805 | + $this->obRCarnePetropolis->stAceite = $rsDadosCompensacao->getCampo("aceite"); | |
1806 | + $this->obRCarnePetropolis->stDataDocumento = date("d/m/Y"); | |
1807 | + $this->obRCarnePetropolis->stDataProcessamento = date("d/m/Y"); | |
1808 | + $this->obRCarnePetropolis->stAgenciaCodCedente = $rsDadosCompensacao->getCampo("agencia")."/".$rsDadosCompensacao->getCampo("codigo_cedente"); | |
1809 | + $this->obRCarnePetropolis->stLocalPagamento = $rsDadosCompensacao->getCampo("local_pagamento"); | |
1810 | + //$this->obRCarnePetropolis->stCedente = 'Prefeitura Municipal de Mata de São João'; | |
1811 | + $this->obRCarnePetropolis->stQuantidade = $rsDadosCompensacao->getCampo("quantidade"); | |
1812 | + //limpando o campo tributo para não repetir nos carnes seguintes do loop | |
1813 | + $this->obRCarnePetropolis->setTributo(''); | |
1814 | + while ( !$rsGeraCarneCabecalho->eof() ) { | |
1815 | + /* montagem cabecalho (protocolo) */ | |
1816 | + $this->obRCarnePetropolis->setCt ( $rsGeraCarneCabecalho->getCampo( 'ano_aquisicao' ) ); | |
1817 | + $this->obRCarnePetropolis->setCa ( $rsGeraCarneCabecalho->getCampo( 'ca' ) ); | |
1818 | + $this->obRCarnePetropolis->setCep ( $rsGeraCarneCabecalho->getCampo( 'cep') ); | |
1819 | + $this->obRCarnePetropolis->setExercicio ( $rsGeraCarneCabecalho->getCampo( 'exercicio' ) ); | |
1820 | + $this->obRCarnePetropolis->setNomCgm ( $rsGeraCarneCabecalho->getCampo( 'nom_cgm' ) ); | |
1821 | + $this->obRCarnePetropolis->setRua ( str_replace ( "Não Informado ", "", $rsGeraCarneCabecalho->getCampo( 'nom_logradouro' ) ) ); | |
1822 | + $this->obRCarnePetropolis->setNumero ( $rsGeraCarneCabecalho->getCampo( 'numero' ) ); | |
1823 | + $this->obRCarnePetropolis->setComplemento ( $rsGeraCarneCabecalho->getCampo( 'complemento' ) ); | |
1824 | + $this->obRCarnePetropolis->setCidade ( $rsGeraCarneCabecalho->getCampo( 'nom_municipio' ) ); | |
1825 | + $this->obRCarnePetropolis->setUf ( $rsGeraCarneCabecalho->getCampo( 'sigla_uf' ) ); | |
1826 | + $this->obRCarnePetropolis->setInscricao ( str_pad($rsGeraCarneCabecalho->getCampo( 'inscricao_municipal' ),strlen( $stMascaraInscricao ), '0', STR_PAD_LEFT) ); | |
1827 | + $this->obRCarnePetropolis->setCtmDci ( $rsGeraCarneCabecalho->getCampo( 'ctm_dci' ) ); | |
1828 | + $this->obRCarnePetropolis->setCodLogradouro ( $rsGeraCarneCabecalho->getCampo( 'cod_logradouro' ) ); | |
1829 | + $this->obRCarnePetropolis->setDistrito ( $rsGeraCarneCabecalho->getCampo( 'distrito' ) ); | |
1830 | + $this->obRCarnePetropolis->setProcessamento ( $rsGeraCarneCabecalho->getCampo( 'data_processamento' ) ); | |
1831 | + $this->obRCarnePetropolis->setAreaTerreno ( $rsGeraCarneCabecalho->getCampo( 'area_real' ) ); | |
1832 | + $this->obRCarnePetropolis->setAreaEdificada ( $rsGeraCarneCabecalho->getCampo( 'area_edificada' ) ); | |
1833 | + $this->obRCarnePetropolis->setUtilizacaoImovel ( $rsGeraCarneCabecalho->getCampo( 'utilizacao' ) ); | |
1834 | + $stTributo = $this->obRCarnePetropolis->getTributo().str_pad($rsGeraCarneCabecalho->getCampo( 'cod_grupo')." - ".$rsGeraCarneCabecalho->getCampo( 'descricao' ),45,' '); | |
1835 | + $this->obRCarnePetropolis->setTributo ( $stTributo ); | |
1836 | + | |
1837 | + $this->obRCarnePetropolis->setValorTributoReal ( $rsGeraCarneCabecalho->getCampo( 'valor_venal_total' ) ); | |
1838 | + $this->obRCarnePetropolis->setObservacao ( wordwrap($rsGeraCarneCabecalho->getCampo('observacao' ),40,chr(13)) ); | |
1839 | + $this->obRCarnePetropolis->setNomBairro ( $rsGeraCarneCabecalho->getCampo( 'nom_bairro' ) ); | |
1840 | + $this->obRCarnePetropolis->setCodDivida ( $rsGeraCarneCabecalho->getCampo( 'cod_grupo' ) ); | |
1841 | + if ( preg_match('/LIMPEZA.*/i',$rsGeraCarneCabecalho->getCampo( 'descricao_credito' ) ) ) { | |
1842 | + $this->obRCarnePetropolis->setTaxaLimpezaAnual ( $rsGeraCarneCabecalho->getCampo( 'valor' ) ); | |
1843 | + } else { | |
1844 | + $flImpostoAnualReal = $rsGeraCarneCabecalho->getCampo( 'valor' ); | |
1845 | + $this->obRCarnePetropolis->setImpostoAnualReal ( $flImpostoAnualReal ); | |
1846 | + } | |
1847 | + $this->obRCarnePetropolis->setReferencia ( "" ); | |
1848 | + $this->obRCarnePetropolis->setNumeroPlanta ( "" ); | |
1849 | + | |
1850 | + // capturar creditos | |
1851 | + $this->obRCarnePetropolis->setObservacaoL1 ( $this->obRCarnePetropolis->getObservacaoL1().$rsGeraCarneCabecalho->getCampo( 'descricao_credito').": ".$rsGeraCarneCabecalho->getCampo( 'valor' )." "); | |
1852 | + | |
1853 | + $rsGeraCarneCabecalho->proximo(); | |
1854 | + | |
1855 | + } //fim do loop de reemitirCarne | |
1856 | + | |
1857 | + //$this->obRCarnePetropolis->setTributo ( $stTributoExercicio ); | |
1858 | + $this->obRCarnePetropolis->setValorAnualReal ( $flImpostoAnualReal + $this->obRCarnePetropolis->getTaxaLimpezaAnual() ); | |
1859 | + // formatar | |
1860 | + $this->obRCarnePetropolis->setValorAnualReal ( number_format($this->obRCarnePetropolis->getValorAnualReal(),2,',','.') ); | |
1861 | + $this->obRCarnePetropolis->setTaxaLimpezaAnual ( number_format($this->obRCarnePetropolis->getTaxaLimpezaAnual(),2,',','.') ); | |
1862 | + $this->obRCarnePetropolis->setImpostoAnualReal ( number_format($this->obRCarnePetropolis->getImpostoAnualReal(),2,',','.') ); | |
1863 | + if ($this->obRCarnePetropolis->getValorTributoReal() != "") { | |
1864 | + $this->obRCarnePetropolis->setValorTributoReal ( number_format($this->obRCarnePetropolis->getValorTributoReal(),2,',','.') ); | |
1865 | + } | |
1866 | +/* $this->obRCarnePetropolis->drawProtocolo(); | |
1867 | + $this->obRCarnePetropolis->posicionaVariaveisProtocolo(); | |
1868 | +*/ | |
1869 | + $inParcela = $inCount = ""; | |
1870 | + | |
1871 | + $this->inHorizontal = 7; | |
1872 | + $this->inVertical = 8; | |
1873 | + | |
1874 | + $this->obBarra = new RCodigoBarraFebrabanCompensacaoBB_Anexo5; | |
1875 | + $this->arBarra = array(); | |
1876 | + | |
1877 | + /*********************** CONSOLIDACAO */ | |
1878 | + if ( $this->getConsolidacao() ) { | |
1879 | + | |
1880 | + #echo '<h2>CONSOLIDACAO </h2>'; exit; | |
1881 | + | |
1882 | + | |
1883 | + foreach ($chave as $parcela) { | |
1884 | + | |
1885 | + $inParcela++; | |
1886 | + | |
1887 | + $this->obRCarnePetropolis->setImagemCarne( CAM_FW_TEMAS."imagens/".$stNomeImagem ); | |
1888 | + $this->obRCarnePetropolis->setImagem(""); | |
1889 | + $this->obRARRCarne->obRARRParcela->setCodParcela( $parcela["cod_parcela"] ); | |
1890 | + $obErro = $this->obRARRCarne->obRARRParcela->listarParcelaCarne( $rsParcela ); | |
1891 | + | |
1892 | + // instanciar mapeamento da função de calculo de juro e multa | |
1893 | + require_once(CAM_GT_ARR_MAPEAMENTO.'FARRCalculaParcelasReemissao.class.php'); | |
1894 | + require_once(CAM_GT_ARR_MAPEAMENTO.'FARRCalculaJuroOrMultaParcelasReemissao.class.php'); | |
1895 | + // retorna parcela com juro e multa aplicados | |
1896 | + $obCalculaParcelas = new FARRCalculaParcelasReemissao; | |
1897 | + // retorna valores de juro e multa que foram aplicados | |
1898 | + $obCalculaJM = new FARRCalculaJuroOrMultaParcelasReemissao; | |
1899 | + | |
1900 | + | |
1901 | + $arTmp = explode('/',$this->getVencimentoConsolidacao()); | |
1902 | + $dtVencimento = $arTmp[2].'-'.$arTmp[1].'-'.$arTmp[0]; | |
1903 | + | |
1904 | + $stParametro = "'".$rsParcela->getCampo('numeracao')."',".$this->obRARRCarne->stExercicio; | |
1905 | + $stParametro .= ",".$parcela["cod_parcela"].",'"; | |
1906 | + | |
1907 | + // monta paramentros com as datas | |
1908 | + $stParametro1 = $stParametro.$dtVencimento."'"; | |
1909 | + | |
1910 | + // valor atualizado | |
1911 | + $obErro = $obCalculaParcelas->executaCalculaValoresParcelasReemissao($rsTmp,$stParametro1); | |
1912 | + | |
1913 | + $arValorNormal = explode ( "§", $rsTmp->getCampo('valor') ); | |
1914 | + | |
1915 | + $this->arBarra['valor_documento'] = $nuValorTotal; | |
1916 | + $this->arBarra['fator_vencimento'] = (string) $rsParcela->getCampo( 'fator_vencimento' ); | |
1917 | + $this->arBarra['nosso_numero'] = (string) $this->getNumeracaoConsolidacao(); | |
1918 | + $this->obRCarnePetropolis->stNumeracao = $this->getNumeracaoConsolidacao(); | |
1919 | + $this->arBarra['convenio'] = 960663; | |
1920 | + $this->arBarra['tipo_moeda'] = 9; | |
1921 | + if ( !$obErro->ocorreu() ) { | |
1922 | + | |
1923 | + $this->obRARRCarne->obRARRParcela->obTARRParcela->setDado ( "cod_parcela" , $rsParcela->getCampo('cod_parcela') ); | |
1924 | + $this->obRARRCarne->obRARRParcela->obTARRParcela->setDado ( "cod_lancamento" , $rsParcela->getCampo('cod_lancamento')); | |
1925 | + $this->obRARRCarne->obRARRParcela->obTARRParcela->setDado ( "nr_parcela" , $rsParcela->getCampo('nr_parcela') ); | |
1926 | + $this->obRARRCarne->obRARRParcela->obTARRParcela->setDado ( "vencimento" , $this->getVencimentoConsolidacao() ); | |
1927 | + $this->obRARRCarne->obRARRParcela->obTARRParcela->setDado ( "valor" , $nuValorTotal ); | |
1928 | + $obErro = $this->obRARRCarne->obRARRParcela->obTARRParcela->alteracao($boTransacao); | |
1929 | + | |
1930 | + #$this->obRARRCarne->obRARRParcela->obTARRParcela->debug(); | |
1931 | + #exit; | |
1932 | + } | |
1933 | + | |
1934 | + $nuValorTotal += $arValorNormal[0]; | |
1935 | + $nuValorNormal += $arValorNormal[1]; | |
1936 | + $nuValorJuroNormal += $arValorNormal[3]; | |
1937 | + $nuValorMultaNormal += $arValorNormal[2]; | |
1938 | + $nuValorCorrecaoNormal += $arValorNormal[4]; | |
1939 | + } | |
1940 | + | |
1941 | + | |
1942 | + $this->obRCarnePetropolis->setObservacaoL1 ( 'Não receber após o vencimento. ' ); | |
1943 | + $this->obRCarnePetropolis->setParcela ( "1/1" ); | |
1944 | + $this->obRCarnePetropolis->setVencimento ( $this->getVencimentoConsolidacao() ); | |
1945 | + | |
1946 | + | |
1947 | + $this->obRCarnePetropolis->flValorMultaJuros = ( number_format(round($nuValorCorrecaoNormal+$nuValorMultaNormal+$nuValorJuroNormal,2),2,',','')); | |
1948 | + $this->obRCarnePetropolis->flValorJuros = ( number_format(round($nuValorJuroNormal,2),2,',','')); | |
1949 | + $this->obRCarnePetropolis->flValorMulta = ( number_format(round($nuValorMultaNormal,2),2,',','')); | |
1950 | + $this->obRCarnePetropolis->flValorOutros = ( number_format(round($nuValorCorrecaoNormal,2),2,',','')); | |
1951 | + $this->obRCarnePetropolis->setValor ( number_format(round($nuValorNormal,2),2,',','')); | |
1952 | + $this->obRCarnePetropolis->setValorTotal(number_format(round($nuValorTotal,2),2,',','')); | |
1953 | + | |
1954 | + $this->arCodigoBarra = $this->obBarra->geraFebraban( $this->arBarra ); | |
1955 | + $this->obRCarnePetropolis->setBarCode( $this->arCodigoBarra['codigo_barras'] ); | |
1956 | + $this->obRCarnePetropolis->setLinhaCode( $this->arCodigoBarra['linha_digitavel'] ); | |
1957 | + | |
1958 | + $this->obRCarnePetropolis->drawCarne( $this->inHorizontal, $this->inVertical ); | |
1959 | + //$this->obRCarnePetropolis->posicionaVariaveis( $this->inHorizontal, $this->inVertical ); | |
1960 | + $this->obRCarnePetropolis->setPicote( $this->inHorizontal, $this->inVertical ); | |
1961 | + $this->inVertical += 96; | |
1962 | + | |
1963 | + | |
1964 | + } else { | |
1965 | + | |
1966 | + foreach ($chave as $parcela) { // impressao das parcelas selecionadas para cada codigo de lancamento | |
1967 | + $inParcela++; | |
1968 | + | |
1969 | + $this->obRCarnePetropolis->setImagemCarne( CAM_FW_TEMAS."imagens/".$stNomeImagem ); //logoCarne.png" ); //imagem mudar | |
1970 | + $this->obRCarnePetropolis->setImagem(""); | |
1971 | + $this->obRARRCarne->obRARRParcela->setCodParcela( $parcela["cod_parcela"] ); | |
1972 | + $obErro = $this->obRARRCarne->obRARRParcela->listarParcelaCarne( $rsParcela ); | |
1973 | + | |
1974 | + // instanciar mapeamento da função de calculo de juro e multa | |
1975 | + require_once(CAM_GT_ARR_MAPEAMENTO.'FARRCalculaParcelasReemissao.class.php'); | |
1976 | + require_once(CAM_GT_ARR_MAPEAMENTO.'FARRCalculaJuroOrMultaParcelasReemissao.class.php'); | |
1977 | + // retorna parcela com juro e multa aplicados | |
1978 | + $obCalculaParcelas = new FARRCalculaParcelasReemissao; | |
1979 | + // retorna valores de juro e multa que foram aplicados | |
1980 | + $obCalculaJM = new FARRCalculaJuroOrMultaParcelasReemissao; | |
1981 | + | |
1982 | + // data da reemissao | |
1983 | + $arTmp = explode('/',$rsParcela->getCampo( 'vencimento' )); | |
1984 | + $dtVencimento = $arTmp[2].'-'.$arTmp[1].'-'.$arTmp[0]; | |
1985 | + | |
1986 | + // parametro padrao | |
1987 | + $stParametro = "'".$rsParcela->getCampo('numeracao')."',".$this->obRARRCarne->stExercicio; | |
1988 | + $stParametro .= ",".$parcela["cod_parcela"].",'"; | |
1989 | + | |
1990 | + // monta paramentros com as datas | |
1991 | + $stParametro1 = $stParametro.$dtVencimento."'"; | |
1992 | + | |
1993 | + // valor atualizado | |
1994 | + $obErro = $obCalculaParcelas->executaCalculaValoresParcelasReemissao($rsTmp,$stParametro1); | |
1995 | + | |
1996 | + $arValorNormal = explode ( "§", $rsTmp->getCampo('valor') ); | |
1997 | + $nuValorTotal = $arValorNormal[0]; | |
1998 | + $nuValorNormal = $arValorNormal[1]; | |
1999 | + $stJuroNormal = $arValorNormal[3]; | |
2000 | + $stMultaNormal = $arValorNormal[2]; | |
2001 | + $stCorrecaoNormal = $arValorNormal[5]; | |
2002 | + | |
2003 | + $this->obRCarnePetropolis->setNumeracao( (string) $rsParcela->getCampo( 'numeracao' ) ); | |
2004 | + $this->arBarra['valor_documento'] = $nuValorTotal; | |
2005 | + $this->arBarra['fator_vencimento'] = (string) $rsParcela->getCampo( 'fator_vencimento' ); | |
2006 | + $this->arBarra['nosso_numero'] = (string) $rsParcela->getCampo( 'numeracao' ); | |
2007 | + $this->obRCarnePetropolis->stNumeracao = $rsParcela->getCampo( 'numeracao' ); | |
2008 | + $this->arBarra['convenio'] = 960663; | |
2009 | + $this->arBarra['tipo_moeda'] = 9; | |
2010 | + | |
2011 | + if ( $obErro->ocorreu() ) { | |
2012 | + break; | |
2013 | + } | |
2014 | + if ($diffBaixa) { | |
2015 | + $this->obRCarnePetropolis->setParcelaUnica ( true ); | |
2016 | + $this->obRCarnePetropolis->lblTitulo2 = ' '; | |
2017 | + $this->obRCarnePetropolis->lblValorCotaUnica = 'VALOR TOTAL'; | |
2018 | + $this->obRCarnePetropolis->setVencimento ( $rsParcela->getCampo( 'vencimento' ) ); | |
2019 | + $this->obRCarnePetropolis->setValor ( number_format($nuValorNormal,2,',','.') ); | |
2020 | + $this->obRCarnePetropolis->setParcela ( $rsParcela->getCampo( 'info' ) ); | |
2021 | + } else { | |
2022 | + if ( $rsParcela->getCampo( 'nr_parcela' ) == 0 ) { | |
2023 | + $this->obRCarnePetropolis->setParcelaUnica ( true ); | |
2024 | + $this->obRCarnePetropolis->setVencimento ( $rsParcela->getCampo( 'vencimento' ) ); | |
2025 | + $this->obRCarnePetropolis->setValor ( number_format($nuValorNormal,2,',','.') ); | |
2026 | + // Recuperar Desconto | |
2027 | + include_once(CAM_GT_ARR_MAPEAMENTO."FARRParcentualDescontoParcela.class.php"); | |
2028 | + $obPercentual = new FARRParcentualDescontoParcela; | |
2029 | + $obPercentual->executaFuncao($rsPercentual,"".$parcela["cod_parcela"].",'".$dtVencimento."'"); | |
2030 | + | |
2031 | + $this->obRCarnePetropolis->stObsVencimento = "REFIS 2015- Não receber após o vencimento."; | |
2032 | + $this->obRCarnePetropolis->setParcela ( 'ÚNICA' ); | |
2033 | + } else { | |
2034 | + $this->obRCarnePetropolis->stObsVencimento = "REFIS 2015- Não receber após o vencimento."; | |
2035 | + $arVencimentos = $this->geraParcelas($rsParcela->getCampo( 'vencimento' ),4); | |
2036 | + $this->obRCarnePetropolis->setParcela( $rsParcela->getCampo( 'info' )); | |
2037 | + $this->obRCarnePetropolis->setParcelaUnica( false ); | |
2038 | + $this->obRCarnePetropolis->setVencimento ( $rsParcela->getCampo( 'vencimento' ) ); | |
2039 | + | |
2040 | + $arTmp = explode('/',$rsParcela->getCampo( 'vencimento' )); | |
2041 | + $boVenc1 = false; | |
2042 | + $boVenc2 = false; | |
2043 | + $boVenc3 = false; | |
2044 | + | |
2045 | + if ($this->stLocal != "WEB") { | |
2046 | + $stMes = $arTmp[1]; | |
2047 | + $arTmp = explode('/',$arVencimentos[0]); | |
2048 | + if ($arTmp[1] >= $stMes) { | |
2049 | + $stMes = $arTmp[1]; | |
2050 | + $boVenc1 = true; | |
2051 | + $this->obRCarnePetropolis->setVencimento1 ( $arVencimentos[0] ); | |
2052 | + $arTmp = explode('/',$arVencimentos[1]); | |
2053 | + if ($arTmp[1] >= $stMes) { | |
2054 | + $stMes = $arTmp[1]; | |
2055 | + $boVenc2 = true; | |
2056 | + $this->obRCarnePetropolis->setVencimento2 ( $arVencimentos[1] ); | |
2057 | + $arTmp = explode('/',$arVencimentos[2]); | |
2058 | + if ($arTmp[1] >= $stMes) { | |
2059 | + $boVenc3 = true; | |
2060 | + $this->obRCarnePetropolis->setVencimento3 ( $arVencimentos[2] ); | |
2061 | + } | |
2062 | + } | |
2063 | + } | |
2064 | + // converter vencimentos para formato americano | |
2065 | + | |
2066 | + $arTmp = explode('/',$arVencimentos[0]); | |
2067 | + $dtVencimento1 = $arTmp[2].'-'.$arTmp[1].'-'.$arTmp[0]; | |
2068 | + | |
2069 | + $arTmp = explode('/',$arVencimentos[1]); | |
2070 | + $dtVencimento2 = $arTmp[2].'-'.$arTmp[1].'-'.$arTmp[0]; | |
2071 | + | |
2072 | + $arTmp = explode('/',$arVencimentos[2]); | |
2073 | + $dtVencimento3 = $arTmp[2].'-'.$arTmp[1].'-'.$arTmp[0]; | |
2074 | + | |
2075 | + $stParametro2 = $stParametro.$dtVencimento1."'"; | |
2076 | + $stParametro3 = $stParametro.$dtVencimento2."'"; | |
2077 | + $stParametro4 = $stParametro.$dtVencimento3."'"; | |
2078 | + | |
2079 | + // valor, % de juro, % de multa para valor normal do carne -------------- | |
2080 | + // valor | |
2081 | + // % de juro | |
2082 | + //$obErro = $obCalculaJM->executaFuncao($rsTmp,$stParametro1.",'j'"); | |
2083 | + //$stJuroNormal = $rsTmp->getCampo('valor'); | |
2084 | + | |
2085 | + $this->obRCarnePetropolis->flValorJuros = number_format(round($stJuroNormal,2),2,',',''); | |
2086 | + | |
2087 | + // % de multa | |
2088 | + // $obErro = $obCalculaJM->executaFuncao($rsTmp,$stParametro1.",'m'"); | |
2089 | + // $stMultaNormal = $rsTmp->getCampo('valor'); | |
2090 | + $this->obRCarnePetropolis->flValorMulta = number_format(round($stMultaNormal,2),2,',',''); | |
2091 | + | |
2092 | + $this->obRCarnePetropolis->flValorOutros = number_format(round($stCorrecaoNormal,2),2,',',''); | |
2093 | + //----------------------------------------------------------------------- | |
2094 | + | |
2095 | + // valor, % de juro, % de multa para valor vencimento 1 do carne -------------- | |
2096 | + // valor | |
2097 | + if ($boVenc1 == true) { | |
2098 | + $obErro = $obCalculaParcelas->executaFuncao($rsTmp,$stParametro2); | |
2099 | + $nuValor1 = $rsTmp->getCampo('valor'); | |
2100 | + // % de juro | |
2101 | + $obErro = $obCalculaJM->executaFuncao($rsTmp,$stParametro2.",'j'"); | |
2102 | + $stJuro1 = $rsTmp->getCampo('valor'); | |
2103 | + $this->obRCarnePetropolis->lblJuros2 = $stJuro1; | |
2104 | + // % de multa | |
2105 | + $obErro = $obCalculaJM->executaFuncao($rsTmp,$stParametro2.",'m'"); | |
2106 | + | |
2107 | + $stMulta1 = $rsTmp->getCampo('valor'); | |
2108 | + $this->obRCarnePetropolis->lblMulta2 = $stMulta1; | |
2109 | + } else { | |
2110 | + $this->obRCarnePetropolis->lblJuros2 = ""; | |
2111 | + $this->obRCarnePetropolis->lblMulta2 = ""; | |
2112 | + } | |
2113 | + //----------------------------------------------------------------------- | |
2114 | + | |
2115 | + // valor, % de juro, % de multa para valor vencimento 2 do carne -------------- | |
2116 | + // valor | |
2117 | + if ($boVenc2 == true) { | |
2118 | + $obErro = $obCalculaParcelas->executaFuncao($rsTmp1,$stParametro3); | |
2119 | + $nuValor2 = $rsTmp1->getCampo('valor'); | |
2120 | + // % de juro | |
2121 | + $obErro = $obCalculaJM->executaFuncao($rsTmp2,$stParametro3.",'j'"); | |
2122 | + | |
2123 | + $stJuro2 = $rsTmp2->getCampo('valor'); | |
2124 | + | |
2125 | + $this->obRCarnePetropolis->lblJuros3 = $stJuro2; | |
2126 | + | |
2127 | + // % de multa | |
2128 | + $obErro = $obCalculaJM->executaFuncao($rsTmp3,$stParametro3.",'m'"); | |
2129 | + $stMulta2 = $rsTmp3->getCampo('valor'); | |
2130 | + $this->obRCarnePetropolis->lblMulta3 = $stMulta2; | |
2131 | + } else { | |
2132 | + $this->obRCarnePetropolis->lblJuros3 = ""; | |
2133 | + $this->obRCarnePetropolis->lblMulta3 = ""; | |
2134 | + } | |
2135 | + //----------------------------------------------------------------------- | |
2136 | + | |
2137 | + // valor, % de juro, % de multa para valor vencimento 3 do carne -------------- | |
2138 | + // valor | |
2139 | + if ($boVenc3 == true) { | |
2140 | + $obErro = $obCalculaParcelas->executaFuncao($rsTmp1,$stParametro4); | |
2141 | + $nuValor3 = $rsTmp1->getCampo('valor'); | |
2142 | + // % de juro | |
2143 | + $obErro = $obCalculaJM->executaFuncao($rsTmp2,$stParametro4.",'j'"); | |
2144 | + | |
2145 | + $stJuro3 = $rsTmp2->getCampo('valor'); | |
2146 | + $this->obRCarnePetropolis->lblJuros4 = $stJuro3; | |
2147 | + // % de multa | |
2148 | + $obErro = $obCalculaJM->executaFuncao($rsTmp3,$stParametro4.",'m'"); | |
2149 | + $stMulta3 = $rsTmp3->getCampo('valor'); | |
2150 | + | |
2151 | + $this->obRCarnePetropolis->lblMulta4 = $stMulta3; | |
2152 | + } else { | |
2153 | + $this->obRCarnePetropolis->lblJuros4 = ""; | |
2154 | + $this->obRCarnePetropolis->lblMulta4 = ""; | |
2155 | + } | |
2156 | + //----------------------------------------------------------------------- | |
2157 | + | |
2158 | + // repassa valores para pdf | |
2159 | + $this->obRCarnePetropolis->setValor (number_format(round($nuValorNormal,2),2,',','.')); | |
2160 | + if ($boVenc1 == true) { | |
2161 | + $this->obRCarnePetropolis->setValor1 (number_format(round($nuValor1,2),2,',','.')) ; | |
2162 | + if ($boVenc2 == true) { | |
2163 | + $this->obRCarnePetropolis->setValor2 (number_format(round($nuValor2,2),2,',','.')) ; | |
2164 | + if ($boVenc3 == true) { | |
2165 | + $this->obRCarnePetropolis->setValor3 (number_format(round($nuValor3,2),2,',','.')) ; | |
2166 | + } | |
2167 | + } | |
2168 | + } | |
2169 | + } else { | |
2170 | + $this->obRCarnePetropolis->setValor (number_format(round($nuValorNormal,2),2,',','.')); | |
2171 | + | |
2172 | + } | |
2173 | + | |
2174 | + } | |
2175 | + } | |
2176 | + | |
2177 | + $this->obRCarnePetropolis->flValorMultaJuros = ( number_format(round($stJuroNormal+$stMultaNormal+$stCorrecaoNormal, 2 ),2,',','')); | |
2178 | + $this->obRCarnePetropolis->setValorTotal( number_format(round($nuValorTotal,2),2,',','.') ); | |
2179 | + $this->arCodigoBarra = $this->obBarra->geraFebraban( $this->arBarra ); | |
2180 | + $this->obRCarnePetropolis->setBarCode( $this->arCodigoBarra['codigo_barras'] ); | |
2181 | + $this->obRCarnePetropolis->setLinhaCode( $this->arCodigoBarra['linha_digitavel'] ); | |
2182 | + | |
2183 | + $this->obRCarnePetropolis->drawCarne( $this->inHorizontal, $this->inVertical ); | |
2184 | + //$this->obRCarnePetropolis->posicionaVariaveis( $this->inHorizontal, $this->inVertical ); | |
2185 | + $this->obRCarnePetropolis->setPicote( $this->inHorizontal, $this->inVertical ); | |
2186 | + $this->inVertical += 96; | |
2187 | + | |
2188 | + if ($inCount == 2) { | |
2189 | + $this->obRCarnePetropolis->novaPagina(); | |
2190 | + $inCount = 0; | |
2191 | + $this->inVertical = 7; | |
2192 | + $this->boPulaPagina = false; | |
2193 | + } else { | |
2194 | + $this->boPulaPagina = true; | |
2195 | + $inCount++; | |
2196 | + } | |
2197 | + | |
2198 | + }// fim foreach parcelas | |
2199 | + } | |
2200 | + | |
2201 | + //if ( ( $inSaltaPagina != count($arEmissao) ) && ( ( count($chave) != 2 ) && ( count($chave) != 3 ) ) ) { | |
2202 | + if (( $this->boPulaPagina ) && ( $inSaltaPagina != count($this->arEmissao) )) { | |
2203 | + $this->obRCarnePetropolis->novaPagina(); | |
2204 | + } | |
2205 | + $arGruposValidos = explode(',','101,102,10120, 10121, 10122, 10123, 10124, 10125, 10198, 10199, 10220, 10221, 10222, 10223, 10224, 10225, 10298,10299'); | |
2206 | + if( in_array($this->obRCarnePetropolis->getCodDivida(),$arGruposValidos)) | |
2207 | + $this->obRCarnePetropolis->drawComplemento($this->inHorizontal, $this->inVertical); | |
2208 | + | |
2209 | + } // fim foreach $arEmissao | |
2210 | + | |
2211 | + if ( Sessao::read( 'stNomPdf' ) ) | |
2212 | + $stNome = Sessao::read( 'stNomPdf' ); | |
2213 | + else | |
2214 | + $stNome = "Carne.pdf"; | |
2215 | + | |
2216 | + if ( Sessao::read( 'stParamPdf' ) ) | |
2217 | + $stParam = Sessao::read( 'stParamPdf' ); | |
2218 | + else | |
2219 | + $stParam = "I"; | |
2220 | + $this->obRCarnePetropolis->show($stNome,$stParam); // lanca o pdf | |
2221 | +} | |
2222 | + | |
2223 | +function geraParcelas($data, $iteracao) | |
2224 | +{ | |
2225 | + $arDataResult = array(); | |
2226 | + | |
2227 | + for ($i=0;$i<$iteracao;$i++) { | |
2228 | + $arData = explode('/',$data); | |
2229 | + | |
2230 | + $mes = $arData[1]; | |
2231 | + $dia = $arData[0]; | |
2232 | + $ano = $arData[2]; | |
2233 | + | |
2234 | + switch ( (int) $mes ) { | |
2235 | + case 2 : | |
2236 | + if ($ano % 4 == 0) { | |
2237 | + $dia = 29; | |
2238 | + } else { | |
2239 | + $dia = 28; | |
2240 | + } | |
2241 | + break; | |
2242 | + case 1 : | |
2243 | + case 3 : | |
2244 | + case 5 : | |
2245 | + case 7 : | |
2246 | + case 8 : | |
2247 | + case 10: $dia = 31; | |
2248 | + break; | |
2249 | + | |
2250 | + case 4 : | |
2251 | + case 6 : | |
2252 | + case 9 : | |
2253 | + case 11: $dia = 30; | |
2254 | + break; | |
2255 | + } | |
2256 | + | |
2257 | + $data = str_pad($dia,2,'0',STR_PAD_LEFT).'/'.str_pad($mes,2,'0',STR_PAD_LEFT).'/'.$ano; | |
2258 | + array_push($arDataResult,$data); | |
2259 | + | |
2260 | + $mes++; | |
2261 | + if ($mes > 12) { | |
2262 | + $mes = 1; | |
2263 | + $ano++; | |
2264 | + } | |
2265 | + | |
2266 | + $data = $dia.'/'.$mes.'/'.$ano; | |
2267 | + } | |
2268 | + | |
2269 | + return $arDataResult; | |
2270 | +} | |
2271 | + | |
2272 | +} | ... | ... |
gestaoTributaria/fontes/PHP/dividaAtiva/instancias/cobranca/OCGeraRelatorioSimulacaoCobranca.php
... | ... | @@ -32,7 +32,7 @@ |
32 | 32 | |
33 | 33 | * @ignore |
34 | 34 | |
35 | - * $Id: OCGeraRelatorioSimulacaoCobranca.php 62067 2015-03-27 19:02:19Z jean $ | |
35 | + * $Id: OCGeraRelatorioSimulacaoCobranca.php 62853 2015-06-30 11:50:35Z evandro $ | |
36 | 36 | |
37 | 37 | * Casos de uso: uc-05.04.04 |
38 | 38 | */ |
... | ... | @@ -271,35 +271,35 @@ $rsParcelas->preenche ( $arParcelasSessao ); |
271 | 271 | $obPDF->setQuebraPaginaLista( false ); |
272 | 272 | $obPDF->setAlturaLinha ( 3 ); |
273 | 273 | $obPDF->setAlinhamento ( "L" ); |
274 | - $obPDF->addCabecalho ( "Inscrição Dívida", 12, 9, "B" ); | |
274 | + $obPDF->addCabecalho ( "Inscrição Dívida", 7.5, 8, "B" ); | |
275 | 275 | $obPDF->setAlinhamento ( "C" ); |
276 | - $obPDF->addCabecalho ( "Exercício Devedor", 8, 9, "B" ); | |
277 | - $obPDF->addCabecalho ( "Tipo", 8, 9, "B" ); | |
278 | - $obPDF->addCabecalho ( "Valor Origem", 6, 9, "B" ); | |
276 | + $obPDF->addCabecalho ( "Exercício Devedor", 7, 8, "B" ); | |
277 | + $obPDF->addCabecalho ( "Tipo", 5, 8, "B" ); | |
278 | + $obPDF->addCabecalho ( "Valor Origem", 5, 8, "B" ); | |
279 | 279 | |
280 | 280 | for ( $inJ=0; $inJ<$rsDados->getCampo("total_de_acrescimos"); $inJ++ ) { |
281 | - $obPDF->addCabecalho ( $rsDados->getCampo( "nome_acrescimo_".$inJ ), 10, 8, "B" ); | |
281 | + $obPDF->addCabecalho ( $rsDados->getCampo( "nome_acrescimo_".$inJ ), 8, 8, "B" ); | |
282 | 282 | } |
283 | 283 | |
284 | - $obPDF->addCabecalho ( "Redução", 8, 9, "B" ); | |
284 | + $obPDF->addCabecalho ( "Redução", 6.5, 8, "B" ); | |
285 | 285 | $obPDF->setAlinhamento ( "R" ); |
286 | - $obPDF->addCabecalho ( "Sub-Total", 9, 9, "B" ); | |
286 | + $obPDF->addCabecalho ( "Sub-Total", 6, 8, "B" ); | |
287 | 287 | |
288 | 288 | $obPDF->setAlinhamento ( "L" ); |
289 | - $obPDF->addCampo ( "[cod_inscricao]/[exercicio]", 9 ); | |
289 | + $obPDF->addCampo ( "[cod_inscricao]/[exercicio]", 8 ); | |
290 | 290 | $obPDF->setAlinhamento ( "C" ); |
291 | - $obPDF->addCampo ( "[exercicio_original]", 9 ); | |
292 | - $obPDF->addCampo ( "[inscricao_tipo]", 9 ); | |
291 | + $obPDF->addCampo ( "[exercicio_original]", 8 ); | |
292 | + $obPDF->addCampo ( "[inscricao_tipo]", 8 ); | |
293 | 293 | |
294 | - $obPDF->addCampo ( "[vlr_parcela]", 9 ); | |
294 | + $obPDF->addCampo ( "[vlr_parcela]", 8 ); | |
295 | 295 | |
296 | 296 | for ( $inJ=0; $inJ<$rsDados->getCampo("total_de_acrescimos"); $inJ++ ) { |
297 | - $obPDF->addCampo ( "[valor_acrescimo_".$inJ."]", 10 ); | |
297 | + $obPDF->addCampo ( "[valor_acrescimo_".$inJ."]", 8 ); | |
298 | 298 | } |
299 | 299 | |
300 | - $obPDF->addCampo ( "[reducao]", 9 ); | |
300 | + $obPDF->addCampo ( "[reducao]", 8 ); | |
301 | 301 | $obPDF->setAlinhamento ( "R" ); |
302 | - $obPDF->addCampo ( "[vlr_final]", 9 ); | |
302 | + $obPDF->addCampo ( "[vlr_final]", 8 ); | |
303 | 303 | |
304 | 304 | $arSomatorioCredito[] = array( "labelListaParcela" => "Detalhamento do tributo de dívidas vinculadas" ); |
305 | 305 | unset( $rsSomatorioParcela ); |
... | ... | @@ -314,22 +314,22 @@ $rsParcelas->preenche ( $arParcelasSessao ); |
314 | 314 | $obPDF->setQuebraPaginaLista( false ); |
315 | 315 | $obPDF->setAlturaLinha ( 3 ); |
316 | 316 | $obPDF->setAlinhamento ( "L" ); |
317 | - $obPDF->addCabecalho ( "", 7, 10, "B" ); | |
318 | - $obPDF->addCabecalho ( "Totais:", 21.8, 10, "B" ); | |
319 | - $obPDF->addCabecalho ( $flValorOrigem, 7.3, 10, "B" ); | |
317 | + $obPDF->addCabecalho ( "Totais:", 20.5, 8, "B" ); | |
318 | + $obPDF->addCabecalho ( $flValorOrigem, 6.5, 8, "B" ); | |
320 | 319 | |
321 | - $arTamanhos[0] = 10; | |
322 | - $arTamanhos[1] = 10; | |
323 | - $arTamanhos[2] = 10.4; | |
324 | - $arTamanhos[3] = 10; | |
325 | - $arTamanhos[4] = 10; | |
326 | 320 | for ( $inJ=0; $inJ<count($arAcrescimos); $inJ++ ) { |
321 | + if ( $inJ == (count($arAcrescimos)-1) ){ | |
322 | + $inTamanhoUltimoCampo = 7.5; | |
323 | + }else{ | |
324 | + $inTamanhoUltimoCampo = 8; | |
325 | + } | |
326 | + | |
327 | 327 | $arAcrescimos[$inJ] = number_format ( $arAcrescimos[$inJ], 2, ',', '.' ); |
328 | - $obPDF->addCabecalho ( $arAcrescimos[$inJ], $arTamanhos[$inJ], 10, "B" ); | |
328 | + $obPDF->addCabecalho ( $arAcrescimos[$inJ], $inTamanhoUltimoCampo, 8, "B" ); | |
329 | 329 | } |
330 | 330 | |
331 | - $obPDF->addCabecalho ( $flReducao, 9.3, 10, "B" ); | |
332 | - $obPDF->addCabecalho ( $flValorTotal, 30, 10, "B" ); | |
331 | + $obPDF->addCabecalho ( $flReducao, 7, 8, "B" ); | |
332 | + $obPDF->addCabecalho ( $flValorTotal, 10, 8, "B" ); | |
333 | 333 | |
334 | 334 | unset( $arSomatorioCredito ); |
335 | 335 | $arSomatorioCredito[] = array( "labelListaParcela" => "Detalhamento do tributo de dívidas vinculadas" ); |
... | ... | @@ -339,10 +339,9 @@ $rsParcelas->preenche ( $arParcelasSessao ); |
339 | 339 | |
340 | 340 | $obPDF->addRecordSet( $rsSomatorioParcela ); |
341 | 341 | $obPDF->setQuebraPaginaLista( false ); |
342 | - $obPDF->setAlturaLinha ( 3 ); | |
342 | + $obPDF->setAlturaLinha ( 1 ); | |
343 | 343 | $obPDF->setAlinhamento ( "L" ); |
344 | - $obPDF->addCabecalho ( "", 40, 10, "B" ); | |
345 | - $obPDF->addCampo ( "[labelListaParcela]", 10, "B" ); | |
344 | + $obPDF->addCabecalho ( "Detalhamento do tributo de dívidas vinculadas", 40, 10, "B" ); | |
346 | 345 | |
347 | 346 | unset( $rsDados ); |
348 | 347 | $rsDados = new Recordset; |
... | ... | @@ -352,12 +351,12 @@ $rsParcelas->preenche ( $arParcelasSessao ); |
352 | 351 | $obPDF->setQuebraPaginaLista( false ); |
353 | 352 | $obPDF->setAlturaLinha ( 3 ); |
354 | 353 | $obPDF->setAlinhamento ( "L" ); |
355 | - $obPDF->addCabecalho ( "Inscrição Dívida", 12, 9, "B" ); | |
356 | - $obPDF->addCabecalho ( "Grupo Origem", 14, 9, "B" ); | |
357 | - $obPDF->addCabecalho ( "Credito Origem", 60, 9, "B" ); | |
358 | - $obPDF->addCampo ( "[cod_inscricao]/[exercicio]", 9 ); | |
359 | - $obPDF->addCampo ( "[grupo_original]", 9 ); | |
360 | - $obPDF->addCampo ( "[origem][descricao_credito];", 9 ); | |
354 | + $obPDF->addCabecalho ( "Inscrição Dívida", 12, 8, "B" ); | |
355 | + $obPDF->addCabecalho ( "Grupo Origem", 14, 8, "B" ); | |
356 | + $obPDF->addCabecalho ( "Credito Origem", 60, 8, "B" ); | |
357 | + $obPDF->addCampo ( "[cod_inscricao]/[exercicio]", 8 ); | |
358 | + $obPDF->addCampo ( "[grupo_original]", 8 ); | |
359 | + $obPDF->addCampo ( "[origem][descricao_credito];", 8 ); | |
361 | 360 | |
362 | 361 | unset( $arSomatorioCredito ); |
363 | 362 | $arSomatorioCredito[] = array( "labelListaParcela" => "Lista de Parcelas" ); |
... | ... | @@ -366,10 +365,9 @@ $rsParcelas->preenche ( $arParcelasSessao ); |
366 | 365 | |
367 | 366 | $obPDF->addRecordSet( $rsSomatorioParcela ); |
368 | 367 | $obPDF->setQuebraPaginaLista( false ); |
369 | - $obPDF->setAlturaLinha ( 3 ); | |
368 | + $obPDF->setAlturaLinha ( 1 ); | |
370 | 369 | $obPDF->setAlinhamento ( "L" ); |
371 | - $obPDF->addCabecalho ( "", 20, 10, "B" ); | |
372 | - $obPDF->addCampo ( "[labelListaParcela]", 12, "B" ); | |
370 | + $obPDF->addCabecalho ( "Lista de Parcelas", 20, 10, "B" ); | |
373 | 371 | # LISTA DE PARCELAS |
374 | 372 | |
375 | 373 | $rsParcelas->addFormatacao("vlr_parcela", "NUMERIC_BR"); |
... | ... | @@ -377,16 +375,16 @@ $rsParcelas->preenche ( $arParcelasSessao ); |
377 | 375 | $obPDF->setQuebraPaginaLista( false ); |
378 | 376 | $obPDF->setAlturaLinha ( 3 ); |
379 | 377 | $obPDF->setAlinhamento ( "C" ); |
380 | - $obPDF->addCabecalho ( "Parcela", 8, 9, "B" ); | |
381 | - $obPDF->addCabecalho ( "Vencimento", 8, 9, "B" ); | |
382 | - $obPDF->addCabecalho ( "Valor", 7, 9, "B" ); | |
378 | + $obPDF->addCabecalho ( "Parcela", 8, 8, "B" ); | |
379 | + $obPDF->addCabecalho ( "Vencimento", 8, 8, "B" ); | |
380 | + $obPDF->addCabecalho ( "Valor", 7, 8, "B" ); | |
383 | 381 | |
384 | 382 | $obPDF->setAlinhamento ( "C" ); |
385 | - $obPDF->addCampo ( "[nr_parcela]", 9 ); | |
383 | + $obPDF->addCampo ( "[nr_parcela]", 8 ); | |
386 | 384 | $obPDF->setAlinhamento ( "C" ); |
387 | - $obPDF->addCampo ( "[data_vencimento]", 9 ); | |
385 | + $obPDF->addCampo ( "[data_vencimento]", 8 ); | |
388 | 386 | $obPDF->setAlinhamento ( "R" ); |
389 | - $obPDF->addCampo ( "[vlr_parcela]", 9 ); | |
387 | + $obPDF->addCampo ( "[vlr_parcela]", 8 ); | |
390 | 388 | |
391 | 389 | $obPDF->show(); |
392 | 390 | ?> | ... | ... |
gestaoTributaria/fontes/PHP/dividaAtiva/instancias/cobranca/PRManterCobranca.php
... | ... | @@ -30,7 +30,7 @@ |
30 | 30 | * @author Analista: Fábio Bertoldi |
31 | 31 | * @author Programador: Fernando Piccini Cercato |
32 | 32 | |
33 | - * $Id: PRManterCobranca.php 62838 2015-06-26 13:02:49Z diogo.zarpelon $ | |
33 | + * $Id: PRManterCobranca.php 62849 2015-06-29 18:55:59Z evandro $ | |
34 | 34 | |
35 | 35 | Caso de uso: uc-05.04.04 |
36 | 36 | **/ |
... | ... | @@ -995,10 +995,9 @@ switch ($stAcao) { |
995 | 995 | |
996 | 996 | include_once( CAM_GT_ARR_CLASSES."boletos/".$stArquivoModelo ); |
997 | 997 | $obRModeloCarne = new $stObjModelo( $arEmissao ); |
998 | - $obRModeloCarne->setCobranca(true); | |
998 | + //$obRModeloCarne->setCobranca(true); | |
999 | 999 | $obRModeloCarne->imprimirCarne(); |
1000 | 1000 | |
1001 | - | |
1002 | 1001 | echo "<script type=\"text/javascript\">\r\n"; |
1003 | 1002 | echo " var sAux = window.open('OCImpressaoPDFEmissao.php?".Sessao::getId()."','','width=20,height=10,resizable=1,scrollbars=1,left=100,top=100');\r\n"; |
1004 | 1003 | echo " eval(sAux)\r\n"; | ... | ... |