Esempio n. 1
0
 public function contaCelularAdminAction()
 {
     try {
         $this->view->pesquisa = '';
         if ($this->request->isPost()) {
             $linhas = $this->request->getPost('linhas', 'string');
             $mes = str_replace('20', '', $this->request->getPost('mes', 'string'));
             $this->view->extratos = Statement::find("operLd IS NOT NULL AND numAcs = '{$linhas}' AND mes = '{$mes}'");
             $this->view->totais = Statement::find("operLd IS NULL AND numAcs = '{$linhas}' AND mes = '{$mes}'");
             $statement = new Statement();
             $this->view->totalLinha = $statement->getTotal($linhas, $mes);
             $this->view->pesquisa = $linhas . ' | ' . $this->request->getPost('mes', 'string');
             $this->view->export = true;
         }
         $cellPhoneLine = CellPhoneLine::find(['order' => 'linha']);
         $linhas = [];
         foreach ($cellPhoneLine as $value) {
             $linhas[$value->linha] = $value->linha;
         }
         $this->view->linhas = $linhas;
     } catch (\Exception $e) {
         $this->flash->error($e->getMessage());
     }
 }