Commit 8a41bd66a520adb193463510d189c1612213613d
1 parent
dd701f08
Exists in
master
and in
1 other branch
acrescentando total de máquinas no final do relatório
Showing
1 changed file
with
10 additions
and
2 deletions
Show diff stats
src/Cacic/RelatorioBundle/Controller/SoftwareController.php
| ... | ... | @@ -41,15 +41,23 @@ class SoftwareController extends Controller |
| 41 | 41 | $dados = $this->getDoctrine() |
| 42 | 42 | ->getRepository('CacicCommonBundle:ComputadorColeta') |
| 43 | 43 | ->gerarRelatorioSoftwaresInventariados( $request->get('rel_filtro_software') ); |
| 44 | + | |
| 45 | + $TotalnumComp = 0; | |
| 46 | + | |
| 47 | + foreach ($dados as $cont ){ | |
| 48 | + $TotalnumComp += $cont['numComp']; | |
| 49 | + } | |
| 44 | 50 | |
| 45 | 51 | return $this->render( |
| 46 | 52 | 'CacicRelatorioBundle:Software:rel_inventariados.html.twig', |
| 47 | 53 | array( |
| 48 | 54 | 'idioma'=>$locale, |
| 49 | - 'dados' => $dados | |
| 50 | - ) | |
| 55 | + 'dados' => $dados, | |
| 56 | + 'totalnumcomp' => $TotalnumComp | |
| 57 | + ) | |
| 51 | 58 | ); |
| 52 | 59 | } |
| 60 | + | |
| 53 | 61 | public function listarAction( Request $request, $idSoftware ) |
| 54 | 62 | { |
| 55 | 63 | $locale = $request->getLocale(); | ... | ... |