public function ajaxBatchDetailAction() { $this->_helper->layout->disableLayout(); if (isset($this->_request->id) && !empty($this->_request->id)) { $stock_batch = new Model_StockBatch(); $stock_batch->form_values['item_pack_size_id'] = $this->_request->id; $items = $this->_em->getRepository("ItemPackSizes")->find($this->_request->id); if ($items->getItemCategory()->getPkId() == 1 || $items->getItemCategory()->getPkId() == 4) { $result = $stock_batch->getBatchDetail(); } else { $result = $stock_batch->getNonVaccineBatchDetail(); } /* $running_doses = 0; $stacked_doses = 0; $finished_doses = 0; $total = 0; if (!empty($result)) { (int) $running_doses = $result[0]['RunningQty'] * $result[0]['description']; (int) $stacked_doses = $result[0]['StackedQty'] * $result[0]['description']; (int) $finished_doses = $result[0]['FinishedQty'] * $result[0]['description']; (int) $total = $running_doses + $stacked_doses + $finished_doses; } $data = array( 'running_doses' => $running_doses, 'stacked_doses' => $stacked_doses, 'finished_doses' => $finished_doses, 'total' => $total ); */ //$this->view->data = $data; $this->view->result = $result; } }