public function FrmSetServicePrice($data = null)
 {
     $_db = new Application_Model_DbTable_DbGlobal();
     $_year = $this->_year;
     $_session = $this->_session;
     $_batch = new Zend_Dojo_Form_Element_NumberTextBox("batch");
     $_batch->setAttribs(array('dojoType' => $this->t_num, 'required' => 'true', 'class' => 'fullside'));
     // 		$this->_year->setAttribs(array(
     // 				'data-dojo-Type'=>$this->tvalidate,
     // 				'data-dojo-props'=>"regExp:'[0-5]{1}',
     // 				'required':true,'class':'fullside',
     // 				'invalidMessage':'អាចបញ្ជូលពី 1 ដល់  5'"));
     $_degree = new Zend_Dojo_Form_Element_FilteringSelect('degree');
     $_degree->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'Onchange' => 'CheckDegree()'));
     $arr_opt = $_db->getAllDegree();
     $_degree->setMultiOptions($arr_opt);
     $_remark = new Zend_Dojo_Form_Element_TextBox('remark');
     $_remark->setAttribs(array('dojoType' => $this->text, 'class' => 'fullside'));
     $rows = $_db->getAllFecultyName();
     array_unshift($rows, array('dept_id' => -1, 'en_name' => "Add New"));
     $opt = "";
     if (!empty($rows)) {
         foreach ($rows as $row) {
             $opt[$row['dept_id']] = $row['en_name'];
         }
     }
     $_faculty = new Zend_Dojo_Form_Element_FilteringSelect("faculty");
     $_faculty->setMultiOptions($opt);
     $_faculty->setAttribs(array('dojoType' => $this->filter, 'required' => 'true', 'class' => 'fullside', 'onchange' => 'showPopupDept()'));
     $_term = new Zend_Dojo_Form_Element_FilteringSelect("payment_term");
     $opt_term = $_db->getAllPaymentTerm();
     $_term->setMultiOptions($opt_term);
     $_term->setAttribs(array('dojoType' => $this->filter, 'required' => 'true', 'class' => 'fullside'));
     $_create_date = new Zend_Dojo_Form_Element_DateTextBox("create_date");
     $_create_date->setAttribs(array('dojoType' => $this->date, 'required' => 'true', 'class' => 'fullside'));
     $_create_date->setValue(date("Y-m-d"));
     $_rank = new Zend_Dojo_Form_Element_FilteringSelect("rank");
     $opt_rank = $_db->getAllMention();
     $_rank->setMultiOptions($opt_rank);
     $_rank->setAttribs(array('dojoType' => $this->filter, 'required' => 'true', 'class' => 'fullside'));
     $this->addElements(array($_degree, $_faculty, $_batch, $_year, $_session, $_term, $_remark, $_rank, $_create_date));
     return $this;
 }
Beispiel #2
0
 public function getAllMetionOption()
 {
     $_db = new Application_Model_DbTable_DbGlobal();
     $rows = $_db->getAllMention();
     $option = '';
     if (!empty($rows)) {
         foreach ($rows as $key => $value) {
             $option .= '<option value="' . $key . '" >' . htmlspecialchars($value, ENT_QUOTES) . '</option>';
         }
     }
     return $option;
 }
Beispiel #3
0
 public function frmSearchTutionFee($_data = null)
 {
     $request = Zend_Controller_Front::getInstance()->getRequest();
     $_title = new Zend_Dojo_Form_Element_TextBox('fee_code');
     $_title->setAttribs(array('dojoType' => $this->text, 'placeholder' => $this->tr->translate("SEARCH_BY_CODE")));
     $_title->setValue($request->getParam('title'));
     $_batch = new Zend_Dojo_Form_Element_TextBox('batch');
     $_batch->setAttribs(array('dojoType' => $this->text, 'placeholder' => $this->tr->translate("SEARCH_BY_BATCH")));
     $_batch->setValue($request->getParam('title'));
     $_status = new Zend_Dojo_Form_Element_FilteringSelect('status_search');
     $_status->setAttribs(array('dojoType' => $this->filter));
     $_status_opt = array(-1 => $this->tr->translate("ALL_STATUS"), 1 => $this->tr->translate("ACTIVE"), 0 => $this->tr->translate("DACTIVE"));
     $_status->setMultiOptions($_status_opt);
     $_status->setValue($request->getParam("status_search"));
     $db = new Application_Model_DbTable_DbGlobal();
     $rows = $db->getAllFecultyName();
     $opt = array(-1 => $this->tr->translate("CHOOSE"));
     if (!empty($rows)) {
         foreach ($rows as $row) {
             $opt[$row['dept_id']] = $row['en_name'];
         }
     }
     $_faculty = new Zend_Dojo_Form_Element_FilteringSelect('faculty');
     $_faculty->setAttribs(array('dojoType' => $this->filter));
     $_faculty->setMultiOptions($opt);
     $_faculty->setValue($request->getParam("faculty"));
     $row = $db->getAllDegree();
     //$row=array(-1=>$this->tr->translate("CHOOSE"));
     $_degree = new Zend_Dojo_Form_Element_FilteringSelect('degree');
     $_degree->setAttribs(array('dojoType' => $this->filter));
     $_degree->setMultiOptions($row);
     $row = $db->getAllMention();
     array_unshift($row, array(-1 => $this->tr->translate("CHOOSE")));
     $_metion = new Zend_Dojo_Form_Element_FilteringSelect('metion');
     $_metion->setAttribs(array('dojoType' => $this->filter));
     $_metion->setMultiOptions($row);
     $this->addElements(array($_degree, $_batch, $_faculty, $_title, $_status, $_metion));
     if (!empty($_data)) {
     }
     return $this;
 }
