Commit 3cc425e0be6d671434d9567449aef02baa891632

Authored by Gedeson Wasley
1 parent 71ee0a6e
Exists in master and in 1 other branch 3.1

Correção de Relatórios

src/Cacic/RelatorioBundle/Controller/FaturamentoController.php
@@ -18,7 +18,17 @@ @@ -18,7 +18,17 @@
18 18
19 $form = $this->createForm( new LogPesquisaType() ); 19 $form = $this->createForm( new LogPesquisaType() );
20 20
  21 + return $this->render( 'CacicRelatorioBundle:Faturamento:index.html.twig',
  22 + array(
  23 + 'locale'=> $locale,
  24 + 'form' => $form->createView()
  25 + )
  26 + );
  27 + }
21 28
  29 + public function faturamentoRelatorioAction(Request $request){
  30 + $locale = $request->getLocale();
  31 + $form = $this->createForm( new LogPesquisaType() );
22 if ( $request->isMethod('POST') ) 32 if ( $request->isMethod('POST') )
23 { 33 {
24 $form->bind( $request ); 34 $form->bind( $request );
@@ -31,12 +41,11 @@ @@ -31,12 +41,11 @@
31 41
32 $logs = $this->getDoctrine()->getRepository( 'CacicCommonBundle:LogAcesso') 42 $logs = $this->getDoctrine()->getRepository( 'CacicCommonBundle:LogAcesso')
33 ->pesquisar( $data['dtAcaoInicio'], $data['dtAcaoFim'], $filtroLocais); 43 ->pesquisar( $data['dtAcaoInicio'], $data['dtAcaoFim'], $filtroLocais);
34 -  
35 } 44 }
36 45
37 - return $this->render( 'CacicRelatorioBundle:Faturamento:index.html.twig', 46 + return $this->render( 'CacicRelatorioBundle:Faturamento:acessoResultado.html.twig',
38 array( 47 array(
39 - 'locale'=> $locale, 48 + 'idioma'=> $locale,
40 'form' => $form->createView(), 49 'form' => $form->createView(),
41 'data' =>$data, 50 'data' =>$data,
42 'logs' => ( isset( $logs ) ? $logs : null ) 51 'logs' => ( isset( $logs ) ? $logs : null )
@@ -72,6 +81,19 @@ @@ -72,6 +81,19 @@
72 81
73 $form = $this->createForm( new LogPesquisaType() ); 82 $form = $this->createForm( new LogPesquisaType() );
74 83
  84 + return $this->render( 'CacicRelatorioBundle:Faturamento:inativos.html.twig',
  85 + array(
  86 + 'locale'=> $locale,
  87 + 'form' => $form->createView()
  88 + )
  89 + );
  90 + }
  91 +
  92 + public function inativosRelatorioAction(Request $request){
  93 + $locale = $request->getLocale();
  94 +
  95 + $form = $this->createForm( new LogPesquisaType() );
  96 +
75 97
76 if ( $request->isMethod('POST') ) 98 if ( $request->isMethod('POST') )
77 { 99 {
@@ -88,9 +110,9 @@ @@ -88,9 +110,9 @@
88 110
89 } 111 }
90 112
91 - return $this->render( 'CacicRelatorioBundle:Faturamento:inativos.html.twig', 113 + return $this->render( 'CacicRelatorioBundle:Faturamento:inativosResultado.html.twig',
92 array( 114 array(
93 - 'locale'=> $locale, 115 + 'idioma'=> $locale,
94 'form' => $form->createView(), 116 'form' => $form->createView(),
95 'data' =>$data, 117 'data' =>$data,
96 'logs' => ( isset( $logs ) ? $logs : null ) 118 'logs' => ( isset( $logs ) ? $logs : null )
src/Cacic/RelatorioBundle/Controller/SoftwareController.php
@@ -157,7 +157,7 @@ class SoftwareController extends Controller @@ -157,7 +157,7 @@ class SoftwareController extends Controller
157 $dados = $this->getDoctrine() 157 $dados = $this->getDoctrine()
158 ->getRepository('CacicCommonBundle:Software') 158 ->getRepository('CacicCommonBundle:Software')
159 ->gerarRelatorioSoftwaresPorOrgao( $request->get('form') ); 159 ->gerarRelatorioSoftwaresPorOrgao( $request->get('form') );
160 - 160 +
161 return $this->render( 161 return $this->render(
162 'CacicRelatorioBundle:Software:rel_orgao.html.twig', 162 'CacicRelatorioBundle:Software:rel_orgao.html.twig',
163 array( 163 array(
src/Cacic/RelatorioBundle/Resources/config/routing.yml
@@ -5,6 +5,14 @@ cacic_relatorio_autorizacoes: @@ -5,6 +5,14 @@ cacic_relatorio_autorizacoes:
5 cacic_relatorio_faturamento: 5 cacic_relatorio_faturamento:
6 pattern: /faturamento 6 pattern: /faturamento
7 defaults: { _controller: CacicRelatorioBundle:Faturamento:index } 7 defaults: { _controller: CacicRelatorioBundle:Faturamento:index }
  8 + requirements:
  9 + _method: GET
  10 +
  11 +cacic_relatorio_resultado:
  12 + pattern: /faturamento
  13 + defaults: { _controller: CacicRelatorioBundle:Faturamento:faturamentoRelatorio }
  14 + requirements:
  15 + _method: POST
8 16
9 cacic_relatorio_faturamento_listar: 17 cacic_relatorio_faturamento_listar:
10 pattern: /software/faturamento/{idRede}/{dtAcaoInicio}/{dtAcaoFim} 18 pattern: /software/faturamento/{idRede}/{dtAcaoInicio}/{dtAcaoFim}
@@ -121,6 +129,14 @@ cacic_relatorio_hardware_wmi_detalhe: @@ -121,6 +129,14 @@ cacic_relatorio_hardware_wmi_detalhe:
121 cacic_relatorio_inativos: 129 cacic_relatorio_inativos:
122 pattern: /inativos 130 pattern: /inativos
123 defaults: { _controller: CacicRelatorioBundle:Faturamento:inativos } 131 defaults: { _controller: CacicRelatorioBundle:Faturamento:inativos }
  132 + requirements:
  133 + _method: GET
  134 +
  135 +cacic_relatorio_inativos_rel:
  136 + pattern: /inativos
  137 + defaults: { _controller: CacicRelatorioBundle:Faturamento:inativosRelatorio }
  138 + requirements:
  139 + _method: POST
124 140
125 cacic_relatorio_inativos_listar: 141 cacic_relatorio_inativos_listar:
126 pattern: /inativos/{idRede}/{dtAcaoInicio}/{dtAcaoFim} 142 pattern: /inativos/{idRede}/{dtAcaoInicio}/{dtAcaoFim}
src/Cacic/RelatorioBundle/Resources/views/Faturamento/acessoResultado.html.twig
  1 +{% extends 'CacicRelatorioBundle::base.html.twig' %}
  2 +
  3 +{% block body %}
  4 +
1 <div class="row-fluid"> 5 <div class="row-fluid">
2 <div class="span12"> 6 <div class="span12">
3 <div class="box grad_colour_black"> 7 <div class="box grad_colour_black">
4 <h2 class="box_head round_top"><i class="icon-list"></i> {{'Resultado do Faturamento' |trans }}</h2> 8 <h2 class="box_head round_top"><i class="icon-list"></i> {{'Resultado do Faturamento' |trans }}</h2>
5 <div class="block box_content round_bottom padding_10"> 9 <div class="block box_content round_bottom padding_10">
6 10
  11 + <h2 class="">{{ 'Relatório de Faturamento'|trans }}</h2>
  12 + <h5>{{ 'Relatório gerado em'|trans }} {% if idioma == 'pt_BR' %}{{ "now"|date("d/m/Y H\\hi") }}{% else %}{{ "now"|date("m/d/Y H\\hi") }}{% endif %}</h5>
  13 +
  14 + <hr />
7 15
8 <form id="faturamento" class="form-horizontal" method="post" > 16 <form id="faturamento" class="form-horizontal" method="post" >
9 17
@@ -55,4 +63,6 @@ @@ -55,4 +63,6 @@
55 </div> <!-- /block --> 63 </div> <!-- /block -->
56 </div> <!-- /box --> 64 </div> <!-- /box -->
57 </div> <!-- /span --> 65 </div> <!-- /span -->
58 -</div> <!-- /row -->  
59 \ No newline at end of file 66 \ No newline at end of file
  67 +</div> <!-- /row -->
  68 +
  69 +{% endblock %}
60 \ No newline at end of file 70 \ No newline at end of file
src/Cacic/RelatorioBundle/Resources/views/Faturamento/inativos.html.twig
@@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
17 17
18 <h4>{{ "Período para verificação de computadores inativos"|trans }}</h4><br /> 18 <h4>{{ "Período para verificação de computadores inativos"|trans }}</h4><br />
19 19
20 - <form id={{ 'formFaturamento'|trans }} class="form-horizontal" action="{{ path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) }}" method="post" > 20 + <form id={{ 'formFaturamento'|trans }} class="form-horizontal" method="post" target="_blank">
21 21
22 <div class="control-group"> 22 <div class="control-group">
23 <label for="log_acesso_periodo" class="control-label">{{ 'Período'|trans }}</label> 23 <label for="log_acesso_periodo" class="control-label">{{ 'Período'|trans }}</label>
@@ -81,11 +81,6 @@ @@ -81,11 +81,6 @@
81 81
82 </div> <!-- /row --> 82 </div> <!-- /row -->
83 83
84 - {% if logs is not null %}  
85 - {% include 'CacicRelatorioBundle:Faturamento:inativosResultado.html.twig' %}  
86 -  
87 - {% endif %}  
88 -  
89 {% endblock %} 84 {% endblock %}
90 85
91 {% block javascripts %} 86 {% block javascripts %}
src/Cacic/RelatorioBundle/Resources/views/Faturamento/inativosResultado.html.twig
  1 +{% extends 'CacicRelatorioBundle::base.html.twig' %}
  2 +
  3 +{% block body %}
  4 +
1 <div class="row-fluid"> 5 <div class="row-fluid">
2 <div class="span12"> 6 <div class="span12">
3 <div class="box grad_colour_black"> 7 <div class="box grad_colour_black">
4 <h2 class="box_head round_top"><i class="icon-list"></i> {{'Total de estações inativas' |trans }}</h2> 8 <h2 class="box_head round_top"><i class="icon-list"></i> {{'Total de estações inativas' |trans }}</h2>
5 <div class="block box_content round_bottom padding_10"> 9 <div class="block box_content round_bottom padding_10">
6 10
  11 + <h2 class="">{{ 'Relatório sem Coletas'|trans }}</h2>
  12 + <h5>{{ 'Relatório gerado em'|trans }} {% if idioma == 'pt_BR' %}{{ "now"|date("d/m/Y H\\hi") }}{% else %}{{ "now"|date("m/d/Y H\\hi") }}{% endif %}</h5>
  13 +
  14 + <hr />
  15 +
7 16
8 <form id="faturamento" class="form-horizontal" method="post" > 17 <form id="faturamento" class="form-horizontal" method="post" >
9 18
@@ -56,3 +65,5 @@ @@ -56,3 +65,5 @@
56 </div> <!-- /box --> 65 </div> <!-- /box -->
57 </div> <!-- /span --> 66 </div> <!-- /span -->
58 </div> <!-- /row --> 67 </div> <!-- /row -->
  68 +
  69 +{% endblock %}
59 \ No newline at end of file 70 \ No newline at end of file
src/Cacic/RelatorioBundle/Resources/views/Faturamento/index.html.twig
@@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
17 17
18 <h4>{{ "Filtros para faturamento mensal"|trans }}</h4><br /> 18 <h4>{{ "Filtros para faturamento mensal"|trans }}</h4><br />
19 19
20 - <form id={{ 'formFaturamento'|trans }} class="form-horizontal" action="{{ path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) }}" method="post" > 20 + <form id={{ 'formFaturamento'|trans }} class="form-horizontal" method="post" target="_blank">
21 21
22 <div class="control-group"> 22 <div class="control-group">
23 <label for="log_acesso_periodo" class="control-label">{{ 'Período'|trans }}</label> 23 <label for="log_acesso_periodo" class="control-label">{{ 'Período'|trans }}</label>
@@ -81,11 +81,6 @@ @@ -81,11 +81,6 @@
81 81
82 </div> <!-- /row --> 82 </div> <!-- /row -->
83 83
84 - {% if logs is not null %}  
85 - {% include 'CacicRelatorioBundle:Faturamento:acessoResultado.html.twig' %}  
86 -  
87 - {% endif %}  
88 -  
89 {% endblock %} 84 {% endblock %}
90 85
91 {% block javascripts %} 86 {% block javascripts %}
src/Cacic/RelatorioBundle/Resources/views/Software/rel_inventariados.html.twig
@@ -10,6 +10,7 @@ @@ -10,6 +10,7 @@
10 <table class="table table-striped table-bordered"> 10 <table class="table table-striped table-bordered">
11 <thead> 11 <thead>
12 <tr> 12 <tr>
  13 + <th width="5%" style="text-align: center"></th>
13 <th width="30%">{{ "Software"|trans }}</th> 14 <th width="30%">{{ "Software"|trans }}</th>
14 <th width="20%">{{ "Local"|trans }}</th> 15 <th width="20%">{{ "Local"|trans }}</th>
15 <th width="20%" style="text-align: center">{{ "Máquinas"|trans }}</th> 16 <th width="20%" style="text-align: center">{{ "Máquinas"|trans }}</th>
@@ -21,6 +22,7 @@ @@ -21,6 +22,7 @@
21 {% for reg in dados %} 22 {% for reg in dados %}
22 23
23 <tr> 24 <tr>
  25 + <td style="text-align: center">{{ loop.index }}</td>
24 <td><a href="{{ path('cacic_relatorio_software_lista') }}/{{ reg['nmSoftware'] }}" title="{{ "Relatório de coletas do software"|trans }}" target="_blank">{{ reg['nmSoftware'] }}</a></td> 26 <td><a href="{{ path('cacic_relatorio_software_lista') }}/{{ reg['nmSoftware'] }}" title="{{ "Relatório de coletas do software"|trans }}" target="_blank">{{ reg['nmSoftware'] }}</a></td>
25 <td>{{ reg['nmLocal'] }}</td> 27 <td>{{ reg['nmLocal'] }}</td>
26 <td style="text-align: center"><a href="{{ path('cacic_relatorio_software_lista') }}/{{ reg['nmSoftware'] }}/{{ reg['nmLocal'] }}" title="{{ "Relatório de coletas do software"|trans }}" target="_blank">{{ reg['numComp'] }}</a></td> 28 <td style="text-align: center"><a href="{{ path('cacic_relatorio_software_lista') }}/{{ reg['nmSoftware'] }}/{{ reg['nmLocal'] }}" title="{{ "Relatório de coletas do software"|trans }}" target="_blank">{{ reg['numComp'] }}</a></td>
src/Cacic/RelatorioBundle/Resources/views/Software/rel_software_lista.html.twig
@@ -10,6 +10,7 @@ @@ -10,6 +10,7 @@
10 <table class="table table-striped table-bordered"> 10 <table class="table table-striped table-bordered">
11 <thead> 11 <thead>
12 <tr> 12 <tr>
  13 + <th width="5%" style="text-align: center"></th>
13 <th width="15%">{{ "Computador"|trans }}</th> 14 <th width="15%">{{ "Computador"|trans }}</th>
14 <th width="10%">{{ "MAC Address"|trans }}</th> 15 <th width="10%">{{ "MAC Address"|trans }}</th>
15 <th width="10%">{{ "Endereço IP"|trans }}</th> 16 <th width="10%">{{ "Endereço IP"|trans }}</th>
@@ -23,6 +24,7 @@ @@ -23,6 +24,7 @@
23 <tbody> 24 <tbody>
24 {% for reg in dados %} 25 {% for reg in dados %}
25 <tr> 26 <tr>
  27 + <td style="text-align: center">{{ loop.index }}</td>
26 <td> 28 <td>
27 <b><a href="{{ path('cacic_computador_detalhar') }}/{{ reg.1 }}" title="{{ "Todas as informações do computador"|trans }}" target="_blank">{{ reg.nmComputador }}</a></b> 29 <b><a href="{{ path('cacic_computador_detalhar') }}/{{ reg.1 }}" title="{{ "Todas as informações do computador"|trans }}" target="_blank">{{ reg.nmComputador }}</a></b>
28 </td> 30 </td>
src/Cacic/RelatorioBundle/Resources/views/Software/rel_tipo.html.twig
@@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
21 <tr> 21 <tr>
22 <td style="text-align: center"><span class="red">{{ reg.teDescricaoTipoSoftware }}</span></td> 22 <td style="text-align: center"><span class="red">{{ reg.teDescricaoTipoSoftware }}</span></td>
23 <td><span class="blue">{{ reg.nmSoftware }}</span></td> 23 <td><span class="blue">{{ reg.nmSoftware }}</span></td>
24 - <td style="text-align: center"><b><a href="{{ path('cacic_relatorio_software_lista', {'software': reg['nmSoftware']}) }}" title="{{ "Relatório de coletas do software"|trans }}" target="_blank"> 24 + <td style="text-align: center"><b><a href="{{ path('cacic_relatorio_software_lista') }}/{{reg['nmSoftware']}}" title="{{ "Relatório de coletas do software"|trans }}" target="_blank">
25 {{ reg.numComp }}</a></b></td> 25 {{ reg.numComp }}</a></b></td>
26 </tr> 26 </tr>
27 {% else %} 27 {% else %}