Ejemplo n.º 1
0
 public function addAction()
 {
     if ($this->getRequest()->isPost()) {
         $data = $this->getRequest()->getPost();
         $db = new Accounting_Model_DbTable_DbChartaccount();
         //print_r($db);exit();
         try {
             $db->addchartaccount($data);
             Application_Form_FrmMessage::message('ការ​បញ្ចូល​​ជោគ​ជ័យ');
         } catch (Exception $e) {
             Application_Form_FrmMessage::message("INSERT_FAIL");
             Application_Model_DbTable_DbUserLog::writeMessageError($e->getMessage());
         }
     }
     $fm = new Accounting_Form_FrmChartaccount();
     $frm = $fm->FrmChartaccount();
     Application_Model_Decorator::removeAllDecorator($frm);
     $this->view->frm_fixedasset = $frm;
 }
Ejemplo n.º 2
0
 public function addAction()
 {
     if ($this->getRequest()->isPost()) {
         $data = $this->getRequest()->getPost();
         $db = new Accounting_Model_DbTable_DbChartaccount();
         try {
             $db->addchartaccount($data);
             if (!empty($data['saveclose'])) {
                 Application_Form_FrmMessage::Sucessfull("INSERT_SUCCESS", "/accounting/chartaccount");
             } else {
                 Application_Form_FrmMessage::message("INSERT_SUCCESS");
             }
         } catch (Exception $e) {
             Application_Form_FrmMessage::message("INSERT_FAIL");
             Application_Model_DbTable_DbUserLog::writeMessageError($e->getMessage());
         }
     }
     $fm = new Accounting_Form_FrmChartaccount();
     $frm = $fm->FrmChartaccount();
     Application_Model_Decorator::removeAllDecorator($frm);
     $this->view->frm_fixedasset = $frm;
 }