Beispiel #4
0
 public function indexAction()
 {
     try {
         if ($this->getRequest()->isPost()) {
             $_data = $this->getRequest()->getPost();
             $search = array('title' => $session_servicetype->txtsearch, 'txtsearch' => $_data['title'], 'status' => $_data['status_search'], 'type' => $_data['type']);
             $limit = $session_servicetype->limit;
         } else {
             $search = '';
         }
         $db = new Accounting_Model_DbTable_DbTuitionFee();
         $service = $db->getAllTuitionFee($search);
         $model = new Application_Model_DbTable_DbGlobal();
         $row = 0;
         $indexterm = 1;
         $key = 0;
         if (!empty($service)) {
             foreach ($service as $i => $rs) {
                 $rows = $db->getFeebyOther($rs['id']);
                 $fee_row = 1;
                 if (!empty($rows)) {
                     foreach ($rows as $payment_tran) {
                         if ($payment_tran['payment_type'] == 1) {
                             $rs_rows[$key] = $this->headAddRecordTuitionFee($rs, $key);
                             $term = $model->getAllPaymentTerm($fee_row);
                             $rs_rows[$key]['quarter'] = $payment_tran['tuition_fee'];
                             $key_old = $key;
                             $key++;
                         } elseif ($payment_tran['payment_type'] == 2) {
                             $term = $model->getAllPaymentTerm($payment_tran['payment_type']);
                             $rs_rows[$key_old]['semester'] = $payment_tran['tuition_fee'];
                         } elseif ($payment_tran['payment_type'] == 3) {
                             $term = $model->getAllPaymentTerm($payment_tran['payment_type']);
                             $rs_rows[$key_old]['year'] = $payment_tran['tuition_fee'];
                         } else {
                             $term = $model->getAllPaymentTerm($payment_tran['payment_type']);
                             $rs_rows[$key_old]['full_fee'] = $payment_tran['tuition_fee'];
                         }
                         if ($rs['degree_type'] == 1) {
                             $rs_rows[$key_old]['faculty_name'] = Application_Model_DbTable_DbGlobal::getAllMention($payment_tran['metion']);
                         } else {
                             $r_facu = $model->getDeptById($payment_tran['metion']);
                             $rs_rows[$key_old]['faculty_name'] = $r_facu['en_name'];
                         }
                     }
                 }
             }
         } else {
             $result = Application_Model_DbTable_DbGlobal::getResultWarning();
         }
         $pay_term = $model->getAllPaymentTerm();
         $payment_term = '';
         foreach ($pay_term as $value) {
             $payment_term .= '"' . $value . '",';
         }
         $list = new Application_Form_Frmtable();
         $collumns = array("DEGREE", "FACULTY/METION", "BATCH", "STATUS", "QUARTER", "SEMESTER", "YEAR", "FULL_FEE");
         $link = array('module' => 'accounting', 'controller' => 'fee', 'action' => 'edit-feetuition');
         $urlEdit = BASE_URL . "/product/index/update";
         $this->view->list = $list->getCheckList(1, $collumns, $rs_rows, array('degree' => $link));
     } catch (Exception $e) {
         Application_Form_FrmMessage::message("APPLICATION_ERROR");
         Application_Model_DbTable_DbUserLog::writeMessageError($e->getMessage());
     }
     $frm = new Global_Form_FrmSearchMajor();
     $frm = $frm->frmSearchTutionFee();
     Application_Model_Decorator::removeAllDecorator($frm);
     $this->view->frm_search = $frm;
 }
