/** * * @return array */ public function balanceReport() { $total = 0; $mapperSmsCredit = new Admin_Model_Mapper_SmsCredit(); $balanceRows = $mapperSmsCredit->getBalance(); foreach ($balanceRows as $row) { $total += $row->balance; } return array('rows' => $balanceRows, 'total' => $total); }
/** * */ public function balanceAction() { $this->_helper->viewRenderer->setRender('balance-rows'); $this->_helper->layout()->disableLayout(); $this->view->rows = $this->_mapper->getBalance(); }