Ejemplo n.º 1
0
 public function vaccinePlacementReceiveAction()
 {
     $this->_helper->layout->setLayout('print');
     $var = $this->_request->grpBy;
     $this->view->val = $var;
     $stock_master = new Model_StockMaster();
     $stock_master->form_values['searchby'] = $this->_request->searchby;
     $stock_master->form_values['number'] = $this->_request->number;
     $stock_master->form_values['warehouses'] = $this->_request->warehouses;
     $stock_master->form_values['product'] = $this->_request->product;
     $stock_master->form_values['date_from'] = $this->_request->date_from;
     $stock_master->form_values['date_to'] = $this->_request->date_to;
     $data = $stock_master->getTempStockReceive();
     $this->view->result = $data;
     $this->view->result = $data;
     $this->view->username = $this->_identity->getUserName();
     $this->view->warehousename = $this->_identity->getWarehouseName();
     $this->view->params = $this->_request->getParams();
     if ($var == "prod") {
         $this->view->headTitle("Product wise Stock Receive Detail");
         $this->view->print_title = "Product wise Stock Receive Detail";
     } else {
         if ($var == "loc") {
             $this->view->headTitle("Location wise Stock Receive Detail");
             $this->view->print_title = "Location wise Stock Receive Detail";
         } else {
             $this->view->headTitle("Stock Receive Detail");
             $this->view->print_title = "Stock Receive Detail";
         }
     }
 }
Ejemplo n.º 2
0
 public function exportExcelReceiveAction()
 {
     $this->_helper->layout->disableLayout();
     $this->_helper->viewRenderer->setNoRender(TRUE);
     $export_array = array();
     $stock_master = new Model_StockMaster();
     $stock_master->form_values['searchby'] = $this->_request->searchby;
     $stock_master->form_values['number'] = $this->_request->number;
     $stock_master->form_values['warehouses'] = $this->_request->warehouses;
     $stock_master->form_values['product'] = $this->_request->product;
     $stock_master->form_values['date_from'] = $this->_request->date_from;
     $stock_master->form_values['date_to'] = $this->_request->date_to;
     $data = $stock_master->getTempStockReceive();
     array_push($export_array, array("Item Name", "Transaction Date", "Transaction Number", "Transaction Reference", "Supplier/Store", "Batch no.", "Expiry date", "Quantity", "Item Unit", "Doses per vial", "Total doses", "VVM Stage"));
     foreach ($data as $row) {
         array_push($export_array, array($row['itemName'], $row['transactionDate'], $row['transactionNumber'], $row['transactionReference'], $row['warehouseName'], $row['number'], $row['expiryDate'], $row['quantity'], $row['itemUnitName'], $row['description'], $row['quantity'] * $row['description'], $row['vvmStage']));
     }
     // generate file (constructor parameters are optional)
     $xls = new App_PhpExcel('UTF-8', false, 'Receive List');
     $xls->addArray($export_array);
     $xls->generateXML('receive-list');
 }