diff --git a/relatorios/custom/relChamadaGeral.php b/relatorios/custom/relChamadaGeral.php
index 361ed8ad..8d5fcc52 100644
--- a/relatorios/custom/relChamadaGeral.php
+++ b/relatorios/custom/relChamadaGeral.php
@@ -179,9 +179,13 @@
if($this->__tipoLigacao){
$query .= "AND tplg_tipo = {$this->__tipoLigacao} ";
}
+
+ if($this->__agente){
+ $query .= "AND apelido = '{$this->__agente}' ";
+ }
$query .= "ORDER BY a.uniqueid";
-
+
$result = $this->___GetQuery($query);
$row = pg_fetch_all($result);
$this->SetData($row ? $row : array());
@@ -436,6 +440,7 @@
* Linha de totalizacao.
*/
$linha = '
Total | %s | %s | %s | %s | %s | %s | %s |
';
+ $dataRel[] = sprintf($linha, '');
/*
* Fecha relatorio.
@@ -512,6 +517,7 @@
}
protected function getAgentes() {
+ $codSel = $this->__agente;
$sel = $this->__agente ? '' : 'selected';
$agentes = "