public function expiredStockPrintAction() { $this->_helper->layout->setLayout('print'); $expired = ''; $ccbreak = ''; $adjustment_type = $this->_request->getParam('adjustment_type', 9); $stock_master = new Model_StockMaster(); $stock_master->form_values = array('date_from' => $this->_request->getParam('date_from', '11/03/2015'), 'date_to' => $this->_request->getParam('date_to', date("d/m/Y")), 'adjustment_type' => $adjustment_type); switch ($adjustment_type) { case 9: $expired = $stock_master->expiredStockReport(); break; case 6: $ccbreak = $stock_master->expiredStockReport(); break; case 'all': $stock_master->form_values['adjustment_type'] = 9; $expired = $stock_master->expiredStockReport(); $stock_master->form_values['adjustment_type'] = 6; $ccbreak = $stock_master->expiredStockReport(); break; } $this->view->expired = $expired; $this->view->ccbreak = $ccbreak; $this->view->warehousename = $this->_identity->getWarehouseName(); $this->view->date_from = App_Controller_Functions::dateToMonthYear(App_Controller_Functions::dateToDbFormat($stock_master->form_values['date_from']), "M, Y"); $this->view->date_to = App_Controller_Functions::dateToMonthYear(App_Controller_Functions::dateToDbFormat($stock_master->form_values['date_to']), "M, Y"); }