✏️ 正在编辑: AtualizarComissionamentoCorretores.php
路径:
/srv/systems_dir/yuppiecred-lidernegocios/application/forms/AtualizarComissionamentoCorretores.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php class Form_AtualizarComissionamentoCorretores extends Core_Form { public function init() { $this->setName('f_atualiza_comissao'); $this->addElement('hidden', 'id', array( 'class' => 'invisible' )); $this->addElement('select', 'operacao', array( 'required' => true, 'label' => 'Operação:', 'multiOptions' => array( '' => '', 'A' => 'AUMENTAR', 'D' => 'DIMINUIR', 'S' => 'SETAR' ), 'separator' => ' ' )); $this->addDisplayGroup(array('operacao'), 'display2', array('legend' => 'Operação')); $select = new Zend_Form_Element_Select('banco_id'); $select->setLabel('Banco:') ->setRequired(true) ->addMultiOptions(Core_Combos::getBancosOptions()); $this->addElement($select); $select = new Zend_Form_Element_Select('convenio_id'); $select->setLabel('Convênio:') ->setRequired(true) ->addMultiOptions(Core_Combos::getConveniosOptions()) ->setAttrib('onchange', "populateComboTabelas(this.id, 'tabela_id', 'banco_id')"); $this->addElement($select); $select = new Zend_Form_Element_Select('tabela_id'); $select->setLabel('Tabela:') ->setRegisterInArrayValidator(false); $this->addElement($select); $select = new Zend_Form_Element_Select('tipo_produto'); $select->setLabel('Tipo Produto:') ->addMultiOptions(Core_Combos::getTiposProdutosOptions()); $this->addElement($select); $this->addElement('text', 'prazo_de', array( 'label' => 'Prazo De:', 'onkeypress' => 'mascara(this, soNumeros)', 'size' => 10 )); $this->addElement('text', 'prazo_a', array( 'label' => 'a:', 'onkeypress' => 'mascara(this, soNumeros)', 'size' => 10 )); $this->addElement('text', 'alteracao_comissao', array( 'required' => true, 'label' => 'Alteração na Comissão (%):', 'onkeypress' => 'mascara(this, mvalor)', 'size' => 10 )); $this->addElement('select', "base_comissao_valor", [ 'label' => 'Base comissão:', 'multiOptions' => Core_Combos::getTipoComissaoValorOptions() ]); $this->addElement(Form_DatePicker::getDatePicker('data_inicial', 'Data Inicial:', date('d/m/Y'), true)); $this->addElement('checkbox', 'substituir_existentes', array( 'description' => 'Substituir existentes' )); $this->getElement('substituir_existentes')->getDecorator('Description') ->setOption('tag', 'span'); $this->addDisplayGroup( array( 'banco_id', 'convenio_id', 'tabela_id', 'tipo_produto', 'prazo_de', 'prazo_a', 'data_inicial', ), 'display3', array('legend' => 'Origem') ); $select = new Zend_Form_Element_Select('grupo_comissao'); $select->setLabel('Grupo:') ->addMultiOptions(Core_Combos::getGruposComissaoOptions()); $this->addElement($select); $select = new Zend_Form_Element_Select('corretor_id'); $select->setLabel('Corretor:') ->addMultiOptions(Core_Combos::getCorretoresOptions(true)); $this->addElement($select); $this->addDisplayGroup( array( 'grupo_comissao', 'corretor_id', 'alteracao_comissao', 'base_comissao_valor', 'substituir_existentes' ), 'display', array('legend' => 'Destino')); $this->addElement('button', 'btn_back', array( 'label' => 'Voltar', 'class' => 'bt_back', 'onclick' => "window.location='" . $this->getView()->baseUrl('comissionamento-corretor') . "'" )); $this->addElement('submit', 'btn_save', array( 'label' => 'Salvar', 'class' => 'bt_save' )); $this->removeDisplayGroupDecorator(); $this->addDisplayGroup(array( 'btn_back', 'btn_save' ), 'buttons'); } public function populate(array $values) { if (isset($values['convenio_id'])) { $tabelas = Core_Combos::getTabelasOptions(); $this->getElement('tabela_id')->setMultiOptions($tabelas); } return parent::populate($values); } public function isValid($values) { if (isset($values['convenio_id']) && $values['convenio_id']) { $tabelas = Core_Combos::getTabelasOptions(); $this->getElement('tabela_id')->setMultiOptions($tabelas); } return parent::isValid($values); } protected function removeDisplayGroupDecorator() { foreach ($this->_displayGroups as $dg){ $dg->removeDecorator('DtDdWrapper'); } } }
💾 保存文件
← 返回文件管理器