Browse Source

Merge origin/master

1.7.12
AMARILDO PEREIRA 2 years ago
parent
commit
0e2f18a003
  1. 22
      admin/cadQgrupos.php
  2. 8
      agente/agentert.php
  3. 2
      configGeral.php
  4. 525
      discador/campanha/retornoCampanha.php
  5. BIN
      imgSite/LOGO_SIMPLESIP200.PNG
  6. BIN
      imgSite/logo_simplesip.png
  7. 1
      include/configBd.php
  8. 2
      include/util/funcoesApl.php
  9. 21
      projeto/base/sql/versao-1.7.11.4.sql
  10. 194
      relatorios/callcenter/geral/recebidasAgente.php
  11. 13
      scriptApl/functions15.js

22
admin/cadQgrupos.php

@ -190,7 +190,7 @@
$modoAtendimento = $_POST["modo_atendimento"];
$pesquisaLiberacao = $_POST["pesquisa_liberacao"];
$ativaFila = isset($_POST['ativaFila']) ? 'A' : 'I';
$midiafila = isset($_POST['midiafila']) ? 'S' : 'N';
$disponivelfila = $_POST['disponivelfila'];
$nome = LimpaString($_POST["nome"], true);
$musicclass = trim($_POST["musicclass"]);
$strategy = trim($_POST["strategy"]);
@ -251,12 +251,12 @@
$query = "INSERT INTO pbx_queues_grupos(nome, musicclass, strategy, servicelevel, timeout, retry,
maxlen, joinempty, eventwhencalled, eventmemberstatus, ringinuse,
periodic_announce_frequency,wrapuptime,autofill,autopause,\"announce-frequency\",\"announce-holdtime\",\"announce-round-seconds\",\"monitor-format\",\"monitor-type\",reportholdtime,timeoutrestart
,numero,timeout2,m_espera,opcao,acao,setinterfacevar,anuncio, id_transbordo, max_agente_pausa, tempo_ring, exige_classificacao, justificativa_pausa, context, retornar_abandonadas,status $dataClass,modo_atendimento,id_pesquisa_liberacao, midiafila)
,numero,timeout2,m_espera,opcao,acao,setinterfacevar,anuncio, id_transbordo, max_agente_pausa, tempo_ring, exige_classificacao, justificativa_pausa, context, retornar_abandonadas,status $dataClass,modo_atendimento,id_pesquisa_liberacao, disponivelfila)
VALUES ('$nome', '$musicclass', '$strategy', $servicelevel, $timeout, $retry,
$maxlen, '$joinempty', '$eventwhencalled', '$eventmemberstatus', '$ringinuse',
$periodic_announce_frequency,
'$wrapuptime','$autofill','$autopause','$announce_frequency','$announce_holdtime','$announce_round_seconds','$monitor_format',
'$monitor_type','$reportholdtime','$timeoutrestart','$numero','$timeout2','$m_espera','$opcao','$acao_opcao','$setinterfacevar','$som_ura', $idTransbordo, $max_agente_pausa, $tempoRing, $exige_classificacao, $justificativa_pausa, '$context', $retornar_abandonadas,'$ativaFila' $dateClass,'$modoAtendimento',$pesquisaLiberacao, '$midiafila')";
'$monitor_type','$reportholdtime','$timeoutrestart','$numero','$timeout2','$m_espera','$opcao','$acao_opcao','$setinterfacevar','$som_ura', $idTransbordo, $max_agente_pausa, $tempoRing, $exige_classificacao, $justificativa_pausa, '$context', $retornar_abandonadas,'$ativaFila' $dateClass,'$modoAtendimento',$pesquisaLiberacao, '$disponivelfila')";
pg_query($dbcon, $query);
$query2 = "select id from pbx_queues_grupos order by id desc limit 1";
@ -297,7 +297,7 @@
maxlen='$maxlen', joinempty='$joinempty', eventwhencalled='$eventwhencalled', eventmemberstatus='$eventmemberstatus', ringinuse='$ringinuse',
periodic_announce_frequency='$periodic_announce_frequency',wrapuptime='$wrapuptime',autofill='$autofill',autopause='$autopause',\"announce-frequency\"='$announce_frequency',\"announce-holdtime\"='$announce_holdtime',\"announce-round-seconds\"='$announce_round_seconds',\"monitor-format\"='$monitor_format',
\"monitor-type\" ='$monitor_type',reportholdtime='$reportholdtime',timeoutrestart='$timeoutrestart',numero='$numero',timeout2='$timeout2',m_espera='$m_espera',opcao='$opcao',acao='$acao_opcao',setinterfacevar='$setinterfacevar', anuncio='$som_ura', id_transbordo = '$idTransbordo', max_agente_pausa = '$max_agente_pausa',
tempo_ring = '$tempoRing', exige_classificacao = '$exige_classificacao', justificativa_pausa = '$justificativa_pausa', context = '$context', retornar_abandonadas = '$retornar_abandonadas', modo_atendimento = '$modoAtendimento',id_pesquisa_liberacao = $pesquisaLiberacao,midiafila = '$midiafila',status = '$ativaFila' $dataClass
tempo_ring = '$tempoRing', exige_classificacao = '$exige_classificacao', justificativa_pausa = '$justificativa_pausa', context = '$context', retornar_abandonadas = '$retornar_abandonadas', modo_atendimento = '$modoAtendimento',id_pesquisa_liberacao = $pesquisaLiberacao,disponivelfila = '$disponivelfila',status = '$ativaFila' $dataClass
WHERE id=$id";
pg_query($dbcon, $query);
@ -341,9 +341,6 @@
$closeWin = 1;
$msgValida = ($a > 1) ? "Os ramais \"$log\" já estão sendo utilizados por um agente logado!" : "O ramal \"$log\" já está sendo utilizado por um agente logado!";
}
if($midiafila == 'N'){
gera_arquivos($dbcon, 'QUEUES_GRUPOS');
}
?>
@ -384,7 +381,7 @@
$modoAtendimento = $dados["modo_atendimento"];
$pesquisaLiberacao = $dados["id_pesquisa_liberacao"];
$ativaFila = $dados['status'];
$midiafila = $dados['midiafila'];
$disponivelfila = $dados['disponivelfila'];
$nome = trim($dados['nome']);
$musicclass = trim($dados['musicclass']);
$strategy = trim($dados['strategy']);
@ -992,12 +989,9 @@
</td>
<td width="15%">
<fieldset>
<legend class="labels">Fila Mídia</legend>
<input name="midiafila" type="checkbox" value="N" <?php
if ($midiafila == "S") {
echo "checked=\"checked\"";
}
?> /> Ativar
<legend class="labels">Disponível Fila</legend>
<input name="disponivelfila" type="radio" value="1" <?= ($disponivelfila == "1" ? "checked=\"checked\"" : '') ?> /> Sim
<input name="disponivelfila" type="radio" value="0" <?= ($disponivelfila == "0" ? "checked=\"checked\"" : '') ?> /> Não
</fieldset>
</td>
<td width="15%">

