WandersonMelo
Mensagens : 3 Data de inscrição : 03/09/2016
| Assunto: Numero de Série na Ocorrencia Sáb Set 03, 2016 11:57 am | |
| Bom dia,
Como adicionar o numero de série na ocorrência impressa? para ajudar na identificação do equipamento. | |
|
FabioRK
Mensagens : 378 Data de inscrição : 14/09/2009 Idade : 44 Localização : Carazinho - RS
| Assunto: Re: Numero de Série na Ocorrencia Seg Set 12, 2016 4:58 pm | |
| Wanderson. Você precisa editar o arquivo ocomon\geral\mostra_relatorio_individual. Eu criei um novo arquivo onde o conteúdo fica mais organizado e adicionei o número de série que você precisa. Caso tenha interesse segue o código: - Código:
-
<?php /* Copyright 2005 Flávio Ribeiro
This file is part of OCOMON.
OCOMON is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
OCOMON is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Foobar; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */session_start();
print "<html>"; print "<style> td.cab_relat { font-family: tahoma; font-size:20px; font-weight:bold; text-align: center; color: black; } </style>"; print "<body>";
include ("../../includes/include_geral.inc.php"); include ("../../includes/include_geral_II.inc.php");
$query = $QRY["ocorrencias_full_ini"]." WHERE numero IN (".$_GET['numero'].") ORDER BY numero"; $resultado = mysql_query($query); $row = mysql_fetch_array($resultado); $linhas = mysql_num_rows($resultado);
$query2 = "SELECT * FROM assentamentos WHERE ocorrencia='".$_GET['numero']."'"; $resultado2 = mysql_query($query2); $linhas2=mysql_num_rows($resultado2);
print "<table border='0' cellpadding='5'> "; print "<tr>"; print "<td><img src='../../includes/imgs/connectos_pb_rel.png' border='0'></td>"; print "<td class='cab_relat' width='60%' nowrap='nowrap'>".TRANS('TTL_OCOMON_REP_ATTEND')."</td>"; print "<td>Data: ".date('d/m/y')."<br/>Hora: ".date('H:i:s')."</td>"; print "</tr>"; print "</table>"; print "<hr>"; print "<fieldset style=\"width:70%\">"; print "<table border='0' align='left' cellpadding='4'>"; print "<tr>"; print "<td width='20%' align='left'><b>".TRANS('OCO_FIELD_NUMBER').":</b></td>"; print "<td colspan='3' width='80%' align='left'>".$row['numero']."</td>"; print "</tr>"; print "<tr>"; print "<td width='20%' align='left'><b>".TRANS('OCO_PROB').":<b></td>"; print "<td style=\"{text-align:justify;}\" width='30%' align='left'>".$row['problema']."</td>"; print "<td width='20%' align='left'><b>".TRANS('FIELD_AREA_ATTEND').":</b></td>"; print "<td width='30%' align='left'>".$row['area']."</td>"; print "</tr>"; print "<tr>"; print "<td width='20%' align='left' valign='top'><b>".TRANS('OCO_DESC').":</b></td>"; print "<td colspan='3' width='80%' align='left'><b>".nl2br($row['descricao'])."</b></td>"; print "</tr>";
// Comentarios if ($linhas2 > 0) { print "<tr>"; print "<td colspan='4'>"; print "<fieldset><legend><b>".TRANS('COMMENTS')."</b></legend>"; print "<table border='0' align='center' width='100%'>"; $i=0; while ($i < $linhas2) { $OP = mysql_result($resultado2,$i,4); $qryOP = "SELECT * FROM usuarios WHERE user_id = ".$OP; $execOP = mysql_query($qryOP); $rowOP = mysql_fetch_array($execOP) or die($qryOP); $countAssentamento = $i+1; print "<tr>"; print "<td width='20%' align='left' valign='top'>".TRANS('FIELD_NESTING')." ".$countAssentamento." de ".$linhas2."<br/>". "por ".$rowOP['nome']."<br/>". "em ".formatDate(mysql_result($resultado2,$i,3))."</td>"; print "<td style=\"text-align:justify;\" colspan='3' width='80%' align='left' valign='top'>".nl2br(mysql_result($resultado2,$i,2))."</td>"; print "</tr>"; $i++; } print "</table>"; print "</fieldset>"; print "</td>"; print "</tr>"; } print "<tr>"; print "<td width='20%' align='left' valign='top'><b>".TRANS('OCO_FIELD_UNIT').":</b></td>"; print "<td width='30%' align='left' valign='top'>".$row['unidade']."</td>";
print "<td width='20%' align='left' valign='top' nowrap='nowrap'><b>".TRANS('FIELD_TAG_EQUIP').":</b></td>"; print "<td width='30%' align='left' valign='top'>".$row['etiqueta']."</td>"; print "</tr>"; print "<tr>"; print "<td width='20%' align='left'><b>".TRANS('OCO_FIELD_CONTACT').":</b></td>"; print "<td width='30%' align='left'>".$row['contato']."</td>"; echo $qry_eqp = "SELECT * FROM equipamentos WHERE comp_inv='".$row['etiqueta']."' AND comp_inst=".$row['unidade_cod']; $exec_eqp = mysql_query($qry_eqp); $row_eqp = mysql_fetch_array($exec_eqp); print "<td width='20%' align='left'><b>".TRANS('COL_SN').":</b></td>"; print "<td width='30%' align='left'>".$row_eqp['comp_sn']."</td>"; print "</tr>"; print "<tr>"; print "<td width='20%' align='left'><b>".TRANS('OCO_FIELD_LOCAL').":</b></td>"; print "<td width='30%' align='left'>".$row['setor']."</td>"; print "<td width='20%' align='left'><b>".TRANS('OCO_FIELD_OPERATOR').":</b></td>"; print "<td width='30%' align='left'>".$row['nome']."</td>"; print "</tr>"; print "<tr>"; print "<td width='20%' align='left'><b>".TRANS('OCO_FIELD_DATE_OPEN').":</b></td>"; print "<td width='30%' align='left'>".formatDate($row['data_abertura'])."</td>"; if ($row['status_cod']== 4) { print "<td width='20%' align='left'><b>".TRANS('FIELD_DATE_CLOSING').":</b></td>"; print "<td width='30%' align='left'>".formatDate($row['data_fechamento'])."</td>"; } print "</tr>"; print "<tr>"; print "<td width='20%' align='left'><b>".TRANS('OCO_FIELD_STATUS').":<b></td>"; print "<td width='30%' align='left' bgcolor='white'>".$row['chamado_status']."</td>"; // busca tempo de atendimento do chamado $qryTempo = "SELECT SUM(ts_tempo) as tempo_sec, sec_to_time(SUM(ts_tempo)) AS tempo FROM tempo_status JOIN ocorrencias ON numero = ts_ocorrencia WHERE ts_ocorrencia = ".$_GET['numero']." AND ts_status IN (2)"; $execTempo = mysql_query($qryTempo); $rowTempo = mysql_fetch_array($execTempo); if ($rowTempo['tempo_sec'] > 0) { print "<td width='20%' align='left'><b>".TRANS('OCO_TEMPOATEND').":<b></td>"; print "<td width='30%' align='left' bgcolor='white'>".$rowTempo['tempo']."</td>"; } print "</tr>"; print "</table>"; print "</fieldset>"; print "</body>"; print "</html>"; ?> | |
|