public function printaction() { /* * If we're printing via the printAction function and calling 'print_customer_statement' function * then set the email and filename * * Otherwise we're probably printing via the */ if (strtolower($this->_data['printaction']) == 'print_customer_statement') { if ($this->loadData()) { $customer = $this->_uses[$this->modeltype]; $this->view->set('email', $customer->email_statement()); } $this->_data['filename'] = 'Statement'; } parent::printAction(); }