当前位置: 首页>>代码示例>>PHP>>正文


PHP Application_Model_DbTable_DbGlobal::getVewOptoinTypeByType方法代码示例

本文整理汇总了PHP中Application_Model_DbTable_DbGlobal::getVewOptoinTypeByType方法的典型用法代码示例。如果您正苦于以下问题:PHP Application_Model_DbTable_DbGlobal::getVewOptoinTypeByType方法的具体用法?PHP Application_Model_DbTable_DbGlobal::getVewOptoinTypeByType怎么用?PHP Application_Model_DbTable_DbGlobal::getVewOptoinTypeByType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Application_Model_DbTable_DbGlobal的用法示例。


在下文中一共展示了Application_Model_DbTable_DbGlobal::getVewOptoinTypeByType方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: FrmGeneraljurnal

 public function FrmGeneraljurnal($data = null)
 {
     $Brance = new Zend_Dojo_Form_Element_FilteringSelect('branch_id');
     $Brance->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'required' => true, 'onchange' => 'getJurnalcode();'));
     $db = new Application_Model_DbTable_DbGlobal();
     $rows = $db->getAllBranchName();
     $options = '';
     if (!empty($rows)) {
         foreach ($rows as $row) {
             $options[$row['br_id']] = $row['branch_namekh'];
         }
     }
     $rows = $db->getAllBranchName();
     $options = array('' => '---Select Branch---');
     if (!empty($rows)) {
         foreach ($rows as $row) {
             $options[$row['br_id']] = $row['branch_namekh'];
         }
     }
     $Brance->setMultiOptions($options);
     $_currency_type = new Zend_Dojo_Form_Element_FilteringSelect('currency_type');
     $_currency_type->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
     $opt = $db->getVewOptoinTypeByType(15, 1, 3, 1);
     $_currency_type->setMultiOptions($opt);
     $_currency_type->setValue(2);
     $parent = new Zend_Dojo_Form_Element_FilteringSelect('parent');
     $parent->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'required' => true, 'onchange' => 'getAllAccountNameByParents();'));
     $db = new Accounting_Model_DbTable_DbChartaccount();
     $option = $db->getAllchartaccount(3, 1);
     $parent->setMultiOptions($option);
     $Add_Date = new Zend_Dojo_Form_Element_DateTextBox('add_date');
     $Add_Date->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'class' => 'fullside', 'required' => true));
     $Add_Date->setValue(date('Y-m-d'));
     $Account_Number = new Zend_Dojo_Form_Element_TextBox('journal_code');
     $Account_Number->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'readOnly' => 'readOnly', 'required' => 'true'));
     $invoice = new Zend_Dojo_Form_Element_TextBox('invoice');
     $invoice->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $Note = new Zend_Dojo_Form_Element_TextBox('note');
     $Note->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $Debit = new Zend_Dojo_Form_Element_NumberTextBox('debit');
     $Debit->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => 1, 'readonly' => 'readonly'));
     // 		$Debit->setValue(0);
     $Credit = new Zend_Dojo_Form_Element_NumberTextBox('credit');
     $Credit->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => 1, 'readonly' => 'readonly'));
     $id = new Zend_Form_Element_Hidden('id');
     if ($data != null) {
         $id->setValue($data['id']);
         $Brance->setValue($data['branch_id']);
         $Account_Number->setValue($data['journal_code']);
         $invoice->setValue($data['receipt_number']);
         $_currency_type->setValue($data['currency_id']);
         $Note->setValue($data['note']);
         $Add_Date->setValue($data['date']);
         $Debit->setValue($data['debit']);
         $Credit->setValue($data['credit']);
     }
     // 		$Credit->setValue(0);
     $this->addElements(array($id, $invoice, $_currency_type, $parent, $Add_Date, $Account_Number, $Note, $Debit, $Credit, $Brance));
     return $this;
 }
开发者ID:samlanh,项目名称:lnms,代码行数:60,代码来源:FrmGeneraljurnal.php

示例2: Frmaccountcate

 public function Frmaccountcate($data = null)
 {
     $Categoryname_kh = new Zend_Dojo_Form_Element_TextBox('categoryname_kh');
     $Categoryname_kh->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'required' => true));
     $Categoryname_Eng = new Zend_Dojo_Form_Element_TextBox('categoryname_eng');
     $Categoryname_Eng->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'required' => true));
     $db = new Application_Model_DbTable_DbGlobal();
     $Type = new Zend_Dojo_Form_Element_FilteringSelect('type');
     $Type->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'required' => true));
     $opt = $db->getVewOptoinTypeByType(8, 1);
     $Type->setMultiOptions($opt);
     $Type->setValue(1);
     $parent = new Zend_Dojo_Form_Element_TextBox('parent');
     $parent->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'required' => true));
     $Date = new Zend_Dojo_Form_Element_DateTextBox('date');
     $Date->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'class' => 'fullside'));
     $Date->setValue(date('Y-m-d'));
     $db = new Application_Model_DbTable_DbGlobal();
     $display = new Zend_Dojo_Form_Element_FilteringSelect('display');
     $display->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'required' => true));
     $opt = $db->getVewOptoinTypeByType(18, 1);
     $display->setMultiOptions($opt);
     $display->setValue(1);
     $Status = new Zend_Dojo_Form_Element_FilteringSelect('status');
     $Status->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'required' => true));
     $opt = array(1 => 'Active', 2 => 'Deactive');
     $Status->setMultiOptions($opt);
     $id = new Zend_Form_Element_Hidden("id");
     if ($data != null) {
         $Categoryname_kh->setValue($data['cate_namekh']);
         $Categoryname_Eng->setValue($data['cate_nameen']);
         $Type->setValue($data['parent_id']);
         $parent->setValue($data['account_type']);
         $Date->setValue($data['date']);
         $display->setValue($data['deplay']);
         $Status->setValue($data['status']);
         $id->setValue($data['id']);
     }
     $this->addElements(array($Categoryname_kh, $Categoryname_Eng, $Type, $Date, $display, $Status, $parent, $id));
     return $this;
 }
开发者ID:samlanh,项目名称:lnms,代码行数:41,代码来源:Frmaccountcate.php

示例3: FrmAddLoan


//.........这里部分代码省略.........
				'dojoType'=>'dijit.form.DateTextBox',
				'class'=>'fullside',
				'required' =>'true',
				//'onchange'=>'calCulateFirstPayment();'
				
		));
		//$_first_payment->setValue('2005-12-30');
		
		$_dateline = new Zend_Dojo_Form_Element_DateTextBox('date_line');
		$_dateline->setAttribs(array(
				'dojoType'=>'dijit.form.DateTextBox',
				'class'=>'fullside',
				'required' =>'true',
				'readonly'=>true,
		));
		
		
		$_graice_pariod = new Zend_Dojo_Form_Element_TextBox('graice_pariod');
		$_graice_pariod->setAttribs(array(
				'dojoType'=>'dijit.form.TextBox',
				'class'=>'fullside',
				'required'=>'true',
				'onKeyup'=>'CompareGraicePariod();'
				//'readOnly'=>true,
		));
		$_graice_pariod->setValue(0);
		
		$_collect_term = new Zend_Dojo_Form_Element_FilteringSelect('collect_termtype');
		$_collect_term->setAttribs(array(
				'dojoType'=>'dijit.form.FilteringSelect',
				'class'=>'fullside',
				'onchange'=>'changeGraicePeroid();'
		));
		$term_opt = $db->getVewOptoinTypeByType(1,1,3);
		$_collect_term->setMultiOptions($term_opt);
	
		$_payterm = new Zend_Dojo_Form_Element_FilteringSelect('payment_term');
		$_payterm->setAttribs(array(
				'dojoType'=>'dijit.form.FilteringSelect',
				'class'=>'fullside',
				'required' =>'true'
		));
// 		$options= array(1=>"Day",2=>"Week",3=>"Month");
// 		$_payterm->setMultiOptions($options);
		$_payterm->setMultiOptions($term_opt);
		
		$_pay_every = new Zend_Dojo_Form_Element_FilteringSelect('pay_every');
		$_pay_every->setAttribs(array(
				'dojoType'=>'dijit.form.FilteringSelect',
				'class'=>'fullside',
				'required' =>'true',
				'onchange'=>'changeCollectType();'
		));
// 		$options= array(1=>"Day",2=>"Week",3=>"Month");
// 		$_pay_every->setMultiOptions($options);
		$_pay_every->setValue(3);
		$_pay_every->setMultiOptions($term_opt);
		
		$_every_payamount = new Zend_Dojo_Form_Element_FilteringSelect('every_payamount');
		$_every_payamount->setAttribs(array(
				'dojoType'=>'dijit.form.FilteringSelect',
				'class'=>'fullside',
				'required' =>'true'
		));
		$options= array(2=>"After",1=>"Before",3=>"Normal");
		$_every_payamount->setMultiOptions($options);
