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


PHP DataEdit::getval方法代码示例

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


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

示例1: dataedit


//.........这里部分代码省略.........
						data: {"q":req.term},
						success:
							function(data){
								var sugiere = [];
								if(data.length==0){
									$("#nombre").val("");
									$("#nombre_val").text("");

									$("#nacional").val("");
									$("#nacional_val").text("");

									$("#cedula").val("");
									$("#cedula_val").text("");

								}else{
									$.each(data,
										function(i, val){
											sugiere.push( val );
										}
									);
								}
								add(sugiere);
							},
					})
				},
				minLength: 2,
				select: function( event, ui ) {
					$("#codigo").attr("readonly", "readonly");

					$("#nombre").val(ui.item.nombre);
					$("#nombre_val").text(ui.item.nombre);

					$("#nacional").val(ui.item.nacional);
					$("#nacional_val").text(ui.item.nacional);

					$("#cedula").val(ui.item.cedula);
					$("#cedula_val").text(ui.item.cedula);

					setTimeout(function() {  $("#codigo").removeAttr("readonly"); }, 1500);
				}
			});
		});';
        $do = new DataObject('cacc');
        $do->pointer('pers', 'cacc.codigo=pers.codigo', 'pers.nombre AS persnombre,pers.nacional AS persnacional,pers.cedula AS perscedula', 'left');
        $edit = new DataEdit('', $do);
        $edit->script($script, 'create');
        $edit->script($script, 'modify');
        $edit->on_save_redirect = false;
        $edit->back_url = site_url($this->url . 'filteredgrid');
        $edit->post_process('insert', '_post_insert');
        $edit->post_process('update', '_post_update');
        $edit->post_process('delete', '_post_delete');
        $edit->pre_process('insert', '_pre_insert');
        $edit->pre_process('update', '_pre_update');
        $edit->pre_process('delete', '_pre_delete');
        $edit->codigo = new inputField('Código del trabajador', 'codigo');
        $edit->codigo->rule = 'trim';
        $edit->codigo->mode = 'autohide';
        $edit->codigo->maxlength = 15;
        $edit->codigo->size = 15;
        $edit->codigo->rule = 'required|existepers|callback_chexiste';
        $edit->persnombre = new inputField('Nombre', 'nombre');
        $edit->persnombre->pointer = 'true';
        $edit->persnombre->db_name = 'persnombre';
        $edit->persnombre->type = 'inputhidden';
        $edit->persnacional = new inputField('Cédula', 'nacional');
        $edit->persnacional->pointer = 'true';
        $edit->persnacional->db_name = 'persnacional';
        $edit->persnacional->type = 'inputhidden';
        $edit->perscedula = new inputField('', 'cedula');
        $edit->perscedula->pointer = 'true';
        $edit->perscedula->db_name = 'perscedula';
        $edit->perscedula->type = 'inputhidden';
        $edit->perscedula->in = 'persnacional';
        $edit->fecha = new DateonlyField('Fecha', 'fecha');
        $edit->fecha->size = 12;
        $edit->fecha->rule = 'required';
        $edit->fecha->insertValue = date('Y-m-d');
        $edit->hora = new inputField('Hora', 'hora');
        $edit->hora->maxlength = 8;
        $edit->hora->size = 10;
        $edit->hora->rule = 'required|callback_chhora';
        $edit->hora->insertValue = date('H:i:s');
        $edit->hora->append('hh:mm:ss');
        $edit->hora->style = 'font-size: 2.5em;font-weight:bold;';
        $id = $edit->getval('id');
        if ($id !== false) {
            $id = intval($id);
            $furl = site_url($this->url . 'foto/' . $id . '/' . $id . '.jpg');
            $edit->foto = new containerField('Foto', "<p style='text-align:center'><img border='0' src='{$furl}' alt='Entrada del trabajador' /></p>");
            $edit->foto->when = array('show');
        }
        $edit->build();
        if ($edit->on_success()) {
            $rt = array('status' => 'A', 'mensaje' => 'Registro guardado', 'pk' => $edit->_dataobject->pk);
            echo json_encode($rt);
        } else {
            echo $edit->output;
        }
    }
开发者ID:codethics,项目名称:proteoerp,代码行数:101,代码来源:cacc.php

