Browse Source

Correção das chamadas recebidas no supervisor

1.9-pjsip
Matheo Bonucia 1 month ago
parent
commit
fd4975d559
  1. 2
      include/util/relatoriosBase.php
  2. 16
      supervisao/RelSupRecebidas.php

2
include/util/relatoriosBase.php

@ -370,7 +370,7 @@ abstract class Relatorios
$pdf->setUserRel(GetLogin());
$pdf->setFiltroRelIni($this->___dataIni);
$pdf->setFiltroRelFim($this->___dataFim);
$pdf->setFiltroRelDac(RemoveExibicaoOrg(GetDacDesc($this->GetDbCon(), $this->___dac)));
$pdf->setFiltroRelDac(GetDacDesc($this->GetDbCon(), $this->___dac));
$pdf->setType($this->___type);
//Formatação do PDF

16
supervisao/RelSupRecebidas.php

@ -2,6 +2,20 @@
$tpLayout = 1;
$dac = $_GET["dac"];
$org_id = $_SESSION['SSEmpresaPadrao'];
$fila_asterisk = '';
if($dac){
pg_query($dbcon, 'begin');
$consulta_fila = "SELECT nome_asterisk FROM pbx_queues_grupos WHERE nome = $1 AND org_id = $2";
$retorno = pg_query_params($dbcon,$consulta_fila,[$dac,$org_id]);
if(!$retorno){
pg_query($dbcon, 'rollback');
return false;
}
$dados = pg_fetch_array($retorno);
$fila_asterisk = $dados['nome_asterisk'];
pg_query($dbcon, 'commit');
}
$nomeTpl = "supervisao/RelSupRecebidas.tpl";
$query = " select a.calldate::time as hora, a.src as origem, a.billsec as tmo, coalesce(c.apelido, '-') as agente,
@ -15,7 +29,7 @@ $query = " select a.calldate::time as hora, a.src as origem, a.billsec as tmo,
where a.data_bilhete = now()::date
and b.evento in('COMPLETEAGENT','COMPLETECALLER', 'TRANSFER','COMPLETEAGENTRAMAL','COMPLETECALLERRAMAL')
and a.lastapp <> 'Transferred Call'
and b.fila = '$dac'
and b.fila = '$fila_asterisk'
order by 1";
$result = pg_query($dbcon, $query);

Loading…
Cancel
Save