Beispiel #5
0
 public function FrmRegistarWU($data = null)
 {
     $_degree = $this->_degree;
     $_khname = $this->_khname;
     $_enname = $this->_enname;
     $_phone = $this->_phone;
     $_batch = $this->_batch;
     $_year = $this->_year;
     $_session = $this->_session;
     $_dob = $this->_dob;
     $_pay_date = $this->_pay_date;
     $_remark = $this->_remark;
     $_dob->setValue(date("Y-m-d"));
     $_invoice_no = new Zend_Dojo_Form_Element_TextBox('reciept_no');
     $_invoice_no->setAttribs(array('dojoType' => $this->tvalidate, 'class' => 'fullside', 'required' => 'true', 'class' => 'fullside'));
     $rs_metion_opt = Application_Model_DbTable_DbGlobal::getAllMention();
     $metion = new Zend_Dojo_Form_Element_FilteringSelect('metion');
     $metion->setAttribs(array('dojoType' => $this->filter, 'class' => 'fullside', 'onchange' => 'getTuitionFee();'));
     $metion->setMultiOptions($rs_metion_opt);
     $_new_student = new Zend_Form_Element_Checkbox('is_new');
     $_new_student->setAttribs(array('dojoType' => "dijit.form.CheckBox", 'class' => 'fullside', 'Onchange' => "getNewStudent();"));
     $_is_hold = new Zend_Form_Element_Checkbox('is_hold');
     $_is_hold->setAttribs(array('dojoType' => "dijit.form.CheckBox", 'class' => 'fullside'));
     //$_is_hold->setValue(1);
     $_year_one = new Zend_Dojo_Form_Element_TextBox('is_year_one');
     $_year_one->setAttribs(array('dojoType' => "dijit.form.CheckBox", 'class' => 'fullside', 'Onchange' => "getNewStudent();"));
     $_studid = new Zend_Dojo_Form_Element_TextBox('stu_id');
     $_studid->setAttribs(array('dojoType' => $this->text, 'class' => 'fullside'));
     $_sex = new Zend_Dojo_Form_Element_FilteringSelect('sex');
     $_sex->setAttribs(array('dojoType' => $this->filter, 'class' => 'fullside'));
     $sex_opt = array(1 => $this->tr->translate("MALE"), 2 => $this->tr->translate("FEMALE"));
     $_sex->setMultiOptions($sex_opt);
     $_db = new Application_Model_DbTable_DbGlobal();
     $rows = $_db->getAllFecultyName();
     $opt = '';
     //array(-1=>$this->tr->translate("SELECT_DEPT"));
     if (!empty($rows)) {
         foreach ($rows as $row) {
             $opt[$row['dept_id']] = $row['en_name'];
         }
     }
     $_dept = new Zend_Dojo_Form_Element_FilteringSelect("dept");
     $_dept->setMultiOptions($opt);
     $_dept->setAttribs(array('dojoType' => $this->filter, 'required' => 'true', 'class' => 'fullside', 'onchange' => 'changeMajor();'));
     $opt_marjor = array(-1 => $this->tr->translate("SELECT_MAJOR"));
     $_major = new Zend_Dojo_Form_Element_FilteringSelect("major");
     $_major->setAttribs(array('dojoType' => $this->filter, 'required' => 'true', 'class' => 'fullside'));
     $_term = new Zend_Dojo_Form_Element_FilteringSelect("payment_term");
     $opt_term = $_db->getAllPaymentTerm();
     // 		  $opt_term = array(
     // 		  		1=>$this->tr->translate('QUARTER'),
     // 		  		2=>$this->tr->translate('SEMESTER'),
     // 		  		3=>$this->tr->translate('YEAR'),
     // 		  		4=>$this->tr->translate('OTHER')
     // 		  );
     $_term->setMultiOptions($opt_term);
     $_term->setAttribs(array('dojoType' => $this->filter, 'required' => 'true', 'class' => 'fullside', 'onchange' => 'getTuitionFee();'));
     $_fee = new Zend_Dojo_Form_Element_NumberTextBox('tuitionfee');
     $_fee->setAttribs(array('dojoType' => $this->t_num, 'required' => 'true', 'class' => 'fullside', 'onkeyup' => 'CheckAmount();'));
     $_disc = new Zend_Dojo_Form_Element_NumberTextBox('discount');
     $_disc->setAttribs(array('dojoType' => $this->text, 'class' => 'fullside', 'onkeyup' => 'CheckAmount();'));
     $_disc->setValue(0);
     $_paid = new Zend_Dojo_Form_Element_NumberTextBox('payment_paid');
     $_paid->setAttribs(array('dojoType' => $this->t_num, 'required' => 'true', 'class' => 'fullside'));
     $_paid_kh = new Zend_Dojo_Form_Element_Textarea('paid_kh');
     $_paid_kh->setAttribs(array('dojoType' => $this->text, 'class' => 'fullside'));
     $this->addElements(array($_year_one, $_new_student, $_invoice_no, $_pay_date, $_khname, $_enname, $_studid, $_sex, $_dob, $_degree, $metion, $_phone, $_dept, $_major, $_batch, $_year, $_session, $_term, $_fee, $_disc, $_paid, $_paid_kh, $_remark, $_is_hold));
     return $this;
 }