예제 #1
0
 public function indexAction()
 {
     try {
         $db = new Application_Model_DbTable_DbExchange();
         $rs_rows = $db->getAllExchangeList();
         //     		$glClass = new Application_Model_GlobalClass();
         //     		$rs_rows = $glClass->getImgActive($rs_rows, BASE_URL, true);
         $list = new Application_Form_Frmtable();
         $collumns = array("លេខវិក្ក័យប័ត្រ", "ថ្ងៃប្រតិបត្តិ", "ការប្តូរប្រាក់", "ចំនួនទឹកប្រាក់", "អត្រាប្តូរប្រាក់ ", "ចំនួនទឹកប្រាក់បានប្តូររួច", "ប្រាក់ទទួលបាន", "ប្រាក់អាប់", "ប្រភេទលុយបានប្ថូរ", "ប្រភេទលុយទទួលបាន", "ឈ្មោះបុគ្គលឹក");
         $link = array('module' => 'exchange', 'controller' => 'index', 'action' => 'edit');
         $this->view->list = $list->getCheckList(0, $collumns, $rs_rows, array('from_to' => $link, 'statusDate' => $link, 'fromAmount' => $link, '' => $link, 'recieptNo' => $link));
     } catch (Exception $e) {
         Application_Form_FrmMessage::message("Application Error");
         echo $e->getMessage();
         Application_Model_DbTable_DbUserLog::writeMessageError($e->getMessage());
     }
 }
예제 #2
0
 public function rptsummaryExchangeAction()
 {
     // Get Session User
     $user_id = -1;
     $from_date = date('Y-m-d');
     $to_date = date('Y-m-d');
     if ($this->getRequest()->isPost()) {
         $search = $this->getRequest()->getPost();
         $user_id = $search['user_id'];
         $from_date = $search['from_date'];
         $to_date = $search['to_date'];
     } else {
         $search = array('from_date' => $from_date, 'to_date' => $to_date, 'user_id' => -1);
     }
     $usr_mod = new Application_Model_DbTable_DbUsers();
     $this->view->users = $usr_mod->getUserListSelect();
     $this->view->user_id = $user_id;
     $this->view->from_date = $from_date;
     $this->view->to_date = $to_date;
     // For view
     $db = new Application_Model_DbTable_DbExchange();
     $rs = $db->getAllExchangeList($search);
     $this->view->rs_tran = $rs;
     $db_exc = new Application_Model_DbTable_DbExchange();
     $trans = $db_exc->getDataAll($user_id, $from_date, $to_date);
     if (empty($rs)) {
         $trans = array('err' => 1, 'msg' => 'មិន​ទាន់​មាន​ទន្និន័យ​នូវ​ឡើយ​ទេ!');
     }
     $this->view->tranlist = $trans;
 }