From 8a41bd66a520adb193463510d189c1612213613d Mon Sep 17 00:00:00 2001 From: Bruno Menezes Date: Tue, 20 May 2014 15:50:59 -0300 Subject: [PATCH] acrescentando total de máquinas no final do relatório --- src/Cacic/RelatorioBundle/Controller/SoftwareController.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Cacic/RelatorioBundle/Controller/SoftwareController.php b/src/Cacic/RelatorioBundle/Controller/SoftwareController.php index 57c87c5..c9f3cbc 100644 --- a/src/Cacic/RelatorioBundle/Controller/SoftwareController.php +++ b/src/Cacic/RelatorioBundle/Controller/SoftwareController.php @@ -41,15 +41,23 @@ class SoftwareController extends Controller $dados = $this->getDoctrine() ->getRepository('CacicCommonBundle:ComputadorColeta') ->gerarRelatorioSoftwaresInventariados( $request->get('rel_filtro_software') ); + + $TotalnumComp = 0; + + foreach ($dados as $cont ){ + $TotalnumComp += $cont['numComp']; + } return $this->render( 'CacicRelatorioBundle:Software:rel_inventariados.html.twig', array( 'idioma'=>$locale, - 'dados' => $dados - ) + 'dados' => $dados, + 'totalnumcomp' => $TotalnumComp + ) ); } + public function listarAction( Request $request, $idSoftware ) { $locale = $request->getLocale(); -- libgit2 0.21.2