public function FiltrarDepositoSaquePeriodo() { $Datas = new Data(); $Conta = new ModelBanco(); $DataIni = !empty($_POST['data_ini_filtro']) ? $Datas->convertDataSql($_POST['data_ini_filtro']) : date('Y-m-d', strtotime("-15 days")); $DataFin = !empty($_POST['data_fim_filtro']) ? $Datas->convertDataSql($_POST['data_fim_filtro']) : date('Y-m-d', strtotime("+31 days")); $CodUsu = !empty($_POST['usuario']) ? $_POST['usuario'] : false; $tipoOp = !empty($_POST['tipo_operacao']) ? $_POST['tipo_operacao'] : false; $CodConta = !empty($_POST['conta_cc']) ? $_POST['conta_cc'] : false; $UsuLabel = !empty($_POST['usuario']) ? $Conta->RecuperaCampo("UCUSERNAME", "UCTABUSERS", "CHAVE_USER", $_POST['usuario']) : "Todos"; $ContaLabel = !empty($_POST['conta_cc']) ? $Conta->RecuperaCampo("NOME", "BANCO", "BANCO_ID", $_POST['conta_cc']) : "Todos"; $tipoOpLabel = !empty($_POST['tipo_operacao']) ? $_POST['tipo_operacao'] : "Todos"; $lista = $Conta->EvolucaoConta($DataIni, $DataFin, $CodConta, $CodUsu, $tipoOp, -1); if (count($lista) > 1) { $_SESSION["listaFiltroOp"] = $lista; $_SESSION["LabelFiltroOP"] = "Exibindo o período de " . $Datas->convertDataBrasileira($DataIni) . " " . "até " . $Datas->convertDataBrasileira($DataFin) . " /" . "Usuário = $UsuLabel /" . "Operacao = $tipoOpLabel /" . "Conta = $ContaLabel"; return TRUE; } else { $_SESSION["listaFiltroOp"] = null; $_SESSION["LabelFiltroOP"] = "Exibindo o período de " . $Datas->convertDataBrasileira($DataIni) . " " . "até " . $Datas->convertDataBrasileira($DataFin) . " /" . "Usuário = $UsuLabel /" . "Operacao = $tipoOpLabel /" . "Conta = $ContaLabel"; parent::setMsg("Não existem movimentações no período para esta conta"); } }
<font color=" . $contasAgrp->getCorStatus() . ">" . substr($contasAgrp->getRazao_social_cli(), 0, 30) . "</font> </td> <td align='left' title=" . $contasAgrp->getNome_conta() . "> <font color=" . $contasAgrp->getCorStatus() . ">" . substr($contasAgrp->getNome_conta(), 0, 20) . "</font> </td> <td align='left' title=" . $contasAgrp->getCentroReceita() . "> <font color=" . $contasAgrp->getCorStatus() . ">" . substr($contasAgrp->getCentroReceita(), 0, 20) . "</font> </td> <td align='center'> <font color=" . $contasAgrp->getCorStatus() . ">" . $contasAgrp->getValor() . "</font> </td> <td align='center'> <font color=" . $contasAgrp->getCorStatus() . ">" . $data->convertDataBrasileira($contasAgrp->getData_vencimento()) . "</font> </td> <td align='center'> <font color=" . $contasAgrp->getCorStatus() . ">" . $contasAgrp->getNome_status() . "</font> </td> <td align='center'> <font color=" . $contasAgrp->getCorStatus() . ">" . $CodFechamento . "</font> </td> </tr>"; }; $Html .= "</tbody>"; $Html .= "</table>"; $Disabled = $contasAgrp->getCod_status() == 1 ? false : true;
$cor = $fluxo->GetCorLancamento(); ?> <tr> <td align="center"> <font color="<?php echo $cor?>"><?php echo $fluxo->getCodigo()?></font> </td> <td align="left"> <font color="<?php echo $cor?>"><?php echo $fluxo->getNomeConta()?></font> </td> <td align="center"> <font color="<?php echo $cor?>"><?php echo $fluxo->getValor()?></font> </td> <td align="center"> <font color="<?php echo $cor?>"><?php echo $Data->convertDataBrasileira($fluxo->getDataOperacao())?></font> </td> <td align="center"> <font color="<?php echo $cor?>"><?php echo $fluxo->getNomeContaCorrente()?></font> </td> <td align="center"> <font color="<?php echo $cor?>"><?php echo $fluxo->getSituacao()?></font> </td> </tr> <?php } ?> </tbody> </table> <br>
$CodItem = $ControladorMedico->CodigoItenOit($_GET["LaudoId"]); if ($DadosPaciente) { $DadosPaciente = $DadosPaciente->fetchObject(); $CData = new Data(); } ?> <?php include_once '../include/header.php';?> <br><br> <script src="js/js_laudos.js"></script> <script src="js/js_oit_alterado.js"></script> <table border="1" class="table table-condensed table-hover table-striped table-responsive tabela"> <tr> <th>Funcionário:</th> <td><?php echo $DadosPaciente->FUNCIONARIO?></td> <td><?php echo $CData->CalculaIdade($CData->convertDataBrasileira($DadosPaciente->DATA_NASCIMENTO)) . " ANOS"?> </td> </tr> <tr> <th>Função:</th> <td colspan=2><?php echo$DadosPaciente->FUNCAO?></td> </tr> </table> <form id="OitAlterado" method="post"> <div id="linha_form"> <span class="label_fonte">1A) Qualidade Técnica:</span> <select name="1a" class="form_style" > <option value=""></option> <option value="1">1</option>
$CData = new Data(); ?> <table class="table table-condensed table-hover table-striped table-responsive tabela grid-data"> <thead> <tr> <th data-column-id='id' data-type='numeric' data-identifier='true'>ID</th> <th data-column-id="funcionario" data-order="asc">Funcionário</th> <th data-column-id="empresa">Empresa</th> <th data-column-id="funcao">Função</th> <th data-column-id="data">Data</th> <th data-column-id='commands' data-formatter='commands' data-sortable='false'>Imagens</th> </tr> </thead> <tbody> <?php while ($linha = $LaudosPendente->fetchObject()){?> <tr> <td><?php echo $linha->LAUDO_ID?></td> <td><?php echo $linha->FUNCIONARIO?></td> <td><?php echo $linha->RAZAO_SOCIAL?></td> <td><?php echo $linha->FUNCAO?></td> <td><?php echo $CData->convertDataBrasileira($linha->DATA)?></td> <td></td> </tr> <?php }?> </tbody> </table> <?php } else {?> <h3 align='center'><span class='label label-warning'>Nenhum laudo a ser analisado</span></h3> <?php }?> </div> <?php include '../include/footer.php';?>
<?php echo $contas->getConta_receber_id()?> </td> <td align="center"> <?php echo $contas->getCodParcela() . "/" . $contas->getTotalParcelas();?> </td> <td align="center"> <?php echo $contas->getNome_status()?> </td> <td align="left" title="<?php echo $contas->getRazao_social_cli()?>"> <?php echo substr($contas->getNomeFormaPagamento(), 0, 30)?> </td> <td align="left" title="<?php echo $contas->getRazao_social_cli()?>"> <?php echo substr($contas->getRazao_social_cli(), 0, 30)?> </td> <td align="left" title="<?php echo $contas->getNome_conta()?>"> <?php echo substr($contas->getNome_conta(), 0, 30)?> </td> <td align="center"> <?php echo $contas->getValor()?> </td> <td align="center"> <?php echo $data->convertDataBrasileira($contas->getData_vencimento())?> </td> </tr> <?php }?> </tbody> </table> <?php } ?> </div> </div>
public function ImportaVencimentoFatura() { $sql = "SELECT * FROM VENCIMENTO_FATURA WHERE RECEBIDO = 'N'"; if ($result = parent::execute_query($sql)) { $CR = new ModellancaCrBd(); $Data = new Data(); $String = new CString(); while ($linha = parent::criaObjetoConsulta($result)){ $linha->VENCIMENTO_FATURA_ID; $linha->BANCO_ID; $linha->OBSERVACAO; $linha->EMPRESA_ID; $linha->FORMA_PAGAMENTO; $linha->DATA_VENCIMENTO; $linha->VALOR_FINAL; //Associa a forma de pagamento aos códigos do pagamento switch ($linha->FORMA_PAGAMENTO){ case "BOLETO": $Cod = 1; break; case "CARTAO_CREDITO": $Cod = 2; break; case "CARTAO_DEBITO": $Cod = 3; break; case "DINHEIRO": $Cod = 4; break; } $linha->UCIDUSER = 1; if (!$linha->BANCO_ID) { $linha->BANCO_ID = 1; } $linha->CENTRO_CUSTO_ID = 'NULL'; $linha->UCIDUSER = 1; $linha->GRUPO_ID = 194; //Verifica a quantidade de parcelas do lançamento $sqlVerificaQtdParcelas = "SELECT COUNT(VENCIMENTO_FATURA_ID) AS TOTAL FROM VENCIMENTO_FATURA WHERE VENCIMENTO_FATURA_ID =" . $linha->VENCIMENTO_FATURA_ID; $resultParcelas = parent::execute_query($sqlVerificaQtdParcelas); $linhaParcela = parent::criaObjetoConsulta($resultParcelas); $Total = $linhaParcela->TOTAL; if ($Total >= 1) { $TotParcelas = $Total; $ValorParcela = Array(); $VencimentoParcela = Array(); $Pais = Array(); $resultFilhos = parent::execute_query("SELECT * FROM VENCIMENTO_FATURA VF WHERE VF.ORIGEM_VENCIMENTO_FATURA_ID =" . $linha->VENCIMENTO_FATURA_ID); while ($linhaFilhos = parent::criaObjetoConsulta($resultFilhos)){ $Parcela = parent::RecuperaCampo("VALOR_FINAL", "VENCIMENTO_FATURA", "VENCIMENTO_FATURA_ID", ($linhaFilhos->VENCIMENTO_FATURA_ID)); $DataVencimento = parent::RecuperaCampo("DATA_VENCIMENTO", "VENCIMENTO_FATURA", "VENCIMENTO_FATURA_ID", ($linhaFilhos->VENCIMENTO_FATURA_ID)); array_push($ValorParcela, 'R$ ' . str_replace('.', ",", $Parcela)); array_push($VencimentoParcela, $Data->convertDataBrasileira($DataVencimento)); array_push($Pais, $linhaFilhos->VENCIMENTO_FATURA_ID); } if (!$CR->GravarLancamento(0, $linha->CENTRO_CUSTO_ID, 0, $linha->OBSERVACAO, $linha->EMPRESA_ID, $linha->GRUPO_ID, $VencimentoParcela, $linha->UCIDUSER, $linha->BANCO_ID, 134, 5, $TotParcelas, $ValorParcela, $String, 0, $Cod, $Pais, NULL, 0)) { break; return false; } } } } }
<?php require_once ("../../include/header.php"); require_once("../../include/Vtopo.php"); require_once '../../include/menu/menu.php'; ?> <script src="js/js_pendencia.js"></script> <div class="control-group" align="center" > <div class='div-ajax-carregamento-pagina'> <img src="../../include/img/load.gif" style='padding-top: 15%;'> <p>Aguarde...</p> </div> <form class="form-inline form_pesquisa" action="#" method="POST" id="form_pesquisa"> <div class="form-group"> <div class="input-group"> <input type="text" name="data_ini_filtro_pendencia" class="datepicker form-control input-sm" value="<?php echo $data->convertDataBrasileira($_SESSION["data_ini_filtro_pendencia"])?>" size="10" placeholder="Data Inicial"> </div> </div> <div class="form-group"> <div class="input-group"> <input type="text" name="data_fim_filtro_pendencia" class="datepicker form-control input-sm" value="<?php echo $data->convertDataBrasileira($_SESSION["data_fim_filtro_pendencia"])?>" size="10" placeholder="Data Final"> </div> </div> <div class="form-group"> <div class="input-group"> <select name="statusPendencia" class="input-sm" > <option value="T" <?php if ($_SESSION ["statusPendencia"] == "!='T'") echo "SELECTED=SELECTED"?>>TODOS</option> <option value="P" <?php if ($_SESSION ["statusPendencia"] == "='P'") echo "SELECTED=SELECTED"?>>PENDENTE</option> <option value="C" <?php if ($_SESSION ["statusPendencia"] == "='C'") echo "SELECTED=SELECTED"?>>CONSOLIDADO</option> </select> </div>
$ValorBaseFatura = number_format($controlador->ValorFaturaCalculoImposto($ValorCalculadoImposto, $contas->getConta_receber_id()), 2, ',', '.'); ?> <script src="js/js_calcula_fatura.js"></script> <div class = "container-fluid"> <h5 class = "text-info">Fatura Laçamento - <?php echo "<font color=red>" . substr($contas->getRazao_social_cli(), 0, 50) . " (Parcela " . $contas->getCodParcela() . "/" . $contas->getTotalParcelas() . ")" . "</font>"?></h5> <form class="form-horizontal" id="formFatura"> <div class="form-group"> <label class="col-sm-2 control-label" for="valor">Valor</label> <div class="col-sm-3"> <input type="text" class="valor form-control input-sm" name="valor_faturado" id="valor_faturado" size="10" readonly="readonly" required="required" value="R$ <?php echo($ValorBaseFatura)?>"> </div> </div> <div class="form-group"> <label class="col-sm-2 control-label" for="valor">Vencimento *</label> <div class="col-sm-3"> <input type="text" class="datepicker form-control input-sm" name="vencimento" id="venc" required="required" value="<?php echo $data->convertDataBrasileira($contas->getData_vencimento())?>"> </div> </div> <div class="form-group"> <label class="col-sm-2 control-label" for="valor">Multa </label> <div class="col-sm-3"> <input type="text" name="multa_boleto" id="multaBoleto" readonly="readonly" value="R$ 0,00" class="form-control input-sm valor"> <!--<button type="button" id="naoMulta">Não calcular multa</button>--> </div> </div> <div class="form-group"> <label class="col-sm-2 control-label" for="valor">Mora</label> <div class="col-sm-3"> <input type="text" name="mora_boleto" id="moraBoleto" readonly="readonly" value="R$ 0,00" class="form-control input-sm valor"> <!--<button type="button" id="naoMora">Não calcular mora</button>-->
private function RealizaInclusaoCp() { $Data = new Data(); $this->setInsereDespesaCp(false); if ($this->getUltimaDataLancamento()) { $this->setDiasUltimoLancamento($Data->DiasEntreDatas($this->getUltimaDataLancamento(), date('Y-m-d'))); } else { $this->setDiasUltimoLancamento(-1); } $ModelCp = new ModelLancaCpBd(); $String = new CString(); $Valor = Array(); array_push($Valor, 'R$ ' . str_replace('.', ",", $this->getValor())); $DataVencimento = Array(); array_push($DataVencimento, $Data->convertDataBrasileira($this->DataProximoVencimento())); if ($this->getInsereDespesaCp()) { if ($ModelCp->GravaContasPagar('', $this->getFornecedorId(), $_SESSION["id_usuario"], date('Y-m-d'), $DataVencimento, $Valor, $this->getDescricao(), $this->getBancoId(), 1, parent::RecuperaCampo("FILIAL_ID", "FILIAL", "FILIAL_PADRAO", "'S'"), $this->getSubCategoriaId(), $this->getGrupoCaixaId(), $String, $this->getFormaPagamentoId(), 'NULL', 'NULL', $this->getDespesaFixaId())) { } } $this->setUltimaDataLancamento(null); }
}; require_once ("../../include/header.php"); require_once ("../../include/Vtopo.php"); if ($controlador->getMsg() != null) { echo "<div align='center' class='alert alert-danger' role='alert'>" . $controlador->getMsg() . "</div>"; } ?> <script src="../js/js_financeiro.js"></script> <script src="js/js_cr.js"></script> <script src="js/js_form_alterar.js"></script> <div class="container container-fluid"> <h4 class="text-info">Alteração de Contas a Receber - Parcela <?php echo $dadosConta->getCodParcela() . "/" . $dadosConta->getTotalParcelas()?> Vencimento - <?php echo $ManipulaData->convertDataBrasileira($dadosConta->getData_vencimento())?></h4> <form class="form-horizontal" method="POST" action="#" id="form_alteracao_cr"> <div class="form-group"> <label class="col-sm-2 control-label" for="descricao">Empresa *</label> <div class="col-sm-3"> <input type="text" id="inputPesquisaCliente" value="<?php echo $dadosConta->getRazao_social_cli()?>" class="form-control input-sm" required="required" placeholder="Empresa"> <div id="loading" ></div> </div> </div> <input type="hidden" name="cliente" value="<?php echo $dadosConta->getId_cliente()?>" id="cliente" class="form-control input-sm combobox"> <div class="form-group"> <label class="col-sm-2 control-label" for="combobox">Categoria </label> <div class="col-sm-3" > <select id="categoria" required="required" name="categoria" class="<?php echo $ClassHtml?>"> <option value=""></option>
public function PesquisaGrid($Todos = False) { if ($_POST) { unset($_SESSION["pg_atual"]); } $Data = New Data(); //Cod Conta if (!isset($_SESSION["codContaEvolucao"]) || (isset($_POST["codContaEvolucao"]))) { $_SESSION["codContaEvolucao"] = isset($_POST['codContaEvolucao']) ? (trim($_POST['codContaEvolucao'])) : ""; } //Data Inicial if (!isset($_SESSION["data_ini_filtro_evolucao"]) || (isset($_POST["data_ini_filtro_evolucao"]))) { $_SESSION["data_ini_filtro_evolucao"] = isset($_POST['data_ini_filtro_evolucao']) ? $Data->convertDataSql($_POST["data_ini_filtro_evolucao"]) : date('Y-m-d', strtotime("-30 days")); } //Data Final if (!isset($_SESSION["data_fin_filtro_evolucao"]) || (isset($_POST["data_fin_filtro_evolucao"]))) { $_SESSION["data_fin_filtro_evolucao"] = isset($_POST['data_fin_filtro_evolucao']) ? $Data->convertDataSql($_POST["data_fin_filtro_evolucao"]) : date('Y-m-d'); } $Conta = new ModelBanco(); //Cria a visualização com os detalhes do filtro $dataLabelIni = $Data->convertDataBrasileira($_SESSION["data_ini_filtro_evolucao"]); $dataLabelFim = $Data->convertDataBrasileira($_SESSION["data_fin_filtro_evolucao"]); $labelNomeBanco = $_SESSION["codContaEvolucao"] != null ? $Conta->RecuperaCampo("NOME", "BANCO", "BANCO_ID", $_SESSION["codContaEvolucao"]) : "Todos"; $_SESSION["label_filtro_evolucao"] = "<span class='label label-default'>Exibindo período de $dataLabelIni até $dataLabelFim Conta = $labelNomeBanco</span>"; if (empty($_SESSION["codContaEvolucao"])) { parent::setMsg("Selecione uma conta"); return false; } $lista = $Conta->EvolucaoConta($_SESSION["data_ini_filtro_evolucao"], $_SESSION["data_fin_filtro_evolucao"], $_SESSION["codContaEvolucao"]); if (count($lista) > 1) { if (!$Todos) return parent::Paginar($lista, $_SERVER["SCRIPT_NAME"], $_REQUEST["Pg"]); else return $lista; } else { parent::setMsg("Não existem movimentações no peróido para esta conta"); } }
private function DiaVencimentoTabela() { $Cdata = new Data(); //Recupera os dados do fechamento $DiaVencimento = trim(parent::RecuperaCampo("DIA_VENCIMENTO", "CONFIG_FECHAMENTO", "CONFIG_FECHAMENTO_ID", $this->getCodConfiguracaoFechamento())); //Recupera os dados do fechamento $Referencia = trim(parent::RecuperaCampo("MES_REFERENCIA_FECHAMENTO", "CONFIG_FECHAMENTO", "CONFIG_FECHAMENTO_ID", $this->getCodConfiguracaoFechamento())); $DiaFechamento = trim(parent::RecuperaCampo("DIA_FECHAMENTO", "CONFIG_FECHAMENTO", "CONFIG_FECHAMENTO_ID", $this->getCodConfiguracaoFechamento())); //Verifica se o dia de vencimento é maior que o dia atual if ((date('d') < $DiaFechamento)AND ( $Referencia == 1)) { $DataVencimento = date("Y-m-$DiaVencimento"); } else { $DataVencimento = date("Y-m-$DiaVencimento", strtotime("+$Referencia month")); } if ($Cdata->DiasEntreDatas($DataVencimento, date('Y-m-d')) < 0) $DataVencimento = date("Y-m-$DiaVencimento", strtotime("+$Referencia+1 month")); return $Cdata->convertDataBrasileira($DataVencimento); }
public function ListaPendenciasNaoConsolidadas($Todos = false) { if ($_POST) { unset($_SESSION["pg_atual"]); } $CString = New CString(); $Data = New Data (); //Status if (!isset($_SESSION ["statusPendencia"]) || (isset($_POST["statusPendencia"]))) { $_SESSION["statusPendencia"] = !empty($_POST['statusPendencia']) ? ("='" . trim($_POST['statusPendencia']) . "'") : "= 'P'"; if ($_SESSION["statusPendencia"] == "='T'") $_SESSION["statusPendencia"] = "!='T'"; } //Data Inicial if (!isset($_SESSION["data_ini_filtro_pendencia"]) || (isset($_POST["data_ini_filtro_pendencia"]))) { $_SESSION["data_ini_filtro_pendencia"] = !empty($_POST['data_ini_filtro_pendencia']) ? $Data->convertDataSql($_POST["data_ini_filtro_pendencia"]) : date('Y-m-d', strtotime("-120 days")); } //Data Final if (!isset($_SESSION["data_fim_filtro_pendencia"]) || (isset($_POST["data_fim_filtro_pendencia"]))) { $_SESSION["data_fim_filtro_pendencia"] = !empty($_POST['data_fim_filtro_pendencia']) ? $Data->convertDataSql($_POST["data_fim_filtro_pendencia"]) : date('Y-m-d'); } //Cód Fechamento if (!isset($_SESSION ["numero_fatura_sigmo_filtro_pendencia"]) || (isset($_POST["numero_fatura_sigmo_filtro_pendencia"]))) { $_SESSION["numero_fatura_sigmo_filtro_pendencia"] = !empty($_POST['numero_fatura_sigmo_filtro_pendencia']) ? trim($_POST['numero_fatura_sigmo_filtro_pendencia']) : false; } //Tabela Fechamento //Cód Fechamento if (!isset($_SESSION ["tabela_fechamento_pendencia"]) || (isset($_POST["tabela_fechamento"]))) { $_SESSION["tabela_fechamento_pendencia"] = !empty($_POST['tabela_fechamento']) ? trim($_POST['tabela_fechamento']) : false; } $dataLabelIni = $Data->convertDataBrasileira($_SESSION["data_ini_filtro_pendencia"]); $dataLabelFim = $Data->convertDataBrasileira($_SESSION["data_fim_filtro_pendencia"]); $TabelaFechamento = $_SESSION["tabela_fechamento_pendencia"]; $Model = new ModelPendencias(); //Label Status if ($_SESSION ["statusPendencia"] == "!='T'") { $labelStatus = "Todos"; } elseif ($_SESSION ["statusPendencia"] == "='P'") { $labelStatus = "Pendente"; } else { $labelStatus = "Consolidado"; } //Label tabela if (!$TabelaFechamento) { $labelTabela = "Todos"; } else { $labelTabela = $Model->RecuperaCampo("NOME_TABELA", "CONFIG_FECHAMENTO", "CONFIG_FECHAMENTO_ID", $TabelaFechamento); } $_SESSION["label_filtro_pendencia"] = "<span class='label label-default'>Exibindo período de " . $dataLabelIni . " até " . $dataLabelFim . " Status = $labelStatus Tabela = $labelTabela</span>"; $Pesquisa = ""; if (isset($_POST["pesquisa"])) { $Pesquisa = trim($CString->convertem($_POST["pesquisa"], 1)); } $Model = new ModelPendencias(); $listaPendencias = $Model->ListaPendencias($_SESSION["data_ini_filtro_pendencia"], $_SESSION["data_fim_filtro_pendencia"], $_SESSION["numero_fatura_sigmo_filtro_pendencia"], $_SESSION["statusPendencia"], false, $TabelaFechamento, $Pesquisa); //Recupera o total consolidado e o total pendente $this->BuscaTotalConsolidado($Model); $this->BuscaTotalPendente($Model); if (isset($_REQUEST["GerarConsolidacao"])) { $this->GeraConsolidacaoCR($Model); } if ($listaPendencias == null) { parent::setMsg("Não existem pendências a serem listadas"); return FALSE; } else { if (!$Todos) return parent::Paginar($listaPendencias, $_SERVER["SCRIPT_NAME"], $_REQUEST["Pg"]); return $listaPendencias; } }
if ((!$LaudosPendentePaciente) OR ( !$DadosPaciente)) { echo $Html = "<h3 align='center'><span class='label label-danger'>Nenhum arquivo para o laudo</span></h3>"; exit(); } $DadosPaciente = $DadosPaciente->fetchObject(); $CData = new Data(); //Dados do paciente $Html = '<table border="1" class="table table-condensed table-hover table-striped table-responsive tabela"> <tr> <th>Funcionário:</th> <td>' . $DadosPaciente->FUNCIONARIO . '</td> <td>' . $CData->CalculaIdade($CData->convertDataBrasileira($DadosPaciente->DATA_NASCIMENTO)) . " ANOS" . '</td> </tr> <tr> <th>Função:</th> <td colspan=2>' . $DadosPaciente->FUNCAO . '</td> </tr> </table>'; //Exibição das imagens $i = 0; while ($linhaImagens = $ListaCodLaudos->fetchObject()){ $i++; if (!$linhaItenAtual = $controlador->ListaImagensLaudo($linhaImagens->LAUDO_ITEM_ID)) { echo $Html = "<h3 align='center'><span class='label label-danger'>Nenhuma imagem definida para o laudo</span></h3>";
<font color=<?php echo $contas->getCorStatus()?>><?php echo substr($contas->getRazaoSocialFor(), 0, 30)?></font> </td> <td align="left" title="<?php echo $contas->getNomeCategoria()?>"> <font color=<?php echo $contas->getCorStatus()?>><?php echo substr($contas->getNomeCategoria(), 0, 30)?></font> </td> <td align="left" title="<?php echo $contas->getCentroDespesa()?>"> <font color=<?php echo $contas->getCorStatus()?>><?php echo substr($contas->getCentroDespesa(), 0, 30)?></font> </td> <td align="left" title="<?php echo $contas->getResumo()?>"> <font color=<?php echo $contas->getCorStatus()?>><?php echo substr($contas->getResumo(), 0, 30)?></font> </td> <td align="left"> <font color=<?php echo $contas->getCorStatus()?>><?php echo $contas->getValor()?></font> </td> <td align="center"> <font color=<?php echo $contas->getCorStatus()?>><?php echo $data->convertDataBrasileira($contas->getDataVencimentoConta())?></font> </td> </tr> <?php }?> </tbody> </table> <br> <div class="control-group" align="center" > <span class="label label-danger">Aberto <?php echo $SumAberto = $objImpressao->getTotalAberto()?></span> <span class="label label-success">Pago <?php echo $SumPago = $objImpressao->getValorPago()?></span> <span class="label label-warning">Total <?php echo number_format(($SumAberto + $SumPago), 2)?></span> </div> </div> </body>
public function GeraOitAlterado() { $CData = new Data(); $SqlOit = "SELECT * FROM oit_formulario WHERE my_parametro_id = " . $this->MyParametroId . " AND laudo_item_id =" . $this->getLaudoItemId(); $BD = New Database(); $Result = $BD->query($SqlOit); if ($Result->rowCount() == 0) { $this->setMsg("Não foram encontradas informações para este laudo, não será possível concluir a geração do arquivo\n\n"); $this->setStatusGeracao(false); } $LinhaOit = $Result->fetchAll(); $Cpf = $this->getCPF(); $DocOit = !isset($Cpf) ? "CPF " . $this->getCPF() : "RG: " . $this->getRG(); $_1a = $LinhaOit[0]["1a"]; $_1b = $LinhaOit[0]["1b"]; $_2a = $LinhaOit[0]["2a"]; $_2b_pequenas_opacidades_primarias = $LinhaOit[0]["2b_pequenas_opacidades_primarias"]; $_2b_pequenas_opacidades_secundarias = $LinhaOit[0]["2b_pequenas_opacidades_secundarias"]; $_2b_zonas_d = $LinhaOit[0]["2b_zonas_d"]; $_2c_profusao = $LinhaOit[0]["2c_profusao"]; $_2c_grandes_opacidades = $LinhaOit[0]["2c_grandes_opacidades"]; $_3a = $LinhaOit[0]["3a"]; $_3b_placas_neurais = $LinhaOit[0]["3b_placas_neurais"]; $_3b_parede_em_perfil_local = $LinhaOit[0]["3b_parede_em_perfil_local"]; $_3b_parede_em_perfil_calcificacao = $LinhaOit[0]["3b_parede_em_perfil_calcificacao"]; $_3b_frontal_local = $LinhaOit[0]["3b_frontal_local"]; $_3b_frontal_calcificacao = $LinhaOit[0]["3b_frontal_calcificacao"]; $_3b_diafragma_local = $LinhaOit[0]["3b_diafragma_local"]; $_3b_diafragma_calcificacao = $LinhaOit[0]["3b_diafragma_calcificacao"]; $_3b_outros_locais_local = $LinhaOit[0]["3b_outros_locais_local"]; $_3b_outros_locais_calcificacao = $LinhaOit[0]["3b_outros_locais_calcificacao"]; $_3b_combinado_0d = $LinhaOit[0]["3b_combinado_0d"]; $_3b_combinado_0e = $LinhaOit[0]["3b_combinado_0e"]; $_3b_combinado_d = $LinhaOit[0]["3b_combinado_d"]; $_3b_combinado_e = $LinhaOit[0]["3b_combinado_e"]; $_3c = $LinhaOit[0]["3c"]; $_3d_espessamento_pleural_difuso = $LinhaOit[0]["3d_espessamento_pleural_difuso"]; $_3d_parede_em_perfil_local = $LinhaOit[0]["3d_parede_em_perfil_local"]; $_3d_parede_em_perfil_calcificacao = $LinhaOit[0]["3d_parede_em_perfil_calcificacao"]; $_3d_frontal_local = $LinhaOit[0]["3d_frontal_local"]; $_3d_frontal_calcificacao = $LinhaOit[0]["3d_frontal_calcificacao"]; $_3d_combinado_0d = $LinhaOit[0]["3d_combinado_0d"]; $_3d_combinado_0e = $LinhaOit[0]["3d_combinado_0e"]; $_4a_outras_normalidades = $LinhaOit[0]["4a_outras_normalidades"]; $_4b_outras_normalidades = $LinhaOit[0]["4b_outras_normalidades"]; $_4c_comentarios = $LinhaOit[0]["4c_comentarios"]; $PHPWord = new PHPWord(); $ArquivoClinica = $this->VerificaDiretorioTemplateOIT(); $document = $PHPWord->loadTemplate($ArquivoClinica); //clínica $document->setValue('nome_emp', $this->getRazaoSocialClinica()); $document->setValue('cnpj_emp', $this->getCnpjClinica()); $document->setValue('rua_emp', $this->getEnderecoClinica()); $document->setValue('tel_emp', $this->getTelefoneClinica()); $document->setValue('cidade_emp', $this->getCidadeClinica()); $document->setValue('estado_emp', $this->getUFClinica()); //Funcionário $document->setValue('nome_func', $this->getFuncionario()); $document->setValue('doc_func', $DocOit); $document->setValue('empresa_func', $this->getRazaoSocialEmp()); $document->setValue('dat_func', $this->getDataNascimento()); $document->setValue('func_funcionario', $this->getFuncao()); $document->setValue('idade_func', $this->IdadeFunc); $document->setValue('tel_func', $this->TelefoneClinica); $document->setValue('data_exame_func', $CData->convertDataBrasileira($this->getDataRealizacao())); $document->setValue('observacao', "$_4c_comentarios"); //Marcações no documento //1A if ($_1a == 1) { $document->setValue('1a1', "X"); } else { $document->setValue('1a1', ""); }; if ($_1a == 2) { $document->setValue('1a2', "X"); } else { $document->setValue('1a2', ""); } if ($_1a == 3) { $document->setValue('1a3', "X"); } else { $document->setValue('1a3', ""); }; if ($_1a == 4) { $document->setValue('1a4', "X"); } else { $document->setValue('1a4', ""); }; //1B if ($_1b == "S") { $document->setValue('1bs', "X"); } else { $document->setValue('1bs', ""); }; if ($_1b == "N") { $document->setValue('1bn', "X"); } else { $document->setValue('1bn', ""); } //2A if ($_2a == "S") { $document->setValue('2as', "X"); } else { $document->setValue('2as', ""); } if ($_2a == "N") { $document->setValue('2an', "X"); } else { $document->setValue('2an', ""); } //2B Primária if ($_2b_pequenas_opacidades_primarias == "P") { $document->setValue('2bp', "X"); } else { $document->setValue('2bp', ""); } if ($_2b_pequenas_opacidades_primarias == "Q") { $document->setValue('2bq', "X"); } else { $document->setValue('2bq', ""); } if ($_2b_pequenas_opacidades_primarias == "R") { $document->setValue('2br', "X"); } else { $document->setValue('2br', ""); } if ($_2b_pequenas_opacidades_primarias == "S") { $document->setValue('2bs', "X"); } else { $document->setValue('2bs', ""); } if ($_2b_pequenas_opacidades_primarias == "T") { $document->setValue('2bt', "X"); } else { $document->setValue('2bt', ""); } if ($_2b_pequenas_opacidades_primarias == "U") { $document->setValue('2bu', "X"); } else { $document->setValue('2bu', ""); }; //2B Secundária if ($_2b_pequenas_opacidades_secundarias == "P") { $document->setValue('2bps', "X"); } else { $document->setValue('2bps', ""); } if ($_2b_pequenas_opacidades_secundarias == "Q") { $document->setValue('2bqs', "X"); } else { $document->setValue('2bqs', ""); } if ($_2b_pequenas_opacidades_secundarias == "R") { $document->setValue('2brs', "X"); } else { $document->setValue('2brs', ""); ; } if ($_2b_pequenas_opacidades_secundarias == "S") { $document->setValue('2bss', "X"); } else { $document->setValue('2bss', ""); } if ($_2b_pequenas_opacidades_secundarias == "T") { $document->setValue('2bts', "X"); } else { $document->setValue('2bts', ""); } if ($_2b_pequenas_opacidades_secundarias == "U") { $document->setValue('2bus', "X"); } else { $document->setValue('2bus', ""); } //2C Profusão if ($_2c_profusao == "0/-") { $document->setValue('0/-', "X"); } else { $document->setValue('0/-', ""); }; if ($_2c_profusao == "1/0") { $document->setValue('1/0', "X"); } else { $document->setValue('1/0', ""); }; if ($_2c_profusao == "2/1") { $document->setValue('2/1', "X"); } else { $document->setValue('2/1', ""); }; if ($_2c_profusao == "3/2") { $document->setValue('3/2', "X"); } else { $document->setValue('3/2', ""); }; if ($_2c_profusao == "0/0") { $document->setValue('0/0', "X"); } else { $document->setValue('0/0', ""); }; if ($_2c_profusao == "1/1") { $document->setValue('1/1', "X"); } else { $document->setValue('1/1', ""); }; if ($_2c_profusao == "2/2") { $document->setValue('2/2', "X"); } else { $document->setValue('2/2', ""); }; if ($_2c_profusao == "3/3") { $document->setValue('3/3', "X"); } else { $document->setValue('3/3', ""); }; if ($_2c_profusao == "0/1") { $document->setValue('0/1', "X"); } else { $document->setValue('0/1', ""); }; if ($_2c_profusao == "1/2") { $document->setValue('1/2', "X"); } else { $document->setValue('1/2', ""); }; if ($_2c_profusao == "1/2") { $document->setValue('1/2', "X"); } else { $document->setValue('1/2', ""); }; if ($_2c_profusao == "2/3") { $document->setValue('2/3', "X"); } else { $document->setValue('2/3', ""); }; if ($_2c_profusao == "3/+") { $document->setValue('3/+', "X"); } else { $document->setValue('3/+', ""); }; if ($_3a == "S") { $document->setValue('3as', "X"); $document->setValue('3an', ""); } elseif ($_3a == "N") { $document->setValue('3as', ""); $document->setValue('3an', "X"); } else { $document->setValue('3as', ""); $document->setValue('3an', ""); }; // 3B Placas Pleurais if ($_3b_placas_neurais == "S") { $document->setValue('3bs', "X"); $document->setValue('3bn', ""); } elseif ($_3b_placas_neurais == "N") { $document->setValue('3bn', "X"); $document->setValue('3bs', ""); } else { $document->setValue('3bn', ""); $document->setValue('3bs', ""); }; //3B Parede em Perfil if ($_3b_parede_em_perfil_local == "0") { $document->setValue('3parede_0_lo', "X"); } else { $document->setValue('3parede_0_lo', ""); } if ($_3b_parede_em_perfil_local == "D") { $document->setValue('3parede_d_lo', "X"); } else { $document->setValue('3parede_d_lo', ""); } if ($_3b_parede_em_perfil_local == "e") { $document->setValue('3parede_e_lo', "X"); } else { $document->setValue('3parede_e_lo', ""); } if ($_3b_parede_em_perfil_calcificacao == "0") { $document->setValue('3parede_0_cal', "X"); } else { $document->setValue('3parede_0_cal', ""); }; if ($_3b_parede_em_perfil_calcificacao == "D") { $document->setValue('3parede_d_cal', "X"); } else { $document->setValue('3parede_d_cal', ""); }; if ($_3b_parede_em_perfil_calcificacao == "E") { $document->setValue('3parede_e_cal', "X"); } else { $document->setValue('3parede_e_cal', ""); }; //3B Frontal if ($_3b_frontal_local == "0") { $document->setValue('3frontal_0_lo', "X"); } else { $document->setValue('3frontal_0_lo', ""); } if ($_3b_frontal_local == "D") { $document->setValue('3frontal_d_lo', "X"); } else { $document->setValue('3frontal_d_lo', ""); } if ($_3b_frontal_local == "E") { $document->setValue('3frontal_e_lo', "X"); } else { $document->setValue('3frontal_e_lo', ""); } if ($_3b_frontal_calcificacao == "0") { $document->setValue('3frontal_0_cal', "X"); } else { $document->setValue('3frontal_0_cal', ""); }; if ($_3b_frontal_calcificacao == "D") { $document->setValue('3frontal_d_cal', "X"); } else { $document->setValue('3frontal_d_cal', ""); }; if ($_3b_frontal_calcificacao == "e") { $document->setValue('3frontal_e_cal', "X"); } else { $document->setValue('3frontal_e_cal', ""); }; //3B Diafragma Local if ($_3b_diafragma_local == "0") { $document->setValue('3diafragma_0_lo', "X"); } else { $document->setValue('3diafragma_0_lo', ""); }; if ($_3b_diafragma_local == "D") { $document->setValue('3diafragma_d_lo', "X"); } else { $document->setValue('3diafragma_d_lo', ""); }; if ($_3b_diafragma_local == "E") { $document->setValue('3diafragma_e_lo', "X"); } else { $document->setValue('3diafragma_e_lo', ""); }; //3B Diafragma Calcificação if ($_3b_diafragma_calcificacao == "0") { $document->setValue('3diafragma_0_cal', "X"); } else { $document->setValue('3diafragma_0_cal', ""); }; if ($_3b_diafragma_calcificacao == "D") { $document->setValue('3diafragma_d_cal', "X"); } else { $document->setValue('3diafragma_d_cal', ""); }; if ($_3b_diafragma_calcificacao == "e") { $document->setValue('3diafragma_e_cal', "X"); } else { $document->setValue('3diafragma_e_cal', ""); }; //3B Outros Locais Calcificação if ($_3b_outros_locais_calcificacao == "0") { $document->setValue('outros_0_cal', "X"); } else { $document->setValue('outros_0_cal', ""); }; if ($_3b_outros_locais_calcificacao == "D") { $document->setValue('outros_d_cal', "X"); } else { $document->setValue('outros_d_cal', ""); }; if ($_3b_outros_locais_calcificacao == "E") { $document->setValue('outros_e_cal', "X"); } else { $document->setValue('outros_e_cal', ""); }; //3B Outros Locais if ($_3b_outros_locais_local == "0") { $document->setValue('outros_0_lo', "X"); } else { $document->setValue('outros_0_lo', ""); }; if ($_3b_outros_locais_local == "d") { $document->setValue('outros_d_lo', "X"); } else { $document->setValue('outros_d_lo', ""); }; if ($_3b_outros_locais_local == "e") { $document->setValue('outros_e_lo', "X"); } else { $document->setValue('outros_e_lo', ""); }; //3B extenção parede if ($_3b_combinado_0d == "0") { $document->setValue('3b_0d_0', "X"); } else { $document->setValue('3b_0d_0', ""); } if ($_3b_combinado_0d == "D") { $document->setValue('3b_0d_D', "X"); } else { $document->setValue('3b_0d_D', ""); } if ($_3b_combinado_0d == "1") { $document->setValue('3b_0d_1', "X"); } else { $document->setValue('3b_0d_1', ""); } if ($_3b_combinado_0d == "2") { $document->setValue('3b_0d_2', "X"); } else { $document->setValue('3b_0d_2', ""); } if ($_3b_combinado_0d == "3") { $document->setValue('3b_0d_3', "X"); } else { $document->setValue('3b_0d_3', ""); } if ($_3b_combinado_0e == "0") { $document->setValue('3b_0e_0', "X"); } else { $document->setValue('3b_0e_0', ""); } if ($_3b_combinado_0e == "E") { $document->setValue('3b_0e_E', "X"); } else { $document->setValue('3b_0e_E', ""); } if ($_3b_combinado_0e == "1") { $document->setValue('3b_0e_1', "X"); } else { $document->setValue('3b_0e_1', ""); } if ($_3b_combinado_0e == "2") { $document->setValue('3b_0e_2', "X"); } else { $document->setValue('3b_0e_2', ""); } if ($_3b_combinado_0e == "3") { $document->setValue('3b_0e_3', "X"); } else { $document->setValue('3b_0e_3', ""); } if ($_3b_combinado_d == "D") { $document->setValue('3d_D', "X"); } else { $document->setValue('3d_D', ""); } if ($_3b_combinado_d == "A") { $document->setValue('3d_a', "X"); } else { $document->setValue('3d_a', ""); } if ($_3b_combinado_d == "B") { $document->setValue('3d_b', "X"); } else { $document->setValue('3d_b', ""); } if ($_3b_combinado_d == "C") { $document->setValue('3d_c', "X"); } else { $document->setValue('3d_c', ""); } if ($_3b_combinado_e == "E") { $document->setValue('3e_E', "X"); } else { $document->setValue('3e_E', ""); } if ($_3b_combinado_e == "A") { $document->setValue('3e_a', "X"); } else { $document->setValue('3e_a', ""); } if ($_3b_combinado_e == "B") { $document->setValue('3e_b', "X"); } else { $document->setValue('3e_b', ""); } if ($_3b_combinado_e == "C") { $document->setValue('3e_c', "X"); } else { $document->setValue('3e_c', ""); } //3C if ($_3c == "0") { $document->setValue('3c0', "X"); } else { $document->setValue('3c0', ""); } if ($_3c == "D") { $document->setValue('3cD', "X"); } else { $document->setValue('3cD', ""); } if ($_3c == "E") { $document->setValue('3cE', "X"); } else { $document->setValue('3cE', ""); } // 3D if ($_3d_espessamento_pleural_difuso == "S") { $document->setValue('3ds', "X"); $document->setValue('3dn', ""); } elseif ($_3d_espessamento_pleural_difuso == "N") { $document->setValue('3dn', "X"); $document->setValue('3ds', ""); } else { $document->setValue('3dn', ""); $document->setValue('3ds', ""); }; //3B Parede em Perfil if ($_3d_parede_em_perfil_local == "0") { $document->setValue('3d0_local', "X"); } else { $document->setValue('3d0_local', ""); } if ($_3d_parede_em_perfil_local == "D") { $document->setValue('3dD_local', "X"); } else { $document->setValue('3dD_local', ""); }; if ($_3d_parede_em_perfil_local == "E") { $document->setValue('3dE_local', "X"); } else { $document->setValue('3dE_local', ""); } if ($_3d_parede_em_perfil_calcificacao == "0") { $document->setValue('3d0_calci', "X"); } else { $document->setValue('3d0_calci', ""); }; if ($_3d_parede_em_perfil_calcificacao == "D") { $document->setValue('3dD_calci', "X"); } else { $document->setValue('3dD_calci', ""); }; if ($_3d_parede_em_perfil_calcificacao == "E") { $document->setValue('3dE_calci', "X"); } else { $document->setValue('3dE_calci', ""); }; //3D Frontal if ($_3d_frontal_local == "0") { $document->setValue('3d0_front_local', "X"); } else { $document->setValue('3d0_front_local', ""); } if ($_3d_frontal_local == "D") { $document->setValue('3dD_front_local', "X"); } else { $document->setValue('3dD_front_local', ""); } if ($_3d_frontal_local == "E") { $document->setValue('3de_calci_local', "X"); } else { $document->setValue('3de_calci_local', ""); } if ($_3d_frontal_calcificacao == "0") { $document->setValue('3d0_front_calc', "X"); } else { $document->setValue('3d0_front_calc', ""); }; if ($_3d_frontal_calcificacao == "D") { $document->setValue('3dD_front_calc', "X"); } else { $document->setValue('3dD_front_calc', ""); }; if ($_3d_frontal_calcificacao == "E") { $document->setValue('3dE_front_calc', "X"); } else { $document->setValue('3dE_front_calc', ""); }; // COMBINADO if ($_3d_combinado_0d == "0") { $document->setValue('3d_d_comb_0', "X"); } else { $document->setValue('3d_d_comb_0', ""); } if ($_3d_combinado_0d == "D") { $document->setValue('3d_d_comb_D', "X"); } else { $document->setValue('3d_d_comb_D', ""); } if ($_3d_combinado_0d == "1") { $document->setValue('3d_d_comb_1', "X"); } else { $document->setValue('3d_d_comb_1', ""); } if ($_3d_combinado_0d == "2") { $document->setValue('3d_d_comb_2', "X"); } else { $document->setValue('3d_d_comb_2', ""); }; if ($_3d_combinado_0d == "3") { $document->setValue('3d_d_comb_3', "X"); } else { $document->setValue('3d_d_comb_3', ""); } // Outro Quadrado if ($_3d_combinado_0d == "0") { $document->setValue('3d_e_comb_0', "X"); } else { $document->setValue('3d_e_comb_0', ""); } if ($_3d_combinado_0d == "E") { $document->setValue('3d_e_comb_E', "X"); } else { $document->setValue('3d_e_comb_E', ""); } if ($_3d_combinado_0d == "1") { $document->setValue('3d_e_comb_1', "X"); } else { $document->setValue('3d_e_comb_1', ""); } if ($_3d_combinado_0d == "2") { $document->setValue('3d_e_comb_2', "X"); } else { $document->setValue('3d_e_comb_2', ""); }; if ($_3d_combinado_0d == "3") { $document->setValue('3d_e_comb_3', "X"); } else { $document->setValue('3d_e_comb_3', ""); } // 4A if ($_4a_outras_normalidades == "S") { $document->setValue('4as', "X"); $document->setValue('4an', ""); } elseif ($_4a_outras_normalidades == "N") { $document->setValue('4an', "X"); $document->setValue('4as', ""); } else { $document->setValue('4an', ""); $document->setValue('4as', ""); } // 4B Outras Anormalidades if ($_4b_outras_normalidades == "aa") { $document->setValue('4baa', "X"); } else { $document->setValue('4baa', ""); } if ($_4b_outras_normalidades == "at") { $document->setValue('4Bat', "X"); } else { $document->setValue('4Bat', ""); } if ($_4b_outras_normalidades == "ax") { $document->setValue('4Bax', "X"); } else { $document->setValue('4Bax', ""); } if ($_4b_outras_normalidades == "bu") { $document->setValue('4Bbu', "X"); } else { $document->setValue('4Bbu', ""); } if ($_4b_outras_normalidades == "ca") { $document->setValue('4Bca', "X"); } else { $document->setValue('4Bca', ""); } if ($_4b_outras_normalidades == "cg") { $document->setValue('4Bcg', "X"); } else { $document->setValue('4Bcg', ""); } if ($_4b_outras_normalidades == "cn") { $document->setValue('4Bcn', "X"); } else { $document->setValue('4Bcn', ""); } if ($_4b_outras_normalidades == "co") { $document->setValue('4Bco', "X"); } else { $document->setValue('4Bco', ""); } if ($_4b_outras_normalidades == "cp") { $document->setValue('4Bcp', "X"); } else { $document->setValue('4Bcp', ""); } if ($_4b_outras_normalidades == "cv") { $document->setValue('4Bcv', "X"); } else { $document->setValue('4Bcv', ""); } if ($_4b_outras_normalidades == "di") { $document->setValue('4Bdi', "X"); } else { $document->setValue('4Bdi', ""); } if ($_4b_outras_normalidades == "ef") { $document->setValue('4Bef', "X"); } else { $document->setValue('4Bef', ""); } if ($_4b_outras_normalidades == "em") { $document->setValue('4Bem', "X"); } else { $document->setValue('4Bem', ""); } if ($_4b_outras_normalidades == "es") { $document->setValue('4Bes', "X"); } else { $document->setValue('4Bes', ""); } if ($_4b_outras_normalidades == "fr") { $document->setValue('4Bfr', "X"); } else { $document->setValue('4Bfr', ""); } // Segunda linha if ($_4b_outras_normalidades == "hi") { $document->setValue('4Bhi', "X"); } else { $document->setValue('4Bhi', ""); } if ($_4b_outras_normalidades == "ho") { $document->setValue('4Bho', "X"); } else { $document->setValue('4Bho', ""); } if ($_4b_outras_normalidades == "id") { $document->setValue('4Bid', "X"); } else { $document->setValue('4Bid', ""); } if ($_4b_outras_normalidades == "ih") { $document->setValue('4Bih', "X"); } else { $document->setValue('4Bih', ""); } if ($_4b_outras_normalidades == "kl") { $document->setValue('4Bkl', "X"); } else { $document->setValue('4Bkl', ""); } if ($_4b_outras_normalidades == "me") { $document->setValue('4Bme', "X"); } else { $document->setValue('4Bme', ""); } if ($_4b_outras_normalidades == "pa") { $document->setValue('4Bpa', "X"); } else { $document->setValue('4Bpa', ""); } if ($_4b_outras_normalidades == "pb") { $document->setValue('4Bpb', "X"); } else { $document->setValue('4Bpb', ""); } if ($_4b_outras_normalidades == "pi") { $document->setValue('4Bpi', "X"); } else { $document->setValue('4Bpi', ""); } if ($_4b_outras_normalidades == "px") { $document->setValue('4Bpx', "X"); } else { $document->setValue('4Bpx', ""); } if ($_4b_outras_normalidades == "ra") { $document->setValue('4Bra', "X"); } else { $document->setValue('4Bra', ""); } if ($_4b_outras_normalidades == "rp") { $document->setValue('4Brp', "X"); } else { $document->setValue('4Brp', ""); } if ($_4b_outras_normalidades == "tb") { $document->setValue('4Btb', "X"); } else { $document->setValue('4Btb', ""); } if ($_4b_outras_normalidades == "od") { $document->setValue('4Bod', "X"); } else { $document->setValue('4Bod', ""); } $Arquivo = $this->getDiretorioParaGeracaoLaudo() . "/" . $this->getNomeLaudoGerado(); $document->save($Arquivo); return true; }
<th align='center'>Cancelamento PG</th> <th align='center'>Valor</th> <th align='center'>Vencimento</th> <th align='center'>Acréscimo</th> <th align='center'>Desconto</th> </tr> </thead> <tbody>"; foreach ($Historico as $his){ $Html .= "<tr> <td align='center'>" . $his->getNomeStatusLancamentoCp2() . "</td> <td align='center'>" . $data->ConvertDataBrasileiraHorario($his->getDataAlteracaoCp2()) . " - " . $his->getNomeUsuarioAlterouCp2() . "</td> <td align='center'>" . $data->ConvertDataBrasileira($his->getDataPagamentoConta()) . " - " . $his->getNomeUsuarioBaixa() . "</td> <td align='center'>" . $data->ConvertDataBrasileiraHorario($his->getDataCancelamentoCp2()) . " - " . $his->getNomeUsuarioCancelouCp2() . "</td> <td align='center'>" . $his->getValor() . "</td> <td align='center'>" . $data->convertDataBrasileira($his->getDataVencimentoConta()) . "</td> <td align='center'>" . $his->getValorAcrescimo() . "</td> <td align='center'>" . $his->getValorDesconto() . "</td> </tr>"; } $Html .=" </tbody>"; $Html .=" </table >"; echo $Html; exit();
} else { $link = $his->getValorResidual(); } if (($his->getValorResidual() > 0) AND ( !$his->getCodResiduoGerado())) { $link = "<a href='?acao=RedirInclusaoResto&cod=" . $String->criptografa($his->getCodFilho()) . "'><button type='button' title='Gerar Resíduo' value='" . $his->getCodResiduoGerado() . "' class='btn btn-mini btn-warning'>Gerar " . $his->getValorResidual() . "</button>"; } $Html.=" <tr> <td align='center'>" . $his->getNomeStatusCr2() . "</td> <td align='center'>" . $data->ConvertDataBrasileiraHorario($his->getDataAlteracao()) . "<br>" . substr($his->getNomeUsuarioAlteracaoLancamento(), 0, 8) . "</td> <td align='center'>" . $data->ConvertDataBrasileiraHorario($his->getDataFaturamento()) . "<br>" . substr($his->getNomeUsuarioFatura(), 0, 8) . "</td> <td align='center'>" . $data->ConvertDataBrasileiraHorario($his->getDataCancelamento()) . "<br>" . substr($his->getNomeUsuarioCancelamentoFatura(), 0, 8) . "</td> <td align='center'>" . $data->ConvertDataBrasileiraHorario($his->getDataCancelamentoBaixa()) . "<br>" . substr($his->getUsu_cancelamento_recebimento(), 0, 8) . "</td> <td align='center'>" . $data->convertDataBrasileira($his->getData_recebimento()) . "<br>" . $his->getUsu_recebimento() . "</td> <td align='center'>" . $his->getValor() . "</td> <td align='center'>" . $data->ConvertDataBrasileira($his->getData_vencimento()) . "</td> <td align='center'>" . $his->getVlrMulta() . "</td> <td align='center'>" . $his->getVlrMora() . "</td> <td align='center'>" . $his->getVlrImposto() . "</td> <td align='center'>" . $his->getVlrDescontoFatura() . "</td> <td align='center'>" . $his->getValorDesconto() . "</td> <td align='center'>" . $his->getVlrAcrescimoRecebimento() . "</td> <td align='center'>" . $link . "</td> </tr>"; } $Html.=" </tbody>"; $Html.="</table>"; echo $Html;
public function GravaFiltroRemessa($Filtro = "FILTRO_REMESSA") { if ($Filtro == "FILTRO_REMESSA") { $bd = new ManipulaBanco(); $Datas = new Data(); $banco = !empty($_POST['banco']) ? " = " . $_POST['banco'] : 'IS NOT NULL'; $data_ini = !empty($_POST['data_ini_filtro']) ? $Datas->convertDataSql($_POST['data_ini_filtro']) : date('Y-m-d', strtotime("-15 days")); $data_fim = !empty($_POST['data_fim_filtro']) ? $Datas->convertDataSql($_POST['data_fim_filtro']) : date('Y-m-d', strtotime("+30 days")); $sql_filtro = "SELECT CR.F_LANCA_CR_ID, NOME_CONTA, VALOR, EMP.EMPRESA_ID, EMP.RAZAO_SOCIAL, EMP.NOME_FANTASIA, EMP.CNPJ, EMP.CPF, EMP.TIPO_PESSOA AS PF_PJ, COR_STATUS, STATUS.F_STATUS_FINANCEIRO_ID, STATUS.NOME_STATUS, DATA_VENCIMENTO, ACAO_FATURAR, ACAO_EDITAR, ACAO_CANCELAR, F_LANCA_CR2_ID, SUBSTRING(DATA_FATURAMENTO FROM 1 FOR 10) AS DATA_FATURAMENTO, BANCO.NOME, PARAMETRO.RAZAO_SOCIAL AS RAZAO_SOCIAL_HEADER, PARAMETRO.CNPJ AS CNPJ_CEDENTE, BANCO.BANCO_ID AS COD_CC, BANCO.CODIGO_CEDENTE_BANCO AS CODIGO_CEDENTE_HEADER, BANCO.NUMERO_SEQUENCIAL AS SEQUENCIAL, BANCO.CARTEIRA_COBRANCA AS CARTEIRA_HEADER, BANCO.AGENCIA AS AGENCIA, BANCO.DIGITO_AGENCIA AS DIG_AGENCIA_HEADER, BANCO.CONTA AS CONTA_HEADER, BANCO.DIGITO_CONTA DIG_CONTA_HEADER, BANCO.VALOR_MULTA MULTA_CONTA, BANCO.VALOR_JURO MORA_CONTA, BANCO.RESP_EMISSAO_BOLETO, BANCO.DIAS_PROTESTO, BANCO.CONVENIO, ENDE.ENDERECO AS END_SACADO, ENDE.NUMERO AS NUMERO_END_SACADO, ENDE.BAIRRO AS BAIRRO_END_SACADO, ENDE.CEP AS CEP_SACADO, ENDE.CIDADE AS CIDADE_SACADO, UF.SIGLA AS UF, CASE WHEN F_LANCA_CR2.ACAO_CANCELAR = " . '"' . 'S' . '"' . " THEN " . '"' . 'CANCELAMENTO' . '"' . " ELSE " . '"' . 'REGISTRO' . '"' . " END AS NOME_OCORRENCIA, CASE WHEN F_LANCA_CR2.ACAO_CANCELAR = " . '"' . 'S' . '"' . " THEN 02 ELSE 01 END AS CODIGO_OCORRENCIA FROM F_LANCA_CR CR INNER JOIN F_LANCA_CR2 ON (F_LANCA_CR2.F_LANCA_CR2_ID = (SELECT MAX(F_LANCA_CR2.F_LANCA_CR2_ID) FROM F_LANCA_CR2 WHERE F_LANCA_CR2.F_LANCA_CR_ID = CR.F_LANCA_CR_ID)) INNER JOIN F_STATUS_FINANCEIRO STATUS ON (STATUS.F_STATUS_FINANCEIRO_ID = CR.F_STATUS_FINANCEIRO_ID) INNER JOIN EMPRESA EMP ON (CR.EMPRESA_ID = EMP.EMPRESA_ID) INNER JOIN GRUPO_CAIXA GRUPO ON (GRUPO.GRUPO_CAIXA_ID = CR.GRUPO_CAIXA) INNER JOIN BANCO ON (CR.BANCO_ID = BANCO.BANCO_ID) INNER JOIN PARAMETRO ON(PARAMETRO.PARAMETRO_ID = 1) INNER JOIN ENDERECO ENDE ON (EMP.ENDERECO_ID = ENDE.ENDERECO_ID) INNER JOIN ESTADO UF ON (UF.ESTADO_ID = ENDE.ESTADO_ID) INNER JOIN F_FORMA_PAGAMENTO FP ON (FP.F_FORMA_PAGAMENTO_ID = CR.F_FORMA_PAGAMENTO_ID) WHERE BANCO.BANCO_ID $banco AND REMESSA_GERADA IS NULL AND FP.F_TIPO_FORMA = " . '"' . 'BO' . '"' . " AND (DATA_FATURAMENTO BETWEEN " . '"' . $data_ini . ' 00:00:01"' . ' AND ' . '"' . $data_fim . ' 23:59:59"' . ") AND (DATA_VENCIMENTO >= " . '"' . date('Y-m-d') . '"' . ") AND CR.F_STATUS_FINANCEIRO_ID = 2"; //Gera a Label de exibição dos filtros $BancoLabel = !empty($_POST['banco']) ? $bd->RecuperaCampo("NOME", "BANCO", "BANCO_ID", $_POST['banco']) : 'Todas os bancos'; $detalheFiltro = " Exibindo Período de " . $Datas->convertDataBrasileira($data_ini) . " até " . $Datas->convertDataBrasileira($data_fim) . " Banco = $BancoLabel Forma Pagamento = BOLETO - Somente títulos não vencidos "; $gravaFiltro = (new ModelFiltro())->GravaFiltrosUsuario($_SESSION["id_usuario"], $Filtro, $sql_filtro, $detalheFiltro); return $gravaFiltro; } return false; }
}; ?> <!-Formulário de inclusão de contas--> <script src="../js/js_financeiro.js"></script> <script src="js/js_cp.js"></script> <?php if ($controlador->getMsg() != null) {?> <div align="center" class="alert alert-success" role="alert"><?php echo $controlador->getMsg()?></div> <?php } ?> <script src="js/js_form_alterar.js"></script> <div class="container container-fluid"> <div class="row"> <div class="col-sm-12 col-md-4"> <div class="container container-fluid"> <h4 class="text-info">Alteração de Contas a Pagar - Parcela <?php echo $DadosEdicao->getNumParcela() . "/" . $DadosEdicao->getTotalParcelas()?> Vencimento - <?php echo $Data->convertDataBrasileira($DadosEdicao->getDataVencimentoConta())?></h4> <form class="form-horizontal" method="POST" action="#" id="form_alteracao_cp"> <div class="form-group"> <label class="col-sm-2 control-label" for="descricao">Fornecedor *</label> <div class="col-sm-3"> <input type="text" id="inputPesquisaFornecedor" value="<?php echo $DadosEdicao->getRazaoSocialFor()?>" class="form-control input-sm" required="required" placeholder="Fornecedor"> <div id="loading"></div> </div> </div> <input type="hidden" name="fornecedor" value="<?php echo trim($DadosEdicao->getCodFornecedor())?>" id="fornecedor" class="form-control input-sm combobox"> <div class="form-group"> <label class="col-sm-2 control-label" for="combobox">Categoria </label> <div class="col-sm-3"> <select id="categoria" name="categoria" required="required" class="<?php echo $ClassHtml?>"> <option value=""></option> <?php