public function __construct($options = null)
 {
     $oModelOrderStatus = new User_Model_OrderStatus();
     $aAllOrderStatus = $oModelOrderStatus->getAll();
     foreach ($aAllOrderStatus as $aValue) {
         $this->_aAllOrderStatus[$aValue["id"]] = $aValue["user_name"];
     }
     parent::__construct($options);
 }
Ejemplo n.º 2
0
 public function indexAction()
 {
     $oModelOrderStatus = new User_Model_OrderStatus();
     $oModelVOrderJournal = new User_Model_VOrderJournal();
     $oScannedFile = new User_Form_UploadScannedFile();
     $aAllStatuses = $oModelOrderStatus->getAll()->toArray();
     if (count($aAllStatuses)) {
         foreach ($aAllStatuses as $nKey => $aValue) {
             $aAllStatuses[$nKey]["count"] = $oModelVOrderJournal->getUserCount(null, $aValue["id"]);
         }
     }
     $this->view->oScannedFile = $oScannedFile;
     $this->view->aAllStatuses = $aAllStatuses;
 }
 public function gettabscountAction()
 {
     $this->_helper->viewRenderer->setNoRender();
     $this->_helper->getHelper("layout")->disableLayout();
     $aJson = null;
     $oModelOrderStatus = new User_Model_OrderStatus();
     $oModelVOrderJournal = new User_Model_VOrderJournal();
     if ($this->_request->isPost()) {
         $aAllStatuses = $oModelOrderStatus->getAll()->toArray();
         if (count($aAllStatuses)) {
             foreach ($aAllStatuses as $nKey => $aValue) {
                 $aAllStatuses[$nKey]["count"] = $oModelVOrderJournal->getUserCount(null, $aValue["id"]);
             }
             $aJson = $aAllStatuses;
         }
     }
     header("Content-type: application/json");
     echo Zend_Json::encode($aJson);
     exit;
 }
Ejemplo n.º 4
0
 public function indexAction()
 {
     $oXServer = new AppCms2_Controller_Plugin_XServer();
     //$oModelSybase = new Borrower_Model_Sybase();
     $oModelOrderStatus = new User_Model_OrderStatus();
     $oModelOrderJournal = new User_Model_OrderJournal();
     $oModelVOrderJournal = new Borrower_Model_VOrderJournal();
     $oModelOrderChangeLog = new User_Model_OrderChangeLog();
     $oModelOrderJournalOrderChangeLog = new User_Model_OrderJournalOrderChangeLog();
     $oSuccessSession = new Zend_Session_Namespace("success");
     $aData = null;
     $nItemHashGet = $this->_request->getParam("new");
     $nOrderJournalId = $this->_request->getParam("open");
     $nItemHashSession = $oSuccessSession->bIsNew;
     if (isset($nItemHashGet)) {
         $nItemHash = $nItemHashGet;
     } else {
         if (isset($nItemHashSession)) {
             $oSuccessSession->bIsNew = false;
             $nItemHash = $nItemHashSession;
         }
     }
     if ($oSuccessSession->bIsSave === true) {
         $oSuccessSession->bIsSave = false;
         $oSuccessSession->bIsNew = false;
         $oSuccessSession->nNewOrder = 0;
     }
     if (isset($nItemHash) && is_numeric($nItemHash)) {
         $aJournalSettings = $oXServer->getJournalSettings($nItemHash);
         if ($aJournalSettings) {
             $aData["user_id"] = $this->_nUserId;
             $aData["order_status_id"] = 1;
             $aData["item_id"] = $aJournalSettings["item#"];
             $aData["call_id"] = $aJournalSettings["call"];
             $aData["csa_call_id"] = $aJournalSettings["csa_call"];
             $aData["location"] = $aJournalSettings["location"];
             $aData["is_journal_collection"] = 1;
             $aData["collection"] = null;
             $aData["journal_title"] = $aJournalSettings["processed"];
             $nTime = time();
             $aData["created_date"] = $nTime;
             $aData["modified_date"] = $nTime;
             $nOrderJournalId = $oModelOrderJournal->saveNewOrder($aData);
             if ($nOrderJournalId) {
                 $oSuccessSession->bIsSave = true;
                 $oSuccessSession->bIsNew = false;
                 $oSuccessSession->nNewOrder = $nOrderJournalId;
                 $nOrderChangeLogId = $oModelOrderChangeLog->addRow(array("order_change_type_id" => 1, "user_id" => $this->_nUserId, "date" => $nTime));
                 $oModelOrderJournalOrderChangeLog->addRow(array("order_journal_id" => $nOrderJournalId, "order_change_log_id" => $nOrderChangeLogId));
             }
         }
     } else {
         if (isset($nOrderJournalId) && is_numeric($nOrderJournalId)) {
             $oSuccessSession->bIsSave = true;
             $oSuccessSession->bIsNew = false;
             $oSuccessSession->nNewOrder = $nOrderJournalId;
         }
     }
     $aAllStatuses = $oModelOrderStatus->getAll()->toArray();
     if (count($aAllStatuses)) {
         foreach ($aAllStatuses as $nKey => $aValue) {
             $aAllStatuses[$nKey]["count"] = $oModelVOrderJournal->getUserCount($this->_nUserId, $aValue["id"]);
         }
     }
     $this->view->aAllStatuses = $aAllStatuses;
 }