开发者ID:samlanh,项目名称:lnms,代码行数:67,代码来源:FrmRepaymentSchedule.php

示例4: FrmaddGuide

 public function FrmaddGuide($data = null)
 {
     $pob = new Zend_Dojo_Form_Element_TextBox('pob');
     $pob->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $att_file = new Zend_Form_Element_File('att_file');
     $att_file->setAttribs(array('class' => 'fullside'));
     $_dob = new Zend_Dojo_Form_Element_DateTextBox('dob_client');
     $_dob->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'class' => 'fullside'));
     $_dob->setValue(date("Y-m-d"));
     $nationality = new Zend_Dojo_Form_Element_TextBox('nationality');
     $nationality->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $request = Zend_Controller_Front::getInstance()->getRequest();
     $_email = new Zend_Dojo_Form_Element_TextBox('email');
     $_email->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $db = new Application_Model_DbTable_DbGlobal();
     $_namekh = new Zend_Dojo_Form_Element_TextBox('name_kh');
     $_namekh->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox', 'class' => 'fullside', 'required' => 'true'));
     $id_client = $db->getDriverCode();
     $_clientno = new Zend_Dojo_Form_Element_TextBox('client_no');
     $_clientno->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'readonly' => 'readonly', 'style' => 'color:red;'));
     $_clientno->setValue($id_client);
     $_nameen = new Zend_Dojo_Form_Element_ValidationTextBox('name_en');
     $_nameen->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox', 'class' => 'fullside', 'required' => 'true'));
     $_sex = new Zend_Dojo_Form_Element_FilteringSelect('sex');
     $_sex->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
     $opt_status = $db->getVewOptoinTypeByType(1, 1);
     unset($opt_status[-1]);
     unset($opt_status['']);
     $_sex->setMultiOptions($opt_status);
     $_phone = new Zend_Dojo_Form_Element_TextBox('phone');
     $_phone->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $normalprice = new Zend_Dojo_Form_Element_NumberTextBox('cnormalprice');
     $normalprice->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => true));
     $otprice = new Zend_Dojo_Form_Element_NumberTextBox('cotprice');
     $otprice->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => true));
     $pnormalprice = new Zend_Dojo_Form_Element_NumberTextBox('pnormalprice');
     $pnormalprice->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => true));
     $potprice = new Zend_Dojo_Form_Element_NumberTextBox('potprice');
     $potprice->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => true));
     $photo = new Zend_Form_Element_File('photo');
     $photo->setAttribs(array());
     $national_id = new Zend_Dojo_Form_Element_TextBox('national_id');
     $national_id->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $experience = new Zend_Dojo_Form_Element_TextBox('experience');
     $experience->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $publicholiday = new Zend_Dojo_Form_Element_NumberTextBox('poblicholiday_price');
     $publicholiday->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => true));
     $weekend_price = new Zend_Dojo_Form_Element_NumberTextBox('weekend_price');
     $weekend_price->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => true));
     $experience_num = new Zend_Dojo_Form_Element_NumberTextBox('experience_number');
     $experience_num->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => true));
     $p_popublicholiday = new Zend_Dojo_Form_Element_NumberTextBox('ppoblicholiday_price');
     $p_popublicholiday->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => true));
     $p_weekend = new Zend_Dojo_Form_Element_NumberTextBox('pweekend_price');
     $p_weekend->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => true));
     $monthly_price = new Zend_Dojo_Form_Element_NumberTextBox('monthly_price');
     $monthly_price->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => true));
     $_id = new Zend_Form_Element_Hidden("id");
     $_desc = new Zend_Dojo_Form_Element_TextBox('desc');
     $_desc->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'style' => 'width:96%;min-height:30px;'));
     $lang = new Zend_Dojo_Form_Element_TextBox('lang');
     $lang->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'style' => 'width:96%;min-height:50px;'));
     $_status = new Zend_Dojo_Form_Element_FilteringSelect('status');
     $_status->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
     $opt = array(1 => "Active", 0 => "Deactive");
     $_status->setMultiOptions($opt);
     $_type = new Zend_Dojo_Form_Element_FilteringSelect('type');
     $_type->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
     $_status_opt = array(1 => $this->tr->translate("Guide"), 2 => $this->tr->translate("Driver"), 3 => $this->tr->translate("Both"));
     $_status_opt = $db->getVewOptoinTypeByType(8, 1, null, 1);
     $_type->setMultiOptions($_status_opt);
     $address = new Zend_Dojo_Form_Element_TextBox('home');
     $address->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $groupnum = new Zend_Dojo_Form_Element_TextBox('group');
     $groupnum->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $streetnum = new Zend_Dojo_Form_Element_TextBox('street');
     $streetnum->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $commune = new Zend_Dojo_Form_Element_TextBox('commune');
     $commune->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $district = new Zend_Dojo_Form_Element_TextBox('district');
     $district->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $province = new Zend_Dojo_Form_Element_FilteringSelect('province');
     $province->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
     $opt = $db->getAllProvince(1);
     $province->setMultiOptions($opt);
     $id_card = new Zend_Dojo_Form_Element_TextBox('id_card');
     $id_card->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $issued_date = new Zend_Dojo_Form_Element_DateTextBox('issued_date');
     $issued_date->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'class' => 'fullside'));
     $issued_date->setValue(date("Y-m-d"));
     $registered_date = new Zend_Dojo_Form_Element_DateTextBox('registered_date');
     $registered_date->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'class' => 'fullside'));
     $registered_date->setValue(date("Y-m-d"));
     $expired_date = new Zend_Dojo_Form_Element_DateTextBox('expired_date');
     $expired_date->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'class' => 'fullside'));
     $expired_date->setValue(date("Y-m-d"));
     $_email = new Zend_Dojo_Form_Element_TextBox('email');
     $_email->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'style' => 'color:red;'));
     ///////////////////////
     $citynormalprice = new Zend_Dojo_Form_Element_NumberTextBox('citynormalprice');
//.........这里部分代码省略.........
开发者ID:samlanh,项目名称:lynacr,代码行数:101,代码来源:FrmClient.php

示例5: AdvanceSearch


//.........这里部分代码省略.........
		if(empty($opt_method)){
			$opt_method=-1;
		}
		$_repayment_method->setValue($opt_method);
		
		$_zone = new Zend_Dojo_Form_Element_FilteringSelect('zone');
		$_zone->setAttribs(array(
				'dojoType'=>'dijit.form.FilteringSelect',
				'onchange'=>'popupCheckZone();'
		));
		$options = $db ->getZoneList(1);
		$_zone->setMultiOptions($options);
		$_zone->setValue($request->getParam("zone"));
		
		$_releasedate = new Zend_Dojo_Form_Element_DateTextBox('start_date');
		$_releasedate->setAttribs(array('dojoType'=>'dijit.form.DateTextBox',
// 				'class'=>'fullside',
				'onchange'=>'CalculateDate();'));
		$_date = $request->getParam("start_date");
		
		if(empty($_date)){
			$_date = date('Y-m-d');
		}
		$_releasedate->setValue($_date);
		
		
		$_dateline = new Zend_Dojo_Form_Element_DateTextBox('end_date');
		$_dateline->setAttribs(array('dojoType'=>'dijit.form.DateTextBox','required'=>'true',
// 				'class'=>'fullside',
		));
		$_date = $request->getParam("end_date");
		
		if(empty($_date)){
			$_date = date("Y-m-d");
		}
		$_dateline->setValue($_date);
		
		
		$_payterm = new Zend_Dojo_Form_Element_FilteringSelect('payment_term');
		$_payterm->setAttribs(array(
				'dojoType'=>'dijit.form.FilteringSelect',
// 				'class'=>'fullside',
				'required' =>'true'
		));
		$options= array(1=>"Day",2=>"Week",3=>"Month");
		$_payterm->setMultiOptions($options);
		$_payterm->setValue($request->getParam("payment_term"));
		
		$_branch_id = new Zend_Dojo_Form_Element_FilteringSelect('branch_id');
		$_branch_id->setAttribs(array(
				'dojoType'=>'dijit.form.FilteringSelect',
		));
		
		$rows = $db->getAllBranchName();
		$options=array(-1=>'---Select Branch---');
			if(!empty($rows))foreach($rows AS $row){
				$options[$row['br_id']]=$row['branch_namekh'];
			}
		$_branch_id->setMultiOptions($options);
		$_branch_id->setValue($request->getParam("branch_id"));
		
		$_pay_every = new Zend_Dojo_Form_Element_FilteringSelect('pay_every');
		$_pay_every->setAttribs(array(
				'dojoType'=>'dijit.form.FilteringSelect',
// 				'class'=>'fullside',
				'required' =>'true',
				'onchange'=>'changeCollectType();'
		));
		
		$term_opt = $db->getVewOptoinTypeByType(14,1,3);
		unset($term_opt[-1]);
		$_pay_every->setMultiOptions($term_opt);
