本文整理汇总了PHP中Application_Model_DbTable_DbGlobal::getClientByType方法的典型用法代码示例。如果您正苦于以下问题:PHP Application_Model_DbTable_DbGlobal::getClientByType方法的具体用法?PHP Application_Model_DbTable_DbGlobal::getClientByType怎么用?PHP Application_Model_DbTable_DbGlobal::getClientByType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Application_Model_DbTable_DbGlobal
的用法示例。
在下文中一共展示了Application_Model_DbTable_DbGlobal::getClientByType方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: FrmSearchLoadSchedule
public function FrmSearchLoadSchedule($forms = null)
{
$request = Zend_Controller_Front::getInstance()->getRequest();
$tr = Application_Form_FrmLanguages::getCurrentlanguage();
$db = new Application_Model_DbTable_DbGlobal();
$_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($request->getParam("from_date"));
$_btn_search = new Zend_Dojo_Form_Element_SubmitButton('btn_search');
$_btn_search->setAttribs(array('dojoType' => 'dijit.form.Button', 'iconclass' => 'dijitIconSearch'));
$_to = new Zend_Dojo_Form_Element_DateTextBox('to_date');
$_to->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'required' => 'true', 'class' => 'fullside'));
$_to->setValue($request->getParam("to_date"));
$_client = new Zend_Dojo_Form_Element_FilteringSelect('client_id');
$_client->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'];
}
}
$_client->setMultiOptions($options);
$_client->setValue($request->getParam("client_id"));
$_coid = new Zend_Dojo_Form_Element_FilteringSelect('co_id');
$rows = $db->getAllCOName();
$options = array(-1 => "------Select------");
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);
$_coid->setValue($request->getParam("co_id"));
$_loan_type = new Zend_Dojo_Form_Element_FilteringSelect('loan_type');
$_loan_type->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
$options = array(-1 => 'ទាំងអស់', 1 => 'ឥណទានទោល', 2 => 'ឥណទានក្រុម');
$_loan_type->setMultiOptions($options);
$_client_no = new Zend_Dojo_Form_Element_TextBox('client_code');
$_client_no->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
$options = array(-1 => 'ជ្រើសរើសទាំងអស់', 1 => 'ឥណទានទោល', 2 => 'ឥណទានក្រុម');
$_loan_type->setMultiOptions($options);
$this->addElements(array($_btn_search, $_client, $_coid, $_client_no, $_loan_type, $_from_date, $_to));
return $this;
}
示例2: 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(
//.........这里部分代码省略.........
示例3: FrmAddClient
public function FrmAddClient($data = null)
{
$_group = new Zend_Dojo_Form_Element_CheckBox('is_group');
$_group->setAttribs(array('dojoType' => 'dijit.form.CheckBox', 'onchange' => 'getGroupCode();'));
$_group_code = new Zend_Dojo_Form_Element_TextBox('group_code');
$_group_code->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'readonly' => 'readonly', 'style' => 'color:red;'));
// $db = new Application_Model_DbTable_DbGlobal();
// $id_client = $db->getNewClientId();
$_branch_id = new Zend_Dojo_Form_Element_FilteringSelect('branch_id');
$_branch_id->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
$db = new Application_Model_DbTable_DbGlobal();
$rows = $db->getAllBranchName();
$options = array('' => "------Select------", -1 => "Add New");
if (!empty($rows)) {
foreach ($rows as $row) {
$options[$row['br_id']] = $row['displayby'] == 1 ? $row['branch_namekh'] : $row['branch_nameen'];
}
}
$_branch_id->setMultiOptions($options);
$_member = new Zend_Dojo_Form_Element_FilteringSelect('group_id');
$_member->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
$db = new Application_Model_DbTable_DbGlobal();
$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);
$_namekh = new Zend_Dojo_Form_Element_TextBox('name_kh');
$_namekh->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox', 'class' => 'fullside', 'required' => 'true'));
$id_client = $db->getNewClientId();
$_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_TextBox('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 = array(1 => "Male", 2 => "Femail");
$_sex->setMultiOptions($opt);
$_situ_status = new Zend_Dojo_Form_Element_FilteringSelect('situ_status');
$_situ_status->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
$opt_status = $db->getAllSituation();
$_situ_status->setMultiOptions($opt_status);
$_province = new Zend_Dojo_Form_Element_FilteringSelect('province');
$_province->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
$rows = $db->getAllProvince();
$options = array('' => "------Select------", -1 => "Add New");
if (!empty($rows)) {
foreach ($rows as $row) {
$options[$row['province_id']] = $row['province_en_name'];
}
}
$_province->setMultiOptions($options);
$_district = new Zend_Dojo_Form_Element_FilteringSelect('district');
$rows = $db->getAllDistrict();
$options = array('' => "------Select------", -1 => "Add New");
if (!empty($rows)) {
foreach ($rows as $row) {
$options[$row['dis_id']] = $row['district_name'];
}
}
$_district->setMultiOptions($options);
$_district->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'onchange' => 'popupCheckDistrict();'));
$_commune = new Zend_Dojo_Form_Element_FilteringSelect('commune');
$rows = $db->getCommune();
$options = array('' => "------Select------", -1 => "Add New");
if (!empty($rows)) {
foreach ($rows as $row) {
$options[$row['com_id']] = $row['commune_name'];
}
}
$_commune->setMultiOptions($options);
$_commune->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'onchange' => 'popupCheckCommune();'));
$_village = new Zend_Dojo_Form_Element_FilteringSelect('village');
$_village->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'required' => 'true', 'onchange' => 'popupCheckVillage();'));
$rows = $db->getVillage();
$options = array('' => "------Select------", -1 => "Add New");
if (!empty($rows)) {
foreach ($rows as $row) {
$options[$row['vill_id']] = $row['village_name'];
}
}
$_village->setMultiOptions($options);
$_house = new Zend_Dojo_Form_Element_TextBox('house');
$_house->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox', 'class' => 'fullside'));
$_street = new Zend_Dojo_Form_Element_TextBox('street');
$_street->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox', 'class' => 'fullside', 'required' => 'true'));
$_id_type = new Zend_Dojo_Form_Element_FilteringSelect('id_type');
$_id_type->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'required' => 'true'));
$rows = $db->GetAllIDType();
$_id_type->setMultiOptions($rows);
$_id_no = new Zend_Dojo_Form_Element_TextBox('id_no');
$_id_no->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox', 'class' => 'fullside', 'required' => 'true'));
$_phone = new Zend_Dojo_Form_Element_TextBox('phone');
$_phone->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
$_spouse = new Zend_Dojo_Form_Element_TextBox('spouse');
$_spouse->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
//.........这里部分代码省略.........
示例4: FrmTeller
public function FrmTeller($data=null){
$db = new Application_Model_DbTable_DbGlobal();
$_groupid = new Zend_Dojo_Form_Element_FilteringSelect('group_id');
$_groupid->setAttribs(array(
'dojoType'=>'dijit.form.FilteringSelect',
'class'=>'fullside',
'onchange'=>'popupCheckClient();'
));
$bran_=new Zend_Dojo_Form_Element_FilteringSelect('bran');
$bran_->setAttribs(array(
'dojoType'=>'dijit.form.FilteringSelect',
'class'=>'fullside'
));
$rows = $db->getAllBranchName();
$options='';
if(!empty($rows))foreach($rows AS $row){
$options[$row['br_id']]=$row['branch_namekh'];
}
$bran_->setMultiOptions($options);
$account_number=new Zend_Dojo_Form_Element_NumberTextBox('account_number');
$account_number->setAttribs(array(
'dojoType'=>'dijit.form.NumberTextBox',
'class'=>'fullside'
));
$rows = $db ->getClientByType(1);
$options="";
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');
$_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);
$_priciple_amount = new Zend_Dojo_Form_Element_NumberTextBox('priciple_amount');
$_priciple_amount->setAttribs(array(
'dojoType'=>'dijit.form.NumberTextBox',
'class'=>'fullside',
));
$_loan_fee = new Zend_Dojo_Form_Element_NumberTextBox('loan_fee');
$_loan_fee->setAttribs(array(
'dojoType'=>'dijit.form.NumberTextBox',
'class'=>'fullside',
));
$_os_amount = new Zend_Dojo_Form_Element_NumberTextBox('os_amount');
$_os_amount->setAttribs(array(
'dojoType'=>'dijit.form.NumberTextBox',
'class'=>'fullside',
));
$_rate = new Zend_Dojo_Form_Element_NumberTextBox('total_interest');
$_rate->setAttribs(array(
'dojoType'=>'dijit.form.NumberTextBox',
'class'=>'fullside',
'required' =>'true'
));
// $value_interest = 2.5;
// $_rate->setValue($value_interest);
$_penalize_amount = new Zend_Dojo_Form_Element_NumberTextBox('penalize_amount');
$_penalize_amount->setAttribs(array(
'dojoType'=>'dijit.form.NumberTextBox',
'class'=>'fullside',
));
$_penalize_amount->setValue(0);
$_total_payment = new Zend_Dojo_Form_Element_NumberTextBox('total_payment');
$_total_payment->setAttribs(array(
'dojoType'=>'dijit.form.NumberTextBox',
'class'=>'fullside',
'required' =>'true'
));
$_note = new Zend_Dojo_Form_Element_NumberTextBox('note');
$_note->setAttribs(array(
'dojoType'=>'dijit.form.NumberTextBox',
'class'=>'fullside',
'required' =>'true'
));
$cash_got=new Zend_Dojo_Form_Element_NumberTextBox('cash_got');
$cash_got->setAttribs(array(
'dojoType'=>'dijit.form.NumberTextBox',
'class'=>'fullside'
//.........这里部分代码省略.........
示例5: 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']);
//.........这里部分代码省略.........
示例6: FrmAddClient
public function FrmAddClient($data=null){
$_spouse = new Zend_Dojo_Form_Element_TextBox('spouse');
$_spouse->setAttribs(array(
'dojoType'=>'dijit.form.TextBox',
'class'=>'fullside',
));
$_releted = new Zend_Dojo_Form_Element_TextBox('relate_with');
$_releted->setAttribs(array(
'dojoType'=>'dijit.form.TextBox',
'class'=>'fullside',
));
$clienttype_nameen= new Zend_Dojo_Form_Element_DateTextBox('clienttype_nameen');
$clienttype_nameen->setAttribs(array('dojoType'=>'dijit.form.TextBox','class'=>'fullside'
));
$clienttype_namekh= new Zend_Dojo_Form_Element_DateTextBox('clienttype_namekh');
$clienttype_namekh->setAttribs(array('dojoType'=>'dijit.form.TextBox','class'=>'fullside'
));
$dob_join_acc= new Zend_Dojo_Form_Element_DateTextBox('dob_join_acc');
$dob_join_acc->setAttribs(array('dojoType'=>'dijit.form.DateTextBox','class'=>'fullside',
));
$_dob_Guarantor= new Zend_Dojo_Form_Element_DateTextBox('dob_guarantor');
$_dob_Guarantor->setAttribs(array('dojoType'=>'dijit.form.DateTextBox','class'=>'fullside',
));
$_dob= new Zend_Dojo_Form_Element_DateTextBox('dob_client');
$_dob->setAttribs(array('dojoType'=>'dijit.form.DateTextBox','class'=>'fullside',
));
$_relate_tel = new Zend_Dojo_Form_Element_TextBox('relate_tel');
$_relate_tel->setAttribs(array(
'dojoType'=>'dijit.form.TextBox',
'class'=>'fullside',
));
$_guarantor_tel = new Zend_Dojo_Form_Element_TextBox('guarantor_tel');
$_guarantor_tel->setAttribs(array(
'dojoType'=>'dijit.form.TextBox',
'class'=>'fullside',
));
$_guarantor_with = new Zend_Dojo_Form_Element_TextBox('guarantor_with');
$_guarantor_with->setAttribs(array(
'dojoType'=>'dijit.form.TextBox',
'class'=>'fullside',
));
$request=Zend_Controller_Front::getInstance()->getRequest();
$_group = new Zend_Dojo_Form_Element_CheckBox('is_group');
$_group->setAttribs(array(
'dojoType'=>'dijit.form.CheckBox',
'onClick'=>'getGroupCode();',
));
$_group_code = new Zend_Dojo_Form_Element_TextBox('group_code');
$_group_code->setAttribs(array(
'dojoType'=>'dijit.form.TextBox',
'class'=>'fullside',
'readonly'=>'readonly',
'style'=>'color:red;'
));
// $db = new Application_Model_DbTable_DbGlobal();
// $id_client = $db->getNewClientId();
$_branch_id = new Zend_Dojo_Form_Element_FilteringSelect('branch_id');
$_branch_id->setAttribs(array(
'dojoType'=>'dijit.form.FilteringSelect',
'class'=>'fullside',
'Onchange'=>'getFunction();'
));
$db = new Application_Model_DbTable_DbGlobal();
$rows = $db->getAllBranchName();
$options=array(''=>"---Select Branch Name---");
if(!empty($rows))foreach($rows AS $row) $options[$row['br_id']]=$row['displayby']==1?$row['branch_namekh']:$row['branch_nameen'];
$_branch_id->setMultiOptions($options);
$_member = new Zend_Dojo_Form_Element_FilteringSelect('group_id');
$_member->setAttribs(array(
'dojoType'=>'dijit.form.FilteringSelect',
'class'=>'fullside',
'onchange'=>'getGroupCode();'
));
$db = new Application_Model_DbTable_DbGlobal();
$rows = $db->getClientByType(1);
$options=array(''=>"---Select Group Name---");
if(!empty($rows))foreach($rows AS $row) $options[$row['client_id']]=$row['name_en'];
$_member->setMultiOptions($options);
$_namekh = new Zend_Dojo_Form_Element_TextBox('name_kh');
$_namekh->setAttribs(array(
'dojoType'=>'dijit.form.ValidationTextBox',
'class'=>'fullside',
'required' =>'true'
));
//.........这里部分代码省略.........
示例7: 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'));
//.........这里部分代码省略.........
示例8: 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;
}
示例9: getAllClientCodeOption
public function getAllClientCodeOption()
{
$_db = new Application_Model_DbTable_DbGlobal();
$rows = $_db->getClientByType();
// array_unshift($rows, array('client_id'=>-1,'client_number'=>"Add New"));
$options = '';
if (!empty($rows)) {
foreach ($rows as $value) {
$options .= '<option value="' . $value['client_id'] . '" >' . htmlspecialchars($value['client_number'], ENT_QUOTES) . '</option>';
}
}
return $options;
}