8
agente/agentert.php

@ -1479,6 +1479,14 @@ function ConnectaAgenteRt($db, $dac, $tpAtend) {
$_SESSION[SS_MODO_ATENDIMENTO_COD] = $tpAtend;
}
/**
* Verifica a disponibilidade da fila
*/
$q = "SELECT disponivelfila FROM pbx_queues_grupos WHERE id = '$dac'";
$res = pg_query($db, $q);
$ret = pg_fetch_assoc($res);
$_SESSION["prm_disponivel_fila"] = $ret['disponivelfila'];
$moduAtendDesc = $_SESSION[SS_MODO_ATENDIMENTO];
$_SESSION[SS_DAC_CODIGO] = $dac;
$matricula = GetMatricula();

2
configGeral.php

@ -532,7 +532,7 @@ function MoveLogo() {
if (!empty($_FILES['logoRelatorio']['name'])) {
$tmpFileName = $_FILES['logoRelatorio']['name'];
$nomeArq = strtolower($tmpFileName);
$nomeArq = LimpaString($nomeArq);
$nomeArq = LimpaString($nomeArq, false);
$pathFile = 'imgSite/' . $nomeArq;

525
discador/campanha/retornoCampanha.php

@ -1,5 +1,530 @@
<?php
include_once 'util/relatoriosBase.php';
class RelCampanhaRetorno extends Relatorios {
private $___campanha;
private $___lista;
public function __construct($idProg, $dbcon, $incDac) {
parent::__construct($idProg, $dbcon, $incDac);
$this->___campanha = isset($_REQUEST['campanha']) ? $_REQUEST['campanha'] : 0;
$this->___lista = isset($_REQUEST['lista']) ? $_REQUEST['lista'] : 0;
$this->___telefone = isset($_REQUEST['telefone']) ? $_REQUEST['telefone'] : '';
$this->___btnConsulta = isset($_POST['btConsulta']) ? $_POST['btConsulta'] : '';
}
function ___ValidaForm() {
parent::___ValidaForm();
if (empty($this->___campanha) && $this->___btnConsulta) {
GeraExcept('Informe uma campanha!');
}
if (empty($this->___lista) && $this->___campanha && $this->___btnConsulta) {
GeraExcept('Informe uma lista!');
}
}
function ___FiltrosRelatorio() {
if ($this->___media != MEDIA_PRINT_GRID) {
/*
* Recupera os filtros da sess�o do usu�rio.
*/
list($this->___dataIni, $this->___dataFim, $this->___telefone) = $_SESSION["SSstorageFiltros"];
if ($this->___media == MEDIA_PRINT_HTML) {
return sprintf("Data Inicial: %s Data Final: %s ", $this->___dataIni, $this->___dataFim);
}
$fltCsv = array();
$fltCsv[] = "Data Inicial: " . $this->___dataIni;
$fltCsv[] = "Data Final: " . $this->___dataFim;
$fltCsv[] = "Data Emissao: " . date('d/m/Y H:i:s');
$fltCsv[] = "Emitido Por: " . GetLogin();
return $fltCsv;
}
$lkPrint = "";
if ($this->___dataCount) {
$prt = '<a href="index.php?idProg=%s&media=%s"><img src="imgSite/%s" alt="Clique aqui para imprimir!" width="24" height="24" border="0"></a>';
//$prtHtml = "<a href=\"javaScript:NovaJanela('index.php?idProg=%s&media=%s', '%s', '720', '700', 'scrollbars=YES');\"><img src=\"imgSite/%s\" alt=\"Clique aqui para imprimir!\" width=\"24\" height=\"24\" border=\"0\"></a>";
//$lkPrint .= sprintf($prtHtml, $this->GetidProg(), MEDIA_PRINT_HTML, substr(LimpaString(GetDispProgSel($this->GetIdProg())), 0, 20), 'print.gif');
$lkPrint .= sprintf($prt, $this->GetidProg(), MEDIA_PRINT_EXCEL, 'prt-xls.png');
//$lkPrint .= sprintf($prt, $this->GetidProg(), MEDIA_PRINT_PDF, 'prt-pdf.png');
$lkPrint .= sprintf($prt, $this->GetidProg(), MEDIA_PRINT_CSV, 'prt-csv.png');
}
/*
* Personalise esta função se necessitar de outras opções de filtro.
*/
$filtro = '<table class="filtro" border="0" cellspacing="1" cellpadding="1">';
/*
* Rotulos.
*/
$filtro .= '<tr>';
$filtro .= '<td>&nbsp</td>';
$filtro .= '<td>Data Inicial </td>';
$filtro .= '<td>Data Final </td>';
$filtro .= '<td>Campanha</td>';
$filtro .= '<td>Lista</td>';
$filtro .= '<td>Origem/Destino</td>';
$filtro .= '<td align="center" valign="middle">&nbsp;</td>';
$filtro .= '</tr>';
/*
* Valores.
*/
$filtro .= '<tr>'
. '<td>&nbsp;</td>';
$filtro .= '<td><input name="dataIni" id="dataIni" type="text" size="15" maxlength="16" value="%s" onkeyup="formataDataHora(this)" title="dd/mm/aaaa HH:mm"></td>';
$filtro .= '<td><input name="dataFim" id="dataFim" type="text" size="15" maxlength="16" value="%s" onkeyup="formataDataHora(this)" title="dd/mm/aaaa HH:mm"></td>';
$filtro .= sprintf('<td>%s</td>', $this->getCampanha($this->___campanha));
$filtro .= sprintf('<td><select name="lista" id="lista" size="1" style="width: 200px">%s</select></td>', $this->getListaCampanha($this->___lista));
$filtro .= sprintf('<td><input name="telefone" type="text" id="telefone" value="%s"/></td>', $this->___telefone);
$filtro .= '<td><input type="submit" name="btConsulta" id="btConsulta" value="Consultar"></td>';
$filtro .= '<td>%s</td>';
$filtro .= '</tr>';
$filtro .= '</table>';
/*
* Guarda os filtros passados para recuperar na emiss�o dos relat?ios para impress�o.
*/
$_SESSION["SSstorageFiltros"] = array($this->___dataIni, $this->___dataFim);
return sprintf($filtro, $this->___dataIni, $this->___dataFim, $lkPrint);
}
protected function ___GetDadosDb() {
$dataIni = $this->___dataIni ? FormatDtMssql($this->___dataIni) : '';
$dataFim = $this->___dataFim ? FormatDtMssql($this->___dataFim) : '';
$query = "SELECT DISTINCT b.id AS fila_id, a.cmp_id, a.data_registro::date, d.cont_id, src, f.conf_fone as contato_numero, b.nome as fila_nome, j.apelido, billsec, a.cmp_descricao,
d.cont_param1 AS contato_descricao,
d.cont_discado AS contato_discado,
COALESCE(h.ctst_nome, 'Número Não Discado') AS contato_status, calldate
FROM pbx_campanha a
INNER JOIN pbx_dacs b ON b.id = a.id_dac
INNER JOIN pbx_campanha_lista c ON c.cmp_id = a.cmp_id
INNER JOIN pbx_campanha_contato d ON d.cmp_id = c.cmp_id AND d.list_id = c.list_id
INNER JOIN pbx_campanha_contato_fone f ON f.cmp_id = d.cmp_id AND f.list_id = d.list_id AND f.cont_id = d.cont_id
INNER JOIN pbx_bilhetes i ON i.uniqueid = f.conf_uid
LEFT JOIN pbx_campanha_operacao g ON g.cmp_id = f.cmp_id AND g.list_id = f.list_id AND g.conf_id = f.conf_id
LEFT JOIN pbx_campanha_contato_status h ON h.ctst_id = d.cont_status::int
LEFT JOIN pbx_usuarios j ON j.matricula = f.conf_agente_matricula
WHERE 1 = 1 ";
$query .= " AND i.data_bilhete::DATE >= '{$dataIni}' AND i.data_bilhete::DATE <= '{$dataFim}'";
$query .= $this->___campanha ? " AND a.cmp_id = {$this->___campanha}" : '';
$query .= $this->___lista ? " AND c.list_id = {$this->___lista}" : '';
$query .= $this->___telefone ? " AND (src = '{$this->___telefone}' OR f.conf_fone = '{$this->___telefone}') " : '';
$query .= " ORDER BY a.cmp_id";
$result = $this->___GetQuery($query);
$row = pg_fetch_all($result);
$this->SetData($row ? $row : array());
}
protected function ___PreparaCsv() {
$nomeDac = "";
$dataRel = array();
$dataAgrup = array();
$filtro = $this->___FiltrosRelatorio();
$dataRel[] = GenerateCsvFromArray($filtro);
$dadosCabecalio = array(
'Data Campanha' => 'align="center"',
'Origem' => 'align="center"',
'Destino' => 'align="center"',
'Fila' => 'align="center"',
'Duracao' => 'align="center"',
'Agente' => 'align="center"',
'Campanha' => 'align="center"',
'Contato' => 'align="center"',
'Status' => 'align="center"',
'Data Chamada' => 'align="center"'
);
$dadosField = array(
'data_registro' => 'align="center"',
'src' => 'align="center"',
'contato_numero' => 'align="center"',
'fila_nome' => 'align="center"',
'billsec' => 'align="center"',
'apelido' => 'align="center"',
'cmp_descricao' => 'align="center"',
'contato_descricao' => 'align="center"',
'contato_status' => 'align="center"',
'calldate' => 'align="center"'
);
$dataRel[] = GenerateCsvFromArray(array_keys($dadosCabecalio));
$somaTempo = 0;
$somaQuantidade = 0;
/*
* Inicia o relat�rio.
*/
foreach ($this->GetData()[0] as $row) {
$row['src'] = $row['src'];
$row["data_registro"] = $row["data_registro"] ? date('d/m/Y', strtotime($row["data_registro"])) : '-';
$row["calldate"] = $row["calldate"] ? date('d/m/Y H:i:s', strtotime($row["calldate"])) : '-';
$row["apelido"] = $row["apelido"] ? $row["apelido"] : '-';
$row['cmp_descricao'] = RemoveAcentos($row['cmp_descricao']);
$row['contato_status'] = RemoveAcentos($row['contato_status']);
$row["billsec"] = SecondToStrTime($row["billsec"]);
$somaQuantidade++;
$linha = array();
foreach ($dadosField as $key => $value) {
$linha[] = $row["$key"];
}
$dataRel[] = GenerateCsvFromArray($linha);
}
$dataRel[] = $linha;
$linha1 = array('Total', 'Registros: ' . $somaQuantidade);
$dataRel[] = GenerateCsvFromArray($linha1);
$dataRel[] = $linha1;
$this->___dataRel[] = $dataRel;
}
protected function ___PreparaExcel() {
//list($this->___dataIni, $this->___dataFim) = $_SESSION["SSstorageFiltros"];
$dataRel = array();
$dataAgrup = array();
$filtro = $this->___FiltrosRelatorio();
/*
* Inicia o relatório.
*/
/*
* Cria os filtros
*/
$linha = array('LABEL');
foreach ($filtro as $values) {
list($label, $value) = explode(":", $values);
$linha[] = $label;
}
$dataRel[] = $linha;
$linha = array('DADOS');
foreach ($filtro as $values) {
list($label, $value) = explode(":", $values);
$linha[] = $value;
}
$dataRel[] = $linha;
$dadosCabecalio = array(
'Data Campanha',
'Origem',
'Destino',
'Fila',
'Duracao',
'Agente',
'Campanha',
'Contato',
'Status',
'Data Chamada'
);
$dadosField = array(
'data_registro',
'src',
'contato_numero',
'fila_nome',
'billsec',
'apelido',
'cmp_descricao',
'contato_descricao',
'contato_status',
'calldate'
);
/*
* Monta a linha de cabecalio.
*/
$linha = array('LABEL');
foreach ($dadosCabecalio as $value) {
$linha[] = $value;
}
$dataRel[] = $linha;
$somaTempo = 0;
$somaQuantidade = 0;
/*
* Linhas de dados.
*/
foreach ($this->GetData()[0] as $row) {
$row['src'] = $row['src'];
$row["data_registro"] = $row["data_registro"] ? date('d/m/Y', strtotime($row["data_registro"])) : '-';
$row["calldate"] = $row["calldate"] ? date('d/m/Y H:i:s', strtotime($row["calldate"])) : '-';
$row["apelido"] = $row["apelido"] ? $row["apelido"] : '-';
$row['cmp_descricao'] = RemoveAcentos($row['cmp_descricao']);
$row['contato_status'] = RemoveAcentos($row['contato_status']);
$row["billsec"] = SecondToStrTime($row["billsec"]);
$somaQuantidade++;
// Formata linha de dados.
$linha = array('DADOS');
foreach ($dadosField as $key) {
$linha[] = $row["$key"];
}
$dataRel[] = $linha;
}
$linha = array('LABEL', 'Total', 'Registros: ' . $somaQuantidade);
$dataRel[] = $linha;
$this->___dataRel[] = $dataRel;
}
protected function ___PreparaGrid() {
$dadosCabecalio = array(
'Data Campanha' => 'align="center"',
'Origem' => 'align="center"',
'Destino' => 'align="center"',
'Fila' => 'align="center"',
'Duração' => 'align="center"',
'Agente' => 'align="center"',
'Campanha' => 'align="center"',
'Contato' => 'align="center"',
'Status' => 'align="center"',
'Data Chamada' => 'align="center"',
'Retornar' => 'align="center"'
);
$dadosField = array(
'data_registro' => 'align="center"',
'src' => 'align="center"',
'contato_numero' => 'align="center"',
'fila_nome' => 'align="center"',
'billsec' => 'align="center"',
'apelido' => 'align="center"',
'cmp_descricao' => 'align="center"',
'contato_descricao' => 'align="center"',
'contato_status' => 'align="center"',
'calldate' => 'align="center"',
'retornar' => 'align="center"'
);
/*
* Inicia o relat�rio.
*/
$dataRel[] = '<table width="90%" cellpadding="2" class="grid">';
/*
* Monta a linha de cabecalio.
*/
$linha = '<tr>';
foreach ($dadosCabecalio as $key => $value) {
$linha .= sprintf("<th %s>%s</th>", $value, $key);
}
$linha .= "</tr>";
$dataRel[] = $linha;
/*
* Verifica se retornou dados
*/
if (!IsPostBack() || !count($this->GetData()[0])) {
$dataRel[] = sprintf("<tr><td align=\"center\" colspan=\"%s\">%s<td></tr></table>", count($dadosCabecalio) - 1, (!IsPostBack() ? 'Informe os parametros e clique em consultar!' : 'Nenhum registro encontado!'));
$this->___dataRel[] = $dataRel;
return;
}
$somaTempo = 0;
$somaQuantidade = 0;
/*
* Linhas de dados.
*/
foreach ($this->GetData()[0] as $row) {
$row['src'] = $row['src'];
$row["data_registro"] = $row["data_registro"] ? date('d/m/Y', strtotime($row["data_registro"])) : '-';
$row["calldate"] = $row["calldate"] ? date('d/m/Y H:i:s', strtotime($row["calldate"])) : '-';
$row["apelido"] = $row["apelido"] ? $row["apelido"] : '-';
$row["billsec"] = SecondToStrTime($row["billsec"]);
if($row['contato_status'] == 'Não Atendida'){
$row["retornar"] = sprintf('<a href="javaScript:RetornaAbd(\'%s\');"><img src="imgSite/ramalOn16.png" border="0" width="20" height="20" alt="Retornar Chamada" title="Retornar Chamada"></a>', $row['contato_numero']);
} else if($row['contato_status'] == 'Atendida'){
$row["retornar"] = sprintf('<a href="#"><img src="imgSite/ramalOff16.png" border="0" width="20" height="20" alt="Chamada já efetuada" title="Chamada já efetuada"></a>');
} else if($row['contato_status']){
$row["retornar"] = sprintf('<a href="javaScript:RetornaAbd(\'%s\');"><img src="imgSite/ramalOcp16.png" border="0" width="20" height="20" alt="Retornar Chamada" title="Retornar Chamada"></a>', $row['contato_numero']);
}
$somaQuantidade++;
// Formata linha de dados.
$linha = "<tr>";
foreach ($dadosField as $key => $value) {
$linha .= sprintf("<td %s>%s</td>", $value, $row["$key"]);
}
$linha .= "</tr>";
$dataRel[] = $linha;
}
/*
* Linha de totalizacao.
*/
$linha = '<tr><th colspan="2" align="left">Total</th><th align="left" colspan="2">Registros: %s</th><th align="left" colspan="7"></th></tr>';
$dataRel[] = sprintf($linha, $somaQuantidade, SecondToStrTime($somaTempo));
/*
* Fecha relatorio.
*/
$dataRel[] = '</table>';
$this->___dataRel[] = $dataRel;
}
protected function ___PreparaHtml() {
}
protected function ___PreparaPdf() {
list($this->___dataIni, $this->___dataFim) = $_SESSION["SSstorageFiltros"];
$dados = $this->GetData()[0];
$x = 0;
$somaQtd = 0;
foreach ($dados as $row) {
$dados[$x]["cmpo_fim"] = $row["cmpo_fim"] ? date('d/m/Y H:i', strtotime($row["cmpo_fim"])) : '-';
$dados[$x]["apelido"] = $row["apelido"] ? $row["apelido"] : '-';
$dados[$x]["cmp_descricao"] = RemoveAcentos($row['cmp_descricao']);
$dados[$x]["contato_status"] = RemoveAcentos($row['contato_status']);
$dados[$x]["billsec"] = SecondToStrTime($row["billsec"]);
$somaQtd++;
$x++;
}
//HEADER DA TABELA DO PDF -> DADOS EM ARRAY
$header = array(
'Data/Hora' => 'C',
'Origem' => 'C',
'Destino' => 'C',
'Fila' => 'C',
'Duracao' => 'C',
'Agente' => 'C',
'Campanha' => 'C',
'Contato' => 'C',
'Status' => 'C'
);
$dataHeader = array(
'cmpo_fim' => 'C',
'src' => 'C',
'contato_numero' => 'C',
'fila_nome' => 'C',
'billsec' => 'C',
'apelido' => 'C',
'cmp_descricao' => 'C',
'contato_descricao' => 'C',
'contato_status' => 'C'
);
$widthHeader = array(20, 13, 15, 20, 15, 15, 30, 60, 15);
$totaliza = array('Total', "Registros: ", $somaQtd);
//Monta o array para passar para o prepara; Necessário passar 6 parametros
$table1 = array($header, $dataHeader, $dados, $widthHeader, $totaliza, 1);
$this->___dataRel = array($table1);
}
private function getCampanha($select = null) {
global $dbcon;
$query = sprintf("SELECT DISTINCT cmp_id as id, cmp_descricao as nome
FROM pbx_grupo_usuario a
INNER JOIN pbx_fila_audios b ON b.gp_id = a.gp_id
INNER JOIN pbx_queues_grupos c ON c.id = b.id
INNER JOIN pbx_campanha d ON d.id_dac = b.id
WHERE user_id = %s
ORDER BY 2", GetIdUser());
$result = pg_query($dbcon, $query);
$res = pg_fetch_all($result);
$opt = "<select name=\"campanha\" id=\"campanha\" size=\"1\" style='width: 250px' onchange='SelectRel(125)'>";
$opt .= "<option value='0'>-----------------</option>";
if($res){
foreach ($res as $val) {
$selected = $select == $val['id'] ? 'selected' : '';
$opt .= "<option value='{$val['id']}' $selected>{$val['nome']}</option>";
}
}
$opt .= "</select>";
return $opt;
}
public function getListaCampanha($select = null, $cmp = null) {
global $dbcon;
if ($this->___campanha || $cmp) {
$query = sprintf("SELECT DISTINCT a.list_id as id, a.list_nome || ' [' || a.list_id::text || ']' as nome
FROM pbx_campanha_lista a
INNER JOIN pbx_campanha_contato_fone b ON b.cmp_id = a.cmp_id AND b.list_id = a.list_id
WHERE a.cmp_id IN (%s)
ORDER BY 2", $cmp ? $cmp : $this->___campanha);
$result = pg_query($dbcon, $query);
$res = pg_fetch_all($result);
}
if(!$res){
$opt .= "<option value='0'>-----------------</option>";
}
foreach ($res as $val) {
$selected = $select == $val['id'] ? 'selected' : '';
$opt .= "<option value='{$val['id']}' $selected>{$val['nome']}</option>";
}
return $opt;
}
public function ExecutaRelatorio() {
global $jsStartup, $jsJQuery, $smarty;
try {
/*
* Use esta fun��o para validar dados do formul�rio.
*/
$this->___ValidaForm();
/*
* Recupera os dados do banco.
*/
$this->___ConteudoRelatorio();
/*
* Imprime relat�rio de acordo com a media passada.
*/
$conteudoRelatorio = $this->___ImprimeRelatorio();
} catch (Exception $exc) {
$this->SetMsg($exc->getMessage());
$jsStartup[] = sprintf("alert('%s');", $this->GetMsg());
$this->___GravaLog();
}
/*
* Inclua os scripts necessários aqui.
*/
$jsJQuery[] = "\$('#dataIni').keypress(function(){formataDataHora(this);}) ";
$jsJQuery[] = "\$('#dataFim').keypress(function(){formataDataHora(this);}) ";
$smarty->assign('filtros', $this->___FiltrosRelatorio());
$smarty->assign('conteudo', $conteudoRelatorio);
$smarty->assign('msg', $this->GetMsg());
GetTemplate($smarty, 'relatoriosGrid.tpl');
}
}
$rel = new RelCampanhaRetorno($idProg, $dbcon, 0);
if($_GET['a'] && $_GET['slc']){
echo $rel->getListaCampanha(null, $_GET['slc']);
exit;
}
$rel->ExecutaRelatorio();
/**
$templateName = 'discador/retornoCampanha.tpl';
$vAlineMaster = 'middle';
$_SESSION["dataIni"] = IsPostBack() ? $_POST["dataIni"] : ""; //date('d/m/Y');

BIN
imgSite/LOGO_SIMPLESIP200.PNG

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

BIN
imgSite/logo_simplesip.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

1
include/configBd.php

@ -17,6 +17,7 @@ $dbPassword = getenv('DB_PASSWD') ? getenv('DB_PASSWD') : 'ctepgSQL';
$master = 1;
$sincContaSenha = 0;
/*
* Quando o arquivo for configurado para slave(master=0) no parametro hostMaster deve ser
* informado o Ip do servidor master.

2
include/util/funcoesApl.php

@ -1900,7 +1900,7 @@ function SetModuAtendimentoDefault() {
}
function GetVersao() {
return "1.7.11.4";
return "1.7.11.5";
}
function GetEncType($upload) {

21
projeto/base/sql/versao-1.7.11.4.sql

@ -0,0 +1,21 @@
CREATE OR REPLACE VIEW pbx_ramais_mesa AS
SELECT 0 AS tipo, pbx_sip_ramais.id, pbx_sip_ramais.nome,
pbx_sip_ramais.dispositivo, pbx_sip_ramais.callerid,
'SIP'::text AS tipo_table, pbx_sip_ramais.conta_senha,
''::character varying AS ddd, pbx_sip_ramais.context AS contexto
FROM pbx_sip_ramais
UNION ALL
SELECT 1 AS tipo, 0 AS id, pbx_ramais_agenda.rma_telefone AS nome,
pbx_ramais_agenda.rma_telefone AS dispositivo,
pbx_ramais_agenda.rma_nome AS callerid, 'AGD'::text AS tipo_table,
'F'::character varying AS conta_senha, pbx_ramais_agenda.ddd,
' '::character varying AS contexto
FROM pbx_ramais_agenda
UNION ALL
SELECT 0 AS tipo,id, nome, dispositivo, nome AS callerid,'IAX'::text AS tipo_table,
conta_senha, ''::character varying AS ddd, context AS contexto
FROM pbx_iax_pbx
ORDER BY callerid;
ALTER TABLE pbx_queues_grupos DROP COLUMN midiafila;
ALTER TABLE pbx_queues_grupos ADD COLUMN disponivelfila INT DEFAULT(1);

194
relatorios/callcenter/geral/recebidasAgente.php

@ -2,18 +2,16 @@
include_once 'util/relatoriosBase.php';
class RelRecebidasAgenteSrv extends Relatorios {
class RelRecebidasAgente extends Relatorios {
private $___agente;
private $___tempoAtendimento;
private $___servico;
public function __construct($idProg, $dbcon, $incDac) {
parent::__construct($idProg, $dbcon, $incDac);
$this->___dac = isset($_POST['listaDacs']) ? $_POST['listaDacs'] : 0;
$this->___tempoAtendimento = isset($_POST['tempoAtendimento']) ? $_POST['tempoAtendimento'] : '';
$this->___agente = isset($_POST["listaAgente"]) ? $_POST["listaAgente"] : 0;
$this->___servico = isset($_POST["listaServico"]) ? $_POST["listaServico"] : 0;
}
public function ___ValidaForm() {
@ -31,7 +29,6 @@ class RelRecebidasAgenteSrv extends Relatorios {
}
function ___FiltrosRelatorio() {
$agente = $this->___GetAgente();
if ($this->___media != MEDIA_PRINT_GRID) {
@ -83,9 +80,6 @@ class RelRecebidasAgenteSrv extends Relatorios {
$filtro .= '<td>Fila</td>';
$filtro .= '<td>Data Inicial</td>';
$filtro .= '<td>Data Final </td>';
if (GetUsoServico()) {
$filtro .= '<td>Serviço </td>';
}
$filtro .= '<td>Agente</td>';
$filtro .= '<td>Duração (Segundos)</td>';
$filtro .= '<td align="center" valign="middle">&nbsp;</td>';
@ -99,9 +93,6 @@ class RelRecebidasAgenteSrv extends Relatorios {
$filtro .= sprintf('<td>%s</td>', $dacs);
$filtro .= '<td><input name="dataIni" id="dataIni" type="text" size="15" maxlength="10" value="%s" onkeyup="formataData(this)" title="dd/mm/aaaa"></td>';
$filtro .= '<td><input name="dataFim" id="dataFim" type="text" size="15" maxlength="10" value="%s" onkeyup="formataData(this)" title="dd/mm/aaaa"></td>';
if (GetUsoServico()) {
$filtro .= sprintf('<td>%s</td>', GetIdentRota(false, $this->___servico));
}
$filtro .= sprintf('<td>%s</td>', $agente);
$filtro .= "<td><input name=\"tempoAtendimento\" type=\"text\" id=\"tempoAtendimento\" size='10'value='{$this->___tempoAtendimento}' /></td>";
$filtro .= '<td><input type="submit" name="btConsulta" id="btConsulta" value="Consultar"></td>';
@ -121,44 +112,33 @@ class RelRecebidasAgenteSrv extends Relatorios {
protected function ___GetDadosDb() {
$dataIni = FormatDtMssql($this->___dataIni);
$dataFim = FormatDtHoraBD($this->___dataFim);
$srv = $this->___servico;
$agente = $this->___agente;
$dac = $this->___dac;
$mostraColunaServicos = GetUsoServico() == RELATORIO_SERVICOS_HABILITA;
$query1 = "SELECT a.calldate AS data, a.src AS origem,
CASE WHEN(b.evento IN('COMPLETECALLER', 'COMPLETEAGENT', 'COMPLETEAGENTRAMAL', 'COMPLETECALLERRAMAL'))THEN strtoint(b.param2)
ELSE
CASE WHEN(b.evento = 'TRANSFER')THEN strtoint(b.param4) ELSE 0 END
END AS tmo,
c.apelido AS agente, CASE WHEN(b.evento IN('BUSY','NOANSWER'))THEN 0 ELSE 1 END AS status,'' AS desligado, b.fila" . ($mostraColunaServicos ? ", s.serv_id" : "");
c.apelido AS agente, CASE WHEN(b.evento IN('BUSY','NOANSWER'))THEN 0 ELSE 1 END AS status,'' AS desligado, b.fila";
$query2 = "SELECT DISTINCT c.matricula, c.apelido";
$query = " FROM pbx_bilhetes a
inner join pbx_eventos_dacs b on b.uid2 = a.uniqueid
inner join pbx_usuarios c on c.matricula = SUBSTRING(b.agente,7 ,4)";
if (GetUsoServico()) {
$query .= " left join pbx_servicos_registra s on s.uniqueid = a.uniqueid";
}
$query .= " WHERE a.data_bilhete >= '$dataIni'
$query = " FROM pbx_bilhetes a, pbx_eventos_dacs b, pbx_usuarios c
WHERE b.uid2 = a.uniqueid
AND c.matricula = SUBSTRING(b.agente,7 ,4)
AND a.data_bilhete >= '$dataIni'
AND a.data_bilhete <= '$dataFim'
AND a.lastapp <> 'Transferred Call'
AND b.evento IN('COMPLETEAGENT','COMPLETECALLER', 'TRANSFER','COMPLETEAGENTRAMAL','COMPLETECALLERRAMAL','BUSY','NOANSWER')
AND b.fila = (SELECT nome FROM pbx_dacs WHERE id = '$dac') ";
if ($agente) {
$addAgente = "\nAND c.matricula = '$agente'";
$query .= "AND c.matricula = '$agente'";
}
if (GetUsoServico() && $srv) {
$query .= "\nAND s.serv_id = '{$srv}'";
}
$sqlTempo = $this->___tempoAtendimento && $this->___tempoAtendimento > 10 ? "\nAND strtoint(b.param2) >= " . $this->___tempoAtendimento : '';
$query1 = ($query1 . $query . $addAgente . $sqlTempo . sprintf("\nORDER BY %s ", $mostraColunaServicos ? 's.serv_id, a.calldate' : 'a.calldate'));
$sqlTempo = $this->___tempoAtendimento && $this->___tempoAtendimento > 10 ? " AND strtoint(b.param2) >= ".$this->___tempoAtendimento : '';
$result = $this->___GetQuery($query1);
$result = $this->___GetQuery($query1 . $query . $sqlTempo ." ORDER BY 1 ");
$row = pg_fetch_all($result);
$this->SetData($row ? $row : array());
@ -171,20 +151,14 @@ class RelRecebidasAgenteSrv extends Relatorios {
$dataRel = array();
$filtro = $this->___FiltrosRelatorio();
$dataRel[] = GenerateCsvFromArray($filtro);
$mostraColunaServicos = GetUsoServico() == RELATORIO_SERVICOS_HABILITA;
$dadosCabecalio = array(
'Data', 'Hora', 'Origem', 'Tempo', 'Agente', 'Status'
'Data', 'Hora', 'Origem', 'TMA', 'Agente', 'Status'
);
$dadosField = array(
'data', 'hora', 'origem', 'tmo', 'agente', 'status'
);
if ($mostraColunaServicos) {
$dadosCabecalio = array_merge(['Servico'], $dadosCabecalio);
$dadosField = array_merge(['serv_id'], $dadosField);
}
$dataRel[] = GenerateCsvFromArray($dadosCabecalio);
$somaReg = 0;
@ -208,19 +182,20 @@ class RelRecebidasAgenteSrv extends Relatorios {
}
$dataRel[] = GenerateCsvFromArray($linha);
}
$dataRel[] = GenerateCsvFromArray(array('DURAÇÃO', SecondToStrTime($somaDuracao), ''));
$dataRel[] = GenerateCsvFromArray(array('TMO', SecondToStrTime($somaDuracao) , ''));
$dataRel[] = GenerateCsvFromArray(array(''));
$dataRel[] = GenerateCsvFromArray(array('Atendida', 'Nao Atendida', 'Geral'));
$dataRel[] = GenerateCsvFromArray(array($somaAtendida, $somaNAtendida, $somaReg));
$this->___dataRel[] = $dataRel;
}
protected function ___PreparaExcel() {
$dataRel = array();
$filtro = $this->___FiltrosRelatorio();
$mostraColunaServicos = GetUsoServico() == RELATORIO_SERVICOS_HABILITA;
/*
* Inicia o relatório.
*/
@ -243,18 +218,11 @@ class RelRecebidasAgenteSrv extends Relatorios {
$dataRel[] = $linha;
$dadosCabecalio = array(
'Data', 'Hora', 'Origem', 'Tempo', 'Agente', 'Status'
'Data', 'Hora', 'Origem', 'TMA', 'Agente', 'Status'
);
$dadosField = array(
'data', 'hora', 'origem', 'tmo', 'agente', 'status'
);
if ($mostraColunaServicos) {
$dadosCabecalio = array_merge(['Servico'], $dadosCabecalio);
$dadosField = array_merge(['serv_id'], $dadosField);
}
$linha = array('LABEL');
foreach ($dadosCabecalio as $value) {
$linha[] = $value;
@ -285,7 +253,8 @@ class RelRecebidasAgenteSrv extends Relatorios {
}
$dataRel[] = $linha;
}
$dataRel[] = array('LABEL', 'DURAÇÃO', SecondToStrTime($somaDuracao), '');
$dataRel[] = array('LABEL', 'TMO', SecondToStrTime($somaDuracao) , '');
$dataRel[] = array('DADOS', '');
$dataRel[] = array('LABEL', 'Atendida', 'Nao Atendida', 'Geral');
$dataRel[] = array('DADOS', $somaAtendida, $somaNAtendida, $somaReg);
@ -294,20 +263,16 @@ class RelRecebidasAgenteSrv extends Relatorios {
}
protected function ___PreparaGrid() {
$dataRel = array();
$mostraColunaServicos = GetUsoServico() == RELATORIO_SERVICOS_HABILITA;
$dadosCabecalio = array(
'Data' => 'align="center"',
'Hora' => 'align="center"',
'Origem' => 'align="center"',
'DURAÇÃO' => 'align="center"',
'TMA' => 'align="center"',
'Agente' => 'align="center"',
'Status' => 'align="center"'
);
$dadosField = array(
'data' => 'align="center"',
'hora' => 'align="center"',
@ -317,11 +282,6 @@ class RelRecebidasAgenteSrv extends Relatorios {
'status' => 'align="center"'
);
if ($mostraColunaServicos) {
$dadosCabecalio = array_merge(['Serviço' => 'align="center"'], $dadosCabecalio);
$dadosField = array_merge(['serv_id' => 'align="left"'], $dadosField);
}
/*
* Inicia o relatório.
*/
@ -332,7 +292,7 @@ class RelRecebidasAgenteSrv extends Relatorios {
*/
$linha = '<tr>';
$linha .= sprintf("<th align=\"center\" colspan=\"%s\">Chamadas Recebidas por Agente</th>", ($mostraColunaServicos ? '7' : '6'));
$linha .= "<th align=\"center\" colspan=\"6\">Chamadas Recebidas por Agente</th>";
$linha .= "</tr>";
$dataRel[] = $linha;
@ -355,42 +315,13 @@ class RelRecebidasAgenteSrv extends Relatorios {
$somaReg = 0;
$somaDuracao = 0;
$somaAtendida = 0;
$somaAtendidaServico = 0;
$somaNAtendida = 0;
$somaNAtendidaServico = 0;
$somaDuracaoServico = 0;
$srv = "";
$oldSrv = "";
$tmo = 0;
$agrupaServico = function($row) use(&$somaDuracaoServico, &$somaAtendidaServico, &$somaNAtendidaServico, &$dataRel, &$srv, &$oldSrv) {
$style = 'style="font-weight: bold; padding: 0; margin: 0; padding-left: 6px; padding-right: 6px; background-color: #4F71C0 !important"';
$srv = $row["serv_id"];
if (!$oldSrv) {
$oldSrv = $srv;
}
if ((($srv != $oldSrv)) || !$row) {
$dataRel[] = sprintf("<tr><th colspan=\"3\" align=\"center\" {$style}>Total [%s] </th><th colspan=\"1\" align=\"center\" {$style}>DURAÇÃO</th><th colspan=\"1\" align=\"center\" {$style}>%s</th><th colspan=\"1\" align=\"center\" {$style}>ATENDIDAS / NA</th><th colspan=\"1\" align=\"center\" {$style}>%s / %s</th></tr>", $oldSrv, SecondToStrTime($somaDuracaoServico), $somaAtendidaServico, $somaNAtendidaServico);
$oldSrv = $srv;
$somaDuracaoServico = 0;
$somaAtendidaServico = 0;
$somaNAtendidaServico = 0;
}
$somaDuracaoServico += $row['tmo'];
$row['status'] == 1 ? $somaAtendidaServico++ : $somaNAtendidaServico++;
};
/*
* Linhas de dados.
*/
foreach ($this->GetData()[0] as $row) {
if ($mostraColunaServicos) {
$agrupaServico($row);
}
$somaReg ++;
$somaDuracao += $row['tmo'];
$row['status'] == 1 ? $somaAtendida++ : $somaNAtendida++;
@ -404,18 +335,12 @@ class RelRecebidasAgenteSrv extends Relatorios {
foreach ($dadosField as $key => $value) {
$linha .= sprintf("<td %s>%s</td>", $value, $row["$key"]);
}
$linha .= "</tr>";
$dataRel[] = $linha;
}
if ($mostraColunaServicos) {
$agrupaServico(false);
}
$linhaGeral = '<tr><th colspan="%s" align="center">TOTAL GERAL</th><th colspan="1" align="center">DURAÇÃO</th><th colspan="1" align="center">%s</th><th colspan="1" align="center">ATENDIDAS / NA</th><th colspan="1" align="center">%s / %s</th></tr>';
$dataRel[] = sprintf($linhaGeral, ($mostraColunaServicos ? '3' : '2'), SecondToStrTime($somaDuracao), $somaAtendida, $somaNAtendida);
$linhaGeral = '<tr><th colspan="2" align="right">TMO: </th><th colspan="4" align="left">%s</th></tr>';
$dataRel[] = sprintf($linhaGeral, SecondToStrTime($somaDuracao));
/*
* Fecha relatorio.
*/
@ -442,15 +367,13 @@ class RelRecebidasAgenteSrv extends Relatorios {
}
protected function ___PreparaPdf() {
list($this->___dac, $this->___dataIni, $this->___dataFim, $this->___tipoRelatorio) = $_SESSION["SSstorageFiltros"];
$mostraColunaServicos = GetUsoServico() == RELATORIO_SERVICOS_HABILITA;
$dadosCabecalio = array(
'Data' => 'C',
'Hora' => 'C',
'Origem' => 'C',
'Tempo' => 'C',
'TMA' => 'C',
'Agente' => 'C',
'Status' => 'C'
);
@ -463,11 +386,6 @@ class RelRecebidasAgenteSrv extends Relatorios {
'status' => 'C'
);
if ($mostraColunaServicos) {
$dadosCabecalio = array_merge(['Serviço' => 'C'], $dadosCabecalio);
$dadosField = array_merge(['serv_id' => 'C'], $dadosField);
}
$dados = $this->GetData()[0];
$somaReg = 0;
$somaDuracao = 0;
@ -475,71 +393,24 @@ class RelRecebidasAgenteSrv extends Relatorios {
$somaNAtendida = 0;
$x = 0;
$somaAtendidaServico = 0;
$somaNAtendidaServico = 0;
$somaDuracaoServico = 0;
$srv = "";
$oldSrv = "";
$dadosTable = [];
$agrupaServico = function($row) use(&$somaDuracaoServico, &$somaAtendidaServico, &$somaNAtendidaServico, &$dadosTable, &$srv, &$oldSrv) {
$srv = $row["serv_id"];
if (!$oldSrv) {
$oldSrv = $srv;
}
if ((($srv != $oldSrv)) || !$row) {
$data = [];
$data['serv_id'] = ' ';
$data['data'] = 'TOTAL';
$data['hora'] = ' ';
$data['origem'] = 'Duração';
$data['tmo'] = SecondToStrTime($somaDuracaoServico);
$data['agente'] = 'ATENDIDAS / NA';
$data['status'] = "$somaAtendidaServico / $somaNAtendidaServico";
$data['cor_linha_dados'] = "225";
$oldSrv = $srv;
$somaDuracaoServico = 0;
$somaAtendidaServico = 0;
$somaNAtendidaServico = 0;
$dadosTable[] = $data;
}
$somaDuracaoServico += $row['tmo'];
$row['status'] == 1 ? $somaAtendidaServico++ : $somaNAtendidaServico++;
};
/*
* Linhas de dados.
*/
foreach ($dados as $row) {
if ($mostraColunaServicos) {
$agrupaServico($row);
}
$somaReg ++;
$somaDuracao += $row['tmo'];
$dados[$x]['status'] == 1 ? $somaAtendida++ : $somaNAtendida++;
$row['hora'] = date('H:i:s', strtotime($row['data']));
$row['data'] = date('d/m/Y', strtotime($row['data']));
$row['tmo'] = SecondToStrTime($row['tmo']);
$row['status'] = $row['status'] == 1 ? "Atendida" : "Não Atendida";
$row['status'] == 1 ? $somaAtendida++ : $somaNAtendida++;
$dadosTable[] = $row;
$dados[$x]['hora'] = date('H:i:s', strtotime($row['data']));
$dados[$x]['data'] = date('d/m/Y', strtotime($row['data']));
$dados[$x]['tmo'] = SecondToStrTime($row['tmo']);
$dados[$x]['status'] = $row['status'] == 1 ? "Atendida" : "Não Atendida";
$x++;
}
if ($mostraColunaServicos) {
$agrupaServico(false);
$widthHeader = array(26, 26, 26, 26, 26, 26, 26);
} else {
$widthHeader = array(26, 26, 26, 26, 26, 26);
}
$totaliza = $mostraColunaServicos ? array('DURAÇÃO', SecondToStrTime($somaDuracao), '', '', '', '', '') : array('DURAÇÃO', SecondToStrTime($somaDuracao), '', '', '', '');
$table = array($dadosCabecalio, $dadosField, $dadosTable, $widthHeader, $totaliza, 0);
$widthHeader = array(32, 32, 32, 32, 32, 32);
$totaliza = array('TMO', SecondToStrTime($somaDuracao), '', '', '', '');
$table = array($dadosCabecalio, $dadosField, $dados, $widthHeader, $totaliza, 0);
$legendaCabecalio = array(
"Atendida" => 'C',
@ -602,8 +473,6 @@ class RelRecebidasAgenteSrv extends Relatorios {
$this->___GravaLog();
}
$legendas = '<strong>* C.I.E.I.V:</strong> CHAMADAS INTERNAS/EMERGENCIA/INTERNACIONAL/VOIP.';
/*
* Inclua os scripts necessários aqui.
*/
@ -612,13 +481,12 @@ class RelRecebidasAgenteSrv extends Relatorios {
$smarty->assign('filtros', $this->___FiltrosRelatorio());
$smarty->assign('conteudo', $conteudoRelatorio);
$smarty->assign('legendas', $legendas);
$smarty->assign('msg', $this->GetMsg());
GetTemplate($smarty, 'relatoriosGrid.tpl');
}
}
$relRecebidasAgente = new RelRecebidasAgenteSrv($idProg, $dbcon, 1);
$relRecebidasAgente = new RelRecebidasAgente($idProg, $dbcon, 1);
$relRecebidasAgente->ExecutaRelatorio();
?>

13
scriptApl/functions15.js

@ -889,7 +889,7 @@ function ClassificaRegistraRt()
var listaClasItem = document.getElementById("listaClasItem");
var classNome = listClas.options[listClas.selectedIndex].text;
var proto = '';
if ((classNome.toUpperCase() == 'VENDA') && ExigeProtoExt())
if ((classNome.toUpperCase() == 'VENDA' || classNome.toUpperCase() == 'PROTOCOLO') && ExigeProtoExt())
{
proto = soNumero(prompt('Informe o Protocolo', ''));
@ -3299,3 +3299,14 @@ function ComplementoCampanha()
;
}
}
function SelectRel(prog){
$.ajax({
url: 'index.php?a=1&idProg=' + prog + "&slc=" + $('#campanha').val(),
type: 'GET',
success: function (res) {
$('#lista option').remove()
$('#lista').append(res)
}
})
}
Loading…
Cancel
Save