// 		$_pay_every->setValue(3);
		$_pay_every->setValue($request->getParam('pay_every'));
		
		$client_name = new Zend_Dojo_Form_Element_FilteringSelect("client_name");
		$opt_client = array(''=>'ជ្រើសរើស ឈ្មោះអតិថិជន');
		$rows = $db->getAllClient();
		if(!empty($rows))foreach($rows AS $row){
			$opt_client[$row['id']]=$row['name'];
		}
		$client_name->setMultiOptions($opt_client);
		$client_name->setAttribs(array('dojoType'=>'dijit.form.FilteringSelect',));
		$client_name->setValue($request->getParam("client_name"));
		
		if($data!=null){
			//print_r($data);
			$_branch_id->setValue($data['member_id']);
			$_member->setValue($data['client_id']);
			$_coid->setValue($data['co_id']);
			$_zone->setValue($data['zone_id']);
			$_releasedate->setValue($data['date_release']);
			$_currency_type->setValue($data['payment_method']);
			$client_name->setValue($data['client_name']);
		}
		$this->addElements(array($client_name,$_pay_every,$_groupid,$_title,$_branch_id,$_member,$_coid,$_currency_type,$_zone,$_releasedate
				,$_payterm,$_dateline,$_group_code,$_customer_code,$_status,$_btn_search,$_repayment_method));
		return $this;
		
	}	
开发者ID:sarankh80,项目名称:lnms,代码行数:101,代码来源:FrmSearchLoan.php

