public function indexAction() { try { $db = new Partner_Model_DbTable_DbWithdraw(); if ($this->getRequest()->isPost()) { $search = $this->getRequest()->getPost(); //print_r($search);exit(); } else { $search = array('adv_search' => '', 'status_search' => -1); } $rows = $db->getAllwithdraw($search); $list = new Application_Form_Frmtable(); $collumns = array("លេខដៃគូ", "ថ្ងៃ", "សម្គាល់", "ប្រាក់ជាដុល្លា", "ប្រាក់ជាបាត", "ប្រាក់ជារៀល", "ប្រាក់ជាដុល្លា(-)", "ប្រាក់ជាបាត(-)", "ប្រាក់ជារៀល(-)"); $link = array('module' => 'partner', 'controller' => 'withdraw', 'action' => 'edit'); $this->view->list = $list->getCheckList(0, $collumns, $rows, array('partner_id' => $link, 'date' => $link, 'note' => $link)); } catch (Exception $e) { Application_Form_FrmMessage::message("Application Error"); echo $e->getMessage(); //Application_Model_DbTable_DbUserLog::writeMessageError($e->getMessage()); } $pructis = new Partner_Form_FrmPartner(); $frm = $pructis->addPartner(); Application_Model_Decorator::removeAllDecorator($frm); $form = $this->view->frm_partner = $frm; $with_draw = new Partner_Form_FrmWithdraw(); $frm = $with_draw->dakMoney(); Application_Model_Decorator::removeAllDecorator($frm); $this->view->frm = $frm; }
public function indexAction() { try { $db = new Keeping_Model_DbTable_DbCustomer(); if ($this->getRequest()->isPost()) { $formdata = $this->getRequest()->getPost(); $search = array('adv_search' => $formdata['adv_search'], 'province_id' => $formdata['province_name'], 'comm_id' => $formdata['commune'], 'district_id' => $formdata['district'], 'village' => $formdata['village'], 'status' => $formdata['status_search'], 'main_branch' => $formdata['main_branch'], 'start_date' => $formdata['start_date'], 'end_date' => $formdata['end_date']); } else { $search = array('adv_search' => '', 'status' => -1, 'province_id' => -1, 'district_id' => '', 'comm_id' => '', 'village' => '', 'main_branch' => '', 'start_date' => date('Y-m-01'), 'end_date' => date('Y-m-d')); //print_r($search);exit(); } $rs_rows = $db->getAllPartner($search); // print_r($rs_rows);exit(); $glClass = new Application_Model_GlobalClass(); $rs_rows = $glClass->getImgActive($rs_rows, BASE_URL, true, null); $list = new Application_Form_Frmtable(); $collumns = array("ដៃគូមេ", "ឈ្មោះអ្នកគ្រប់គ្រង", "ឈ្មោះដៃគូរសហការណ៏", "លេខគណនេយ្យ", "លេខអត្តសញ្ញាណប័ណ្ណ", "ខេត្ត/ក្រុង", "លេខទូរស័ព្ទ ", "លេខទូរស័ព្ទដៃ", "ប្រាក់រៀល", "ប្រាក់ដុល្លា", "ប្រាក់បាត", "ថ្ងៃ", "STATUS"); $link = array('module' => 'Keeping', 'controller' => 'customer', 'action' => 'edit'); $this->view->list = $list->getCheckList(0, $collumns, $rs_rows, array('main_branch' => $link, 'nation_id' => $link, 'account_no' => $link, 'partner_name' => $link, 'partner_brand' => $link, 'name' => $link, 'address' => $link)); } catch (Exception $e) { Application_Form_FrmMessage::message("Application Error"); Application_Model_DbTable_DbUserLog::writeMessageError($e->getMessage()); } $pructis = new Partner_Form_FrmPartner(); $frm = $pructis->addPartner(); Application_Model_Decorator::removeAllDecorator($frm); $form = $this->view->frm_partner = $frm; //echo $form;exit(); $this->view->result = $search; $db = new Application_Model_DbTable_DbGlobal(); $this->view->district = $db->getAllDistricts(); $this->view->commune_name = $db->getCommune(); $this->view->village_name = $db->getVillage(); }
public function indexAction() { try { $db = new Partner_Model_DbTable_DbDeposite(); if ($this->getRequest()->isPost()) { $search = $this->getRequest()->getPost(); // print_r($search);exit(); } else { $search = array('adv_search' => '', 'status_search' => -1, 'start_date' => date('Y-m-01'), 'end_date' => date('Y-m-d')); } $rows = $db->getAllDeposite($search); // print_r($rows);exit(); $arr = array(); foreach ($rows as $index => $rs) { $arr[$index] = array('id' => $rs['id'], 'invoice' => $rs['invoice'], 'partner_name' => $rs['partner_name'], 'date' => $rs['date'], 'note' => $rs['note'], 'amount_dollar' => 0, 'amount_riel' => 0, 'amount_bath' => 0, 'status' => $rs['status']); $rs_detail = $db->getGroupDepositeDetail($rs['id']); foreach ($rs_detail as $key => $r) { if ($r['currency_type'] == 3) { $arr[$index]['amount_riel'] = $r['amount']; } elseif ($r['currency_type'] == 1) { $arr[$index]['amount_dollar'] = $r['amount']; } elseif ($r['currency_type'] == 2) { $arr[$index]['amount_bath'] = $r['amount']; } } } $glClass = new Application_Model_GlobalClass(); $arr = $glClass->getImgActive($arr, BASE_URL, true, null); $list = new Application_Form_Frmtable(); $collumns = array("លេខវិកាប័ត្ត", "ឈ្មោះដៃគូ", "ថ្ងៃ", "សម្គាល់", "ចំនួនប្រាក់ដុល្លា", "ចំនួនប្រាក់រៀល", "ចំនួនប្រាក់បាត", "status"); $link = array('module' => 'partner', 'controller' => 'deposite', 'action' => 'edit'); $this->view->list = $list->getCheckList(0, $collumns, $arr, array('partner_id' => $link, 'invoice' => $link, 'date' => $link, 'note' => $link)); } catch (Exception $e) { Application_Form_FrmMessage::message("Application Error"); echo $e->getMessage(); //Application_Model_DbTable_DbUserLog::writeMessageError($e->getMessage()); } $pructis = new Partner_Form_FrmPartner(); $frm = $pructis->addPartner(); Application_Model_Decorator::removeAllDecorator($frm); $form = $this->view->frm_partner = $frm; $pructis = new Partner_Form_FrmDeposite(); $frm_de = $pructis->partnerinformation(); Application_Model_Decorator::removeAllDecorator($frm_de); $this->view->frm_deposite = $frm_de; }
public function editAction() { if ($this->getRequest()->isPost()) { $data = $this->getRequest()->getPost(); $db_partner = new Partner_Model_DbTable_DbPartner(); try { if ($this->getRequest()->getParam("btn_save_close")) { //print_r($data);exit(); $db = $db_partner->getupdatePartner($data); Application_Form_FrmMessage::Sucessfull('ការបញ្ចូលជោគជ័យ', '/partner/'); } } catch (Exception $e) { echo $e->getMessage(); $this->view->msg = 'ការបញ្ចូលមិនជោគជ័យ'; } } $db_partner = new Partner_Model_DbTable_DbPartner(); $id = $this->getRequest()->getParam('id'); $row = $db_partner->getPartnerById($id); $this->view->row = $row; $this->view->photo = $row['photo']; $pructis = new Partner_Form_FrmPartner(); $frm = $pructis->addPartner($row); Application_Model_Decorator::removeAllDecorator($frm); $form = $this->view->frm = $frm; $db = new Application_Model_DbTable_DbGlobal(); $this->view->district = $db->getAllDistricts(); $this->view->commune_name = $db->getCommune(); $this->view->village_name = $db->getVillage(); }