示例2: dataedit

 function dataedit()
 {
     $this->rapyd->uri->keep_persistence();
     $this->rapyd->load('dataedit', 'datagrid');
     $edit = new DataEdit('Detalle del producto', 'gpt_pro');
     $edit->back_url = site_url($this->url . 'filteredgrid/process');
     $edit->post_process('insert', '_post_insert');
     $edit->post_process('update', '_post_update');
     $edit->post_process('delete', '_post_delete');
     $edit->pre_process('insert', '_pre_insert');
     $edit->pre_process('update', '_pre_update');
     $edit->pre_process('delete', '_pre_delete');
     /*$edit->n1_pro = new inputField('N1_pro','n1_pro');
     		$edit->n1_pro->rule='max_length[2]';
     		$edit->n1_pro->size =4;
     		$edit->n1_pro->maxlength =2;
     
     		$edit->n2_pro = new inputField('N2_pro','n2_pro');
     		$edit->n2_pro->rule='max_length[6]';
     		$edit->n2_pro->size =8;
     		$edit->n2_pro->maxlength =6;
     
     		$edit->n3_pro = new inputField('N3_pro','n3_pro');
     		$edit->n3_pro->rule='max_length[8]';
     		$edit->n3_pro->size =10;
     		$edit->n3_pro->maxlength =8;
     
     		$edit->n4_pro = new inputField('N4_pro','n4_pro');
     		$edit->n4_pro->rule='max_length[12]';
     		$edit->n4_pro->size =14;
     		$edit->n4_pro->maxlength =12;
     
     		$edit->n5_pro = new inputField('N5_pro','n5_pro');
     		$edit->n5_pro->rule='max_length[16]';
     		$edit->n5_pro->size =18;
     		$edit->n5_pro->maxlength =16;*/
     /*$edit->nom_pro = new inputField('Nombre','nom_pro');
     		$edit->nom_pro->rule='max_length[200]';
     		$edit->nom_pro->maxlength =200;
     
     		$edit->pres_pro = new inputField('Presentaci&oacute;n','pres_pro');
     		$edit->pres_pro->rule='max_length[200]';
     		$edit->pres_pro->maxlength =200;
     
     		$edit->lab_pro = new inputField('Laboratorio','lab_pro');
     		$edit->lab_pro->rule='max_length[200]';
     		$edit->lab_pro->maxlength =200;
     
     		$edit->cod_pro = new inputField('Cod.Pro','cod_pro');
     		$edit->cod_pro->rule='max_length[200]';
     		$edit->cod_pro->maxlength =200;
     
     		$edit->gen_pro = new inputField('Gen&eacute;ricos','gen_pro');
     		$edit->gen_pro->rule='max_length[300]';
     		$edit->gen_pro->maxlength =300;*/
     //$edit->mono_pro = new textareaField(' ','mono_pro');
     //$edit->mono_pro = new htmlField(' ','mono_pro');
     //$edit->mono_pro = new editorField(' ','mono_pro');
     //$edit->mono_pro->cols = 70;
     //$edit->mono_pro->rows = 4;
     $memo = $edit->getval('mono_pro');
     //$memo=htmlentities($memo);
     $memo = str_replace('<br/>', '</p><p>', $memo);
     /*$memo=highlight_phrase($memo,'Composici&oacute;n:'  ,'</p><p><b>','</b>');
     		$memo=highlight_phrase($memo,'Advertencias:'        ,'</p><p><b>','</b>');
     		$memo=highlight_phrase($memo,'Reacciones Adversas:' ,'</p><p><b>','</b>');
     		$memo=highlight_phrase($memo,'Interacciones:'       ,'</p><p><b>','</b>');
     		$memo=highlight_phrase($memo,'Precauciones:'        ,'</p><p><b>','</b>');
     		$memo=highlight_phrase($memo,'Composicion:'         ,'</p><p><b>','</b>');
     		$memo=highlight_phrase($memo,'Contra indicaciones:' ,'</p><p><b>','</b>');
     		$memo=highlight_phrase($memo,'Indicaciones:'        ,'</p><p><b>','</b>');
     		$memo=highlight_phrase($memo,'Posolog&iacute;a:'    ,'</p><p><b>','</b>');
     		$memo=highlight_phrase($memo,'Posologia:'           ,'</p><p><b>','</b>');
     		$memo=highlight_phrase($memo,'Presentaci&oacute;n:' ,'</p><p><b>','</b>');
     		$memo=highlight_phrase($memo,'Presentacion:'        ,'</p><p><b>','</b>');*/
     $edit->container = new containerField('alert', '<p>' . $memo . '</p>');
     //$memo=$edit->getval('mono_pro');
     //$edit->container = new containerField("alert",htmlspecialchars($memo));
     $dbnom_pro = $this->db->escape($edit->getval('nom_pro'));
     $grid = new DataGrid('Productos relacionados', 'sinv');
     $grid->db->where('MATCH(descrip) AGAINST (' . $dbnom_pro . ')');
     $grid->order_by('descrip');
     $grid->per_page = 40;
     $grid->column('C&oacute;digo', 'codigo', 'align="left"');
     $grid->column('Descripci&oacute;n', 'descrip', 'align="left"');
     $grid->column('&Uacute;ltima compra', '<dbdate_to_human><#fechac#></dbdate_to_human>', 'align="center"');
     $grid->column('Existencia', '<nformat><#existen#></nformat>', 'align="right"');
     $grid->column('PVP', '<nformat><#precio1#></nformat>', 'align="right"');
     $grid->build();
     $edit->build();
     $data['content'] = $edit->output;
     if ($grid->recordCount > 0) {
         $data['content'] .= $grid->output;
     }
     $data['head'] = $this->rapyd->get_head();
     //$data['title']   = heading($this->tits);
     $data['title'] = '';
     $this->load->view('view_ventanas_sola', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:99,代码来源:gpt_pro.php

示例3: dataedit


//.........这里部分代码省略.........
        $edit->nombre->size = 50;
        $edit->nombre->maxlength = 100;
        $edit->comenta = new textareaField('Descripcion', 'comenta');
        $edit->comenta->rule = '';
        $edit->comenta->cols = 48;
        $edit->comenta->rows = 3;
        $edit->cedula = new inputField('Cedula', 'cedula');
        $edit->cedula->rule = '';
        $edit->cedula->size = 15;
        $edit->cedula->maxlength = 15;
        $edit->persona = new inputField('Responsable', 'persona');
        $edit->persona->rule = '';
        $edit->persona->size = 50;
        $edit->persona->maxlength = 100;
        $edit->fecha = new dateonlyField('Fecha', 'fecha');
        $edit->fecha->rule = 'chfecha';
        $edit->fecha->calendar = false;
        $edit->fecha->size = 10;
        $edit->fecha->maxlength = 8;
        $edit->horai = new inputField('Inicio', 'horai');
        $edit->horai->rule = '';
        $edit->horai->size = 10;
        $edit->horai->maxlength = 8;
        $edit->horaf = new inputField('Final', 'horaf');
        $edit->horaf->rule = '';
        $edit->horaf->size = 10;
        $edit->horaf->maxlength = 8;
        /*
        		$edit->activador = new textareaField('Activador','activador');
        		$edit->activador->rule='';
        		$edit->activador->cols = 50;
        		$edit->activador->rows = 4;
        */
        $estado = $this->datasis->traevalor('ESTADO');
        if (empty($estado)) {
            $estado = 12;
        } else {
            $estado = $this->datasis->dameval('SELECT codigo FROM estado WHERE entidad="' . $estado . '"');
            if (empty($estado)) {
                $estado = 12;
            }
        }
        $edit->entidad = new dropdownField('Estado', 'entidad');
        $edit->entidad->rule = 'required';
        $edit->entidad->style = 'width:220px;';
        $edit->entidad->option('', 'Seleccione un Estado');
        $edit->entidad->options('SELECT codigo, entidad FROM estado ORDER BY entidad');
        $edit->entidad->insertValue = 12;
        $edit->municipio = new dropdownField('Municipio', 'municipio');
        $edit->municipio->style = 'width:220px;';
        $edo = $edit->getval('entidad');
        if ($edo !== FALSE) {
            $dbedo = $this->db->escape($edo);
            $edit->municipio->options("SELECT codigo, municipio FROM municipios WHERE entidad={$dbedo} ORDER BY municipio");
        } else {
            $edit->municipio->option('', 'Seleccione una Entidad primero');
        }
        $edit->parroquia = new dropdownField('Parroquia', 'parroquia');
        $edit->parroquia->style = 'width:220px;';
        $muni = $edit->getval('municipio');
        if ($muni !== FALSE) {
            $dbmuni = $this->db->escape($muni);
            $edit->parroquia->options("SELECT codigo, parroquia FROM parroquias WHERE entidad={$edo} AND municipio={$dbmuni} ORDER BY parroquia");
        } else {
            $edit->parroquia->option('', 'Seleccione un Municipio primero');
        }
        /*
        		$edit->entidad = new inputField('Entidad','entidad');
        		$edit->entidad->rule='integer';
        		$edit->entidad->insertValue = $estado;
        		$edit->entidad->css_class='inputonlynum';
        		$edit->entidad->size =13;
        		$edit->entidad->maxlength =11;
        
        		$edit->municipio = new inputField('Municipio','municipio');
        		$edit->municipio->rule='integer';
        		$edit->municipio->css_class='inputonlynum';
        		$edit->municipio->size =13;
        		$edit->municipio->maxlength =11;
        
        		$edit->parroquia = new inputField('Parroquia','parroquia');
        		$edit->parroquia->rule='integer';
        		$edit->parroquia->css_class='inputonlynum';
        		$edit->parroquia->size =13;
        		$edit->parroquia->maxlength =11;
        */
        $edit->sector = new inputField('Sector', 'sector');
        $edit->sector->rule = '';
        $edit->sector->size = 52;
        $edit->sector->maxlength = 100;
        $edit->usuario = new autoUpdateField('usuario', $this->session->userdata('usuario'), $this->session->userdata('usuario'));
        $edit->estampa = new autoUpdateField('estampa', date('Ymd'), date('Ymd'));
        $edit->build();
        if ($edit->on_success()) {
            $rt = array('status' => 'A', 'mensaje' => 'Registro guardado', 'pk' => $edit->_dataobject->pk);
            echo json_encode($rt);
        } else {
            echo $edit->output;
        }
    }
开发者ID:codethics,项目名称:proteoerp,代码行数:101,代码来源:proevent.php

示例4: dataedit


//.........这里部分代码省略.........
					dataType: "json",
					data: {rifci: rif},
					success: function(data){
						if(data.error==0){
							if($("#telefono").val()==""){ $("#telefono").val(data.telefono); }
							if($("#email").val()   ==""){ $("#email").val(data.email); }
							if($("#sector").val()  ==""){ $("#sector").val(data.sector); }
						}
					}
				});
			}
			return true;
		});
		';
        $script .= '
		$("#campana").change(function(){
			campana_change();
			campa = $(this).val();
		});
		function campana_change(){
			$.post(\'' . site_url('ajax/get_evento') . '\',{ campana:$("#campana").val() },function(data){$("#evento").html(data);})
		}
		';
        $script .= '
		$("#evento").change(function(){
			evento_change();
		});

		function evento_change(){
			$.post(\'' . site_url('ajax/get_asislista') . '\',{ campana:$("#campana").val(), evento:$("#evento").val() },function(data){$("#contenedor").html(data);})
		}
		';
        $idanterior = intval($this->uri->segment(5));
        $campana = '';
        $evento = '';
        if ($idanterior) {
            $ante = $this->datasis->damerow("SELECT campana, evento FROM proasiste WHERE id={$idanterior}");
            $campana = $ante['campana'];
            $evento = $ante['evento'];
        }
        $edit = new DataEdit('', 'proasiste');
        $edit->script($script, 'modify');
        $edit->script($script, 'create');
        $edit->on_save_redirect = false;
        $edit->post_process('insert', '_post_insert');
        $edit->post_process('update', '_post_update');
        $edit->post_process('delete', '_post_delete');
        $edit->pre_process('insert', '_pre_insert');
        $edit->pre_process('update', '_pre_update');
        $edit->pre_process('delete', '_pre_delete');
        $edit->campana = new dropdownField('Campana', 'campana');
        $edit->campana->option('', 'Seleccione una Campa&acute;a');
        $edit->campana->options('SELECT id, campana FROM procamp ORDER BY campana');
        $edit->campana->style = 'width:250px;';
        $edit->campana->insertValue = $campana;
        $edit->evento = new dropdownField('Evento', 'evento');
        $edit->evento->style = 'width:250px;';
        $campa = $edit->getval('campana');
        if ($campana) {
            $campa = $campana;
        }
        if ($campa !== FALSE) {
            $dbcampa = $this->db->escape($campa);
            $edit->evento->options("SELECT id, nombre FROM proevent WHERE campana={$dbcampa} ORDER BY nombre");
        } else {
            $edit->evento->option('', 'Seleccione una Campa&acute;a primero');
        }
        $edit->evento->insertValue = $evento;
        $edit->cedula = new inputField('Cedula', 'cedula');
        $edit->cedula->rule = '';
        $edit->cedula->size = 15;
        $edit->cedula->maxlength = 15;
        $edit->nombre = new inputField('Nombre', 'nombre');
        $edit->nombre->rule = 'strtoupper';
        $edit->nombre->size = 52;
        $edit->nombre->maxlength = 100;
        $edit->telefono = new inputField('Telefono', 'telefono');
        $edit->telefono->rule = '';
        $edit->telefono->size = 32;
        $edit->telefono->maxlength = 30;
        $edit->email = new inputField('Email', 'email');
        $edit->email->rule = '';
        $edit->email->size = 52;
        $edit->email->maxlength = 100;
        $edit->sector = new inputField('Sector', 'sector');
        $edit->sector->rule = 'strtoupper';
        $edit->sector->size = 52;
        $edit->sector->maxlength = 100;
        $div = "<br><div style='overflow:auto;border: 1px solid #9AC8DA;background: #EAEAEA;height:200px' id='contenedor'></div>";
        $edit->contenedor = new containerField('contenedor', $div);
        $edit->usuario = new autoUpdateField('usuario', $this->session->userdata('usuario'), $this->session->userdata('usuario'));
        $edit->estampa = new autoUpdateField('estampa', date('Ymd'), date('Ymd'));
        $edit->build();
        if ($edit->on_success()) {
            $rt = array('status' => 'A', 'mensaje' => 'Registro guardado', 'pk' => $edit->_dataobject->pk);
            echo json_encode($rt);
        } else {
            echo $edit->output;
        }
    }
开发者ID:codethics,项目名称:proteoerp,代码行数:101,代码来源:proasiste.php

示例5: dataedit


//.........这里部分代码省略.........
        $edit->email->group = 'Datos del Trabajador';
        $edit->email->maxlength = 50;
        $edit->email->rule = 'trim';
        $edit->civil = new dropdownField('Estado Civil', 'civil');
        $edit->civil->style = 'width:80px;';
        $edit->civil->option('S', 'Soltero');
        $edit->civil->option('C', 'Casado');
        $edit->civil->option('D', 'Divorciado');
        $edit->civil->option('V', 'Viudo');
        $edit->civil->group = 'Datos del Trabajador';
        $edit->profes = new dropdownField('Profesi&oacute;n', 'profes');
        $edit->profes->options('SELECT TRIM(codigo) AS codigo,profesion FROM prof ORDER BY profesion');
        $edit->profes->style = 'width:200px;';
        $edit->nacimi = new DateonlyField('Nacimiento', 'nacimi', 'd/m/Y');
        $edit->nacimi->size = 12;
        $edit->nacimi->rule = 'required';
        $edit->nacimi->calendar = false;
        $edit->nacimi->rule = 'chfecha';
        $edit->sucursal = new dropdownField('Sucursal', 'sucursal');
        $edit->sucursal->style = 'width:120px;';
        $edit->sucursal->options("SELECT TRIM(codigo) AS codigo, CONCAT(codigo,' ',sucursal) desrip FROM sucu ORDER BY sucursal");
        $edit->sucursal->group = 'Relaci&oacute;n Laboral';
        $edit->divi = new dropdownField('Divisi&oacute;n', 'divi');
        $edit->divi->style = 'width:200px;';
        $edit->divi->option('', 'Seleccionar');
        $edit->divi->options('SELECT division,descrip FROM divi ORDER BY division');
        $edit->divi->onchange = 'get_depto();';
        $edit->divi->group = 'Relaci&oacute;n Laboral';
        $edit->depa = new dropdownField('Departamento', 'depto');
        $edit->depa->style = 'width:200px;';
        //$edit->depa->option('','Seleccionar');
        $edit->depa->group = 'Relaci&oacute;n Laboral';
        $edit->depa->rule = 'required';
        $divi = $edit->getval('divi');
        if ($divi !== false) {
            $dbdivi = $this->db->escape($divi);
            $edit->depa->options("SELECT departa,depadesc FROM depa WHERE division={$dbdivi} ORDER BY division");
        } else {
            $edit->depa->option('', 'Seleccione un Division');
        }
        $edit->contrato = new dropdownField('Contrato', 'contrato');
        $edit->contrato->style = 'width:350px;';
        $edit->contrato->option('', 'Ninguno');
        $edit->contrato->options("SELECT codigo,CONCAT_WS('-',codigo,nombre) AS nombre FROM noco ORDER BY codigo");
        $edit->vencimiento = new DateonlyField('Vencimiento', 'vence', 'd/m/Y');
        $edit->vencimiento->size = 10;
        $edit->vencimiento->group = 'Relaci&oacute;n Laboral';
        $edit->vencimiento->rule = 'trim|chfecha';
        $edit->vencimiento->calendar = false;
        $edit->cargo = new dropdownField('Cargo', 'cargo');
        $edit->cargo->style = 'width:200px;';
        $edit->cargo->group = 'Relaci&oacute;n Laboral';
        $edit->cargo->options("SELECT cargo, CONCAT(descrip, ' ', cargo) descrip FROM carg ORDER BY cargo");
        $edit->enlace = new inputField('Enlace', 'enlace');
        $edit->enlace->size = 11;
        $edit->enlace->maxlength = 5;
        $edit->enlace->group = 'Relaci&oacute;n Laboral';
        $edit->enlace->append($cboton);
        $edit->enlace->rule = 'trim|strtoupper';
        $edit->sso = new inputField('Nro. SSO', 'sso');
        $edit->sso->size = 13;
        $edit->sso->maxlength = 11;
        $edit->sso->group = 'Relaci&oacute;n Laboral';
        $edit->sso->css_class = 'inputnum';
        $edit->observa = new textareaField('Observaci&oacute;n', 'observa');
        $edit->observa->rule = 'trim';
开发者ID:codethics,项目名称:proteoerp,代码行数:67,代码来源:pers.php

示例6: dataedit

    function dataedit()
    {
        $this->rapyd->load('dataedit');
        $scli = array('tabla' => 'scli', 'columnas' => array('cliente' => 'C&oacute;digo Cliente', 'nombre' => 'Nombre', 'contacto' => 'Contacto'), 'filtro' => array('cliente' => 'C&oacute;digo Cliente', 'nombre' => 'Nombre'), 'retornar' => array('cliente' => 'cliente'), 'titulo' => 'Buscar Cliente');
        $boton = $this->datasis->modbus($scli);
        $edit = new DataEdit($this->tits, 'edres');
        $id = $edit->getval('id');
        if ($id !== false) {
            $action = "javascript:window.location='" . site_url($this->url . 'formato/' . $id) . "'";
            $edit->button('btn_formato', 'Descargar formato', $action);
        }
        $edit->back_url = site_url($this->url . 'filteredgrid');
        $edit->post_process('insert', '_post_insert');
        $edit->post_process('update', '_post_update');
        $edit->post_process('delete', '_post_delete');
        $edit->pre_process('insert', '_pre_insert');
        $edit->pre_process('update', '_pre_update');
        $edit->pre_process('delete', '_pre_delete');
        $edit->numero = new inputField('N&uacute;mero', 'numero');
        $edit->numero->rule = 'max_length[8]|required|unique';
        $edit->numero->size = 10;
        $edit->numero->mode = 'autohide';
        $edit->numero->maxlength = 8;
        $edit->numero->when = array('show', 'modify');
        $edit->fecha = new dateField('Fecha', 'fecha');
        $edit->fecha->rule = 'required|chfecha';
        $edit->fecha->insertValue = date('Y-m-d');
        $edit->fecha->size = 10;
        $edit->fecha->maxlength = 8;
        $edit->cliente = new inputField('Cliente', 'cliente');
        $edit->cliente->rule = 'max_length[5]|existescli|required';
        $edit->cliente->size = 7;
        $edit->cliente->maxlength = 5;
        $edit->cliente->append($boton);
        $edit->edificacion = new dropdownField('Edificaci&oacute;n', 'edificacion');
        $edit->edificacion->option('', 'Seleccionar');
        $edit->edificacion->options('SELECT id,TRIM(nombre) AS nombre FROM `edif` ORDER BY nombre');
        $edit->edificacion->rule = 'max_length[11]';
        $edit->inmueble = new dropdownField('Inmueble', 'inmueble');
        $edit->inmueble->option('', 'Seleccionar');
        $edif = $edit->getval('edificacion');
        if ($edif !== false) {
            $dbedif = $this->db->escape($edif);
            $edit->inmueble->option('', 'Seleccionar');
            $edit->inmueble->options("SELECT id,TRIM(descripcion) AS nombre FROM `edinmue` WHERE status='D' AND edificacion={$dbedif} ORDER BY descripcion");
        } else {
            $edit->inmueble->option('', 'Seleccione una edificacion');
        }
        $edit->inmueble->rule = 'max_length[11]';
        $edit->reserva = new inputField('Monto de la Reservaci&oacute;n', 'reserva');
        $edit->reserva->rule = 'max_length[17]|numeric|callback_chmonto|required';
        $edit->reserva->css_class = 'inputnum';
        $edit->reserva->size = 19;
        $edit->reserva->maxlength = 17;
        $mSQL = "SELECT cod_banc, nomb_banc FROM tban WHERE cod_banc<>'CAJ'";
        $query = $this->db->query($mSQL);
        $bancos = array();
        foreach ($query->result() as $row) {
            $bancos[$row->cod_banc] = $row->nomb_banc;
        }
        for ($i = 1; $i < 4; $i++) {
            $group = 'Formas de pago ' . $i;
            $obj1 = 'formap' . $i;
            $edit->{$obj1} = new dropdownField('Pago ' . $i, $obj1);
            $edit->{$obj1}->option('', 'Ninguno');
            $edit->{$obj1}->option('CH', 'Cheque');
            $edit->{$obj1}->option('DE', 'Deposito');
            $edit->{$obj1}->option('NC', 'Transferencia');
            $edit->{$obj1}->group = $group;
            $edit->{$obj1}->style = 'width:140px';
            $edit->{$obj1}->rule = 'max_length[2]';
            if ($i == 1) {
                $edit->{$obj1}->rule = 'required';
            }
            $obj2 = 'banco' . $i;
            $edit->{$obj2} = new dropdownField('Banco ' . $i, $obj2);
            $edit->{$obj2}->option('', 'Seleccionar banco');
            $edit->{$obj2}->options($bancos);
            $edit->{$obj2}->group = $group;
            $edit->{$obj2}->rule = 'max_length[3]|condi_required|callback_chpago[' . $i . ']';
            $edit->{$obj2}->in = $obj1;
            $obj4 = 'pfecha' . $i;
            $edit->{$obj4} = new dateonlyField('Fecha ', $obj4);
            $edit->{$obj4}->group = $group;
            $edit->{$obj4}->rule = 'condi_required|callback_chpago[' . $i . ']';
            $edit->{$obj4}->size = 10;
            //$edit->$obj4->in=$obj1;
            $obj3 = 'nummp' . $i;
            $edit->{$obj3} = new inputField('N&uacute;mero referencia', $obj3);
            $edit->{$obj3}->rule = 'max_length[20]|condi_required|callback_chpago[' . $i . ']';
            $edit->{$obj3}->size = 20;
            $edit->{$obj3}->maxlength = 20;
            $edit->{$obj3}->group = $group;
            $obj4 = 'monto' . $i;
            $edit->{$obj4} = new inputField('Monto', $obj4);
            $edit->{$obj4}->rule = 'condi_required|callback_chpago[' . $i . ']';
            $edit->{$obj4}->css_class = 'inputnum';
            $edit->{$obj4}->size = 19;
            $edit->{$obj4}->maxlength = 17;
            $edit->{$obj4}->group = $group;
//.........这里部分代码省略.........
开发者ID:codethics,项目名称:proteoerp,代码行数:101,代码来源:edres.php

示例7: dataefla


//.........这里部分代码省略.........
		$(".inputnum").numeric(".");
		$.post(\'' . site_url('medico/medhvisita/get_tabula') . '\',{ historia:"' . $historia . '", fecha:$("#fecha").val() },function(data){$("#tabulados").html(data);});

		$("#descripcion").focus(function(){
			$.post(\'' . site_url('medico/medhvisita/get_tabula') . '\',{ historia:"' . $historia . '", fecha:$("#fecha").val() },function(data){$("#tabulados").html(data);});
		});

		$("#fecha").change(function(){
			$.post(\'' . site_url('medico/medhvisita/get_tabula') . '\',{ historia:"' . $historia . '", fecha:$("#fecha").val() },function(data){$("#tabulados").html(data);});
		});

		$("#tabula").change(function(){
			var jqxhr = $.getJSON("' . site_url($this->url . 'ajaxfield') . '/"+$("#tabula").val(), function(data) {
				$("#td_descripcion").html(data[0]);
				eval(data[1]);
			}).fail(function() {
				console.log( "error" );
			});
		});

		$("#tabula").change();

		function elivisita(id){
			$.prompt("<h1>Eliminar entrada</h1>", {
				buttons: { Eliminar: true, Cancelar: false },
				submit: function(e,v,m,f){
					if (v) {
						$.ajax({ url: "' . site_url('medico/medhvisita/elimina') . '/"+id,
							complete: function(){
								//alert(("Entrada Eliminada"))
								$.post(\'' . site_url('medico/medhvisita/get_tabula') . '\',{ historia:"' . $historia . '", fecha:$("#fecha").val() },function(data){$("#tabulados").html(data);})
							}
						});
					}
				}
			});
		}';
        $edit = new DataEdit('', 'medhvisita');
        $edit->script($script, 'modify');
        $edit->script($script, 'create');
        $edit->on_save_redirect = false;
        $edit->back_url = site_url($this->url . 'filteredgrid');
        $edit->post_process('insert', '_post_insert');
        $edit->post_process('update', '_post_update');
        $edit->post_process('delete', '_post_delete');
        $edit->pre_process('insert', '_pre_insert');
        $edit->pre_process('update', '_pre_update');
        $edit->pre_process('delete', '_pre_delete');
        $html = '<table width="100%" style="background-color:#BCF5A9;font-size:14px;"><tr><td>Historia: </td><td style="font-weight:bold;">' . $historia . '</td><td>Nombre:</td><td style="font-weight:bold;">' . $nombres . '</td></td></tr></table>';
        $edit->cabeza = new containerField('cabeza', $html);
        $tabula = $arr_tipo = array();
        $mSQL = 'SELECT a.id, b.nombre AS grupo ,CONCAT(a.indice," ",a.nombre ) tabu,a.tipo, a.tipoadc
			FROM medhtab  AS a
			JOIN medhgrup AS b ON a.grupo=b.id
		WHERE a.grupo > 1 ORDER BY b.nombre,a.indice';
        $query = $this->db->query($mSQL);
        foreach ($query->result() as $row) {
            $tabula[$row->grupo][$row->id] = $row->tabu;
            $arr_tipo[$row->id] = array($row->tipo, $row->tipoadc);
        }
        $edit->tabula = new dropdownField('Tabula', 'tabula', $tabula);
        $edit->tabula->rule = 'required';
        $edit->tabula->style = 'width:350px;';
        $edit->historia = new hiddenField('', 'historia');
        $edit->historia->insertValue = $historia;
        $edit->historia->in = 'tabula';
        $edit->fecha = new dateonlyField('Fecha', 'fecha');
        $edit->fecha->rule = 'chfecha';
        $edit->fecha->calendar = false;
        $edit->fecha->size = 10;
        $edit->fecha->maxlength = 8;
        $edit->fecha->insertValue = $fecha;
        $par = array('nombre' => 'Descripci&oacute;n', 'obj' => 'descripcion', 'tipoadc' => '');
        $tabula = $edit->getval('tabula');
        if (isset($arr_tipo[$tabula][0])) {
            $ttipo = $arr_tipo[$tabula][0];
            $par['tipo'] = $arr_tipo[$tabula][0];
            $par['tipoadc'] = $arr_tipo[$tabula][1];
        } else {
            $par['tipo'] = 'text';
            $par['tipoadc'] = '';
        }
        $rt = $this->_tabuladorfield($par);
        $scriptadd = $rt[1];
        $edit->descripcion = $rt[0];
        if (empty($edit->descripcion->rule)) {
            $edit->descripcion->rule = 'required';
        } else {
            $edit->descripcion->rule = $edit->descripcion->rule . '|' . $rule;
        }
        $div = "<br><div style='overflow:auto;border: 1px solid #9AC8DA;background: #EAEAEA;height:210px' id='tabulados'></div>";
        $edit->contenedor = new containerField('contenedor', $div);
        $edit->build();
        if ($edit->on_success()) {
            $rt = array('status' => 'A', 'mensaje' => 'Registro guardado', 'pk' => $edit->_dataobject->pk);
            echo json_encode($rt);
        } else {
            echo $edit->output;
        }
    }
开发者ID:codethics,项目名称:proteoerp,代码行数:101,代码来源:medhvisita.php

示例8: dataedit

    function dataedit()
    {
        $this->rapyd->load('dataedit');
        $link1 = site_url('construccion/common/get_ubic');
        $script = '
		$(function() {
			$("#edificacion").change(function(){ edif_change(); });
			$(".inputnum").numeric(".");
			$(".inputonlynum").numeric();
		});

		function edif_change(){
			$.post("' . $link1 . '",{ edif:$("#edificacion").val() }, function(data){ $("#ubicacion").html(data);})
		}
		';
        $edit = new DataEdit('', 'edinmue');
        $edit->script($script, 'modify');
        $edit->script($script, 'create');
        $edit->on_save_redirect = false;
        //$edit->back_url = site_url($this->url.'filteredgrid');
        $edit->post_process('insert', '_post_insert');
        $edit->post_process('update', '_post_update');
        $edit->post_process('delete', '_post_delete');
        $edit->pre_process('insert', '_pre_insert');
        $edit->pre_process('update', '_pre_update');
        $edit->pre_process('delete', '_pre_delete');
        $edit->codigo = new inputField('C&oacute;digo', 'codigo');
        $edit->codigo->rule = 'max_length[15]|unique';
        $edit->codigo->size = 17;
        $edit->codigo->maxlength = 15;
        $edit->aplicacion = new dropdownField('Aplicacion', 'aplicacion');
        $edit->aplicacion->option('', 'Seleccionar');
        $edit->aplicacion->options('SELECT depto, CONCAT(depto," ",descrip) descrip FROM dpto WHERE tipo="G" AND depto NOT IN ("CO","GP") ORDER BY depto');
        $edit->aplicacion->rule = 'max_length[11]';
        $edit->aplicacion->style = 'width:150px;';
        $edit->descripcion = new inputField('Descripci&oacute;n', 'descripcion');
        $edit->descripcion->rule = 'max_length[100]';
        $edit->descripcion->maxlength = 100;
        $edit->objeto = new dropdownField('Objeto', 'objeto');
        $edit->objeto->option('', 'Seleccionar');
        $edit->objeto->option('A', 'Alquiler');
        $edit->objeto->option('V', 'Venta');
        $edit->objeto->rule = 'max_length[1]|required';
        $edit->objeto->style = 'width:150px;';
        $edit->status = new dropdownField('Estatus', 'status');
        $edit->status->option('D', 'Disponible');
        $edit->status->option('A', 'Alquilado');
        $edit->status->option('V', 'Vendido');
        $edit->status->option('R', 'Reservado');
        $edit->status->option('O', 'Otro');
        $edit->status->rule = 'max_length[11]';
        $edit->status->style = 'width:150px;';
        $edit->edificacion = new dropdownField('Edificaci&oacute;n', 'edificacion');
        $edit->edificacion->option('', 'Seleccionar');
        $edit->edificacion->options('SELECT id,TRIM(nombre) AS nombre FROM edif ORDER BY nombre');
        $edit->edificacion->rule = 'max_length[11]';
        $edit->edificacion->style = 'width:150px;';
        $edit->ubicacion = new dropdownField('Ubicaci&oacute;n', 'ubicacion');
        $edit->ubicacion->rule = 'max_length[11]|integer';
        $edit->ubicacion->style = 'width:150px;';
        $edif = $edit->getval('edificacion');
        if ($edif !== false) {
            $dbedif = $this->db->escape($edif);
            $edit->ubicacion->option('', 'Seleccionar');
            $edit->ubicacion->options("SELECT id,descripcion FROM `edifubica` WHERE id_edif={$dbedif} ORDER BY descripcion");
        } else {
            $edit->ubicacion->option('', 'Seleccione una edificacion');
        }
        $edit->uso = new dropdownField('Uso', 'uso');
        $edit->uso->option('', 'Seleccionar');
        $edit->uso->options('SELECT id,uso FROM `eduso` ORDER BY uso');
        $edit->uso->rule = 'max_length[11]|required';
        $edit->uso->style = 'width:150px;';
        $edit->usoalter = new dropdownField('Uso Alternativo', 'usoalter');
        $edit->usoalter->option('', 'Seleccionar');
        $edit->usoalter->options('SELECT id,uso FROM `eduso` ORDER BY uso');
        $edit->usoalter->rule = 'max_length[11]';
        $edit->usoalter->style = 'width:150px;';
        $edit->caracteristicas = new textareaField('Caracter&iacute;sticas', 'caracteristicas');
        //$edit->caracteristicas->rule='max_length[8]';
        $edit->caracteristicas->cols = 65;
        $edit->caracteristicas->rows = 2;
        $edit->area = new inputField('&Aacute;rea Mt2', 'area');
        $edit->area->rule = 'max_length[15]|numeric';
        $edit->area->css_class = 'inputnum';
        $edit->area->size = 10;
        //$edit->area->maxlength =15;
        $edit->estaciona = new inputField('Estacionamiento', 'estaciona');
        $edit->estaciona->rule = 'max_length[10]|integer';
        $edit->estaciona->size = 15;
        $edit->estaciona->css_class = 'inputonlynum';
        $edit->estaciona->maxlength = 10;
        $edit->deposito = new inputField('Dep&oacute;sito', 'deposito');
        $edit->deposito->rule = 'max_length[11]|integer';
        $edit->deposito->size = 15;
        $edit->deposito->maxlength = 11;
        $edit->deposito->css_class = 'inputonlynum';
        $edit->preciomt2e = new inputField('Precio x mt2 (Contado)', 'preciomt2e');
        $edit->preciomt2e->rule = 'max_length[15]|numeric';
        $edit->preciomt2e->css_class = 'inputnum';
//.........这里部分代码省略.........
开发者ID:codethics,项目名称:proteoerp,代码行数:101,代码来源:edinmue.php

示例9: dataedit


//.........这里部分代码省略.........
        $edit->post_process('delete', '_post_delete');
        $edit->pre_process('insert', '_pre_insert');
        $edit->pre_process('update', '_pre_update');
        $edit->pre_process('delete', '_pre_delete');
        $script = '
		$(function() {
			$("#fecha").datepicker({dateFormat:"dd/mm/yy"});
			$("#maintabcontainer").tabs();
		});		';
        $edit->script($script, 'create');
        $edit->script($script, 'modify');
        $edit->codigo = new inputField('Codigo', 'codigo');
        $edit->codigo->rule = '';
        $edit->codigo->size = 17;
        $edit->codigo->maxlength = 15;
        $edit->referen = new inputField('Codigo Alterno', 'referen');
        $edit->referen->rule = '';
        $edit->referen->size = 17;
        $edit->referen->maxlength = 15;
        $edit->barras = new inputField('Barras', 'barras');
        $edit->barras->rule = '';
        $edit->barras->size = 17;
        $edit->barras->maxlength = 15;
        $edit->depto = new dropdownField("Departamento", "depto");
        $edit->depto->option("", "");
        $edit->depto->options("SELECT depto, CONCAT(descrip,' (',depto,')') descrip FROM dpto WHERE tipo='I' ORDER BY descrip");
        //$edit->depto->onchange = "get_familias();";
        $edit->depto->group = "Datos";
        $edit->depto->style = 'width:200px;';
        $edit->familia = new dropdownField("Familia", "familia");
        $edit->familia->rule = "required";
        //$edit->familia->append($AddLinea);
        //$edit->familia->onchange = "get_grupo();";
        $depto = $edit->getval('depto');
        $edit->familia->style = 'width:200px;';
        if ($depto !== FALSE) {
            $edit->familia->option("", "");
            $edit->familia->options("SELECT familia, CONCAT( descrip,' (',familia,')') descrip FROM fami WHERE depto='{$depto}' ORDER BY descrip");
        } else {
            $edit->familia->option("", "Seleccione un Departamento primero");
        }
        $edit->grupo = new dropdownField("Grupo", "grupo");
        $edit->grupo->rule = "required";
        $familia = $edit->getval('familia');
        //$edit->grupo->options("SELECT grupo, nom_grup FROM grup WHERE familia='$familia' ORDER BY nom_grup");
        $edit->grupo->style = 'width:200px;';
        if ($familia !== FALSE) {
            $edit->grupo->option("", "");
            $edit->grupo->options("SELECT grupo, CONCAT(nom_grup,' (',grupo,')') descrip FROM grup WHERE familia='{$familia}' ORDER BY nom_grup");
        } else {
            $edit->grupo->option("", "Seleccione un Departamento primero");
        }
        $edit->tipo = new dropdownField("Tipo", "tipo");
        $edit->tipo->style = 'width:120px;';
        $edit->tipo->option("Articulo", "Art&iacute;culo");
        $edit->tipo->option("Servicio", "Servicio");
        $edit->tipo->option("Descartar", "Descartar");
        $edit->tipo->option("Consumo", "Consumo");
        $edit->tipo->option("Fraccion", "Fracci&oacute;n");
        $edit->tipo->option("Lote", "Lote");
        $edit->unidad = new inputField('Unidad', 'unidad');
        $edit->unidad->rule = '';
        $edit->unidad->size = 10;
        $edit->unidad->maxlength = 8;
        $edit->presenta = new inputField('Presenta', 'presenta');
        $edit->presenta->rule = '';
开发者ID:codethics,项目名称:proteoerp,代码行数:67,代码来源:maes.php

示例10: dataedit

    function dataedit()
    {
        $this->rapyd->load('dataedit');
        $script = '
		$(function() {
			$("#fecha").datepicker({dateFormat:"dd/mm/yy"});
			$(".inputnum").numeric(".");
		});
		';
        $link = site_url('nomina/conc/getctade');
        $link2 = site_url('nomina/conc/getctade');
        $script .= <<<script
\t\tfunction get_ctade(){
\t\t\tvar tipo=\$("#tipod").val();
\t\t\t\$.ajax({
\t\t\t\turl: "{$link}"+'/'+tipo,
\t\t\t\tsuccess: function(msg){
\t\t\t\t\t\$("#td_ctade").html(msg);
\t\t\t\t}
\t\t\t});
\t\t}
\t\tfunction get_ctaac(){
\t\t\tvar tipo=\$("#tipoa").val();
\t\t\t\$.ajax({
\t\t\t\turl: "{$link2}"+'/'+tipo,
\t\t\t\tsuccess: function(msg){
\t\t\t\t\t\$("#td_ctaac").html(msg);
\t\t\t\t}
\t\t\t});
\t\t}
script;
        $qformato = $this->qformato = $this->datasis->formato_cpla();
        $modbus = array('tabla' => 'cpla', 'columnas' => array('codigo' => 'C&oacute;digo', 'descrip' => 'Descripci&oacute;n'), 'filtro' => array('codigo' => 'C&oacute;digo', 'descrip' => 'Descripci&oacute;n'), 'retornar' => array('codigo' => '<#i#>'), 'titulo' => 'Buscar Cuenta', 'where' => "codigo LIKE \"{$qformato}\"", 'p_uri' => array(4 => '<#i#>'));
        $bcuenta = $this->datasis->p_modbus($modbus, 'cuenta');
        $bcontra = $this->datasis->p_modbus($modbus, 'contra');
        $edit = new DataEdit('', 'conc');
        $edit->back_url = site_url("nomina/conc/filteredgrid");
        $edit->script($script, 'modify');
        $edit->script($script, 'create');
        $edit->on_save_redirect = false;
        $edit->post_process('insert', '_post_insert');
        $edit->post_process('update', '_post_update');
        $edit->post_process('delete', '_post_delete');
        $edit->concepto = new inputField('Concepto', 'concepto');
        $edit->concepto->rule = 'required|callback_chexiste|alpha_numeric';
        $edit->concepto->mode = 'autohide';
        $edit->concepto->maxlength = 4;
        $edit->concepto->size = 7;
        $edit->tipo = new dropdownField('Tipo', 'tipo');
        $edit->tipo->style = 'width:100px;';
        $edit->tipo->option('', 'Seleccioar');
        $edit->tipo->options(array('A' => 'Asignaci&oacute;n', 'O' => 'Otros', 'D' => 'Deducci&oacute;n'));
        $edit->tipo->rule = 'required';
        $edit->descrip = new inputField('Descripci&oacute;n', 'descrip');
        $edit->descrip->size = 30;
        $edit->descrip->maxlength = 35;
        $edit->descrip->rule = 'strtoupper|required';
        $edit->grupo = new inputField('Grupo', 'grupo');
        $edit->grupo->size = 7;
        $edit->grupo->maxlength = 4;
        $edit->encab1 = new inputField('Encabezado 1', 'encab1');
        $edit->encab1->size = 16;
        $edit->encab1->maxlength = 12;
        $edit->encab1->rule = 'required';
        $edit->encab2 = new inputField('Encabezado 2&nbsp;', 'encab2');
        $edit->encab2->size = 16;
        $edit->encab2->maxlength = 12;
        $edit->formula = new textareaField('F&oacute;rmula', 'formula');
        $edit->formula->rows = 4;
        $edit->formula->cols = 85;
        $edit->formula->rule = 'required';
        $edit->cuenta = new inputField('Debe', 'cuenta');
        $edit->cuenta->size = 19;
        $edit->cuenta->maxlength = 15;
        $edit->cuenta->group = 'Enlace Contable';
        $edit->cuenta->rule = 'existecpla';
        $edit->cuenta->append($bcuenta);
        $edit->contra = new inputField('Haber', 'contra');
        $edit->contra->size = 19;
        $edit->contra->maxlength = 15;
        $edit->contra->group = 'Enlace Contable';
        $edit->contra->rule = 'existecpla';
        $edit->contra->append($bcontra);
        $edit->tipod = new dropdownField('Deudor', 'tipod');
        $edit->tipod->style = 'width:100px;';
        $edit->tipod->option('', 'Seleccionar');
        $edit->tipod->option('G', 'Gasto');
        $edit->tipod->option('C', 'Cliente');
        $edit->tipod->option('P', 'Proveedor');
        $edit->tipod->onchange = 'get_ctade();';
        $edit->tipod->group = 'Enlace Administrativo';
        $edit->tipod->rule = 'required|enum[G,C,P]';
        $edit->ctade = new dropdownField('Cuenta Deudor', 'ctade');
        $edit->ctade->style = 'width:400px;';
        $edit->ctade->group = 'Enlace Administrativo';
        $edit->ctade->style = 'width:210px;';
        $tipod = $edit->getval('tipod');
        if ($tipod == 'P') {
            $edit->ctade->options("SELECT proveed,CONCAT_WS(' ',proveed,nombre) AS descrip FROM sprv ORDER BY proveed");
        } else {
//.........这里部分代码省略.........
开发者ID:codethics,项目名称:proteoerp,代码行数:101,代码来源:conc.php

示例11: dataedit


//.........这里部分代码省略.........
        $edit->banco->maxlength = 60;
        //$edit->banco->readonly=true;
        $edit->numcuent = new inputField('Nro. de Cuenta', 'numcuent');
        $edit->numcuent->rule = 'trim';
        $edit->numcuent->size = 24;
        $edit->numcuent->maxlength = 25;
        $edit->dire1 = new inputField('Direcci&oacute;n', 'dire1');
        $edit->dire1->rule = 'trim';
        $edit->dire1->size = 40;
        $edit->dire1->maxlength = 40;
        $edit->dire2 = new inputField('', 'dire2');
        $edit->dire2->rule = 'trim';
        $edit->dire2->size = 40;
        $edit->dire2->maxlength = 40;
        $edit->telefono = new inputField('Tel&eacute;fono', 'telefono');
        $edit->telefono->rule = 'trim';
        $edit->telefono->size = 40;
        $edit->telefono->maxlength = 40;
        $edit->nombre = new inputField('Contacto', 'nombre');
        $edit->nombre->rule = 'trim';
        $edit->nombre->size = 40;
        $edit->nombre->maxlength = 40;
        $edit->moneda = new dropdownField('Moneda', 'moneda');
        $edit->moneda->options('SELECT moneda, descrip FROM mone ORDER BY moneda');
        $edit->moneda->style = 'width:100px;';
        $edit->tipocta = new dropdownField('Cuenta Tipo', 'tipocta');
        $edit->tipocta->style = 'width:100px;';
        $edit->tipocta->options(array('K' => 'Caja', 'C' => 'Corriente', 'A' => 'Ahorros', 'P' => 'Plazo Fijo', 'T' => 'Tarjeta', 'Q' => 'Caja Chica', 'F' => 'Fondo'));
        $edit->proxch = new inputField('Pr&oacute;ximo CH', 'proxch');
        $edit->proxch->rule = 'trim';
        $edit->proxch->size = 12;
        $edit->proxch->maxlength = 12;
        $edit->saldo = new inputField('Saldo Actual', 'saldo');
        $edit->saldo->mode = 'autohide';
        $edit->saldo->size = 12;
        $edit->saldo->when = array('show');
        $edit->saldo->css_class = 'inputnum';
        $edit->saldo->readonly = true;
        $edit->dbporcen = new inputField('Debito %', 'dbporcen');
        $edit->dbporcen->rule = 'trim';
        $edit->dbporcen->size = 12;
        $edit->dbporcen->maxlength = 5;
        $edit->dbporcen->css_class = 'inputnum';
        $edit->dbporcen->rule = 'callback_chporcent';
        $edit->dbporcen->onchange = 'gasto()';
        $edit->cuenta = new inputField('Cta. Contable', 'cuenta');
        $edit->cuenta->rule = 'trim|existecpla';
        $edit->cuenta->size = 12;
        $edit->cuenta->append($bcpla);
        $lsprv = '<a href="javascript:add_proveed();" title="Agregar un proveedor para este banco">' . image('list_plus.png', 'Agregar', array('border' => '0')) . '</a>';
        $edit->codprv = new inputField('Proveedor', 'codprv');
        $edit->codprv->rule = 'condi_required|callback_chiscaja|trim';
        $edit->codprv->append($boton);
        $edit->codprv->append($lsprv);
        $edit->codprv->size = 6;
        $edit->depto = new dropdownField('Departamento', 'depto');
        $edit->depto->option('', 'Seleccionar');
        $edit->depto->options("SELECT depto, descrip FROM dpto ORDER BY descrip");
        $edit->depto->rule = 'condi_required|callback_chiscaja';
        $edit->depto->style = 'width:180px;';
        $edit->sucur = new dropdownField('Sucursal', 'sucur');
        $edit->sucur->option('', 'Ninguna');
        $edit->sucur->options('SELECT codigo, TRIM(sucursal) FROM sucu ORDER BY sucursal');
        $edit->sucur->style = 'width:150px;';
        $mSQL = "SELECT codigo, CONCAT_WS('-',TRIM(descrip),TRIM(codigo)) AS descrip FROM mgas ORDER BY descrip";
        $edit->gastoidb = new dropdownField('Gasto I.D.B.', 'gastoidb');
        $edit->gastoidb->option('', 'Seleccionar');
        $edit->gastoidb->rule = 'condi_required|callback_chisidb';
        $edit->gastoidb->options($mSQL);
        $edit->gastoidb->style = 'width:250px;';
        $edit->gastocom = new dropdownField('Comisi&oacute;n', 'gastocom');
        $edit->gastocom->rule = 'condi_required|callback_chiscaja|trim';
        $edit->gastocom->option('', 'Seleccionar');
        $edit->gastocom->options($mSQL);
        $edit->gastocom->style = 'width:250px;';
        $rif = '';
        $tbanco = $edit->getval('tbanco');
        $tipoct = $edit->getval('tipocta');
        if ($tbanco && $tbanco != 'CAJ' && $tipoct != 'F') {
            $rif = $this->datasis->dameval('SELECT rif FROM tban WHERE cod_banc="' . $edit->getval('tbanco') . '"');
        }
        $edit->rif = new inputField('RIF del Banco', 'rif');
        $edit->rif->rule = 'trim';
        $edit->rif->size = 12;
        $edit->rif->maxlength = 12;
        $edit->rif->updateValue = $rif;
        $edit->rif->showValue = $rif;
        $edit->formula = new textareaField('Formula', 'formula');
        $edit->formula->rule = '';
        $edit->formula->cols = 40;
        $edit->formula->rows = 2;
        $edit->build();
        if ($edit->on_success()) {
            $rt = array('status' => 'A', 'mensaje' => 'Registro guardado', 'pk' => $edit->_dataobject->pk);
            echo json_encode($rt);
        } else {
            $conten['form'] =& $edit;
            $data['content'] = $this->load->view('view_banc', $conten, false);
        }
    }
开发者ID:codethics,项目名称:proteoerp,代码行数:101,代码来源:banc.php


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