示例6: FrmAsset

 public function FrmAsset($data = null)
 {
     $request = Zend_Controller_Front::getInstance()->getRequest();
     $_title = new Zend_Dojo_Form_Element_TextBox('adv_search');
     $_title->setAttribs(array('dojoType' => $this->tvalidate, 'onkeyup' => 'this.submit()', 'placeholder' => $this->tr->translate("SEARCH_FIXD_NAME")));
     $_title->setValue($request->getParam("adv_search"));
     $db = new Application_Model_DbTable_DbGlobal();
     $asset_name = new Zend_Dojo_Form_Element_FilteringSelect('asset_name');
     $asset_name->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'onchange' => "getAssetInfo(1);"));
     $rows = $db->getAssetByType();
     $options = array('' => "------Select------", -1 => "Add New");
     if (!empty($rows)) {
         foreach ($rows as $row) {
             $options[$row['id']] = $row['account_name_en'];
         }
     }
     $asset_name->setMultiOptions($options);
     $asset_code = new Zend_Dojo_Form_Element_FilteringSelect('asset_code');
     $asset_code->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'onchange' => "getAssetInfo(2);", 'required' => true));
     $rows = $db->getAssetByType();
     $options = array('' => "------Select------", -1 => "Add New");
     if (!empty($rows)) {
         foreach ($rows as $row) {
             $options[$row['id']] = $row['account_code'];
         }
     }
     $asset_code->setMultiOptions($options);
     $db = new Application_Model_DbTable_DbGlobal();
     $paid_type = new Zend_Dojo_Form_Element_FilteringSelect('paid_type');
     $paid_type->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'onchange' => 'checkasset();', 'required' => true));
     $opt = $db->getVewOptoinTypeByType(19, 1);
     $paid_type->setMultiOptions($opt);
     // 		$paid_type->setValue(1);
     $note = new Zend_Dojo_Form_Element_TextBox('note');
     $note->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'required' => true));
     $_stutas = new Zend_Dojo_Form_Element_FilteringSelect('status');
     $_stutas->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
     $options = array(1 => "ប្រើប្រាស់", 0 => "មិនប្រើប្រាស់");
     $_stutas->setMultiOptions($options);
     $some_payamount = new Zend_Dojo_Form_Element_TextBox('some_payamount');
     $some_payamount->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'required' => true));
     $asset_type = new Zend_Dojo_Form_Element_FilteringSelect('asset_type');
     $asset_type->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'required' => true));
     $opt = array(1 => 'Long Term', 2 => 'Short Term');
     $asset_type->setMultiOptions($opt);
     $asset_cost = new Zend_Dojo_Form_Element_NumberTextBox('asset_cost');
     $asset_cost->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'onchange' => 'calculateDepreciation();', 'class' => 'fullside', 'required' => 'true'));
     $useful_life = new Zend_Dojo_Form_Element_NumberTextBox('usefull_life');
     $useful_life->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'onchange' => 'calculateDepreciation();', 'class' => 'fullside', 'required' => true));
     $salvage_value = new Zend_Dojo_Form_Element_NumberTextBox('salvage_value');
     $salvage_value->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'onchange' => 'calculateDepreciation();', 'required' => 'true'));
     $payment_method = new Zend_Dojo_Form_Element_FilteringSelect('payment_method');
     $payment_method->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
     $option = array(1 => 'Straight line', 2 => 'Double-declining banlance', 3 => 'Sum of the year');
     $payment_method->setMultiOptions($option);
     $Date = new Zend_Dojo_Form_Element_DateTextBox('date');
     $Date->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'class' => 'fullside'));
     $Date->setValue(date('Y-m-d'));
     $start_date = new Zend_Dojo_Form_Element_DateTextBox('start_date');
     $start_date->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'class' => 'fullside'));
     $start_date->setValue(date('Y-m-d'));
     $_branch_id = new Zend_Dojo_Form_Element_FilteringSelect('branch');
     $_branch_id->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'required' => 'true'));
     // 		$_branch_id = new Zend_Dojo_Form_Element_FilteringSelect('branch_id');
     // 		$_branch_id->setAttribs(array(
     // 				'dojoType'=>'dijit.form.FilteringSelect',
     // 				'class'=>'fullside',
     // 				'required' =>'true'
     // 		));
     $db = new Application_Model_DbTable_DbGlobal();
     $rows = $db->getAllBranchName();
     $options = '';
     if (!empty($rows)) {
         foreach ($rows as $row) {
             $options[$row['br_id']] = $row['branch_namekh'];
         }
     }
     $_branch_id->setMultiOptions($options);
     $current_type = new Zend_Dojo_Form_Element_FilteringSelect('current_type');
     $current_type->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'required' => true));
     $opt = $db->getVewOptoinTypeByType(15, 1);
     $current_type->setMultiOptions($opt);
     $current_type->setValue(1);
     $tem_type = new Zend_Dojo_Form_Element_FilteringSelect('tem_type');
     $tem_type->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'required' => true));
     $opt = $db->getVewOptoinTypeByType(20, 1);
     $tem_type->setMultiOptions($opt);
     $tem_type->setValue(1);
     $journal = new Zend_Dojo_Form_Element_CheckBox('journal');
     $journal->setAttribs(array('dojoType' => 'dijit.form.CheckBox', 'class' => 'fullside', 'required' => true));
     $amount = new Zend_Dojo_Form_Element_TextBox('amount');
     $amount->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'required' => true));
     $_id = new Zend_Form_Element_Hidden('id');
     // 		print_r($data);exit();
     if ($data != null) {
         $_branch_id->setValue($data['branch_id']);
         $asset_name->setValue($data['fixed_assetname']);
         $asset_type->setValue($data['fixed_asset_type']);
         $asset_cost->setValue($data['asset_cost']);
         $useful_life->setValue($data['usefull_life']);
//.........这里部分代码省略.........
开发者ID:samlanh,项目名称:lnms,代码行数:101,代码来源:Frmasset.php

示例7: FrmTables

 public function FrmTables($data = null)
 {
     $table_code = new Zend_Form_Element_Text('table_code');
     $table_code->setAttribs(array('class' => 'form-control', 'required' => true, 'onkeyup' => 'displayPhoto()'));
     $db = new Application_Model_DbTable_DbGlobal();
     $g_code = new Zend_Form_Element_Select('group_code');
     $g_code->setAttribs(array('class' => 'form-control select2me', 'onchange' => 'displayDescriptions()'));
     $option = $db->getGroupCode();
     $g_code->setMultiOptions($option);
     $g_code1 = new Zend_Form_Element_Text('g_code1');
     $g_code1->setAttribs(array('class' => 'form-control'));
     $est_time = new Zend_Form_Element_Text('est_time');
     $est_time->setAttribs(array('class' => 'form-control clockface_1 clockface-open', 'data-format' => "hh:mm A", 'id' => 'mask_number'));
     $price = new Zend_Dojo_Form_Element_NumberTextBox('price');
     $price->setAttribs(array('class' => 'form-control'));
     $max_seat = new Zend_Form_Element_Text('max_seat');
     $max_seat->setAttribs(array('class' => 'form-control', 'id' => 'mask_number'));
     $time = new Zend_Form_Element_Text('time');
     $time->setAttribs(array('class' => 'form-control'));
     $time->setValue('00:00');
     $description = new Zend_Form_Element_Text('description');
     $description->setAttribs(array('class' => 'form-control', 'required' => true, 'onkeyup' => 'displayPhoto()'));
     $lang_1 = new Zend_Form_Element_Text('lang_1');
     $lang_1->setAttribs(array('class' => 'form-control', 'onkeyup' => 'displayPhoto()'));
     $lang_2 = new Zend_Form_Element_Text('lang_2');
     $lang_2->setAttribs(array('checked' => 'checked', 'class' => 'form-control', 'onkeyup' => 'displayPhoto()'));
     $lang_3 = new Zend_Form_Element_Text('lang_3');
     $lang_3->setAttribs(array('checked' => 'checked', 'class' => 'form-control'));
     if ($data != null) {
         // 			print_r($data);
     }
     $db = new Application_Model_DbTable_DbGlobal();
     $description_opt = array("" => $this->tr->translate("SELECT_DESCRIPTION"));
     $show_description1 = new Zend_Form_Element_Select('show_description');
     $show_description1->setAttribs(array('class' => 'form-control', 'onchange' => 'displayPhoto()'));
     $opt = $db->getVewOptoinTypeByType(1, 1, null, 1);
     $show_description1->setMultiOptions($opt);
     $type_of_table = new Zend_Form_Element_Select('type_of_table');
     $type_of_table->setAttribs(array('class' => 'form-control select2me', 'onchange' => 'popoupTableType()'));
     $opt_type_table = $db->getTypeOfTable();
     $type_of_table->setMultiOptions($opt_type_table);
     $apply_to_company = new Zend_Form_Element_Select('apply_to_company');
     $apply_to_company->setAttribs(array('class' => 'form-control'));
     $opt = array('0' => 'select company', '1' => 'A', '2' => 'B', '3' => 'C');
     $apply_to_company->setMultiOptions($opt);
     $photo = new Zend_Form_Element_File('photo');
     $background = new Zend_Form_Element_Text('background');
     $background->setAttribs(array('class' => 'form-control color-picker-rgba'));
     $backgroun_color = new Zend_Form_Element_Text('backgroun_color');
     $backgroun_color->setAttribs(array('class' => 'colorpicker-rgba form-control', 'onclick' => 'displayPhoto()'));
     $apply = new Zend_Form_Element_Select('apply');
     $apply->setAttribs(array('class' => 'form-control'));
     $apply_opt = array("" => $this->tr->translate("SELECT_APPLY_TO_COMPANY"));
     $apply->setMultiOptions($apply_opt);
     $combo = new Zend_Form_Element_Checkbox('combo');
     $combo->setAttribs(array('class' => 'red'));
     $active = new Zend_Form_Element_Checkbox('active');
     $active->setAttribs(array('class' => 'red', 'checked' => 'checked'));
     $time_ck = new Zend_Form_Element_Checkbox('time_ck');
     $time_ck->setAttribs(array('class' => 'red'));
     $dicount_ck = new Zend_Form_Element_Checkbox('dicount_ck');
     $dicount_ck->setAttribs(array('class' => 'red'));
     $format = new Zend_Form_Element_Text('demo4');
     $format->setAttribs(array('class' => 'form-control', 'id' => "demo4", 'value' => 12, 'placeholder' => '12'));
     $font_color = new Zend_Form_Element_text('font_color');
     $font_color->setAttribs(array('class' => 'colorpicker-default form-control', 'onclick' => 'displayPhoto()'));
     $font_site = new Zend_Form_Element_text('font_size');
     $font_site->setAttribs(array('class' => ' spinner-input form-control', 'onkeyup' => 'displayPhoto()', 'onclick' => 'displayPhoto()'));
     $font_site->setValue(20);
     $resize = new Zend_Form_Element_Text('resize');
     $resize->setAttribs(array('class' => 'form-control', 'id' => "resize", 'value' => 12, 'placeholder' => '12'));
     $note = new Zend_Form_Element_Textarea('note');
     $note->setAttribs(array('class' => 'form-control', 'style' => "margin-top: 0px; margin-bottom: 0px; height: 150px;"));
     $note1 = new Zend_Form_Element_Textarea('note1');
     $note1->setAttribs(array('class' => 'form-control', 'style' => "margin-top: 0px; margin-bottom: 0px; height: 150px;"));
     $id = new Zend_Form_Element_Hidden('id');
     if ($data != null) {
         //print_r($data);exit();
         $id->setValue($data['id']);
         $table_code->setValue($data['code']);
         $description->setValue($data['description']);
         $lang_1->setValue($data['lang1']);
         $lang_2->setValue($data['lang2']);
         $g_code->setValue($data['tbl_groupid']);
         $type_of_table->setValue($data['tbl_type']);
         $show_description1->setValue($data['display_by']);
         $max_seat->setValue($data['max_sit']);
         $apply_to_company->setValue($data['compid']);
         $active->setValue($data['active']);
         $time_ck->setValue($data['time_charge_id']);
         $dicount_ck->setValue($data['is_discound']);
         $price->setValue($data['price']);
         $est_time->setValue($data['est_time']);
         $backgroun_color->setValue($data['backgroud_color']);
         $font_color->setValue($data['font_color']);
         $font_site->setValue($data['font_size']);
         $note->setValue($data['note']);
     }
     $this->addElements(array($id, $photo, $dicount_ck, $time_ck, $type_of_table, $est_time, $price, $max_seat, $time, $g_code, $apply, $active, $combo, $table_code, $description, $lang_1, $lang_2, $lang_3, $note1, $backgroun_color, $g_code1, $show_description1, $apply_to_company, $background, $font_color, $format, $font_color, $font_site, $resize, $note));
     return $this;
//.........这里部分代码省略.........
开发者ID:sarankh80,项目名称:restaurant168,代码行数:101,代码来源:FrmTables.php

示例8: FrmGroupPayment

	public function FrmGroupPayment($data=null){
	
		$db = new Application_Model_DbTable_DbGlobal();
		
		$old_penelize = new Zend_Form_Element_Hidden("old_penelize");
		$old_penelize->setAttribs(array(
				'dojoType'=>'dijit.form.TextBox',
				'class'=>'fullside',
				//'required' =>'true'
		));
		
		$old_service_charge = new Zend_Form_Element_Hidden("old_service_charge");
		$old_service_charge->setAttribs(array(
				'dojoType'=>'dijit.form.TextBox',
				'class'=>'fullside',
				//'required' =>'true'
		));
		
		$_interest_rate = new Zend_Dojo_Form_Element_TextBox("interest_rate");
		$_interest_rate->setAttribs(array(
				'dojoType'=>'dijit.form.TextBox',
				'class'=>'fullside',
				'required' =>'true',
				'readOnly'=>'readOnly'
		));
		
		$term_opt = $db->getVewOptoinTypeByType(14,1,3);
		$_payterm = new Zend_Dojo_Form_Element_FilteringSelect('payment_term');
		$_payterm->setAttribs(array(
				'dojoType'=>'dijit.form.FilteringSelect',
				'class'=>'fullside',
				'required' =>'true',
				'readOnly'=>'readOnly'
		));
		$_payterm->setMultiOptions($term_opt);
		
		$_currency_type = new Zend_Dojo_Form_Element_FilteringSelect('currency_type');
		$_currency_type->setAttribs(array(
				'dojoType'=>'dijit.form.FilteringSelect',
				'class'=>'fullside',
				'readOnly'=>'readOnly'
		));
		$opt = array(-1=>"--Select Currency Type--",2=>"Dollar",1=>'Khmer',3=>"Bath");
		$_currency_type->setMultiOptions($opt);
		//$_currency_type->setValue($request->getParam("currency_type"));
		
// 		$_groupid = new Zend_Dojo_Form_Element_FilteringSelect('client_id');
// 		$_groupid->setAttribs(array(
// 				'dojoType'=>'dijit.form.FilteringSelect',
// 				'class'=>'fullside',
//  				//'onchange'=>'getLaonPayment(3);getAllLaonPayment(3);',
// 				'required'=>true
// 				));
		$rows = $db ->getClientByType(1);
// 		$options=array(''=>'-----Select------');
// 		if(!empty($rows))foreach($rows AS $row){
// // 			$options[$row['client_id']]=$row['name_en'].','.$row['province_en_name'].','.$row['district_name'].','.$row['commune_name'].','.$row['village_name'];
// 			$options[$row['client_id']]=$row['name_en'].','.$row['province_en_name'];
// 		}
// 		$_groupid->setMultiOptions($options);
		
		$_client_code = new Zend_Dojo_Form_Element_FilteringSelect('client_code');
		$_client_code->setAttribs(array(
				'dojoType'=>'dijit.form.FilteringSelect',
				'class'=>'fullside',
				'readOnly'=>'readOnly',
				//'onchange'=>'getLaonHasPayByLoanNumber(2);getLaonPayment(2);getAllLaonPayment(2);',
				'required'=>true
		));
		
		$option_client_number = array(''=>'-----Select------');
		if(!empty($rows))foreach($rows AS $row){
			$option_client_number[$row['client_id']]=$row['client_number']."-".$row['name_en'];
		}
		$_client_code->setMultiOptions($option_client_number);
		
// 		$_loan_number = new Zend_Dojo_Form_Element_TextBox('loan_number');
// 		$_loan_number->setAttribs(array(
// 				'dojoType'=>'dijit.form.TextBox',
// 				'class'=>'fullside',
// 				//'onKeyUp'=>'getLaonPayment(1);getAllLaonPayment(1);'
// 				'required'=>true
// 		));
		$row_loan_number = $db->getAllLoanNumber(2);
		$options=array(''=>'');
		if(!empty($row_loan_number))foreach($row_loan_number AS $row){
			$options[$row['loan_number']]=$row['loan_number'];
		}
		$_loan_number = new Zend_Dojo_Form_Element_FilteringSelect('loan_number');
		$_loan_number->setAttribs(array(
				'dojoType'=>'dijit.form.FilteringSelect',
				'class'=>'fullside',
				'onChange'=>'getLaonPayment(1);',
				'required'=>true
		));
		$_loan_number->setMultiOptions($options);
		
		
		$_amount_receive = new Zend_Dojo_Form_Element_NumberTextBox('amount_receive');
		$_amount_receive->setAttribs(array(
//.........这里部分代码省略.........
开发者ID:sarankh80,项目名称:lnms,代码行数:101,代码来源:FrmIlPayment.php

示例9: AdvanceSearch

 public function AdvanceSearch($data = null, $type = null)
 {
     $request = Zend_Controller_Front::getInstance()->getRequest();
     $_title = new Zend_Dojo_Form_Element_TextBox('adv_search');
     $_title->setAttribs(array('dojoType' => $this->tvalidate, 'onkeyup' => 'this.submit()', 'placeholder' => $this->tr->translate("ADVANCE_SEARCH")));
     $_title->setValue($request->getParam("adv_search"));
     $_status = new Zend_Dojo_Form_Element_FilteringSelect('status');
     $_status->setAttribs(array('dojoType' => $this->filter));
     $_status_opt = array(-1 => $this->tr->translate("ALL"), 1 => $this->tr->translate("ACTIVE"), 0 => $this->tr->translate("DACTIVE"));
     $_status->setMultiOptions($_status_opt);
     $_status->setValue($request->getParam("status"));
     $db = new Application_Model_DbTable_DbGlobal();
     $employee = new Zend_Dojo_Form_Element_FilteringSelect('employee');
     $rows = $db->getAllCOName();
     $options = array('' => "---ស្វែងរកតាមរយៈឈ្មោះ---");
     if (!empty($rows)) {
         foreach ($rows as $row) {
             $options[$row['co_id']] = $row['co_khname'];
         }
     }
     $employee->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'onchange' => 'popupCheckCO();'));
     $employee->setMultiOptions($options);
     $employee->setValue($request->getParam('employee'));
     $_btn_search = new Zend_Dojo_Form_Element_SubmitButton('btn_search');
     $_btn_search->setAttribs(array('dojoType' => 'dijit.form.Button', 'iconclass' => 'dijitIconSearch', 'label' => 'Search'));
     $branch_id = new Zend_Dojo_Form_Element_FilteringSelect('branch_id');
     $branch_id->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'required' => 'true'));
     $rows = $db->getAllBranchName();
     $options_branch = array('' => "---ស្វែងរកតាមរយៈសាខា---");
     if (!empty($rows)) {
         foreach ($rows as $row) {
             $options_branch[$row['br_id']] = $row['branch_namekh'];
         }
     }
     $branch_id->setMultiOptions($options_branch);
     $branch_id->setValue($request->getParam("branch_id"));
     $approve_by = new Zend_Dojo_Form_Element_FilteringSelect('approve_by');
     $rows = $db->getAllCOName();
     $options_approve = array('' => "---ស្វែងរកអ្នកយល់ព្រម---");
     if (!empty($rows)) {
         foreach ($rows as $row) {
             $options_approve[$row['co_id']] = $row['co_khname'];
         }
     }
     $approve_by->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'onchange' => 'popupCheckCO();'));
     $approve_by->setMultiOptions($options_approve);
     $approve_by->setValue($request->getParam("approve_by"));
     $opt_type = $db->getVewOptoinTypeByType(7, 1);
     $type = new Zend_Dojo_Form_Element_FilteringSelect('type');
     $type->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'required' => true, 'class' => 'fullside'));
     $type->setMultiOptions($opt_type);
     $type->setValue($request->getParam("type"));
     // 		$from_date=new Zend_Dojo_Form_Element_DateTextBox('from_date');
     // 		$from_date->setAttribs(array(
     // 				'dojoType'=>'dijit.form.DateTextBox',
     // 				'required'=>true,
     // 				'class'=>'fullside'
     // 		));
     // 		$from_date->setValue(date('Y-m-d'));
     // // 		$from_date->setValue($request->getParam("from_date"));
     // 		$to_date=new Zend_Dojo_Form_Element_DateTextBox('to_date');
     // 		$to_date->setAttribs(array(
     // 				'dojoType'=>'dijit.form.DateTextBox',
     // 				'required'=>true,
     // 				'class'=>'fullside'
     // 		));
     // 		$to_date->setValue(date('Y-m-d'));
     // // 		$to_date->setValue($request->getParam("to_date"));
     $from_date = new Zend_Dojo_Form_Element_DateTextBox('start_date');
     $from_date->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'required' => 'true', 'class' => 'fullside', 'onchange' => 'CalculateDate();'));
     $_date = $request->getParam("start_date");
     if (empty($_date)) {
         $_date = date('Y-m-d');
     }
     $from_date->setValue($_date);
     $to_date = new Zend_Dojo_Form_Element_DateTextBox('end_date');
     $to_date->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'required' => 'true', 'class' => 'fullside'));
     $_date = $request->getParam("end_date");
     if (empty($_date)) {
         $_date = date("Y-m-d");
     }
     $to_date->setValue($_date);
     $position_ = new Zend_Dojo_Form_Element_FilteringSelect('position');
     $position_->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'required' => true, 'class' => 'fullside'));
     $opt_position = $db->getAllStaffPosition(null, 1);
     $position_->setMultiOptions($opt_position);
     $position_->setValue($request->getParam("position"));
     $this->addElements(array($position_, $from_date, $to_date, $type, $employee, $_title, $_title, $_status, $_btn_search, $branch_id, $approve_by));
     return $this;
 }
