public function targetIssuancePrintAction() { $this->_helper->layout->setLayout("print"); $this->view->headTitle("Vaccine Balance"); //$res = $this->_request->getPost(); $stock_master = new Model_StockMaster(); $stock_master->form_values['month'] = $this->_request->m; $stock_master->form_values['year'] = $this->_request->y; $stock_master->form_values['warehouse_id'] = $this->_request->w; $result = $stock_master->targetIssuanceSearch(); $warehouses = new Model_Warehouses(); $issue_warehouse_name = $warehouses->getWarehouseNameByWarehouseId($this->_request->w); $this->view->i_warehousename = $issue_warehouse_name; $this->view->m = $this->_request->m; $this->view->y = $this->_request->y; // Logged in Warehouse $this->view->warehousename = $this->_identity->getWarehouseName(); $this->view->result = $result; }
public function getTempStock() { $str_sql = $this->_em->createQueryBuilder()->select('sm.transactionNumber AS transaction_number, sm.transactionReference AS transaction_reference, sm.transactionDate AS transaction_date, sm.pkId AS pk_id, ws.pkId AS from_warehouse_id, ws.warehouseName AS warehouse_name ')->from("StockMaster", "sm")->join("sm.fromWarehouse", "ws")->where("sm.createdBy = " . $this->_user_id)->andWhere("ws.status = 1"); if ($this->form_values['transaction_type_id'] == 1) { $str_sql->andWhere("sm.toWarehouse = " . $this->_identity->getWarehouseId()); } else { $str_sql->andWhere("sm.fromWarehouse = " . $this->_identity->getWarehouseId()); } $str_sql->andWhere("sm.transactionType = " . $this->form_values['transaction_type_id'])->andWhere("sm.draft = 1 "); //echo $str_sql->getQuery()->getSql(); //exit; $row = $str_sql->getQuery()->getResult(); if (!empty($row) && count($row) > 0) { $warehouses = new Model_Warehouses(); $arr_data['warehouse_name'] = $warehouses->getWarehouseNameByWarehouseId($row[0]['from_warehouse_id']); $arr_data['transaction_date'] = App_Controller_Functions::dateToUserFormat($row[0]['transaction_date']); $arr_data['transaction_number'] = $row[0]['transaction_number']; $arr_data['transaction_reference'] = $row[0]['transaction_reference']; $arr_data['stock_id'] = $row[0]['pk_id']; return $arr_data; } else { return false; } }
public function dsStockPlacementComparisonPrintAction() { $this->_helper->layout->setLayout('print'); $this->view->headTitle("Dry Store Stock Placement Comparison"); $this->view->print_title = "Dry Store Stock Placement Comparison"; $wh_id = $this->_request->getParam('id'); $stock_batch = new Model_StockBatch(); $stock_batch->form_values['wh_id'] = $wh_id; $batch_total = $stock_batch->dsBatchProductTotal(); $this->view->batch_total = $batch_total; $stakeholder_total = $stock_batch->dsStakeholderProductTotal(); $this->view->stakeholder_total = $stakeholder_total; $priority_total = $stock_batch->dsPlacementProductTotal(); $this->view->priority_total = $priority_total; $warehouse = new Model_Warehouses(); $wh_name = $warehouse->getWarehouseNameByWarehouseId($wh_id); $this->view->warehousename = $wh_name; $this->view->warehouseid = $wh_id; }
public function printStockReportAction() { $this->_helper->layout->setLayout('print'); $wh = new Model_Warehouses(); $stock_master = new Model_StockMaster(); $stock_master->form_values = $this->_request->getParams(); $this->view->headTitle("Stock Balance Report"); $this->view->print_title = "Stock Balance Report"; $this->view->month = $this->_request->getParam('month', date("m")); $this->view->year = $this->_request->getParam('year', date("Y")); $this->view->result = $stock_master->getStockReportByDate(); $this->view->username = $this->_identity->getUserName(); $this->view->warehousename = $wh->getWarehouseNameByWarehouseId($this->_request->getParam('warehouse')); }