Commit 8ca7aa4e203ed07d84845899e5adf2c890a01ed2
1 parent
7843a2e3
Exists in
master
and in
1 other branch
correção de rotas e controlles
Showing
1 changed file
with
5 additions
and
6 deletions
Show diff stats
src/Cacic/RelatorioBundle/Controller/FaturamentoController.php
| ... | ... | @@ -54,7 +54,7 @@ |
| 54 | 54 | |
| 55 | 55 | foreach ($logs as $cont ){ |
| 56 | 56 | $TotalnumComp += $cont['numComp']; |
| 57 | - } | |
| 57 | + } | |
| 58 | 58 | |
| 59 | 59 | } |
| 60 | 60 | |
| ... | ... | @@ -63,6 +63,7 @@ |
| 63 | 63 | 'idioma'=> $locale, |
| 64 | 64 | 'form' => $form->createView(), |
| 65 | 65 | 'data' =>$data, |
| 66 | + 'filtroLocais' => $filtroLocais, | |
| 66 | 67 | 'logs' => ( isset( $logs ) ? $logs : null ), |
| 67 | 68 | 'totalnumcomp' => $TotalnumComp |
| 68 | 69 | ) |
| ... | ... | @@ -72,7 +73,6 @@ |
| 72 | 73 | //botão csv de todas faturamento |
| 73 | 74 | public function faturamentoCsvAction(Request $request) |
| 74 | 75 | { |
| 75 | - $em = $this->getDoctrine()->getManager(); | |
| 76 | 76 | |
| 77 | 77 | $form = $this->createForm( new LogPesquisaType() ); |
| 78 | 78 | |
| ... | ... | @@ -80,11 +80,11 @@ |
| 80 | 80 | $data = $form->getData(); |
| 81 | 81 | $filtroLocais = array(); // Inicializa array com locais a pesquisar |
| 82 | 82 | foreach ( $data['idLocal'] as $locais ) { |
| 83 | - array_push( $filtroLocais, $locais->getIdLocal() ); | |
| 83 | + array_push( $filtroLocais, $locais->getIdLocal() ); | |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | - $printers = $em->getRepository( 'CacicCommonBundle:LogAcesso') | |
| 87 | - ->faturamentoCsv( $data['dtAcaoInicio'], $data['dtAcaoFim'], $filtroLocais); | |
| 86 | + $printers = $this->getDoctrine()->getRepository( 'CacicCommonBundle:LogAcesso') | |
| 87 | + ->faturamentoCsv( $data['dtAcaoInicio'], $data['dtAcaoFim'], $filtroLocais); | |
| 88 | 88 | |
| 89 | 89 | // Gera CSV |
| 90 | 90 | $reader = new ArrayReader($printers); |
| ... | ... | @@ -120,7 +120,6 @@ |
| 120 | 120 | $dataInicio = $request->get('dtAcaoInicio'); |
| 121 | 121 | $dataFim = $request->get('dtAcaoFim'); |
| 122 | 122 | |
| 123 | - | |
| 124 | 123 | $locale = $request->getLocale(); |
| 125 | 124 | $dados = $this->getDoctrine() |
| 126 | 125 | ->getRepository('CacicCommonBundle:LogAcesso') | ... | ... |