Esempio n. 1
0
 public function indexAction()
 {
     $toolbar = new Statistics_Form_Toolbar();
     $options = $this->_helper->Options->getOptions($toolbar, $this->_user['clientid']);
     $params = $this->_helper->Params->getParams($toolbar, $options);
     $charts = new Statistics_Model_Charts();
     $charts->createCharts(13, 500, 300, $this->view->translate('STATISTICS_UNCATEGORIZED'), $params, $options);
     $quotesDb = new Sales_Model_DbTable_Quote();
     $quotes = $quotesDb->fetchAll($quotesDb->select()->where('quoteid = ?', 0)->order('id desc')->limit(5));
     $this->view->quotes = $quotes;
     $salesordersDb = new Sales_Model_DbTable_Salesorder();
     $salesorders = $salesordersDb->fetchAll($salesordersDb->select()->where('salesorderid = ?', 0)->order('id desc')->limit(5));
     $this->view->salesorders = $salesorders;
     $invoicesDb = new Sales_Model_DbTable_Invoice();
     $invoices = $invoicesDb->fetchAll($invoicesDb->select()->where('invoiceid = ?', 0)->order('id desc')->limit(5));
     $this->view->invoices = $invoices;
     $quoterequestsDb = new Purchases_Model_DbTable_Quoterequest();
     $quoterequests = $quoterequestsDb->fetchAll($quoterequestsDb->select()->where('quoterequestid = ?', 0)->order('id desc')->limit(5));
     $this->view->quoterequests = $quoterequests;
     $purchaseordersDb = new Purchases_Model_DbTable_Purchaseorder();
     $purchaseorders = $purchaseordersDb->fetchAll($purchaseordersDb->select()->where('purchaseorderid = ?', 0)->order('id desc')->limit(5));
     $this->view->purchaseorders = $purchaseorders;
     $this->view->options = $options;
     $this->view->toolbar = new Application_Form_Toolbar();
     $this->view->messages = $this->_flashMessenger->getMessages();
 }
Esempio n. 2
0
 public function searchAction()
 {
     $this->_helper->viewRenderer->setRender('index');
     $this->_helper->getHelper('layout')->disableLayout();
     $lenght = $this->_getParam('lenght', 25);
     $toolbar = new Statistics_Form_Toolbar();
     $options = $this->_helper->Options->getOptions($toolbar, $this->_user['clientid']);
     $params = $this->_helper->Params->getParams($toolbar, $options);
     $chart = new Statistics_Model_Charts();
     $chart->createCharts($lenght, 1000, 400, $this->view->translate("STATISTICS_UNCATEGORIZED"), $params, $options);
     $this->view->lenght = $lenght;
     $this->view->options = $options;
     $this->view->toolbar = $toolbar;
     $this->view->messages = $this->_flashMessenger->getMessages();
 }