Ejemplo n.º 1
0
 public function indexAction()
 {
     try {
         $db = new Accounting_Model_DbTable_DbChartaccount();
         if ($this->getRequest()->isPost()) {
             $search = $this->getRequest()->getPost();
         } else {
             $search = array('adv_search' => '', 'status' => -1);
         }
         $rs_rows = $db->getAllchartaccounts($search);
         $glClass = new Application_Model_GlobalClass();
         $rs_rows = $glClass->getImgActive($rs_rows, BASE_URL, true);
         $list = new Application_Form_Frmtable();
         $collumns = array("ACCOUNT_TYPE", "PARENT", "CATEGORY", "ACCOUNT_CODE", "ACCOUNT_NAME_EN", "ACCOUNT_NAME_KH", "STATUS");
         $link = array('module' => 'accounting', 'controller' => 'chartaccount', 'action' => 'edit');
         $this->view->list = $list->getCheckList(0, $collumns, $rs_rows, array('account_name_en' => $link));
     } catch (Exception $e) {
         Application_Form_FrmMessage::message("Application Error");
         Application_Model_DbTable_DbUserLog::writeMessageError($e->getMessage());
     }
     $fm = new Application_Form_FrmAdvanceSearch();
     $frm = $fm->AdvanceSearch();
     Application_Model_Decorator::removeAllDecorator($frm);
     $this->view->frm_search = $frm;
     $fms = new Accounting_Form_FrmChartaccount();
     $frms = $fms->FrmChartaccount();
     Application_Model_Decorator::removeAllDecorator($frms);
     $this->view->frm_chartaccount = $frms;
 }