예제 #1
0
 public function addAction()
 {
     $fm = new Accounting_Form_FrmChartaccount();
     $frm = $fm->FrmChartaccount();
     Application_Model_Decorator::removeAllDecorator($frm);
     $this->view->frm_fixedasset = $frm;
 }
예제 #2
0
 public function editAction()
 {
     if ($this->getRequest()->isPost()) {
         $data = $this->getRequest()->getPost();
         $db = new Accounting_Model_DbTable_DbChartaccount();
         try {
             $db->updatchartaccount($data);
             Application_Form_FrmMessage::message('ការ​បញ្ចូល​​ជោគ​ជ័យ');
         } catch (Exception $e) {
             Application_Form_FrmMessage::message("INSERT_FAIL");
             $err = $e->getMessage();
             Application_Model_DbTable_DbUserLog::writeMessageError($err);
         }
     }
     $id = $this->getRequest()->getParam('id');
     $db = new Accounting_Model_DbTable_DbChartaccount();
     $row = $db->getechartaccountbyid($id);
     $fm = new Accounting_Form_FrmChartaccount();
     $frm = $fm->FrmChartaccount($row);
     Application_Model_Decorator::removeAllDecorator($frm);
     $this->view->frm_fixedasset = $frm;
 }
예제 #3
0
 public function indexAction()
 {
     try {
         $db = new Accounting_Model_DbTable_DbGeneraljurnal();
         if ($this->getRequest()->isPost()) {
             $search = $this->getRequest()->getPost();
         } else {
             $search = array('adv_search' => '', 'status' => -1);
         }
         $rs_rows = $db->getAllJurnalEntry($search);
         $list = new Application_Form_Frmtable();
         $collumns = array("BRANCH_NAME", "ENTRY_CODE", "INVOICE", "DEBIT", "CREDIT", "STATUS", "BY");
         $link = array('module' => 'accounting', 'controller' => 'generaljurnal', 'action' => 'edit');
         $this->view->list = $list->getCheckList(0, $collumns, $rs_rows, array('branch_name' => $link, 'receipt_number' => $link, 'journal_code' => $link, 'debit' => $link, 'credit' => $link));
     } catch (Exception $e) {
         Application_Form_FrmMessage::message("Application Error");
         Application_Model_DbTable_DbUserLog::writeMessageError($e->getMessage());
     }
     $fms = new Accounting_Form_FrmChartaccount();
     $frms = $fms->FrmChartaccount();
     Application_Model_Decorator::removeAllDecorator($frms);
     $this->view->frm_chartaccount = $frms;
 }