开发者ID:TheTypoMaster,项目名称:restaurant168,代码行数:90,代码来源:FrmAdvanceSearch.php

示例10: callecteralllist

 public function callecteralllist($data = null)
 {
     $db = new Application_Model_DbTable_DbGlobal();
     $branch = new Zend_Dojo_Form_Element_FilteringSelect('branch');
     $branch->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'required' => 'true'));
     $rows = $db->getAllBranchName();
     $options = '';
     if (!empty($rows)) {
         foreach ($rows as $row) {
             $options[$row['br_id']] = $row['branch_namekh'];
         }
     }
     $branch->setMultiOptions($options);
     $id_client = $db->getNewReceiptId();
     $receipt = new Zend_Dojo_Form_Element_TextBox('receipt');
     $receipt->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'required' => true, 'readonly' => true, 'style' => 'color:red; font-weight: bold;'));
     $receipt->setValue($id_client);
     $id_client = $db->getCodecallId();
     $code_call = new Zend_Dojo_Form_Element_TextBox('code_call');
     $code_call->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'readonly' => true, 'style' => 'color:red; font-weight: bold;'));
     $code_call->setValue($id_client);
     $db = new Application_Model_DbTable_DbGlobal();
     $customer_name = new Zend_Dojo_Form_Element_FilteringSelect('customer_name');
     $customer_name->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'onchange' => "getClientInfo(1);"));
     $rows = $db->getClientByType();
     $options = array('' => "------Select------", -1 => "Add New");
     if (!empty($rows)) {
         foreach ($rows as $row) {
             $options[$row['client_id']] = $row['name_en'];
         }
     }
     $customer_name->setMultiOptions($options);
     $db = new Application_Model_DbTable_DbGlobal();
     $cus_code = new Zend_Dojo_Form_Element_FilteringSelect('cus_code');
     $cus_code->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'required' => true, 'onchange' => "getClientInfo(2);"));
     $rows = $db->getClientByType();
     $options = array('' => "------Select------", -1 => "Add New");
     if (!empty($rows)) {
         foreach ($rows as $row) {
             $options[$row['client_id']] = $row['client_number'];
         }
     }
     $cus_code->setMultiOptions($options);
     $db = new Application_Model_DbTable_DbGlobal();
     $callecterall_type = new Zend_Dojo_Form_Element_FilteringSelect('callecterall_type');
     $callecterall_type->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
     $opt = $db->getVewOptoinTypeBys(1);
     $callecterall_type->setMultiOptions($opt);
     //$callecterall_type->setValue();
     $nameouner = new Zend_Dojo_Form_Element_TextBox('nameouner');
     $nameouner->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $callnumber = new Zend_Dojo_Form_Element_TextBox('callnumber');
     $callnumber->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $date_call = new Zend_Dojo_Form_Element_DateTextBox('date_call');
     $date_call->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'class' => 'fullside', 'onchange' => 'checkReleaseDate();', 'required' => true));
     $date_call->setValue(date('Y-m-d'));
     $db = new Application_Model_DbTable_DbGlobal();
     $time_think = new Zend_Dojo_Form_Element_FilteringSelect('time_think');
     $time_think->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'onchange' => 'checkTerm();', 'required' => true));
     $opt = $db->getVewOptoinTypeByType(14, 1);
     $time_think->setMultiOptions($opt);
     $time_think->setValue(1);
     $time_boro = new Zend_Dojo_Form_Element_NumberTextBox('time_boro');
     $time_boro->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'onkeyup' => 'calCulatePeriod()', 'required' => true));
     $dayless = new Zend_Dojo_Form_Element_DateTextBox('dayless');
     $dayless->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'class' => 'fullside'));
     $dayless->setValue(date('Y-m-d'));
     $db = new Application_Model_DbTable_DbGlobal();
     $cash_type = new Zend_Dojo_Form_Element_FilteringSelect('cash_type');
     $cash_type->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
     $opt = $db->getVewOptoinTypeByType(15, 1);
     $cash_type->setMultiOptions($opt);
     $cash_type->setValue(1);
     $much_boro = new Zend_Dojo_Form_Element_NumberTextBox('much_boro');
     $much_boro->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside'));
     $note = new Zend_Dojo_Form_Element_TextBox('note');
     $note->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $term_fun = new Zend_Dojo_Form_Element_FilteringSelect('term_fun');
     $term_fun->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
     $opt_fun = $db->getVewOptoinTypeByType(14, 1);
     $term_fun->setMultiOptions($opt_fun);
     $term_fun->setValue(1);
     $charge_term = new Zend_Dojo_Form_Element_FilteringSelect('charge_term');
     $charge_term->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'required' => true));
     $opt_ch_term = array(1 => 'គិតជាភាគរយ​ %', 2 => 'គិតជាលុយផ្ទាល់');
     $charge_term->setMultiOptions($opt_ch_term);
     $amount_money = new Zend_Dojo_Form_Element_TextBox('amount_money');
     $amount_money->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'required' => true));
     $_id = new Zend_Form_Element_Hidden('id');
     if ($data != null) {
         $branch->setValue($data['branch']);
         $receipt->setValue($data['receipt']);
         $code_call->setValue($data['code_call']);
         $customer_name->setValue($data['customer_id']);
         $callecterall_type->setValue($data['type_call']);
         $nameouner->setValue($data['owner_call']);
         $callnumber->setValue($data['callnumber']);
         $date_call->setValue($data['date_debt']);
         $time_think->setValue($data['term']);
         $time_boro->setValue($data['amount_term']);
//.........这里部分代码省略.........
开发者ID:samlanh,项目名称:lnms,代码行数:101,代码来源:Frmcallecteralllist.php

示例11: FrmAddClient


//.........这里部分代码省略.........
		$_clientno->setAttribs(array(
				'dojoType'=>'dijit.form.TextBox',
				'class'=>'fullside',
				'readonly'=>'readonly',
				'style'=>'color:red;'
		));
 		$_clientno->setValue($id_client);
	
		$_nameen = new Zend_Dojo_Form_Element_ValidationTextBox('name_en');
		$_nameen->setAttribs(array(
				'dojoType'=>'dijit.form.ValidationTextBox',
				'class'=>'fullside',
				'required' =>'true'
		));
		
		$_join_with = new Zend_Dojo_Form_Element_TextBox('join_with');
		$_join_with->setAttribs(array(
				'dojoType'=>'dijit.form.TextBox',
				'class'=>'fullside',
		));
		
		$_join_nation_id = new Zend_Dojo_Form_Element_TextBox('join_nation_id');
		$_join_nation_id->setAttribs(array(
				'dojoType'=>'dijit.form.TextBox',
				'class'=>'fullside',
		));
		
		$_sex = new Zend_Dojo_Form_Element_FilteringSelect('sex');
		$_sex->setAttribs(array(
				'dojoType'=>'dijit.form.FilteringSelect',
				'class'=>'fullside',
		));
// 		$opt = array(1=>"Male",2=>"Femail");
		$opt_status = $db->getVewOptoinTypeByType(11,1);
		unset($opt_status[-1]);
		unset($opt_status['']);
		$_sex->setMultiOptions($opt_status);
		
		
		$_situ_status = new Zend_Dojo_Form_Element_FilteringSelect('situ_status');
		$_situ_status->setAttribs(array(
				'dojoType'=>'dijit.form.FilteringSelect',
				'class'=>'fullside',
		));
		$opt_status = $db->getVewOptoinTypeByType(5,1);
		unset($opt_status[-1]);
		unset($opt_status['']);
		$_situ_status->setMultiOptions($opt_status);
		
		$client_d_type = new Zend_Dojo_Form_Element_FilteringSelect('client_d_type');
		$client_d_type->setAttribs(array(
				'dojoType'=>'dijit.form.FilteringSelect',
				'class'=>'fullside',
		));
// 		$opt_client_d_type= $db->getVewOptoinTypeByType(23,1);
// 		$client_d_type->setMultiOptions($opt_client_d_type);
		
// 		$join_d_type = new Zend_Dojo_Form_Element_FilteringSelect('join_d_type');
// 		$join_d_type->setAttribs(array(
// 				'dojoType'=>'dijit.form.FilteringSelect',
// 				'class'=>'fullside',
// 		));
// 		$join_d_type->setMultiOptions($opt_client_d_type);
		
// 		$guarantor_d_type = new Zend_Dojo_Form_Element_FilteringSelect('guarantor_d_type');
// 		$guarantor_d_type->setAttribs(array(
开发者ID:samlanh,项目名称:lnms,代码行数:67,代码来源:FrmClient.php

示例12: FrmAddLoan

 public function FrmAddLoan($data = null)
 {
     $_isgroup = new Zend_Dojo_Form_Element_CheckBox('is_group');
     $_isgroup->setAttribs(array('dojoType' => 'dijit.form.CheckBox', 'class' => 'fullside'));
     $_loan_code = new Zend_Dojo_Form_Element_TextBox('loan_code');
     $_loan_code->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'readonly' => true, 'style' => 'color:red; font-weight: bold;'));
     $db = new Application_Model_DbTable_DbGlobal();
     $loan_number = $db->getLoanNumber();
     $_loan_code->setValue($loan_number);
     $_collect_term = new Zend_Dojo_Form_Element_FilteringSelect('collect_termtype');
     $_collect_term->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'onchange' => 'changeGraicePeroid();'));
     $term_opt = $db->getVewOptoinTypeByType(1, 1, 3);
     $_collect_term->setMultiOptions($term_opt);
     $_client_code = new Zend_Dojo_Form_Element_TextBox('client_code');
     $_client_code->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $_groupid = new Zend_Dojo_Form_Element_FilteringSelect('group_id');
     $_groupid->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'onchange' => 'popupCheckClient();'));
     $rows = $db->getClientByType(1);
     $options = array('' => "------Select------", -1 => "Add New new group");
     if (!empty($rows)) {
         foreach ($rows as $row) {
             $options[$row['client_id']] = $row['name_en'] . ',' . $row['province_en_name'] . ',' . $row['district_name'] . ',' . $row['commune_name'] . ',' . $row['village_name'];
         }
     }
     $_groupid->setMultiOptions($options);
     $_coid = new Zend_Dojo_Form_Element_FilteringSelect('co_id');
     $rows = $db->getAllCOName();
     $options = array('' => "------Select------", -1 => "Add New");
     if (!empty($rows)) {
         foreach ($rows as $row) {
             $options[$row['co_id']] = $row['co_khname'];
         }
     }
     $_coid->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'onchange' => 'popupCheckCO();'));
     $_coid->setMultiOptions($options);
     $_member = new Zend_Dojo_Form_Element_FilteringSelect('member');
     $_member->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
     $rows = $db->getClientByType();
     $options = array('' => "------Select------", -1 => "Add New");
     if (!empty($rows)) {
         foreach ($rows as $row) {
             $options[$row['client_id']] = $row['name_en'];
         }
     }
     $_member->setMultiOptions($options);
     $_currency_type = new Zend_Dojo_Form_Element_FilteringSelect('currency_type');
     $_currency_type->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
     $opt = array(2 => "Dollar", 1 => 'Khmer', 3 => "Bath");
     $_currency_type->setMultiOptions($opt);
     $_zone = new Zend_Dojo_Form_Element_FilteringSelect('zone');
     $_zone->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'onchange' => 'popupCheckZone();'));
     $rows = $db->getZoneList();
     $options = array('' => "------Select------", -1 => "Add New");
     if (!empty($rows)) {
         foreach ($rows as $row) {
             $options[$row['zone_id']] = $row['zone_name'];
         }
     }
     $_zone->setMultiOptions($options);
     $_loan_fee = new Zend_Dojo_Form_Element_NumberTextBox('loan_fee');
     $_loan_fee->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside'));
     $_loan_fee->setValue(0);
     $_time_collect = new Zend_Dojo_Form_Element_NumberTextBox('amount_collect');
     $_time_collect->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'onkeyup' => 'getFirstPayment();'));
     $_time_collect->setValue(1);
     $_time_collect_pri = new Zend_Dojo_Form_Element_NumberTextBox('amount_collect_pricipal');
     $_time_collect_pri->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'readonly' => true, 'required' => true));
     $_time_collect_pri->setValue(2);
     $_amount = new Zend_Dojo_Form_Element_NumberTextBox('total_amount');
     $_amount->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => 'true'));
     $_level = new Zend_Dojo_Form_Element_NumberTextBox('level');
     $_level->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => 'true'));
     $_level->setValue(1);
     // 		$_rate = new Zend_Dojo_Form_Element_NumberTextBox('interest_rate');
     // 		$_rate->setAttribs(array(
     // 				'data-dojo-Type'=>'dijit.form.NumberTextBox',
     // 				'data-dojo-props'=>"regExp:'[0-9]{1,2}',
     // 				'required':true,
     // 				'name':'batch',
     // 				'value':2.5,
     // 				'class':'fullside',
     // 				'invalidMessage':'អាចបញ្ជូលពី 1 ដល់ 99'"));
     $_rate = new Zend_Dojo_Form_Element_ValidationTextBox("interest_rate");
     $_rate->setAttribs(array('data-dojo-Type' => 'dijit.form.ValidationTextBox', 'data-dojo-props' => "\r\n\t\t\t\t'required':true,\r\n\t\t\t\t'name':'interest_rate',\r\n\t\t\t\t'value':2.5,\r\n\t\t\t\t'class':'fullside',\r\n\t\t\t\t'invalidMessage':'អាចបញ្ជូលពី 1 ដល់  100'"));
     // 		$value_interest = 2.5;
     // 		$_rate->setValue($value_interest);
     $_period = new Zend_Dojo_Form_Element_NumberTextBox('period');
     $_period->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => 'true', 'onkeyup' => 'calCulatePeriod();'));
     $_period->setValue(12);
     $_releasedate = new Zend_Dojo_Form_Element_DateTextBox('release_date');
     $_releasedate->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'class' => 'fullside', 'required' => 'true', 'onchange' => 'checkReleaseDate();'));
     $s_date = date('Y-m-d');
     $_releasedate->setValue($s_date);
     $_first_payment = new Zend_Dojo_Form_Element_DateTextBox('first_payment');
     $_first_payment->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'class' => 'fullside', 'required' => 'true'));
     //$_first_payment->setValue('2005-12-30');
     $_dateline = new Zend_Dojo_Form_Element_DateTextBox('date_line');
     $_dateline->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'class' => 'fullside', 'required' => 'true', 'readonly' => true));
     $_graice_pariod = new Zend_Dojo_Form_Element_TextBox('graice_pariod');
     $_graice_pariod->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'required' => 'true'));
