Skip to content

Commit

Permalink
fix: Cron pos-venda and registrarAlteracao Metodo in ClienteCtrl
Browse files Browse the repository at this point in the history
  • Loading branch information
elfiservice committed Apr 30, 2018
1 parent 7f6b73c commit ac86079
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 11 deletions.
7 changes: 3 additions & 4 deletions classes/controller/ClienteCtrl.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ public function atualizarCliente(Array $dados, Array $dadosClienteAntigoObj) {

if ($this->atualizarBD($arrayFilha[0][0])) {
$idCliente = $dados['id'];
$alteracaoCliente = "<b><span>Alterado</span></b> pelo colaborador <b> {$dados['usuario']} </b> no Sistema:<br>{$stringDadosAlterados}";
LogCtrl::inserirLog($dados['id_colab_logado'], "Cliente Cod <b>{$idCliente}</b> {$alteracaoCliente}", "tec");
$alteracaoCliente = "<b><span>Alterado</span></b> no Sistema:<br>{$stringDadosAlterados}";
LogCtrl::inserirLog($dados['id_colab_logado'], "Cliente {$dados['razao_social']} de Cod <b>{$idCliente}</b> foi {$alteracaoCliente}", "tec");

$this->historicoClienteCtrl->inserirBD(new HistoricoClientes("", $idCliente, $alteracaoCliente, date('Y-m-d H:i:s')));

Expand Down Expand Up @@ -344,8 +344,7 @@ private function registrarAlteracao($objAlterado, $objAnterior) {
foreach ($novosDadosClienteArr as $campo => $valor) {
if ($novosDadosClienteArr[$campo] != $velhorDadosClienteArr[$campo]) {

//ToDo: lançar o dado Alterado no LOG do sistema
$dadosAlterados .= "- O campo <i>" . $campo . "</i> passou de " . $velhorDadosClienteArr[$campo] . " para <b>" . $novosDadosClienteArr[$campo] . "</b></br>";
$dadosAlterados .= "- O campo <i>" . $campo . "</i> passou de <span class=\"text-line-through\">" . ($velhorDadosClienteArr[$campo] != "" ? $velhorDadosClienteArr[$campo] : "<i>em branco</i>") . "</span> para <span class=\"text-underline\"><b>" . ($novosDadosClienteArr[$campo] != "" ? $novosDadosClienteArr[$campo] : "<i>em branco</i>") . "</b></span></br>";

}
}
Expand Down
4 changes: 2 additions & 2 deletions cron/email_pos_venda.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
. "<a href=\"{$www}/modulos/tecnico/orcamento/aprovados/pesquisa_pos_venda.php?ido={$row ['id']}&idc={$row ['id_cliente']}\" >"
. "{$www}/modulos/tecnico/orcamento/aprovados/pesquisa_pos_venda.php?ido={$row ['id']}&idc={$row ['id_cliente']} </a> <br>";

//$emailCopiaOculta = array();
$emailCopiaOculta = array(EMAIL_ADMIN);
$emailCopiaOculta = array();
//$emailCopiaOculta = array(EMAIL_ADMIN);
$email2 = new EmailGenerico($emailTo, $assunto, $textoCorpo, array(), $emailCopiaOculta);

$textoNomeClienteEOrc = "{$row ['razao_social_contr']} ORC {$row ['n_orc']}";
Expand Down
10 changes: 10 additions & 0 deletions estilos.css
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,16 @@ legend{ font-size: 18px; font-weight: bold; }
.trigger.alert{background-color: #FFF6BF; border-color: #FCEB77;}
.trigger.error{background-color: #FAD0D0; border-color: #F6ABAB;}

/**************************************
/************ CSS TEXTs - stilos para textos *************
**************************************/
.text-underline {
text-decoration: underline;
}

.text-line-through {
text-decoration: line-through;
}

.text-left{text-align: left;}
.tableComum{
Expand Down
9 changes: 4 additions & 5 deletions nbproject/private/private.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group>
<file>file:/Applications/XAMPP/htdocs/elfi/modulos/tecnico/cliente/novo_cliente.php</file>
<file>file:/Applications/XAMPP/htdocs/elfi/classes/controller/HistoricoClientesCtrl.class.php</file>
<file>file:/Applications/XAMPP/htdocs/elfi/classes/controller/CRUDAbstractCtrl.class.php</file>
<file>file:/Applications/XAMPP/htdocs/elfi/modulos/tecnico/cliente/perfil.php</file>
<file>file:/Applications/XAMPP/htdocs/elfi/classes/controller/ClienteCtrl.class.php</file>
<file>file:/Applications/XAMPP/htdocs/elfi/modulos/tecnico/orcamento/aprovados/editar_orc_aprovado.php</file>
<file>file:/Applications/XAMPP/htdocs/elfi/classes/Config.inc.php</file>
<file>file:/Applications/XAMPP/htdocs/elfi/cron/email_pos_venda.php</file>
<file>file:/Applications/XAMPP/htdocs/elfi/cron/email_cliente_n_aprovado.php</file>
</group>
</open-files>
</project-private>

0 comments on commit ac86079

Please sign in to comment.