public function indexAction(){ try{ $db = new Loan_Model_DbTable_DbLoanIL(); if($this->getRequest()->isPost()){ $search=$this->getRequest()->getPost(); } else{ $search = array( 'client_id' => -1, 'status' => -1, 'from_date' =>date('Y-m-d'), 'to_date' => date('Y-m-d'), ); } $rs_rows= $db->getAllIndividuleLoan($search); $glClass = new Application_Model_GlobalClass(); $rs_rows = $glClass->getImgActive($rs_rows, BASE_URL, true); $list = new Application_Form_Frmtable(); $collumns = array("CLIENT_EN","CLIENT_KH","RELEASE_AMOUNT","INTEREST_RATE","METHOD","TIME_COLLECTION","ZONE","CO", "By","status"); $link=array( 'module'=>'group','controller'=>'Client','action'=>'edit', ); $this->view->list=$list->getCheckList(0, $collumns, $rs_rows,array('client_number'=>$link,'name_kh'=>$link,'name_en'=>$link)); }catch (Exception $e){ Application_Form_FrmMessage::message("Application Error"); echo $e->getMessage(); Application_Model_DbTable_DbUserLog::writeMessageError($e->getMessage()); } $frm = new Application_Form_FrmAdvanceSearch(); $frm = $frm->AdvanceSearch(); Application_Model_Decorator::removeAllDecorator($frm); $this->view->frm_search = $frm; }
public function indexAction(){ try{ $db = new Loan_Model_DbTable_DbLoanIL(); if($this->getRequest()->isPost()){ $search=$this->getRequest()->getPost(); } else{ $search = array( 'client_id' => -1, 'status' => -1, 'from_date' =>date('Y-m-d'), 'to_date' => date('Y-m-d'), ); } $rs_rows= $db->getAllIndividuleLoan($search); // print_r($rs_rows); // foreach ($rs_rows as $key =>$rs){ // // $result[$key]=array( // // 'client_id'=>$rs['client_id'], // // 'client_number'=>$rs['client_number'], // // 'name_kh'=>$rs['name_kh'], // // 'name_en'=>$rs['name_en'], // // 'sex'=>$this->sex[$rs['sex']], // // 'phone'=>$rs['phone'], // // 'house'=>$rs['house'], // // 'street'=>$rs['street'], // // 'village_name'=>$rs['village_name'], // // 'spouse_name'=>$rs['spouse_name'], // // 'user_name'=>$rs['user_name'], // // 'status'=>$rs['status'], // // ); // } $glClass = new Application_Model_GlobalClass(); $rs_rows = $glClass->getImgActive($rs_rows, BASE_URL, true); $list = new Application_Form_Frmtable(); $collumns = array("Client Name","Client NameKh","Release Amount","Interest Rate","Method","Time Collect","Zone","CO", "By","status"); $link=array( 'module'=>'group','controller'=>'Client','action'=>'edit', ); $this->view->list=$list->getCheckList(0, $collumns, $rs_rows,array('client_number'=>$link,'name_kh'=>$link,'name_en'=>$link)); }catch (Exception $e){ Application_Form_FrmMessage::message("Application Error"); echo $e->getMessage(); Application_Model_DbTable_DbUserLog::writeMessageError($e->getMessage()); } $frm = new Application_Form_FrmAdvanceSearch(); $frm = $frm->AdvanceSearch(); Application_Model_Decorator::removeAllDecorator($frm); $this->view->frm_search = $frm; }
public function indexAction(){ try{ if($this->getRequest()->isPost()){ $search = $this->getRequest()->getPost(); }else{ $search = array( 'txt_search'=>'', 'customer_code'=> -1, 'repayment_method' => -1, 'branch_id' => -1, 'co_id' => -1, 'status' => -1, 'currency_type'=>-1, 'pay_every'=>-1, 'start_date'=> date('Y-m-01'), 'end_date'=>date('Y-m-d'), ); } // print_r($search); $db = new Loan_Model_DbTable_DbLoanIL(); $rs_rows= $db->getAllIndividuleLoan($search,1); $glClass = new Application_Model_GlobalClass(); $rs_rows = $glClass->getImgActive($rs_rows, BASE_URL, true); $list = new Application_Form_Frmtable(); $collumns = array("LOAN_NO","CUSTOMER_NAME","COMUNE_NAME_EN","LOAN_AMOUNT","INTEREST_RATE","REPAYMENT_TYPE","TERM_BORROW","ZONE_NAME","CO_NAME", "BRANCH_NAME","STATUS"); $link=array( 'module'=>'loan','controller'=>'repaymentschedule','action'=>'view', ); $link_info=array('module'=>'loan','controller'=>'repaymentschedule','action'=>'edit',); $this->view->list=$list->getCheckList(0, $collumns, $rs_rows,array('loan_number'=>$link,'payment_method'=>$link_info,'client_name_kh'=>$link_info,'client_name_en'=>$link_info,'total_capital'=>$link_info),0); }catch (Exception $e){ Application_Form_FrmMessage::message("Application Error"); Application_Model_DbTable_DbUserLog::writeMessageError($e->getMessage()); } $frm = new Loan_Form_FrmSearchLoan(); $frm = $frm->AdvanceSearch(); Application_Model_Decorator::removeAllDecorator($frm); $this->view->frm_search = $frm; }