//.........这里部分代码省略.........
开发者ID:samlanh,项目名称:currencyms,代码行数:101,代码来源:FrmLoan.php

示例13: FrmCustomer

 public function FrmCustomer($data = null)
 {
     $_dob = new Zend_Form_Element_Text('dob_client');
     $_dob->setValue(date("d-m-Y"));
     $_dob->setAttribs(array('class' => 'fullside', "style" => "width:100%"));
     $request = Zend_Controller_Front::getInstance()->getRequest();
     $db = new Application_Model_DbTable_DbGlobal();
     $_namekh = new Zend_Form_Element_Text('name_kh');
     $_namekh->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $_clientno = new Zend_Form_Element_Text('client_no');
     $_clientno->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $id_client = $db->getNewClientId();
     $_clientno->setValue($id_client);
     $_nameen = new Zend_Form_Element_Text('name_en');
     $_nameen->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $_sex = new Zend_Form_Element_Select('sex');
     $_sex->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $opt_status = $db->getVewOptoinTypeByType(1, 1);
     unset($opt_status[-1]);
     unset($opt_status['']);
     $_sex->setMultiOptions($opt_status);
     $_situ_status = new Zend_Form_Element_Select('status');
     $_situ_status->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $home = new Zend_Form_Element_Text('home');
     $home->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $group_num = new Zend_Form_Element_Text('group_num');
     $group_num->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $i_group_num = new Zend_Form_Element_Text('igroup_num');
     $i_group_num->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $country = new Zend_Form_Element_Select('country');
     $country->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $row = $db->getAllCountry();
     $opt_country = array();
     if (!empty($row)) {
         foreach ($row as $rs) {
             $opt_country[$rs['id']] = $rs['country_name'];
         }
     }
     $country->setMultiOptions($opt_country);
     $state = new Zend_Form_Element_Text('state');
     $state->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $commune = new Zend_Form_Element_Text('commune');
     $commune->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $district = new Zend_Form_Element_Text('district');
     $district->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $icommune = new Zend_Form_Element_Text('zip');
     $icommune->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $city = new Zend_Form_Element_Text('city');
     $city->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $province = new Zend_Form_Element_Select('province');
     $province->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $opt = $db->getAllProvince(1);
     $province->setMultiOptions($opt);
     $_street = new Zend_Form_Element_Text('street');
     $_street->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $address1 = new Zend_Form_Element_Text('address1');
     $address1->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $_id_type = new Zend_Form_Element_Select('id_type');
     $_id_type->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $address = new Zend_Form_Element_Text('address');
     $address->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $_phone = new Zend_Form_Element_Text('phone');
     $_phone->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $photo = new Zend_Form_Element_File('photo');
     $photo->setAttribs(array());
     $job = new Zend_Form_Element_Text('job');
     $job->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $national_id = new Zend_Form_Element_Text('national_id');
     $national_id->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $email = new Zend_Form_Element_Text('email');
     $email->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $iemail = new Zend_Form_Element_Text('iemail');
     $iemail->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $fax = new Zend_Form_Element_Text('fax');
     $fax->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $balance = new Zend_Form_Element_Text('balance');
     $balance->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $_id = new Zend_Form_Element_Hidden("id");
     $_desc = new Zend_Form_Element_Text('desc');
     $_desc->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $_status = new Zend_Form_Element_Select('status');
     $_status->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $_status_opt = array(1 => $this->tr->translate("ACTIVE"), 0 => $this->tr->translate("DACTIVE"));
     $_status->setMultiOptions($_status_opt);
     $_title = new Zend_Form_Element_Select('title');
     $_title->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $_status_opt = array(1 => $this->tr->translate("Mr."), 2 => $this->tr->translate("Ms"), 3 => $this->tr->translate("Miss"));
     $_title->setMultiOptions($_status_opt);
     $customer_type = new Zend_Form_Element_Select('customer_type');
     $customer_type->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;'));
     $_status_opt = array(1 => $this->tr->translate("Self"), 2 => $this->tr->translate("Agency"));
     $customer_type->setMultiOptions($_status_opt);
     $nationality = new Zend_Form_Element_Text('nationality');
     $nationality->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $company_name = new Zend_Form_Element_Text('company_name');
     $company_name->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $passport = new Zend_Form_Element_Text('passport');
     $passport->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $p_issuedate = new Zend_Form_Element_Text('pissue_date');
     $p_issuedate->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
//.........这里部分代码省略.........
开发者ID:samlanh,项目名称:lynacr,代码行数:101,代码来源:FrmBooking.php

示例14: Frmrefundcallecterall

 public function Frmrefundcallecterall()
 {
     $db = new Application_Model_DbTable_DbGlobal();
     $branch = new Zend_Dojo_Form_Element_FilteringSelect('branch');
     $branch->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'required' => 'true'));
     $rows = $db->getAllBranchName();
     $options = '';
     if (!empty($rows)) {
         foreach ($rows as $row) {
             $options[$row['br_id']] = $row['branch_namekh'];
         }
     }
     $branch->setMultiOptions($options);
     $db = new Application_Model_DbTable_DbGlobal();
     $customer_name = new Zend_Dojo_Form_Element_FilteringSelect('customer_name');
     $customer_name->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'onchange' => "getClientInfo(1);"));
     $rows = $db->getClientByType();
     $options = array('' => "------Select------", -1 => "Add New");
     if (!empty($rows)) {
         foreach ($rows as $row) {
             $options[$row['client_id']] = $row['name_en'];
         }
     }
     $customer_name->setMultiOptions($options);
     $db = new Application_Model_DbTable_DbGlobal();
     $cus_code = new Zend_Dojo_Form_Element_FilteringSelect('cus_code');
     $cus_code->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'required' => true, 'onchange' => "getClientInfo(2);"));
     $rows = $db->getClientByType();
     $options = array('' => "------Select------", -1 => "Add New");
     if (!empty($rows)) {
         foreach ($rows as $row) {
             $options[$row['client_id']] = $row['client_number'];
         }
     }
     $cus_code->setMultiOptions($options);
     $callecterall_code = new Zend_Dojo_Form_Element_TextBox('callecterall_code');
     $callecterall_code->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'readonly' => true, 'style' => 'color:red; font-weight: bold;'));
     $client_id = new Zend_Dojo_Form_Element_FilteringSelect('client_id');
     $client_id->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'required' => true));
     $fund_amount = new Zend_Dojo_Form_Element_TextBox('fund_amount');
     $fund_amount->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'required' => true));
     $date = new Zend_Dojo_Form_Element_FilteringSelect('date');
     $date->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'class' => 'fullside', 'required' => true));
     $innalization = new Zend_Dojo_Form_Element_TextBox('innalization');
     $innalization->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'required' => true));
     $note = new Zend_Dojo_Form_Element_TextBox('note');
     $note->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'required' => true));
     $_arr = array(1 => $this->tr->translate("ACTIVE"), 0 => $this->tr->translate("DACTIVE"));
     $stastu = new Zend_Dojo_Form_Element_FilteringSelect("status");
     $stastu->setMultiOptions($_arr);
     $stastu->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'required' => 'true', 'missingMessage' => 'Invalid Module!', 'class' => 'fullside'));
     $db = new Application_Model_DbTable_DbGlobal();
     $callecterall_type = new Zend_Dojo_Form_Element_FilteringSelect('callecterall_type');
     $callecterall_type->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
     $opt = $db->getVewOptoinTypeBys(1);
     $callecterall_type->setMultiOptions($opt);
     $dayless = new Zend_Dojo_Form_Element_DateTextBox('dayless');
     $dayless->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'class' => 'fullside'));
     $dayless->setValue(date('Y-m-d'));
     $db = new Application_Model_DbTable_DbGlobal();
     $cash_type = new Zend_Dojo_Form_Element_FilteringSelect('cash_type');
     $cash_type->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
     $opt = $db->getVewOptoinTypeByType(15, 1);
     $cash_type->setMultiOptions($opt);
     $cash_type->setValue(1);
     $much_boro = new Zend_Dojo_Form_Element_NumberTextBox('much_boro');
     $much_boro->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside'));
     $term_fun = new Zend_Dojo_Form_Element_FilteringSelect('term_fun');
     $term_fun->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
     $opt_fun = $db->getVewOptoinTypeByType(14, 1);
     $term_fun->setMultiOptions($opt_fun);
     $term_fun->setValue(1);
     $charge_term = new Zend_Dojo_Form_Element_FilteringSelect('charge_term');
     $charge_term->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'required' => true));
     $opt_ch_term = array(1 => 'គិតជាភាគរយ​ %', 2 => 'គិតជាលុយផ្ទាល់');
     $charge_term->setMultiOptions($opt_ch_term);
     $amount_money = new Zend_Dojo_Form_Element_TextBox('amount_money');
     $amount_money->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'required' => true));
     $_id = new Zend_Form_Element_Hidden('id');
     $this->addElements(array($branch, $stastu, $note, $innalization, $date, $fund_amount, $client_id, $cash_type, $customer_name, $cus_code, $callecterall_type, $dayless, $much_boro, $term_fun, $charge_term, $amount_money, $callecterall_code));
     return $this;
 }
