本文整理汇总了PHP中Application_Model_DbTable_DbGlobal::getAllBranchName方法的典型用法代码示例。如果您正苦于以下问题:PHP Application_Model_DbTable_DbGlobal::getAllBranchName方法的具体用法?PHP Application_Model_DbTable_DbGlobal::getAllBranchName怎么用?PHP Application_Model_DbTable_DbGlobal::getAllBranchName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Application_Model_DbTable_DbGlobal
的用法示例。
在下文中一共展示了Application_Model_DbTable_DbGlobal::getAllBranchName方法的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;
}
示例2: Frmchengcallecterall
public function Frmchengcallecterall()
{
$db = new Application_Model_DbTable_DbGlobal();
$request = Zend_Controller_Front::getInstance()->getRequest();
$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();
$owner = new Zend_Dojo_Form_Element_FilteringSelect('owner');
$owner->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'onchange' => "popupCheckStaff();"));
$options = $db->getGroupCodeById(2, 0, 1);
$owner->setMultiOptions($options);
$db = new Application_Model_DbTable_DbGlobal();
$owner_code = new Zend_Dojo_Form_Element_FilteringSelect('owner_code');
$group_opt = $db->getGroupCodeById(1, 0, 1);
//code,individual,option
$owner_code->setMultiOptions($group_opt);
$owner_code->setValue($request->getParam('client_code'));
$from = new Zend_Dojo_Form_Element_FilteringSelect('from');
$from->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'required' => true));
$from->setValue($request->getParam('from'));
$opt = $db->getCollteralType(1);
$from->setMultiOptions($opt);
$to = new Zend_Dojo_Form_Element_FilteringSelect('to');
$to->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'required' => true));
$opt = $db->getCollteralType(1);
$to->setMultiOptions($opt);
$owners = new Zend_Dojo_Form_Element_TextBox('owners');
$owners->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'required' => true));
$_personal = new Zend_Dojo_Form_Element_FilteringSelect('personal');
$_personal->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
$opt = array(1 => 'ផ្ទាល់ខ្លួន', 2 => 'អ្នកធានាជំនួស');
$_personal->setMultiOptions($opt);
$_personal->setValue(1);
$numbernote = new Zend_Dojo_Form_Element_NumberTextBox('numbernote');
$numbernote->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => true));
$date = new Zend_Dojo_Form_Element_DateTextBox('date');
$date->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'class' => 'fullside', 'required' => true));
$date->setValue(date('Y-m-d'));
$note = new Zend_Dojo_Form_Element_TextBox('note');
$note->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'required' => true));
$status = new Zend_Dojo_Form_Element_FilteringSelect('status');
$status->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'required' => true));
$options = array(1 => "ប្រើប្រាស់", 2 => "មិនប្រើប្រាស់");
$status->setMultiOptions($options);
$detial = new Zend_Dojo_Form_Element_TextBox('detial');
$detial->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'required' => true));
$this->addElements(array($branch, $owner, $from, $to, $date, $note, $status, $owners, $owner_code, $detial, $_personal, $numbernote));
return $this;
}
示例3: FrmGeneraljurnal
public function FrmGeneraljurnal($data = null)
{
$Brance = new Zend_Dojo_Form_Element_FilteringSelect('brance');
$Brance->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'];
}
}
$Brance->setMultiOptions($options);
$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_FilteringSelect('account_number');
$Account_Number->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'required' => 'true'));
$db = new Application_Model_DbTable_DbGlobal();
$sql = "SELECT id,account_name_en,account_code FROM ln_account_name WHERE status=1";
$rows = $db->getGlobalDb($sql);
$opt = '';
if (!empty($rows)) {
foreach ($rows as $row) {
$opt[$row['id']] = $row['account_code'];
}
}
$Account_Number->setMultiOptions($opt);
$Account_name = new Zend_Dojo_Form_Element_FilteringSelect('account_name');
$Account_name->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
$opt = '';
if (!empty($rows)) {
foreach ($rows as $row) {
$opt[$row['id']] = $row['account_name_en'];
}
}
$Account_name->setMultiOptions($opt);
$Note = new Zend_Dojo_Form_Element_TextBox('note');
$Note->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
$Debit = new Zend_Dojo_Form_Element_TextBox('debit');
$Debit->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
$Debit->setValue(0);
$Credit = new Zend_Dojo_Form_Element_TextBox('credit');
$Credit->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
$Credit->setValue(0);
$this->addElements(array($Add_Date, $Account_Number, $Account_name, $Note, $Debit, $Credit, $Brance));
return $this;
}
示例4: FrmIncome
public function FrmIncome($data = null)
{
$account_id = new Zend_Dojo_Form_Element_TextBox('account_id');
$account_id->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
$for_date = new Zend_Dojo_Form_Element_FilteringSelect('for_date');
$for_date->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
$opt_month = "";
for ($i = 1; $i <= 12; $i++) {
$opt_month[$i] = $i;
}
$for_date->setMultiOptions($opt_month);
$_Date = new Zend_Dojo_Form_Element_DateTextBox('Date');
$_Date->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'required' => true, 'class' => 'fullside'));
$_Date->setValue(date('Y-m-d'));
$_branch_id = new Zend_Dojo_Form_Element_FilteringSelect('branch_id');
$_branch_id->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'required' => 'true', 'class' => 'fullside', 'onchange' => 'filterClient();'));
$db = new Application_Model_DbTable_DbGlobal();
$rows = $db->getAllBranchName();
$options = array('' => '---Select Branch---');
if (!empty($rows)) {
foreach ($rows as $row) {
$options[$row['br_id']] = $row['branch_namekh'];
}
}
$_branch_id->setMultiOptions($options);
$_stutas = new Zend_Dojo_Form_Element_FilteringSelect('Stutas');
$_stutas->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
$options = array(1 => "ប្រើប្រាស់", 2 => "មិនប្រើប្រាស់");
$_stutas->setMultiOptions($options);
$total_amount = new Zend_Dojo_Form_Element_NumberTextBox('total_amount');
$total_amount->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside'));
$_Description = new Zend_Dojo_Form_Element_Textarea('Description');
$_Description->setAttribs(array('dojoType' => 'dijit.form.SimpleTextarea', 'class' => 'fullside', 'style' => 'width:98%'));
$id = new Zend_Form_Element_Hidden("id");
if ($data != null) {
$_branch_id->setValue($data['branch_id']);
$account_id->setValue($data['account_id']);
$total_amount->setValue($data['total_amount']);
$for_date->setValue($data['fordate']);
$_Description->setValue($data['disc']);
$_Date->setValue($data['date']);
$_stutas->setValue($data['status']);
$id->setValue($data['id']);
}
$this->addElements(array($account_id, $_Date, $_stutas, $total_amount, $_Description, $_branch_id, $for_date, $id));
return $this;
}
示例5: 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;
}
示例6: FrmAddLoan
//.........这里部分代码省略.........
$_every_payamount->setMultiOptions($options);
$_time= new Zend_Dojo_Form_Element_TextBox('time');
$_time->setAttribs(array(
'dojoType'=>'dijit.form.TextBox',
'class'=>'fullside',
));
$set_time='10:00-11:00 AM';
$_time->setValue($set_time);
$_paybefore = new Zend_Dojo_Form_Element_NumberTextBox('pay_before');
$_paybefore->setAttribs(array(
'dojoType'=>'dijit.form.NumberTextBox',
'class'=>'fullside',
'required' =>'true'
));
$_paybefore->setValue(0);
$_pay_late = new Zend_Dojo_Form_Element_NumberTextBox('pay_late');
$_pay_late->setAttribs(array(
'dojoType'=>'dijit.form.NumberTextBox',
'class'=>'fullside',
'required' =>'true'
));
$_pay_late->setValue(0);
$_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='';
if(!empty($rows))foreach($rows AS $row){
$options[$row['br_id']]=$row['branch_namekh'];
}
$_branch_id->setMultiOptions($options);
$_repayment_method = new Zend_Dojo_Form_Element_FilteringSelect('repayment_method');
$_repayment_method->setAttribs(array(
'dojoType'=>'dijit.form.FilteringSelect',
'class'=>'fullside',
'required' =>'true',
'onchange'=>'chechPaymentMethod()'
));
$options = $db->getAllPaymentMethod(null,1);
$_repayment_method->setMultiOptions($options);
$_holiday = new Zend_Dojo_Form_Element_FilteringSelect('holiday');
$_holiday->setAttribs(array(
'dojoType'=>'dijit.form.FilteringSelect',
'class'=>'fullside',
'required' =>'true'
));
$options= array(1=>"Befor",2=>"After",3=>"Cancel");
$_holiday->setMultiOptions($options);
$_id = new Zend_Form_Element_Hidden('id');
if($data!=null){
// print_r($data);
$_branch_id->setValue($data['branch_id']);
$_loan_code->setValue($data['loan_number']);
$_level->setValue($data['level']);
$_loan_fee->setValue($data['admin_fee']);
示例7: FrmAddLoan
//.........这里部分代码省略.........
'class'=>'fullside',
));
$set_time='10:00-11:00 AM';
$_time->setValue($set_time);
$_paybefore = new Zend_Dojo_Form_Element_NumberTextBox('pay_before');
$_paybefore->setAttribs(array(
'dojoType'=>'dijit.form.NumberTextBox',
'class'=>'fullside',
'required' =>'true'
));
$_paybefore->setValue(0);
$_pay_late = new Zend_Dojo_Form_Element_NumberTextBox('pay_late');
$_pay_late->setAttribs(array(
'dojoType'=>'dijit.form.NumberTextBox',
'class'=>'fullside',
'required' =>'true'
));
$_pay_late->setValue(0);
$arr=$db->getSystemSetting('interest_late');
$_pay_late->setValue($arr['value']);
// print_r($arr);exit();
$_branch_id = new Zend_Dojo_Form_Element_FilteringSelect('branch_id');
$_branch_id->setAttribs(array(
'dojoType'=>'dijit.form.FilteringSelect',
'class'=>'fullside',
'required' =>'true',
'onchange'=>'filterClient();'
));
$rows = $db->getAllBranchName();
$options=array(''=>'---Select Branch---');
if(!empty($rows))foreach($rows AS $row){
$options[$row['br_id']]=$row['branch_namekh'];
}
$_branch_id->setMultiOptions($options);
// $_branch_ids = new Zend_Dojo_Form_Element_FilteringSelect('branch_ids');
// $_branch_ids->setAttribs(array(
// 'dojoType'=>'dijit.form.FilteringSelect',
// 'class'=>'fullside',
// 'required' =>'true',
// 'onchange'=>'filterClient();'
// ));
// $rows = $db->getAllBranchName();
// $optionsa=array(''=>'---Select Branch---');
// if(!empty($rows))foreach($rows AS $row){
// $optionsa[$row['br_id']]=$row['branch_namekh'];
// }
// $_branch_ids->setMultiOptions($optionsa);
$_repayment_method = new Zend_Dojo_Form_Element_FilteringSelect('repayment_method');
$_repayment_method->setAttribs(array(
'dojoType'=>'dijit.form.FilteringSelect',
'class'=>'fullside',
'required' =>'true',
'onchange'=>'chechPaymentMethod()'
));
$options = $db->getAllPaymentMethod(null,1);
$_repayment_method->setMultiOptions($options);
$_status = new Zend_Dojo_Form_Element_FilteringSelect('status_using');
示例8: frmSearch
public function frmSearch(){
$request=Zend_Controller_Front::getInstance()->getRequest();
$db = new Application_Model_DbTable_DbGlobal();
$rows = $db->getAllBranchName();
$options=array(-1=>'សូមជ្រើសរើស សាខា');
if(!empty($rows))foreach($rows AS $row){
$options[$row['br_id']]=$row['branch_namekh'];
}
$brance_from = new Zend_Dojo_Form_Element_FilteringSelect('brance_from');
$brance_from->setAttribs(array(
'dojoType'=>'dijit.form.FilteringSelect'
));
$brance_from->setMultiOptions($options);
$brance_from->setValue($request->getParam("brance_from"));
$brance_to = new Zend_Dojo_Form_Element_FilteringSelect('brance_to');
$brance_to->setAttribs(array(
'dojoType'=>'dijit.form.FilteringSelect'
));
$brance_to->setValue($request->getParam("brance_to"));
$brance_to->setMultiOptions($options);
$btnSearch=new Zend_Dojo_Form_Element_SubmitButton('btn_search');
$btnSearch->setAttribs(array(
'dojoType'=>'dijit.form.Button',
'iconclass'=>'dijitIconSearch',
'label' => 'Search'));
$_stutas = new Zend_Dojo_Form_Element_FilteringSelect('status');
$_stutas ->setAttribs(array(
'dojoType'=>'dijit.form.FilteringSelect',
));
$options= array(-1=>"ជ្រើសរើស ស្ថានភាព",1=>"ប្រើប្រាស់",0=>"មិនប្រើប្រាស់");
$_stutas->setMultiOptions($options);
$_stutas->setValue($request->getParam("status"));
$date=new Zend_Dojo_Form_Element_DateTextBox('date');
$date->setAttribs(array(
'dojoType'=>'dijit.form.DateTextBox'
));
$date->setValue(date('Y-m-d'));
$search = new Zend_Dojo_Form_Element_TextBox("search");
$search->setAttribs(array('dojoType' => 'dijit.form.TextBox','placeHolder' => 'ឈ្មោះសាខា ជាភាសាខ្មែរ ឬ អង់គ្លេស',));
$search->setValue($request->getParam("search"));
return $this->addElements(array($search,$brance_from,$brance_to,$_stutas,$btnSearch,$date));
}
示例9: FrmCallTeral
public function FrmCallTeral($data=null){
$db = new Application_Model_DbTable_DbGlobal();
$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_COLLTERAL")
));
$_title->setValue($request->getParam("adv_search"));
$_status_search= new Zend_Dojo_Form_Element_FilteringSelect('status_search');
$_status_search->setAttribs(array('dojoType'=>$this->filter));
$_status_opt = array(
-1=>$this->tr->translate("ALL"),
1=>$this->tr->translate("ACTIVE"),
0=>$this->tr->translate("DACTIVE"));
$_status_search->setMultiOptions($_status_opt);
$_status_search->setValue($request->getParam("status_search"));
$_btn_search = new Zend_Dojo_Form_Element_SubmitButton('btn_search');
$_btn_search->setAttribs(array(
'dojoType'=>'dijit.form.Button',
'iconclass'=>'dijitIconSearch'
));
$_branch_id = new Zend_Dojo_Form_Element_FilteringSelect('branch_id');
$_branch_id->setAttribs(array(
'dojoType'=>'dijit.form.FilteringSelect',
'class'=>'fullside',
'required' =>'true',
'Onchange'=>"filterClient();"
));
$rows = $db->getAllBranchName();
$options=array(''=>"------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'));
$db = new Application_Model_DbTable_DbGlobal();
$co_name = new Zend_Dojo_Form_Element_FilteringSelect('co_name');
$rows = $db ->getAllCOName();
$options=array(''=>"------Select Staff------",-1=>"Add New");
if(!empty($rows))foreach($rows AS $row) $options[$row['co_id']]=$row['co_khname'];
$co_name->setAttribs(array(
'dojoType'=>'dijit.form.FilteringSelect',
'class'=>'fullside',
'onchange'=>'popupCheckCO();'
));
$co_name->setMultiOptions($options);
$co_name->setValue($request->getParam('co_name'));
$getter_name = new Zend_Dojo_Form_Element_ValidationTextBox('getter_name');
$getter_name->setAttribs(array(
'dojoType'=>'dijit.form.ValidationTextBox',
'class'=>'fullside',
'required'=>true
));
$giver_name = new Zend_Dojo_Form_Element_TextBox('giver_name');
$giver_name->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'
));
$_name=new Zend_Dojo_Form_Element_ValidationTextBox('name');
$_name->setAttribs(array(
'dojoType'=>'dijit.form.ValidationTextBox',
'class'=>'fullside'
));
$relattive=new Zend_Dojo_Form_Element_ValidationTextBox('names');
$relattive->setAttribs(array(
'dojoType'=>'dijit.form.ValidationTextBox',
'class'=>'fullside'
));
$guarantor=new Zend_Dojo_Form_Element_ValidationTextBox('owner');
$guarantor->setAttribs(array(
'dojoType'=>'dijit.form.ValidationTextBox',
'class'=>'fullside'
));
$relative_guarantor=new Zend_Dojo_Form_Element_ValidationTextBox('and_name');
$relative_guarantor->setAttribs(array(
'dojoType'=>'dijit.form.ValidationTextBox',
'class'=>'fullside'
));
$relative_guarantor_=new Zend_Dojo_Form_Element_ValidationTextBox('and_names');
$relative_guarantor_->setAttribs(array(
//.........这里部分代码省略.........
示例10: FrmReturnCollteral
public function FrmReturnCollteral($data = null)
{
$db = new Application_Model_DbTable_DbGlobal();
$request = Zend_Controller_Front::getInstance()->getRequest();
$_client_code = new Zend_Dojo_Form_Element_FilteringSelect('client_code');
$_client_code->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'onchange' => 'getOwnerInfo();'));
$group_opt = $db->getGroupCodeById(1, 0, 1);
//code,individual,option
$_client_code->setMultiOptions($group_opt);
$_client_code->setValue($request->getParam('client_code'));
$clint_name = new Zend_Dojo_Form_Element_FilteringSelect('client_name');
$clint_name->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'onchange' => 'checkClientCode()'));
$options = $db->getGroupCodeById(2, 0, 1);
$clint_name->setMultiOptions($options);
$_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_search = new Zend_Dojo_Form_Element_FilteringSelect('status_search');
$_status_search->setAttribs(array('dojoType' => $this->filter));
$_status_opt = array(-1 => $this->tr->translate("ALL"), 1 => $this->tr->translate("ACTIVE"), 0 => $this->tr->translate("DACTIVE"));
$_status_search->setMultiOptions($_status_opt);
$_status_search->setValue($request->getParam("status_search"));
$_btn_search = new Zend_Dojo_Form_Element_SubmitButton('btn_search');
$_btn_search->setAttribs(array('dojoType' => 'dijit.form.Button', 'iconclass' => 'dijitIconSearch'));
$Date = new Zend_Dojo_Form_Element_DateTextBox('date');
$Date->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'class' => 'fullside'));
$note = new Zend_Dojo_Form_Element_TextBox('note');
$note->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
$note->setValue('out of loan');
$Date->setValue(date('Y-m-d'));
$stutas = new Zend_Dojo_Form_Element_FilteringSelect('stutas');
$stutas->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
$options = array(1 => "ប្រើប្រាស់", 0 => "មិនប្រើប្រាស់");
$stutas->setMultiOptions($options);
$receiver_name = new Zend_Dojo_Form_Element_ValidationTextBox('receiver_name');
$receiver_name->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox', 'class' => 'fullside', 'required' => true));
$giver_name = new Zend_Dojo_Form_Element_ValidationTextBox('giver_name');
$giver_name->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox', 'class' => 'fullside', 'required' => true));
$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);
$from = new Zend_Dojo_Form_Element_FilteringSelect('from');
$from->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'required' => true));
$from->setValue($request->getParam('from'));
$opt = $db->getCollteralType(1);
$from->setMultiOptions($opt);
$_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 = array('' => "------Select Branch Name------");
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'));
$collteral_type = new Zend_Dojo_Form_Element_FilteringSelect('collteral_type');
$collteral_type->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
$opt = $db->getCollteralType(1);
$collteral_type->setMultiOptions($opt);
$collteral_type->setValue($request->getParam('collteral_type'));
$id = new Zend_Form_Element_Hidden("id");
$receiver_name->setValue($this->getUserName());
if ($data != null) {
$_branch_id->setValue($data['branch_id']);
$clint_name->setValue($data['client_id']);
$_client_code->setValue($data['client_id']);
$giver_name->setValue($data['receiver_name']);
$receiver_name->setValue($data['giver_name']);
$note->setValue($data['note']);
$Date->setValue($data['date']);
$stutas->setValue($data['status']);
$id->setValue($data['return_id']);
}
$this->addElements(array($collteral_type, $_branch_id, $from, $_client_code, $clint_name, $from_date, $to_date, $giver_name, $receiver_name, $_btn_search, $_status_search, $_title, $Date, $note, $Date, $id, $stutas));
return $this;
}
示例11: FrmBadLoan
public function FrmBadLoan($data=null){
$db = new Application_Model_DbTable_DbGlobal();
$request=Zend_Controller_Front::getInstance()->getRequest();
$_title = new Zend_Dojo_Form_Element_TextBox('adv_search');
$_title->setAttribs(array(
'dojoType'=>'dijit.form.TextBox',
'class'=>'fullside',
'placeholder'=>$this->tr->translate("SEARCH")
));
$_title->setValue($request->getParam("adv_search"));
$_branch_id = new Zend_Dojo_Form_Element_FilteringSelect('branch');
$_branch_id->setAttribs(array(
'dojoType'=>'dijit.form.FilteringSelect',
'class'=>'fullside',
'required' =>'true'
));
$rows = $db->getAllBranchName();
$options=array(''=>"---Select Branch Name---");
if(!empty($rows))
foreach($rows AS $row){
$options[$row['br_id']]=$row['branch_namekh'];
}
$_branch_id->setMultiOptions($options);
$_branch_id->setValue($request->getParam('branch'));
$db = new Loan_Model_DbTable_DbBadloan();
$client_code = new Zend_Dojo_Form_Element_FilteringSelect('client_code');
$client_code->setAttribs(array(
'dojoType'=>'dijit.form.FilteringSelect',
'class'=>'fullside',
'onchange'=>'getClientInfo();'
));
$opt= $db->getClientByTypes(1);
$opt[0]='---Select Client Code---';
$client_code->setMultiOptions($opt);
$client_code->setValue($request->getParam('client_code'));
$client_codeadd = new Zend_Dojo_Form_Element_FilteringSelect('client_codeadd');
$client_codeadd->setAttribs(array(
'dojoType'=>'dijit.form.FilteringSelect',
'class'=>'fullside',
'onchange'=>'getClientInfo();'
));
$opt= $db->getClientByTypesADD(1);
$client_codeadd->setMultiOptions($opt);
$client_name = new Zend_Dojo_Form_Element_FilteringSelect('client_name');
$client_name->setAttribs(array(
'dojoType'=>'dijit.form.FilteringSelect',
'class'=>'fullside',
'onchange'=>"getClientInfo(1);"
));
$options = $db->getClientByTypes(2);
$options[0]='---Select Client Name---';
$client_name->setMultiOptions($options);
$client_name->setValue($request->getParam('client_name'));
$client_nameadd = new Zend_Dojo_Form_Element_FilteringSelect('client_nameadd');
$client_nameadd->setAttribs(array(
'dojoType'=>'dijit.form.FilteringSelect',
'class'=>'fullside',
'onchange'=>"getClientInfo(1);"
));
$options = $db->getClientByTypesADD(2);
$client_nameadd->setMultiOptions($options);
$number_code = new Zend_Dojo_Form_Element_FilteringSelect('number_code');
$number_code->setAttribs(array(
'dojoType'=>'dijit.form.FilteringSelect',
'class'=>'fullside',
'onchange'=>"getClientInfo(2);"
));
$options = $db->getClientByTypes(3);
$number_code->setMultiOptions($options);
$_date= new Zend_Dojo_Form_Element_DateTextBox('Date');
$_date->setAttribs(array(
'dojoType'=>'dijit.form.DateTextBox',
'class'=>'fullside',
));
$_date->setValue(date('Y-m-d'));
$date_loss= new Zend_Dojo_Form_Element_DateTextBox('date_loss');
$date_loss->setAttribs(array(
'dojoType'=>'dijit.form.DateTextBox',
'class'=>'fullside',
));
$date_loss->setValue(date('Y-m-d'));
$db = new Loan_Model_DbTable_DbBadloan();
$total_amount = new Zend_Dojo_Form_Element_NumberTextBox('Total_amount');
$total_amount->setAttribs(array(
'dojoType'=>'dijit.form.NumberTextBox',
'class'=>'fullside',
'required'=>true
//.........这里部分代码省略.........
示例12: FrmTransfer
public function FrmTransfer($data=null){
$db = new Application_Model_DbTable_DbGlobal();
$_title = new Zend_Dojo_Form_Element_TextBox('adv_search');
$_title->setAttribs(array(
'dojoType'=>$this->tvalidate,
'onkeyup'=>'this.submit()',
'placeholder'=>$this->tr->translate("SEARCH")
));
$_btn_search = new Zend_Dojo_Form_Element_SubmitButton('btn_search');
$_btn_search->setAttribs(array(
'dojoType'=>'dijit.form.Button',
'iconclass'=>'dijitIconSearch'
));
$request=Zend_Controller_Front::getInstance()->getRequest();
$branch_name = new Zend_Dojo_Form_Element_FilteringSelect('branch_name');
$branch_name->setAttribs(array(
'dojoType'=>'dijit.form.FilteringSelect',
'class'=>'fullside',
'required' =>'true'
));
$rows = $db->getAllBranchName();
$options=array(''=>"------Select------");
if(!empty($rows))
foreach($rows AS $row){
$options[$row['br_id']]=$row['branch_namekh'];
}
$branch_name->setMultiOptions($options);
$branch_name->setValue($request->getParam('branch_id'));
$co_name = new Zend_Dojo_Form_Element_FilteringSelect('co_code');
$co_name->setAttribs(array(
'dojoType'=>'dijit.form.FilteringSelect',
'class'=>'fullside',
'required' =>'true',
'onchange'=>'getClientInfo(1);'
));
$db_co = new Loan_Model_DbTable_DbTransferCo();
$row_co = $db_co->getcoinfo();
$options_co =array(''=>"---Select From CO Code---");
if (!empty($row_co))
foreach ($row_co AS $row_cos){
$options_co[$row_cos['co_id']] = $row_cos['co_code'];
}
$co_name->setMultiOptions($options_co);
$_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 Loan_Model_DbTable_DbBadloan();
$co_code = new Zend_Dojo_Form_Element_FilteringSelect('co_codes');
$co_code->setAttribs(array(
'dojoType'=>'dijit.form.FilteringSelect',
'class'=>'fullside',
// 'onchange'=>'getClientInfo();'
));
// $opt= $db->getClientByTypes(1);
// $co_code->setMultiOptions($opt);
$formc_co = new Zend_Dojo_Form_Element_FilteringSelect('formc_co');
$formc_co->setAttribs(array(
'dojoType'=>'dijit.form.FilteringSelect',
'class'=>'fullside',
'onchange'=>"getClientInfo(2);"
));
$row_froms = $db_co->getcoinfo();
$options_from =array(''=>"---Select From CO Name---");
if (!empty($row_froms))
foreach ($row_froms AS $row_from){
$options_from[$row_from['co_id']] = $row_from['co_khname'];
}
$formc_co->setMultiOptions($options_from);
// $options = $db->getClientByTypes(2);
// $formc_co->setMultiOptions($options);
$to_co = new Zend_Dojo_Form_Element_FilteringSelect('to_co');
$to_co->setAttribs(array(
'dojoType'=>'dijit.form.FilteringSelect',
'class'=>'fullside',
'onchange'=>"getClientInfo(3);"
));
$row_co = $db_co->getcoinfo();
$options_co =array(''=>"---Select To CO Name---");
if (!empty($row_co))
foreach ($row_co AS $row_cos){
$options_co[$row_cos['co_id']] = $row_cos['co_khname'];
}
$to_co->setMultiOptions($options_co);
// $options = $db->getClientByTypes(2);
// $formc_co->setMultiOptions($options);
$to_co_code = new Zend_Dojo_Form_Element_FilteringSelect('to_co_code');
//.........这里部分代码省略.........
示例13: FrmTransfer
public function FrmTransfer($data=null){
$request=Zend_Controller_Front::getInstance()->getRequest();
$db = new Application_Model_DbTable_DbGlobal();
$db_co = new Loan_Model_DbTable_DbTransferCoClient();
$branch_name = new Zend_Dojo_Form_Element_FilteringSelect('branch_name');
$branch_name->setAttribs(array(
'dojoType'=>'dijit.form.FilteringSelect',
'class'=>'fullside',
'required' =>'true'
));
$rows = $db->getAllBranchName();
$options=array(''=>"------Select Branch Name------");
if(!empty($rows))
foreach($rows AS $row){
$options[$row['br_id']]=$row['branch_namekh'];
}
$branch_name->setMultiOptions($options);
$branch_name->setValue($request->getParam('branch_name'));
$_date= new Zend_Dojo_Form_Element_DateTextBox('Date');
$_date->setAttribs(array(
'dojoType'=>'dijit.form.DateTextBox',
'class'=>'fullside',
));
$_date->setValue(date('Y-m-d'));
$co_code = new Zend_Dojo_Form_Element_FilteringSelect('co_code');
$co_code->setAttribs(array(
'dojoType'=>'dijit.form.FilteringSelect',
'class'=>'fullside',
'onchange'=>"getClientInfo(1);"
));
$_member = new Zend_Dojo_Form_Element_FilteringSelect('member');
$_member->setAttribs(array(
'dojoType'=>'dijit.form.FilteringSelect',
'class'=>'fullside',
'onchange'=>'getClientInfo(1);'
));
$db = new Application_Model_DbTable_DbGlobal();
$options = $db->getGroupCodeById(2,0,1);
$_member->setMultiOptions($options);
$_customer_code = new Zend_Dojo_Form_Element_FilteringSelect('customer_code');
$_customer_code->setAttribs(array(
'dojoType'=>'dijit.form.FilteringSelect',
'class'=>'fullside',
'onchange'=>'getClientInfo(2);'
));
$group_opt = $db->getGroupCodeById(1,0,1);//code,individual,option
$_customer_code->setMultiOptions($group_opt);
$row_co = $db->getAllCOName();
$options_co =array(''=>"------Select From CO ------");
if (!empty($row_co))
foreach ($row_co AS $row_cos){
$options_co[$row_cos['co_id']] = $row_cos['co_firstname'];
}
$co_code->setMultiOptions($options_co);
$co_code->setValue($request->getParam('co_code'));
$formc_co = new Zend_Dojo_Form_Element_FilteringSelect('name_co');
$formc_co->setAttribs(array(
'dojoType'=>'dijit.form.FilteringSelect',
'class'=>'fullside',
'onchange'=>"getClientInfo(2);"
));
$options = $db->getAllCOName(1);
$options['']='---Select To CO---';
$formc_co->setMultiOptions($options);
$formc_co->setValue($request->getParam('name_co'));
$name_client = new Zend_Dojo_Form_Element_FilteringSelect('name_client');
$name_client->setAttribs(array(
'dojoType'=>'dijit.form.FilteringSelect',
'class'=>'fullside',
'onchange'=>"getClientInfo(3);"
));
$row_co = $db_co->getcoinfo();
$options_co =array(''=>"---Select Client Name---");
if (!empty($row_co))
foreach ($row_co AS $row_cos){
$options_co[$row_cos['member_id']] = $row_cos['client_name'];
}
$name_client->setMultiOptions($options_co);
$code_client = new Zend_Dojo_Form_Element_FilteringSelect('code_client');
$code_client->setAttribs(array(
'dojoType'=>'dijit.form.FilteringSelect',
'class'=>'fullside',
'onchange'=>"getClientInfo(4);"
));
$row_number = $db_co->getcoinfo();
$options_numbers=array(''=>"---Select Client Code---");
//.........这里部分代码省略.........
示例14: 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;
}
示例15: AdvanceSearch
public function AdvanceSearch ($data=null){
$request=Zend_Controller_Front::getInstance()->getRequest();
$db = new Loan_Model_DbTable_DbGroupPayment();
$payment_type = new Zend_Dojo_Form_Element_FilteringSelect("paymnet_type");
$payment_type->setAttribs(array('class'=>'fullside','dojoType'=>'dijit.form.FilteringSelect'));
$options= array(''=>'ប្រភេទបង់ប្រាក់',1=>'បង់ធម្មតា',2=>'បង់មុន',3=>'បង់រំលោះប្រាក់ដើម');
$payment_type->setMultiOptions($options);
$payment_type->setValue($request->getParam("paymnet_type"));
$branch = new Zend_Dojo_Form_Element_FilteringSelect("branch_id");
$branch->setAttribs(array('class'=>'fullside','dojoType'=>'dijit.form.FilteringSelect'));
$opt_branch = array(-1=>'ជ្រើសរើស សាខា');
$dbs = new Application_Model_DbTable_DbGlobal();
$rows = $dbs->getAllBranchName();
if(!empty($rows))foreach($rows AS $row){
$opt_branch[$row['br_id']]=$row['branch_namekh'];
}
$branch->setMultiOptions($opt_branch);
$branch->setValue($request->getParam("branch_id"));
$advnceSearch = new Zend_Dojo_Form_Element_TextBox("advance_search");
$advnceSearch->setAttribs(array('class'=>'fullside'
,'dojoType'=>'dijit.form.TextBox'
,'placeholder'=>$this->tr->translate("ADVANCE_SEARCH")));
$client_name = new Zend_Dojo_Form_Element_FilteringSelect("client_name");
$opt_client = array(''=>'ជ្រើសរើស ឈ្មោះអតិថិជន');
$rows = $db->getIndividuleClient();
if(!empty($rows))foreach($rows AS $row){
$opt_client[$row['id']]=$row['name'];
}
$client_name->setMultiOptions($opt_client);
$client_name->setAttribs(array('class'=>'fullside','dojoType'=>'dijit.form.FilteringSelect'));
$g_client_name = new Zend_Dojo_Form_Element_FilteringSelect("g_client_name");
$opt_client = array(''=>'ជ្រើសរើស ឈ្មោះអតិថិជន');
$rows = $db->getAllClient();
if(!empty($rows))foreach($rows AS $row){
$opt_client[$row['id']]=$row['name'];
}
$g_client_name->setMultiOptions($opt_client);
$g_client_name->setAttribs(array('class'=>'fullside','dojoType'=>'dijit.form.FilteringSelect'));
$_coid = new Zend_Dojo_Form_Element_FilteringSelect('co_id');
$_coid->setAttribs(array(
'dojoType'=>'dijit.form.FilteringSelect',
'onchange'=>'popupCheckCO();',
'class'=>'fullside'
));
$options = $dbs->getAllCOName(1);
$_coid->setMultiOptions($options);
$_coid->setValue($request->getParam("co_id"));
$start_date = new Zend_Dojo_Form_Element_DateTextBox("start_date");
$start_date->setAttribs(array('class'=>'fullside','dojoType'=>'dijit.form.DateTextBox','placeholder'=>$this->tr->translate("ចាប់ពីថ្ងៃ")));
//$start_date->setValue($date);
$_date = $request->getParam("start_date");
if(empty($_date)){
$_date = date('Y-m-d');
}
$start_date->setValue($_date);
$date = date("y-m-d");
$end_date = new Zend_Dojo_Form_Element_DateTextBox("end_date");
$end_date->setAttribs(array('class'=>'fullside','dojoType'=>'dijit.form.DateTextBox','placeholder'=>$this->tr->translate("រហូតដល់ថ្ងៃ")));
//$end_date->setValue($date);
$_date = $request->getParam("end_date");
if(empty($_date)){
$_date = date('Y-m-d');
}
$end_date->setValue($_date);
$status = new Zend_Dojo_Form_Element_FilteringSelect("status");
$status->setAttribs(array('class'=>'fullside','dojoType'=>'dijit.form.FilteringSelect','placeholder'=>$this->tr->translate("ស្ថានការ")));
$opt_status = array(''=>'ជ្រើសរើស ស្ថានការ','1'=>'ដំណើការ','2'=>'មិនដំណើការ');
$status->setMultiOptions($opt_status);
$submit = new Zend_Dojo_Form_Element_SubmitButton("btn_submit");
$submit->setAttribs(array('dojoType'=>'dijit.form.Button',
'iconclass'=>'dijitIconSearch',
'label'=>'Search'));
$advnceSearch->setValue($request->getParam("advance_search"));
$client_name->setValue($request->getParam("client_name"));
//$start_date->setValue($request->getParam("start_date"));
//$end_date->setValue($request->getParam("end_date"));
$status->setValue($request->getParam("status"));
$_currency_type = new Zend_Dojo_Form_Element_FilteringSelect('currency_type');
$_currency_type->setAttribs(array(
'dojoType'=>'dijit.form.FilteringSelect',
));
$opt = array(-1=>"--Select Currency Type--",2=>"Dollar",1=>'Khmer',3=>"Bath");
$_currency_type->setMultiOptions($opt);
$_currency_type->setValue($request->getParam("currency_type"));
if($data!=null){
$advnceSearch->setValue($request->getParam("advance_search"));
//.........这里部分代码省略.........