forked from SimplesIP/pabx-app
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
512 lines
23 KiB
512 lines
23 KiB
<?php |
|
|
|
include_once 'util/relatoriosBase.php'; |
|
|
|
class RelTransfer extends Relatorios { |
|
|
|
private $___ramal; |
|
private $___agente; |
|
private $___status; |
|
|
|
public function __construct($idProg, $dbcon, $incDac) { |
|
parent::__construct($idProg, $dbcon, $incDac); |
|
$this->___ramal = isset($_POST["ramal"]) ? $_POST["ramal"] : ''; |
|
$this->___agente = isset($_POST["listaAgente"]) ? $_POST["listaAgente"] : ''; |
|
$this->___status = isset($_POST["lstStatus"]) ? $_POST["lstStatus"] : ''; |
|
} |
|
|
|
function ___FiltrosRelatorio() { |
|
$agente = $this->___GetAgente(); |
|
|
|
if ($this->___media != MEDIA_PRINT_GRID) { |
|
/* |
|
* Recupera os filtros da sessão do usuário. |
|
*/ |
|
list($this->___dac, $this->___dataIni, $this->___dataFim, $this->___tipoRelatorio) = $_SESSION["SSstorageFiltros"]; |
|
|
|
if ($this->___media == MEDIA_PRINT_HTML) { |
|
$fila = $this->GetIncDac() ? 'Fila: ' . GetDacDesc($this->GetDbCon(), $this->GetIdProg() . ' ') : ''; |
|
return sprintf("%sData Inicial: %s Data Final: %s Tipo: %s", $fila, $this->___dataIni, $this->___dataFim, ($this->___tipoRelatorio ? 'Analítico' : 'Sintético')); |
|
} |
|
|
|
$fltCsv = array(); |
|
if ($this->GetIncDac()) { |
|
$fltCsv[] = 'Fila:' . GetDacDesc($this->GetDbCon(), $this->___dac); |
|
} |
|
$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; |
|
} |
|
|
|
if ($this->GetIncDac()) { |
|
$dacs = GetDac($this->GetDbCon(), $this->___dac, "", 0, 1, 0, 0, 1); |
|
} |
|
|
|
$lkPrint = ""; |
|
if ($this->___dataCount) { |
|
$prt = '<a href="index.php?idProg=%s&media=%s&tipoRelatorio=%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&tipoRelatorio=%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, $this->___tipoRelatorio, substr(LimpaString(GetDispProgSel($this->GetIdProg())), 0, 20), 'print.gif'); |
|
$lkPrint .= sprintf($prt, $this->GetidProg(), MEDIA_PRINT_EXCEL, $this->___tipoRelatorio, 'prt-xls.png'); |
|
$lkPrint .= sprintf($prt, $this->GetidProg(), MEDIA_PRINT_PDF, $this->___tipoRelatorio, 'prt-pdf.png'); |
|
$lkPrint .= sprintf($prt, $this->GetidProg(), MEDIA_PRINT_CSV, $this->___tipoRelatorio, 'prt-csv.png'); |
|
} |
|
|
|
$tipoRel = !$this->___tipoRelatorio ? '' : 'checked="checked"'; |
|
/* |
|
* Personalise esta função se necessitar de outras opnioes de filtro. |
|
*/ |
|
$filtro = '<table border="0" cellspacing="1" cellpadding="1">'; |
|
/* |
|
* Rotulos. |
|
*/ |
|
$filtro .= '<tr>'; |
|
if ($this->GetIncDac()) |
|
$filtro .= '<td>Fila</td>'; |
|
$filtro .= '<td>Data Inicial</td>'; |
|
$filtro .= '<td>Data Final </td>'; |
|
$filtro .= '<td>Ramal</td>'; |
|
$filtro .= '<td>Agente</td>'; |
|
$filtro .= '<td>Status</td>'; |
|
$filtro .= '<td align="center" valign="middle"> </td>'; |
|
$filtro .= '</tr>'; |
|
|
|
/* |
|
* Valores. |
|
*/ |
|
$filtro .= '<tr>'; |
|
if ($this->GetIncDac()) |
|
$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>'; |
|
$filtro .= sprintf('<td><input name="ramal" id="ramal" type="text" size="15" value="%s" /></td>', $this->___ramal); |
|
$filtro .= sprintf('<td>%s</td>', $agente); |
|
$filtro .= sprintf('<td>%s</td>', $this->___GetStatus($this->___status)); |
|
$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->___dac, $this->___dataIni, $this->___dataFim, $this->___tipoRelatorio, $this->___agente); |
|
|
|
return sprintf($filtro, $this->___dataIni, $this->___dataFim, $lkPrint); |
|
} |
|
|
|
protected function ___GetDadosDb() { |
|
|
|
$dataIni = FormatDtMssql($this->___dataIni); |
|
$dataFim = FormatDtMssql($this->___dataFim); |
|
$dac = $this->___dac; |
|
$dataCorte = GetDataRelatorio(); |
|
$ramal = $this->___ramal; |
|
$agente = $this->___agente; |
|
$status = $this->___status; |
|
|
|
$query = "select transferencia.fila, calldate, transferencia.src, transferencia.dst, apelido, billsec, duration, status |
|
from( |
|
select d.fila, a.calldate, a.src, |
|
case when(d.evento in('COMPLETECALLER','COMPLETEAGENT')) |
|
then(select q.destino from pbx_bilhetes_complemento q where q.uniqueid2 = a.uniqueid and q.direcao = 'fila-ramal' limit 1) |
|
else(select q.destino from pbx_bilhetes_complemento q where q.uniqueid2 = a.uniqueid order by data_registro limit 1) |
|
end as dst, |
|
c.apelido, a.billsec, a.duration, |
|
case when(a.disposition = 'ANSWERED')then 'ATENDIDA' else 'ABANDONADA' end as status |
|
from pbx_bilhetes a,pbx_usuarios c, pbx_eventos_dacs d, pbx_dacs e |
|
where c.matricula = substring(d.agente, 7, 4) |
|
and d.uid2 = a.uniqueid |
|
and e.nome = d.fila |
|
and d.evento in('COMPLETEAGENT','COMPLETECALLER','COMPLETAAGENT','COMPLETACALLER') |
|
and a.lastapp <> 'Transferred Call' |
|
and a.data_bilhete >= '$dataIni' |
|
and a.data_bilhete <= '$dataFim' |
|
and exists(select '' from pbx_bilhetes where data_bilhete = a.data_bilhete and accountcode = a.uniqueid) "; |
|
|
|
$dataIni ? $query .= " and a.calldate::date >= '$dataIni' " : ''; |
|
$dataFim ? $query .= " and a.calldate::date <= '$dataFim' " : ''; |
|
$ramal ? $query .= " and a.dst = '$ramal' " : ''; |
|
$agente ? $query .= " and c.matricula = '$agente' " : ''; |
|
$status ? $query .= " and a.disposition = '$status' " : ''; |
|
$dac ? $query .= " and e.id = '$dac' " : ''; |
|
|
|
$query .= " union all |
|
select d.fila, a.calldate, a.src, (select q.destino from pbx_bilhetes_complemento q where q.uniqueid2 = a.uniqueid order by data_registro desc limit 1)as dst, c.apelido, d.param4::bigint as billsec, a.duration, |
|
case when(a.disposition = 'ANSWERED' or d.param4 > '0')then 'ATENDIDA' else 'ABANDONADA' end as status |
|
from pbx_bilhetes a,pbx_usuarios c, pbx_eventos_dacs d, pbx_dacs e |
|
where c.matricula = substring(d.agente, 7, 4) |
|
and d.uid2 = a.uniqueid |
|
and e.nome = d.fila |
|
and d.param4 <> '' |
|
and d.evento in('TRANSFER','TRANSFERORIG') |
|
and a.lastapp <> 'Transferred Call' |
|
and a.data_bilhete >= '$dataIni' |
|
and a.data_bilhete <= '$dataFim' "; |
|
|
|
$dataIni ? $query .= " and a.calldate::date >= '$dataIni' " : ''; |
|
$dataFim ? $query .= " and a.calldate::date <= '$dataFim' " : ''; |
|
$ramal ? $query .= " and a.dst = '$ramal' " : ''; |
|
$agente ? $query .= " and c.matricula = '$agente' " : ''; |
|
$status ? $query .= " and a.disposition = '$status' " : ''; |
|
$dac ? $query .= " and e.id = '$dac' " : ''; |
|
|
|
$query .= ")as transferencia |
|
group by transferencia.fila, calldate, transferencia.src, transferencia.dst, apelido, billsec, duration, status |
|
order by 2"; |
|
|
|
$result = $this->___GetQuery($query); |
|
$row = pg_fetch_all($result); |
|
$this->SetData($row ? $row : array()); |
|
} |
|
|
|
protected function ___PreparaCsv() { |
|
$dataRel = array(); |
|
$chmTotal = array(); |
|
$filtro = $this->___FiltrosRelatorio(); |
|
$dataRel[] = GenerateCsvFromArray($filtro); |
|
|
|
$dadosCabecalio = array('Ramal', 'Origem', 'Data/Hora', 'Tempo', 'Status'); |
|
$dadosField = array('dst', 'src', 'calldate', 'billsec', 'status'); |
|
|
|
$dataRel[] = GenerateCsvFromArray($dadosCabecalio); |
|
|
|
$somaReg = 0; |
|
$somaChm = 0; |
|
|
|
/* |
|
* Linhas de dados. |
|
*/ |
|
foreach ($this->GetData()[0] as $row) { |
|
$somaReg ++; |
|
$row['status'] == 'ATENDIDA' ? $somaChm++ : ''; |
|
$row['dst'] = ocultarTelefone($row['dst']); |
|
$row['src'] = ocultarTelefone($row['src']); |
|
$row['billsec'] = SecondToStrTime($row['billsec']); |
|
$row['calldate'] = date('d/m/Y H:i:s', strtotime($row['calldate'])); |
|
|
|
$chmTotal[$row['dst']] += 1; |
|
|
|
$linha = array(); |
|
foreach ($dadosField as $key) { |
|
$linha[] = $row["$key"]; |
|
} |
|
$dataRel[] = GenerateCsvFromArray($linha); |
|
} |
|
$dataRel[] = GenerateCsvFromArray(array('Total Atendidadas:', '', '', '', $somaChm)); |
|
$dataRel[] = GenerateCsvFromArray(array('Total Chamadas:', '', '', '', $somaReg)); |
|
$dataRel[] = GenerateCsvFromArray(array('')); |
|
$dataRel[] = GenerateCsvFromArray(array('Ramal','Quantidade')); |
|
foreach($chmTotal as $k => $v){ |
|
$dataRel[] = GenerateCsvFromArray(array($k,$v)); |
|
} |
|
|
|
$this->___dataRel[] = $dataRel; |
|
} |
|
|
|
protected function ___PreparaExcel() { |
|
$dataRel = array(); |
|
$chmTotal = 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('Ramal', 'Origem', 'Data/Hora', 'Tempo', 'Status'); |
|
$dadosField = array('dst', 'src', 'calldate', 'billsec', 'status'); |
|
|
|
$linha = array('LABEL'); |
|
foreach ($dadosCabecalio as $value) { |
|
$linha[] = $value; |
|
} |
|
$dataRel[] = $linha; |
|
|
|
$somaReg = 0; |
|
$somaChm = 0; |
|
|
|
/* |
|
* Linhas de dados. |
|
*/ |
|
foreach ($this->GetData()[0] as $row) { |
|
$somaReg ++; |
|
$row['status'] == 'ATENDIDA' ? $somaChm++ : ''; |
|
$row['dst'] = ocultarTelefone($row['dst']); |
|
$row['src'] = ocultarTelefone($row['src']); |
|
$row['billsec'] = SecondToStrTime($row['billsec']); |
|
$row['calldate'] = date('d/m/Y H:i:s', strtotime($row['calldate'])); |
|
|
|
$chmTotal[$row['dst']] += 1; |
|
|
|
$linha = array('DADOS'); |
|
foreach ($dadosField as $key) { |
|
$linha[] = $row["$key"]; |
|
} |
|
$dataRel[] = $linha; |
|
} |
|
|
|
$dataRel[] = array('LABEL', 'Chamadas Atendidas: ', '', '', '', $somaChm); |
|
$dataRel[] = array('LABEL', 'Total Chamadas: ', '', '', '', $somaReg); |
|
$dataRel[] = array('LABEL', ''); |
|
$dataRel[] = array('LABEL', 'Ramal ', 'Quantidade'); |
|
foreach ($chmTotal as $k => $v){ |
|
$dataRel[] = array('DADOS', $k, $v); |
|
} |
|
|
|
$this->___dataRel[] = $dataRel; |
|
} |
|
|
|
protected function ___PreparaGrid() { |
|
$dataRel = array(); |
|
$chmTotal = array(); |
|
|
|
$dadosCabecalio = array( |
|
'Ramal' => 'align="center"', |
|
'Origem' => 'align="center"', |
|
'Data/Hora' => 'align="center"', |
|
'Tempo' => 'align="center"', |
|
'Status' => 'align="center"' |
|
); |
|
$dadosField = array( |
|
'dst' => 'align="center"', |
|
'src' => 'align="center"', |
|
'calldate' => 'align="center"', |
|
'billsec' => 'align="center"', |
|
'status' => 'align="center"' |
|
); |
|
|
|
/* |
|
* Inicia o relat�rio. |
|
*/ |
|
$dataRel[] = '<table width="70%" cellpadding="2" class="grid">'; |
|
|
|
/* |
|
* Monta a linha de cabecalio. |
|
*/ |
|
|
|
$linha = '<tr>'; |
|
$linha .= "<th align=\"center\" colspan=\"5\">Transferência de chamada</th>"; |
|
$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; |
|
} |
|
|
|
$linhaC = "<tr>"; |
|
foreach ($dadosCabecalio as $key => $value) { |
|
$linhaC .= sprintf("<th %s>%s</th>", $value, $key); |
|
} |
|
$linhaC .= "</tr>"; |
|
$dataRel[] = $linhaC; |
|
|
|
$somaReg = 0; |
|
$somaChm = 0; |
|
|
|
/* |
|
* Linhas de dados. |
|
*/ |
|
foreach ($this->GetData()[0] as $row) { |
|
$somaReg ++; |
|
$row['status'] == 'ATENDIDA' ? $somaChm++ : ''; |
|
$row['dst'] = ocultarTelefone($row['dst']); |
|
$row['src'] = ocultarTelefone($row['src']); |
|
$row['billsec'] = SecondToStrTime($row['billsec']); |
|
$row['calldate'] = date('d/m/Y H:i:s', strtotime($row['calldate'])); |
|
|
|
$chmTotal[$row['dst']] += 1; |
|
|
|
$linha = "<tr>"; |
|
foreach ($dadosField as $key => $value) { |
|
$linha .= sprintf("<td %s>%s</td>", $value, $row["$key"]); |
|
} |
|
$linha .= "</tr>"; |
|
$dataRel[] = $linha; |
|
} |
|
$dataRel[] = "<tr><th colspan=\"4\">Chamadas Atendidas: </th><th align=\"center\">$somaChm</th></tr>"; |
|
$dataRel[] = "<tr><th colspan=\"4\">Total de chamadas: </th><th align=\"center\">$somaReg</th></tr>"; |
|
|
|
$dataRel[] = "</table><br>"; |
|
|
|
$tabletotal = "<table width=\"30%\" cellpadding=\"2\" class=\"grid\"><tr><th colspan=\"2\">Resumo de chamadas: </th></tr>"; |
|
$tabletotal .= "<tr><th>Ramal</th><th>Quantidade</th></tr>"; |
|
foreach ($chmTotal as $chave => $valores) { |
|
$tabletotal .= "<tr><td>$chave </td><td>$valores</td></tr>"; |
|
} |
|
$tabletotal .= "</table>"; |
|
$dataRel[] = $tabletotal; |
|
$this->___dataRel[] = $dataRel; |
|
} |
|
|
|
protected function ___PreparaHtml() { |
|
|
|
} |
|
|
|
protected function ___PreparaPdf() { |
|
list($this->___dac, $this->___dataIni, $this->___dataFim, $this->___tipoRelatorio) = $_SESSION["SSstorageFiltros"]; |
|
$chmTotal = array(); |
|
$dadosCabecalio = array( |
|
'Ramal' => 'C', |
|
'Origem' => 'C', |
|
'Data/Hora' => 'C', |
|
'Tempo' => 'C', |
|
'Status' => 'C' |
|
); |
|
$dadosField = array( |
|
'dst' => 'C', |
|
'src' => 'C', |
|
'calldate' => 'C', |
|
'billsec' => 'C', |
|
'status' => 'C' |
|
); |
|
|
|
|
|
$somaChm = 0; |
|
$x = 0; |
|
$dados = $this->GetData()[0]; |
|
$chave = ''; |
|
/* |
|
* Linhas de dados. |
|
*/ |
|
foreach ($dados as $row) { |
|
$dados[$x]['status'] == 'ATENDIDA' ? $somaChm++ : ''; |
|
$dados[$x]['dst'] = ocultarTelefone($row['dst']); |
|
$dados[$x]['src'] = ocultarTelefone($row['src']); |
|
$dados[$x]['billsec'] = SecondToStrTime($row['billsec']); |
|
$dados[$x]['calldate'] = date('d/m/Y H:i:s', strtotime($row['calldate'])); |
|
|
|
foreach ($chmTotal as $key => $v) { |
|
if ($v['ramal'] == $row['dst']) { |
|
$chave = $key; |
|
break; |
|
} |
|
} |
|
$x++; |
|
|
|
if ($chave) { |
|
$chmTotal[$chave]['quantidade'] ++; |
|
$chave = ''; |
|
} else { |
|
$chmTotal[$x]['ramal'] = $row['dst']; |
|
$chmTotal[$x]['quantidade'] = 1; |
|
} |
|
} |
|
$widthHeader = array(38, 38, 38, 38, 38); |
|
$totaliza = array("Total Chamadas: $x", '', '', '', "Total Atendidas: $somaChm"); |
|
$table = array($dadosCabecalio, $dadosField, $dados, $widthHeader, $totaliza, 0); |
|
|
|
|
|
|
|
$table1 = array(array('Ramal' => 'C', 'Quantidade' => 'C'), array('ramal' => 'C', 'quantidade' => 'C'), $chmTotal, array(38, 38), 0, 1); |
|
|
|
$this->___dataRel = array($table, $table1); |
|
} |
|
|
|
protected function ___GetAgente() { |
|
global $dbcon; |
|
|
|
$query = sprintf("SELECT DISTINCT c.matricula, c.apelido as nome |
|
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.calldate::date >= '%s' |
|
AND a.calldate::date <= '%s' |
|
AND b.fila = case when(%s = 0)then b.fila else (select nome from pbx_dacs where id = %s) end |
|
ORDER BY 2", FormatDtMssql($this->___dataIni), FormatDtMssql($this->___dataFim), $this->___dac, $this->___dac); |
|
|
|
$resp = pg_query($dbcon, $query); |
|
|
|
|
|
if(!$resp) { |
|
return "<select><option value=\"0\">Todos</option></select>"; |
|
} |
|
|
|
$result = pg_fetch_all($resp); |
|
|
|
$row = "<select name=\"listaAgente\">"; |
|
!$result ? $row .= "<option value=\"0\"> ----- </option>" : $row .= "<option value=\"0\">Todos</option>"; |
|
foreach ($result as $agentes) { |
|
$sel = $this->___agente == $agentes['matricula'] ? "selected" : ''; |
|
$row .= sprintf("<option value=\"%s\" $sel>%s</option>", $agentes['matricula'], $agentes['nome']); |
|
} |
|
$row .= "</select>"; |
|
return $row; |
|
} |
|
|
|
protected function ___GetStatus($st) { |
|
$status = "<select name=\"lstStatus\" id=\"lstStatus\">"; |
|
$status .= str_replace("{SEL}", (!$st ? "selected" : ""), "<option value=\"\" {SEL}>Todos</option>"); |
|
$status .= str_replace("{SEL}", ($st == "ANSWERED" ? "selected" : ""), "<option value=\"ANSWERED\" {SEL}>ATENDIDA</option>"); |
|
$status .= str_replace("{SEL}", ($st == "BUSY" ? "selected" : ""), "<option value=\"BUSY\" {SEL}>OCUPADO</option>"); |
|
$status .= str_replace("{SEL}", ($st == "ENQUIRY" ? "selected" : ""), "<option value=\"ENQUIRY\" {SEL}>CONSULTA</option>"); |
|
$status .= str_replace("{SEL}", ($st == "NO ANSWER" ? "selected" : ""), "<option value=\"NO ANSWER\" {SEL}>ABANDONADA</option>"); |
|
$status .= "</select>"; |
|
|
|
return $status; |
|
} |
|
|
|
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'); |
|
} |
|
|
|
} |
|
|
|
$relTransfer = new RelTransfer($idProg, $dbcon, 1); |
|
$relTransfer->ExecutaRelatorio(); |
|
?>
|