开发者ID:samlanh,项目名称:lnms,代码行数:82,代码来源:Frmrefundcallecterall.php

示例15: FrmAsset

 public function FrmAsset($data = null)
 {
     $asset_name = new Zend_Dojo_Form_Element_TextBox('asset_name');
     $asset_name->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'required' => true));
     $asset_code = new Zend_Dojo_Form_Element_NumberTextBox('asset_code');
     $asset_code->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => true));
     $db = new Application_Model_DbTable_DbGlobal();
     $paid_type = new Zend_Dojo_Form_Element_FilteringSelect('paid_type');
     $paid_type->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'required' => true));
     $opt = $db->getVewOptoinTypeByType(7, 1);
     $paid_type->setMultiOptions($opt);
     $paid_type->setValue(1);
     $note = new Zend_Dojo_Form_Element_TextBox('note');
     $note->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'required' => true));
     $_stutas = new Zend_Dojo_Form_Element_FilteringSelect('status');
     $_stutas->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
     $options = array(1 => "ប្រើប្រាស់", 0 => "មិនប្រើប្រាស់");
     $_stutas->setMultiOptions($options);
     $some_payamount = new Zend_Dojo_Form_Element_TextBox('some_payamount');
     $some_payamount->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'required' => true));
     $asset_type = new Zend_Dojo_Form_Element_FilteringSelect('asset_type');
     $asset_type->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'required' => true));
     $opt = array(1 => 'Long Term', 2 => 'Short Term');
     $asset_type->setMultiOptions($opt);
     $asset_cost = new Zend_Dojo_Form_Element_NumberTextBox('asset_cost');
     $asset_cost->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => 'true'));
     $useful_life = new Zend_Dojo_Form_Element_NumberTextBox('usefull_life');
     $useful_life->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => true));
     $salvage_value = new Zend_Dojo_Form_Element_NumberTextBox('salvage_value');
     $salvage_value->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => 'true'));
     $payment_method = new Zend_Dojo_Form_Element_FilteringSelect('payment_method');
     $payment_method->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
     $option = array(1 => 'Straight line', 2 => 'Double-declining banlance', 3 => 'Sum of the year');
     $payment_method->setMultiOptions($option);
     $Date = new Zend_Dojo_Form_Element_DateTextBox('date');
     $Date->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'class' => 'fullside'));
     $Date->setValue(date('Y-m-d'));
     $start_date = new Zend_Dojo_Form_Element_DateTextBox('start_date');
     $start_date->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'class' => 'fullside'));
     $start_date->setValue(date('Y-m-d'));
     $_branch_id = new Zend_Dojo_Form_Element_FilteringSelect('branch');
     $_branch_id->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'required' => 'true'));
     // 		$_branch_id = new Zend_Dojo_Form_Element_FilteringSelect('branch_id');
     // 		$_branch_id->setAttribs(array(
     // 				'dojoType'=>'dijit.form.FilteringSelect',
     // 				'class'=>'fullside',
     // 				'required' =>'true'
     // 		));
     $db = new Application_Model_DbTable_DbGlobal();
     $rows = $db->getAllBranchName();
     $options = '';
     if (!empty($rows)) {
         foreach ($rows as $row) {
             $options[$row['br_id']] = $row['branch_namekh'];
         }
     }
     $_branch_id->setMultiOptions($options);
     $_id = new Zend_Form_Element_Hidden('id');
     if ($data != null) {
         $_branch_id->setValue($data['branch_id']);
         $asset_name->setValue($data['fixed_assetname']);
         $asset_type->setValue($data['fixed_asset_type']);
         $asset_cost->setValue($data['asset_cost']);
         $useful_life->setValue($data['usefull_life']);
         $salvage_value->setValue($data['salvagevalue']);
         $payment_method->setValue($data['payment_method']);
         $Date->setValue($data['depreciation_start']);
         $start_date->setValue($data['date']);
         $asset_code->setValue($data['asset_code']);
         $paid_type->setValue($data['pay_type']);
         $some_payamount->setValue($data['some_payamount']);
         $note->setValue($data['note']);
         $_stutas->setValue($data['status']);
         $_id->setValue($data['id']);
     }
     $this->addElements(array($asset_name, $asset_type, $asset_cost, $start_date, $useful_life, $salvage_value, $payment_method, $Date, $_branch_id, $_id, $asset_code, $paid_type, $note, $_stutas, $some_payamount));
     return $this;
 }
开发者ID:samlanh,项目名称:currencyms,代码行数:78,代码来源:Frmasset.php


注:本文中的Application_Model_DbTable_DbGlobal::getVewOptoinTypeByType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。