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


PHP DataEdit::button_status方法代码示例

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


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

示例1: dataedit

    function dataedit()
    {
        //$this->datasis->modulo_id(101,1);
        $this->rapyd->load('dataedit', 'dataobject');
        $mSPRV = array('tabla' => 'sprv', 'columnas' => array('proveed' => 'Cóodigo', 'nombre' => 'Nombre', 'rif' => 'Rif', 'contacto' => 'Contacto'), 'filtro' => array('proveed' => 'Código', 'nombre' => 'Nombre', 'rif' => 'Rif'), 'retornar' => array('proveed' => 'cod_prov', 'nombre' => 'nombrep'), 'titulo' => 'Buscar Beneficiario');
        $bSPRV = $this->datasis->p_modbus($mSPRV, "proveed");
        $pers = array('tabla' => 'pers', 'columnas' => array('codigo' => 'Codigo', 'cedula' => 'Cedula', 'nombre' => 'Nombre', 'apellido' => 'Apellido'), 'filtro' => array('codigo' => 'Código', 'cedula' => 'Cedula'), 'retornar' => array('nombre' => 'solicitante'), 'titulo' => 'Buscar Personal');
        $bpers = $this->datasis->modbus($pers);
        $script = '
			function btn_anulaf(i){
				if(!confirm("Esta Seguro que desea Anular la Orden de Pago Directo"))
					return false;
				else
					window.location="' . site_url($this->url . 'anular') . '/"+i
			}
		
			$(".inputnum").numeric(".");
		';
        $do = new DataObject("ocomrapid");
        $do->pointer('sprv', 'sprv.proveed = ocomrapid.cod_prov', 'sprv.nombre as nombrep');
        $edit = new DataEdit($this->tits, $do);
        $edit->back_url = site_url($this->url . "filteredgrid");
        $edit->script($script, "create");
        $edit->script($script, "modify");
        $edit->script($script, "show");
        $edit->pre_process('insert', '_valida');
        $edit->pre_process('update', '_valida');
        $edit->post_process('insert', '_post_insert');
        $edit->post_process('update', '_post_update');
        $edit->post_process('delete', '_post_delete');
        $edit->numero = new inputField("Número", "numero");
        $edit->numero->mode = "autohide";
        $edit->numero->when = array('show');
        $edit->fecha = new dateonlyField("Fecha", "fecha");
        $edit->fecha->insertValue = date('Y-m-d');
        $edit->fecha->size = 12;
        $edit->fecha->rule = 'required';
        $edit->cod_prov = new inputField("Beneficiario", 'cod_prov');
        $edit->cod_prov->size = 6;
        $edit->cod_prov->rule = "required";
        $edit->cod_prov->append($bSPRV);
        //$edit->cod_prov->readonly=true;
        $edit->nombrep = new inputField("Nombre", 'nombrep');
        $edit->nombrep->size = 50;
        $edit->nombrep->readonly = true;
        $edit->nombrep->pointer = true;
        $edit->nombrep->in = "cod_prov";
        $edit->placa = new inputField("Placa", 'placa');
        $edit->placa->size = 20;
        $edit->solicitante = new inputField("Solicitante", 'solicitante');
        $edit->solicitante->size = 40;
        //$edit->solicitante->rule     = "required";
        $edit->solicitante->append($bpers);
        //$edit->litros = new inputField("Litros", 'litros');
        //$edit->litros->size     = 8;
        //$edit->litros->css_class='inputnum';
        $edit->monto = new inputField("Monto", 'monto');
        $edit->monto->size = 8;
        $edit->monto->css_class = 'inputnum';
        $edit->monto->rule = "required|callback_positivo";
        $edit->concepto = new textAreaField("Concepto", 'concepto');
        $edit->concepto->cols = 60;
        $edit->concepto->rows = 3;
        $status = $edit->_dataobject->get("status");
        if ($status == 'P') {
            $action = "javascript:btn_anulaf('" . $edit->rapyd->uri->get_edited_id() . "')";
            $edit->button_status("btn_status", 'Anular', $action, "TR", "show");
            $edit->buttons("modify");
        }
        $edit->buttons("save", "undo", "back", "add");
        $edit->build();
        $smenu['link'] = barra_menu('102');
        $data['smenu'] = $this->load->view('view_sub_menu', $smenu, true);
        $data['content'] = $edit->output;
        $data['title'] = "{$this->tits}";
        $data["head"] = script("jquery.pack.js") . script("plugins/jquery.numeric.pack.js") . script("plugins/jquery.floatnumber.js") . $this->rapyd->get_head();
        $this->load->view('view_ventanas', $data);
    }
开发者ID:enderochoa,项目名称:tortuga,代码行数:78,代码来源:ocomrapid.php

示例2: dataedit


//.........这里部分代码省略.........
            return $tprecio . ' ' . $link;
        }
        //Campos para el detalle
        $this->_autoasignar($numero);
        $this->_autoprecios($numero);
        $tabla = $this->db->database;
        $detalle = new DataGrid('');
        $detalle->use_function('similar', 'ofertas');
        $select = array('a.*', 'a.codigo AS barras', 'COALESCE(b.descrip, d.descrip) AS sinvdesc', 'a.costo AS pond', 'COALESCE( b.codigo , c.abarras) AS sinv', 'c.id AS farmaid', 'e.margen');
        $detalle->db->select($select);
        $detalle->db->from('itscst AS a');
        $detalle->db->where('a.control', $numero);
        $detalle->db->join($tabla . '.sinv AS b', 'a.codigo=b.codigo', 'LEFT');
        $detalle->db->join($tabla . '.farmaxasig AS c', "a.codigo=c.barras AND c.proveed={$proveed}", 'LEFT');
        $detalle->db->join($tabla . '.sinv AS d', 'd.codigo=c.abarras', 'LEFT');
        $detalle->db->join($tabla . '.grup AS e', 'e.grupo=COALESCE(b.grupo,d.grupo)', 'LEFT');
        $detalle->db->order_by('a.id');
        $detalle->use_function('exissinv');
        $detalle->column('Barras', '<#codigo#>');
        $detalle->column('Semejanza% -Descripci&oacute;n', '<similar><#descrip#>|<#sinvdesc#>|<#farmaid#></similar> - <#descrip#>');
        $detalle->column('Cantidad', '<nformat><#cantidad#></nformat>', 'align=\'right\'');
        $detalle->column('PVP', $llink, 'align=\'right\'');
        $detalle->column('Costo', '<nformat><#ultimo#></nformat>', 'align=\'right\'');
        $detalle->column('Importe', '<nformat><#importe#></nformat>', 'align=\'right\'');
        $detalle->column('C&oacute;digo local', '<exissinv><#sinv#>|<#dg_row_id#></exissinv>', "bgcolor='#D7F7D7' align='center'");
        $detalle->column('Desc.', '<ofertas><#sinv#>|<#margen#>|<#precio1#>|<#ultimo#></ofertas>', 'align=\'right\'');
        $detalle->build();
        //echo $detalle->db->last_query();
        $c_articulos = $detalle->recordCount;
        $query = $this->rapyd->db->query('SELECT SUM(a.cantidad) AS cant FROM itscst AS a WHERE a.control=' . $this->db->escape($numero));
        if ($query->num_rows() > 0) {
            $row = $query->row_array();
            $unid = $row['cant'];
        } else {
            $unid = 0;
        }
        $edit->unidades = new freeField('Unidades', 'unidades', nformat($unid));
        $script = '
		function pcrear(id){
			var pasar=["barras","descrip","ultimo","iva","codigo","pond","precio1","precio2","precio3","precio4"];
			var url  = "' . site_url('farmacia/sinv/dataedit/create') . '";
			form_virtual(pasar,id,url);
		}

		function pasig(id){
			var pasar=["barras","proveed","descrip"];
			var url  = "' . site_url('farmacia/scst/asignardataedit/scst/create') . '";
			form_virtual(pasar,id,url);
		}

		function form_virtual(pasar,id,url){
			var data=' . json_encode($detalle->data) . ';
			var w = window.open("' . site_url('farmacia/scst/dummy') . '","asignar","width=800,height=600,scrollbars=Yes,status=Yes,resizable=Yes,screenx="+((screen.availWidth/2)-400)+",screeny="+((screen.availHeight/2)-300)+"");

			var fform  = document.createElement("form");
			fform.setAttribute("target", "asignar");
			fform.setAttribute("action", url );
			fform.setAttribute("method", "post");

			for(i=0;i<pasar.length;i++){
				Val=eval("data[id]."+pasar[i]);
				iinput = document.createElement("input");
				iinput.setAttribute("type", "hidden");
				iinput.setAttribute("name", pasar[i]);
				iinput.setAttribute("value", Val);
				fform.appendChild(iinput);
			}

			var cuerpo = document.getElementsByTagName("body")[0];
			cuerpo.appendChild(fform);
			fform.submit();
			w.focus();
			cuerpo.removeChild(fform);
		}';
        $edit->detalle = new freeField('detalle', 'detalle', $detalle->output);
        $accion = "javascript:window.location='" . site_url('farmacia/scst/cargar' . $edit->pk_URI()) . "'";
        $pcontrol = $edit->_dataobject->get('pcontrol');
        if ($this->_btn_cargar($pcontrol)) {
            $edit->button_status('btn_cargar', 'Cargar', $accion, 'TR', 'show');
        }
        $edit->buttons('save', 'undo', 'back');
        $edit->script($script, 'show');
        $edit->build();
        $this->rapyd->jquery[] = '$("#dialog").dialog({
			autoOpen: false,
			show: "blind",
			hide: "explode"
		});

		$( "#opener" ).click(function() {
			$( "#dialog" ).dialog( "open" );
			return false;
		});';
        $conten['form'] =& $edit;
        $conten['carti'] = $c_articulos;
        $data['content'] = $this->load->view('view_farmax_compras', $conten, true);
        $data['head'] = $this->rapyd->get_head();
        $data['title'] = '<h1>Compras Descargadas</h1>';
        $this->load->view('view_ventanas', $data);
    }
开发者ID:codethics,项目名称:proteoerp,代码行数:101,代码来源:scst.php

示例3: dataedit

    function dataedit()
    {
        $this->rapyd->load("dataedit");
        $script = '
		$(function() {
			$(".inputnum").numeric(".");
		});
		';
        $edit = new DataEdit("Relacion de Cheques", "relch");
        $edit->back_url = site_url("tesoreria/relch/filteredgrid");
        $edit->script($script, "create");
        $edit->script($script, "modify");
        $edit->post_process('insert', '_post_insert');
        $edit->post_process('update', '_post_update');
        $edit->post_process('delete', '_post_delete');
        $edit->id = new inputField("Id", "id");
        $edit->id->mode = "autohide";
        $edit->id->when = array('show');
        $edit->id->size = 5;
        $edit->numero = new inputField("Numero", "numero");
        //$edit->numero->mode='autohide';
        $edit->usuario = new inputField("Usuario", "usuario");
        $edit->usuario->mode = 'autohide';
        $edit->fecha = new dateonlyField("Fecha", 'fecha');
        //$edit->fecha->mode='autohide';
        $edit->destino = new dropdownField('Destino', 'destino');
        $edit->destino->mode = 'autohide';
        $edit->destino->option('C', 'Caja');
        $edit->destino->option('I', 'Interno');
        $edit->status = new inputField("Estado", 'status');
        $edit->status->mode = 'autohide';
        $edit->fondo = new dropdownField("Clasificacion", "fondo");
        $edit->fondo->style = "width:300px;";
        $edit->fondo->option("", "");
        $edit->fondo->options("SELECT fondo,fondo a FROM banc GROUP BY fondo UNION ALL SELECT CONCAT('REPO.',fondo),CONCAT('REPO.',fondo) a FROM banc GROUP BY fondo");
        $status = $edit->_dataobject->get('status');
        if ($status == 'P') {
            $action = "javascript:window.location='" . site_url($this->url . '/busca/' . $edit->rapyd->uri->get_edited_id()) . "'";
            $edit->button_status("btn_anular", 'Modificar Cheques', $action, "TR", "show");
            $action = "javascript:window.location='" . site_url($this->url . '/actualizar/' . $edit->rapyd->uri->get_edited_id()) . "'";
            $edit->button_status("btn_anular", 'Cerrar Relacion', $action, "TR", "show");
        } elseif ($status == 'C') {
            $action = "javascript:window.location='" . site_url($this->url . '/anular/' . $edit->rapyd->uri->get_edited_id()) . "'";
            $edit->button_status("btn_rever", 'Anular', $action, "TR", "show");
        } else {
            //$edit->buttons("save");
        }
        $edit->buttons("modify", "save");
        $edit->buttons("undo", "back");
        $edit->build();
        $data['content'] = $edit->output;
        $data['title'] = "Relacion de Ordenes Pagadas";
        $data["head"] = script("jquery.pack.js") . script("plugins/jquery.numeric.pack.js") . script("plugins/jquery.floatnumber.js") . $this->rapyd->get_head();
        $this->load->view('view_ventanas', $data);
    }
开发者ID:enderochoa,项目名称:tortuga,代码行数:55,代码来源:relch.php

示例4: dataedit

    function dataedit()
    {
        //$this->datasis->modulo_id(101,1);
        $this->rapyd->load('dataedit');
        $mBANC = array('tabla' => 'banc', 'columnas' => array('codbanc' => 'C&oacute;odigo', 'banco' => 'Banco', 'saldo' => 'Saldo'), 'filtro' => array('codbanc' => 'C&oacute;odigo', 'banco' => 'Banco', 'saldo' => 'Saldo'), 'retornar' => array('codbanc' => 'codbanc', 'banco' => 'nombreb'), 'where' => 'activo="S"', 'titulo' => 'Buscar Bancos');
        $bBANC = $this->datasis->p_modbus($mBANC, "banc");
        $script = '
			$(".inputnum").numeric(".");
		';
        $edit = new DataEdit($this->tits, "pmov");
        $edit->back_url = site_url($this->url . "filteredgrid");
        $edit->script($script, "create");
        $edit->script($script, "modify");
        //$edit->pre_process('insert'  ,'_valida');
        //$edit->pre_process('update'  ,'_valida');
        $edit->numero = new inputField("N&uacute;mero", "numero");
        $edit->numero->mode = "autohide";
        $edit->numero->when = array('show');
        $edit->orden = new inputField("Orden de Pago", "orden");
        $edit->orden->size = 10;
        $edit->orden->maxlength = 12;
        //$edit->orden->mode    = "autohide";
        //$edit->orden->when    = array('show');
        $edit->bancemi = new dropdownField("Banco Emisor", "bancemi");
        $edit->bancemi->option("", "Seccionar");
        $edit->bancemi->options("SELECT cod_banc, CONCAT_WS(' ',cod_banc,nomb_banc) FROM tban ORDER BY cod_banc");
        $edit->bancemi->group = "Cheque";
        $edit->cheque = new inputField("Cheque Nº", 'cheque');
        $edit->cheque->size = 30;
        $edit->cheque->maxlength = 30;
        $edit->cheque->group = "Cheque";
        $edit->fecha1 = new dateonlyField("Fecha Cheque", "fecha1");
        $edit->fecha1->insertValue = date('Y-m-d');
        $edit->fecha1->size = 12;
        $edit->fecha1->group = "Cheque";
        //$edit->fecha1->rule        = "required";
        $edit->monto = new inputField("Monto", 'monto');
        $edit->monto->size = 20;
        $edit->monto->css_class = 'inputnum';
        $edit->monto->rule = 'required|callback_positivo';
        //$edit->monto->group = "Cheque";
        $edit->deposito = new inputField("Deposito Nº*", 'deposito');
        $edit->deposito->size = 30;
        $edit->deposito->maxlength = 30;
        $edit->deposito->group = "Deposito";
        $edit->fecha2 = new dateonlyField("Fecha Deposito*", "fecha2");
        $edit->fecha2->insertValue = date('Y-m-d');
        $edit->fecha2->size = 12;
        //$edit->fecha2->rule        = "required";
        $edit->fecha2->group = "Deposito";
        $edit->codbanc = new inputField("Banco*", 'codbanc');
        $edit->codbanc->size = 6;
        //$edit->codbanc->rule     = "required";
        $edit->codbanc->append($bBANC);
        $edit->codbanc->readonly = true;
        $edit->codbanc->group = "Deposito";
        $edit->nombreb = new inputField("", 'nombreb');
        $edit->nombreb->db_name = 'nombreb';
        $edit->nombreb->size = 30;
        $edit->nombreb->group = "Deposito";
        $edit->nombreb->in = "codbanc";
        $status = $edit->_dataobject->get("status");
        if ($status == 'P') {
            $action = "javascript:window.location='" . site_url($this->url . 'actualizar/' . $edit->rapyd->uri->get_edited_id()) . "'";
            $edit->button_status("btn_status", 'Actualizar', $action, "TR", "show");
            $edit->buttons("modify", "delete", "save");
        } elseif ($status == 'C') {
            $action = "javascript:window.location='" . site_url($this->url . 'reversar/' . $edit->rapyd->uri->get_edited_id()) . "'";
            $edit->button_status("btn_rever", 'Reversar', $action, "TR", "show");
        } else {
            $edit->buttons("save");
        }
        $edit->buttons("undo", "back");
        $edit->build();
        $data['content'] = $edit->output;
        $data['title'] = " {$this->tits} ";
        $data["head"] = script("jquery.pack.js") . script("plugins/jquery.numeric.pack.js") . script("plugins/jquery.floatnumber.js") . $this->rapyd->get_head();
        $this->load->view('view_ventanas', $data);
    }
开发者ID:enderochoa,项目名称:tortuga,代码行数:79,代码来源:pmov3.php

示例5: dataedit


//.........这里部分代码省略.........
     $edit->fechafac->mode = "autohide";
     $edit->fechafac->group = "Causaci&oacute;n";
     $edit->numero = new inputField("N&uacute;mero O. Compra", "numero");
     $edit->numero->mode = "autohide";
     $edit->numero->when = array('show');
     $edit->numero->group = "Orden De Compra";
     $edit->tipo = new inputField("Orden de", "tipo");
     $edit->tipo->mode = "autohide";
     $edit->tipo->group = "Orden De Compra";
     $edit->fecha = new inputField("Fecha O. Compra", "fecha");
     $edit->fecha->mode = "autohide";
     $edit->fecha->group = "Orden De Compra";
     $grupo = 'Datos';
     $edit->uejecutora = new inputField("Unidad Ejecutora", "uejecutora");
     $edit->uejecutora->mode = "autohide";
     $edit->uejecutora->group = $grupo;
     $edit->estadmin = new dropdownField("Estructura Administrativa", "estadmin");
     $edit->estadmin->mode = "autohide";
     $edit->estadmin->group = $grupo;
     $edit->fondo = new dropdownField("Fondo", "fondo");
     $edit->fondo->mode = "autohide";
     $edit->fondo->group = $grupo;
     $edit->cod_prov = new inputField("Beneficiario", 'cod_prov');
     $edit->cod_prov->size = 6;
     $edit->cod_prov->group = $grupo;
     $edit->cod_prov->mode = "autohide";
     $edit->nombre = new inputField("Nombre Beneficiario", 'nombre');
     $edit->nombre->size = 50;
     $edit->nombre->group = $grupo;
     $edit->nombre->mode = "autohide";
     $edit->beneficiario = new inputField("Beneficiario", 'beneficiario');
     $edit->beneficiario->size = 50;
     $edit->beneficiario->mode = "autohide";
     $edit->beneficiario->group = $grupo;
     //$edit->beneficiario->rule = "required";
     $edit->observa = new textAreaField("Observaciones", 'observa');
     $edit->observa->mode = "autohide";
     $edit->observa->group = $grupo;
     $edit->reteiva_prov = new inputField("Retencion IVA Beneficiario", "reteiva_prov");
     $edit->reteiva_prov->mode = "autohide";
     $edit->reteiva_prov->group = "Retenci&oacute;n Iva";
     $edit->reteiva = new inputField("Retencion de IVA", 'reteiva');
     $edit->reteiva->size = 8;
     $edit->reteiva->mode = "autohide";
     $edit->reteiva->group = "Retenci&oacute;n Iva";
     $edit->creten = new inputField("Codigo ISLR", "creten");
     $edit->creten->mode = "autohide";
     $edit->creten->group = "Impuesto Sobre la Renta";
     $edit->reten = new inputField("Retencion de ISLR", 'reten');
     $edit->reten->size = 8;
     $edit->reten->mode = "autohide";
     $edit->reten->group = "Impuesto Sobre la Renta";
     $gtotal = "Montos Totales";
     $edit->subtotal = new inputField("Sub Total", 'subtotal');
     $edit->subtotal->size = 8;
     $edit->subtotal->mode = "autohide";
     $edit->subtotal->group = $gtotal;
     $edit->ivaa = new inputField("IVA Sobre Tasa", 'ivaa');
     $edit->ivaa->size = 8;
     $edit->ivaa->mode = "autohide";
     $edit->ivaa->group = $gtotal;
     $edit->ivag = new inputField("IVA Tasa General", 'ivag');
     $edit->ivag->size = 8;
     $edit->ivag->mode = "autohide";
     $edit->ivag->group = $gtotal;
     $edit->ivar = new inputField("IVA Tasa reducida", 'ivar');
     $edit->ivar->size = 8;
     $edit->ivar->mode = "autohide";
     $edit->ivar->group = $gtotal;
     $edit->exento = new inputField("Exento", 'exento');
     $edit->exento->size = 8;
     $edit->exento->mode = "autohide";
     $edit->exento->group = $gtotal;
     $edit->total = new inputField("Total", 'total');
     $edit->total->size = 8;
     $edit->total->mode = "autohide";
     $edit->total->group = $gtotal;
     $n = $edit->_dataobject->get('numero');
     $status = $edit->_dataobject->get("status");
     if ($status == 'T') {
         //$action = "javascript:window.location='" .site_url($this->url.'actualizar/'.$edit->rapyd->uri->get_edited_id()). "'";
         //$action = "javascript:window.location='" .site_url($this->url.'actualizar/'.$n)."'";
         //$edit->button_status("btn_status",'Ordenar Pago',$action,"TR","show");
         $edit->buttons("modify", "save");
     } elseif ($status == 'O') {
         $action = "javascript:window.location='" . site_url($this->url . 'reversar/' . $edit->rapyd->uri->get_edited_id()) . "'";
         //$action = "javascript:window.location='" .site_url($this->url.'reversar/'.$n). "'";
         $edit->button_status("btn_rever", 'Deshacer Ordenar Pago', $action, "TR", "show");
     } else {
         $edit->buttons("save");
     }
     $edit->buttons("undo", "back");
     $edit->build();
     $data['content'] = $edit->output;
     $data['title'] = " {$this->tits} ";
     //$data['content'] = $edit->output;
     //$data['title']   = " $this->tits ";
     $data["head"] = script("jquery.pack.js") . script("plugins/jquery.numeric.pack.js") . script("plugins/jquery.floatnumber.js") . $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
开发者ID:enderochoa,项目名称:tortuga,代码行数:101,代码来源:opago4.php

示例6: dataedit


//.........这里部分代码省略.........
        $edit->subt = new inputField("Subt", "montotot");
        $edit->subt->size = 20;
        $edit->subt->css_class = 'inputnum';
        $edit->iva = new inputField("IVA", "montoiva");
        $edit->iva->size = 20;
        $edit->iva->css_class = 'inputnum';
        $edit->total = new inputField("Total", "montonet");
        $edit->total->size = 20;
        $edit->total->css_class = 'inputnum';
        $edit->anticipo = new inputField("Anticipo", "anticipo");
        $edit->anticipo->size = 20;
        $edit->anticipo->css_class = 'inputnum';
        $edit->contado = new inputField("Contado", "inicial");
        $edit->contado->size = 20;
        $edit->contado->css_class = 'inputnum';
        $edit->rislr = new inputField("R.ISLR", "reten");
        $edit->rislr->size = 20;
        $edit->rislr->css_class = 'inputnum';
        $edit->riva = new inputField("R.IVA", "reteiva");
        $edit->riva->size = 20;
        $edit->riva->css_class = 'inputnum';
        $edit->pcontrol = new inputField('Control', 'pcontrol');
        $edit->pcontrol->size = 12;
        $edit->monto = new inputField("Monto US \$", "mdolar");
        $edit->monto->size = 20;
        $edit->monto->css_class = 'inputnum';
        $numero = $edit->_dataobject->get('control');
        $proveed = $this->db->escape($edit->_dataobject->get('proveed'));
        //Campos para el detalle
        $tabla = $this->db->database;
        $detalle = new DataGrid('');
        $select = array('a.*', 'a.codigo AS barras', 'a.costo AS pond', 'COALESCE( b.codigo , c.abarras) AS sinv');
        $detalle->db->select($select);
        $detalle->db->from('itscst AS a');
        $detalle->db->where('a.control', $numero);
        $detalle->db->join($tabla . '.sinv AS b', 'a.codigo=b.codigo', 'LEFT');
        $detalle->db->join($tabla . '.farmaxasig AS c', "a.codigo=c.barras AND c.proveed={$proveed}", 'LEFT');
        $detalle->use_function('exissinv');
        $detalle->column("Barras", "<#codigo#>");
        $detalle->column("Descripci&oacute;n", "<#descrip#>");
        $detalle->column("Cantidad", "<#cantidad#>", "align='right'");
        $detalle->column("Precio", "<#ultimo#>", "align='right'");
        $detalle->column("Importe", "<#importe#>", "align='right'");
        $detalle->column("Acciones ", "<exissinv><#sinv#>|<#dg_row_id#></exissinv>", "bgcolor='#D7F7D7' align='center'");
        $detalle->build();
        //echo $detalle->db->last_query();
        $script = '
		function pcrear(id){
			var pasar=["barras","descrip","ultimo","iva","codigo","pond"];
			var url  = "' . site_url('inventario/sinv/dataedit/create') . '";
			form_virtual(pasar,id,url);
		}

		function pasig(id){
			var pasar=["barras","proveed"];
			var url  = "' . site_url('farmacia/scst/asignardataedit/create') . '";
			form_virtual(pasar,id,url);
		}

		function form_virtual(pasar,id,url){
			var data=' . json_encode($detalle->data) . ';
			var w = window.open("' . site_url('farmacia/scst/dummy') . '","asignar","width=800,height=600,scrollbars=Yes,status=Yes,resizable=Yes,screenx="+((screen.availWidth/2)-400)+",screeny="+((screen.availHeight/2)-300)+"");

			var fform  = document.createElement("form");
			fform.setAttribute("target", "asignar");
			fform.setAttribute("action", url );
			fform.setAttribute("method", "post");

			for(i=0;i<pasar.length;i++){
				Val=eval("data[id]."+pasar[i]);
				iinput = document.createElement("input");
				iinput.setAttribute("type", "hidden");
				iinput.setAttribute("name", pasar[i]);
				iinput.setAttribute("value", Val);
				fform.appendChild(iinput);
			}

			var cuerpo = document.getElementsByTagName("body")[0];
			cuerpo.appendChild(fform);
			fform.submit();
			w.focus();
			cuerpo.removeChild(fform);
		}';
        $edit->detalle = new freeField("detalle", 'detalle', $detalle->output);
        $accion = "javascript:window.location='" . site_url('farmacia/scst/cargar' . $edit->pk_URI()) . "'";
        $pcontrol = $edit->_dataobject->get('pcontrol');
        if (is_null($pcontrol)) {
            $edit->button_status('btn_cargar', 'Cargar', $accion, 'TR', 'show');
        }
        $edit->buttons('save', 'undo', 'back');
        $edit->script($script, 'show');
        $edit->build();
        $smenu['link'] = barra_menu('201');
        $data['smenu'] = $this->load->view('view_sub_menu', $smenu, true);
        $conten['form'] =& $edit;
        $data['content'] = $this->load->view('view_farmax_compras', $conten, true);
        $data['head'] = script("tabber.js") . script("prototype.js") . $this->rapyd->get_head() . script("scriptaculous.js") . script("effects.js");
        $data['title'] = '<h1>Compras Descargadas</h1>';
        $this->load->view('view_ventanas', $data);
    }
开发者ID:codethics,项目名称:proteoerp,代码行数:101,代码来源:scst.php

示例7: dataedit


//.........这里部分代码省略.........
                                    $("#benefi").val(nombret);
                                }
			}
		';
        $mBCTA = array('tabla' => 'bcta', 'columnas' => array('codigo' => 'C&oacute;odigo', 'denominacion' => 'Denominacion', 'cuenta' => 'Cuenta'), 'filtro' => array('codigo' => 'C&oacute;odigo', 'denominacion' => 'Denominacion', 'cuenta' => 'Cuenta'), 'retornar' => array('codigo' => 'bcta'), 'titulo' => 'Buscar Otros Ingresos');
        $bBCTA = $this->datasis->p_modbus($mBCTA, "bcta");
        $do = new DataObject("mbancnoc");
        $do->pointer('banc', 'banc.codbanc=mbancnoc.codbanc', 'banc.banco as nombreb', 'LEFT');
        if ($status == "create" && !empty($numero) && $duplicar == 'S') {
            $do->load($numero);
            $do->set('cheque', '');
            $do->set('id', '');
            $do->set('monto', '');
            $do->pk = array('id' => '');
        }
        $edit = new DataEdit($this->tits, $do);
        $edit->back_url = site_url($this->url . "filteredgrid");
        $edit->script($script, "create");
        $edit->script($script, "modify");
        $edit->post_process('insert', '_post_insert');
        $edit->post_process('update', '_post_update');
        $edit->post_process('delete', '_post_delete');
        $tipo = $edit->_dataobject->get('tipo');
        $edit->id = new inputField("N&uacute;mero", "id");
        $edit->id->mode = "autohide";
        $edit->id->when = array('show');
        //$edit->fechapago = new  dateonlyField("Fecha Movimiento",  "fechapago");
        //$edit->fechapago->insertValue = date('Y-m-d');
        //$edit->fechapago->size        =12;
        //$edit->fechapago->rule        = 'required';
        $edit->nombret = new inputField("nombre temporal", 'nombret');
        $edit->nombret->size = 50;
        $edit->nombret->db_name = ' ';
        $edit->nombret->when = array("create", "modify");
        $edit->codbanc = new inputField("Banco", 'codbanc');
        $edit->codbanc->size = 3;
        $edit->codbanc->rule = "required";
        $edit->codbanc->append($bBANC);
        //$edit->codbanc-> readonly=true;
        $edit->codbanc->group = "Transaccion";
        $edit->nombreb = new inputField("Nombre", "nombreb");
        $edit->nombreb->size = 50;
        $edit->nombreb->readonly = true;
        $edit->nombreb->pointer = true;
        $edit->nombreb->in = "codbanc";
        $edit->nombreb->group = "Transaccion";
        $edit->tipo_doc = new dropdownField("Tipo Documento", "tipo_doc");
        $edit->tipo_doc->option("NC", "Nota de Credito");
        $edit->tipo_doc->option("ND", "Nota de Debito");
        $edit->tipo_doc->option("DP", "Deposito");
        $edit->tipo_doc->style = "width:180px";
        $edit->tipo_doc->group = "Transaccion";
        $edit->tipo_doc->rule = 'required';
        $edit->fecha = new dateonlyField("Fecha Transacci&oacute;n", "fecha");
        //$edit->fecha->insertValue = date('Y-m-d');
        $edit->fecha->size = 12;
        $edit->fecha->rule = 'required';
        $edit->fecha->group = "Transaccion";
        $edit->cheque = new inputField("Nro. Transacci&oacute;n", 'cheque');
        $edit->cheque->rows = 2;
        $edit->cheque->cols = 80;
        $edit->cheque->rule = "required";
        //callback_chexiste_cheque|
        $edit->cheque->group = "Transaccion";
        $edit->monto = new inputField("Monto", 'monto');
        $edit->monto->size = 20;
        $edit->monto->group = "Transaccion";
        $edit->monto->css_class = 'inputnum';
        $edit->monto->rule = 'callback_positivo';
        if ($tipo == 'I') {
            $edit->monto->mode = "autohide";
        }
        //$edit->benefi =  new inputField("A nombre de", 'benefi');
        //$edit->benefi-> size  = 100;
        //$edit->benefi->rule   = "required";
        //$edit->benefi->group  = "Transaccion";
        $edit->observa = new textAreaField("Concepto", 'observa');
        $edit->observa->cols = 80;
        $edit->observa->rows = 5;
        $edit->observa->group = "Transaccion";
        $edit->bcta = new inputField("Motivo Movimiento", 'bcta');
        $edit->bcta->size = 6;
        $edit->bcta->append($bBCTA);
        $edit->bcta->readonly = true;
        $edit->bcta->group = "Otros";
        $edit->fecha2 = new dateonlyField("Fecha Aux", "fecha2");
        $edit->fecha2->group = "Otros";
        $action = "javascript:window.location='" . site_url($this->url . '/dataedit/S/create/' . $edit->rapyd->uri->get_edited_id()) . "'";
        $edit->button_status("btn_anular", 'Duplicar', $action, "TL", "show");
        $action = "javascript:window.location='" . site_url($this->url . '/dataedit/S/create/' . $edit->rapyd->uri->get_edited_id()) . "'";
        $edit->button_status("btn_anularm", 'Duplicar', $action, "TL", "modify");
        $edit->buttons("undo", "back", "add", "modify", "save", "delete");
        $edit->build();
        //$smenu['link']   = barra_menu('204');
        //$data['smenu']   = $this->load->view('view_sub_menu', $smenu,true);
        $data['content'] = $edit->output;
        $data['title'] = "{$this->tits}";
        $data["head"] = script("jquery.pack.js") . script("plugins/jquery.numeric.pack.js") . script("plugins/jquery.floatnumber.js") . $this->rapyd->get_head();
        $this->load->view('view_ventanas', $data);
    }
开发者ID:enderochoa,项目名称:tortuga,代码行数:101,代码来源:mbancnoc.php

示例8: certifi


//.........这里部分代码省略.........
         //$municipio  = $row->municipio;
         //$estado     = $row->estado;
         //$cpostal    = $row->cpostal;
         //$ctelefono1 = $row->ctelefono1;
         //$telefono1  = $row->telefono1;
         //$ctelefono2 = $row->ctelefono2;
         //$telefono2  = $row->telefono2;
         $data = array();
         if (empty($row->nombre)) {
             $data['nombre'] = $nombre;
             $where = 'id = ' . $this->db->escape($id);
             $str = $this->db->update_string('sinvehiculo', $data, $where);
             $this->db->simple_query($str);
         }
     }
     $this->rapyd->load('dataedit');
     $edit = new DataEdit($this->tits, 'sinvehiculo');
     $edit->back_url = site_url($this->url . 'index');
     $edit->nombre = new inputField('Nombre', 'nombre');
     $edit->nombre->rule = 'max_length[200]|required';
     $edit->nombre->maxlength = 200;
     $edit->casa = new inputField('Casa Quinta Edificio Apto', 'casa');
     $edit->casa->rule = 'max_length[100]|required';
     //$edit->casa->size =102;
     $edit->casa->maxlength = 100;
     $edit->calle = new inputField('Avenida, calle, plaza, esquina', 'calle');
     $edit->calle->rule = 'max_length[100]|required';
     //$edit->calle->size =102;
     $edit->calle->maxlength = 100;
     $edit->urb = new inputField('Urbanizaci&oacute;n, Bario, Residencia', 'urb');
     $edit->urb->rule = 'max_length[100]|required';
     //$edit->urb->size =102;
     $edit->urb->maxlength = 100;
     $edit->ciudad = new inputField('Ciudad', 'ciudad');
     $edit->ciudad->rule = 'max_length[100]|required';
     //$edit->ciudad->size =102;
     $edit->ciudad->maxlength = 100;
     $edit->municipio = new inputField('Parroquia, distrito, Municipio', 'municipio');
     $edit->municipio->rule = 'max_length[100]|required';
     //$edit->municipio->size =102;
     $edit->municipio->maxlength = 100;
     $edit->estado = new inputField('Estado', 'estado');
     $edit->estado->rule = 'max_length[100]|required';
     //$edit->estado->size =102;
     $edit->estado->maxlength = 100;
     $edit->cpostal = new inputField('C&oacute;digo Postal', 'cpostal');
     $edit->cpostal->rule = 'max_length[10]|numeric|required';
     $edit->cpostal->size = 10;
     $edit->cpostal->maxlength = 10;
     $edit->ctelefono1 = new inputField('Tel&eacute;fono de Habitaci&oacute;n', 'ctelefono1');
     $edit->ctelefono1->rule = 'max_length[100]|numeric|required';
     $edit->ctelefono1->size = 6;
     $edit->ctelefono1->maxlength = 100;
     $edit->telefono1 = new inputField('', 'telefono1');
     $edit->telefono1->rule = 'max_length[100]|numeric|required';
     $edit->telefono1->size = 10;
     $edit->telefono1->maxlength = 10;
     $edit->telefono1->in = 'ctelefono1';
     $edit->ctelefono2 = new inputField('Tel&eacute;fono de Trabajo', 'ctelefono2');
     $edit->ctelefono2->rule = 'max_length[100]|numeric|required';
     $edit->ctelefono2->size = 6;
     $edit->ctelefono2->maxlength = 4;
     $edit->telefono2 = new inputField('', 'telefono2');
     $edit->telefono2->rule = 'max_length[100]|numeric|required';
     $edit->telefono2->size = 10;
     $edit->telefono2->maxlength = 10;
     $edit->telefono2->in = 'ctelefono2';
     $edit->distrito = new inputField('Distrito', 'distrito');
     $edit->distrito->rule = 'max_length[100]';
     $edit->aseguradora = new inputField('Nombre de la aseguradora', 'aseguradora');
     $edit->aseguradora->rule = 'max_length[100]';
     $edit->aseguradora->group = 'Datos del seguro';
     $edit->poliza = new inputField('Poliza', 'poliza');
     $edit->poliza->rule = 'max_length[100]';
     $edit->poliza->group = 'Datos del seguro';
     $edit->vence = new dateonlyField('Vencimiento de la p&oacute;liza', 'vence');
     $edit->vence->rule = 'chfecha';
     $edit->vence->group = 'Datos del seguro';
     $edit->nomban = new inputField('Nombre  del banco', 'nomban');
     $edit->nomban->rule = 'max_length[100]';
     $edit->nomban->group = 'Reserva de dominio';
     $edit->banrif = new inputField('Rif del banco', 'banrif');
     $edit->banrif->rule = 'max_length[10]';
     $edit->banrif->group = 'Reserva de dominio';
     $edit->representante = new inputField('Representaci&oacute;n', 'representante');
     $edit->representante->rule = 'max_length[100]';
     $edit->concesionario = new inputField('Concesionario B', 'concesionario');
     $edit->concesionario->rule = 'max_length[100]';
     $edit->concesionariorif = new inputField('Concesionario B Rif', 'concesionariorif');
     $edit->concesionariorif->rule = 'max_length[10]';
     $accion = "javascript:window.location='" . site_url($this->url . 'certificado' . $edit->pk_URI()) . "'";
     $edit->button_status('btn_imprime', 'Certificado', $accion, 'BR', 'show');
     $edit->buttons('modify', 'save', 'undo', 'delete', 'back');
     //$edit->submit = new submitField("login","btn_submit");
     $edit->build();
     $data['content'] = $edit->output;
     $data['head'] = $this->rapyd->get_head() . script('jquery.js');
     $data['title'] = heading($this->titp);
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:101,代码来源:inicio.php

示例9: dataedit

    function dataedit()
    {
        //$this->datasis->modulo_id(101,1);
        $this->rapyd->load('dataedit', 'dataobject');
        $script = '
		$(function() {
			$(".inputnum").numeric(".");
			$("#estadmin").change(function(){
				$.post("' . site_url('presupuesto/presupuesto/get_tipo') . '",{ codigoadm:$("#estadmin").val() },function(data){$("#fondo").html(data);})
			});
		});
		
		function btn_anulaf(i){
			if(!confirm("Esta Seguro que desea Anular El Fondo en Avance ?"))
				return false;
			else
				window.location="' . site_url($this->url . 'anular') . '/"+i
		}
		
		';
        $mSPRV = array('tabla' => 'sprv', 'columnas' => array('proveed' => 'C&oacute;odigo', 'nombre' => 'Nombre', 'rif' => 'Rif', 'contacto' => 'Contacto'), 'filtro' => array('proveed' => 'C&oacute;digo', 'nombre' => 'Nombre', 'rif' => 'Rif'), 'retornar' => array('proveed' => 'codprov', 'nombre' => 'nombrep'), 'titulo' => 'Buscar Beneficiario');
        $bSPRV = $this->datasis->p_modbus($mSPRV, "sprv");
        $do = new DataObject("odirect");
        $do->pointer('sprv', 'sprv.proveed=odirect.cod_prov', 'sprv.nombre as nombrep', 'LEFT');
        $edit = new DataEdit($this->tits, $do);
        $edit->back_url = site_url($this->url . "filteredgrid");
        $edit->script($script, "create");
        $edit->script($script, "modify");
        $edit->script($script, "show");
        $edit->pre_process('insert', '_valida');
        $edit->pre_process('update', '_valida');
        $edit->post_process('insert', '_post');
        $edit->post_process('update', '_post');
        $edit->numero = new inputField("N&uacute;mero", "numero");
        $edit->numero->mode = "autohide";
        //		$edit->numero->when=array('show');
        $edit->fecha = new dateonlyField("Fecha", "fecha");
        $edit->fecha->insertValue = date('Y-m-d');
        $edit->fecha->size = 12;
        $edit->fecha->rule = 'required';
        $edit->uejecutora = new dropdownField("Unidad Ejecutora", "uejecutora");
        $edit->uejecutora->option("", "Seccionar");
        $edit->uejecutora->options("SELECT codigo, nombre FROM uejecutora ORDER BY nombre");
        //$edit->uejecutora->onchange = "get_uadmin();";
        $edit->uejecutora->rule = "required";
        $edit->codprov = new inputField("Beneficiario", 'codprov');
        $edit->codprov->db_name = "cod_prov";
        $edit->codprov->size = 4;
        $edit->codprov->rule = "required";
        $edit->codprov->readonly = true;
        $edit->codprov->append($bSPRV);
        $edit->nombrep = new inputField("Nombre", 'nombrep');
        $edit->nombrep->size = 20;
        $edit->nombrep->readonly = true;
        $edit->nombrep->pointer = TRUE;
        $edit->nombrep->in = "codprov";
        //$edit->beneficiario = new inputField("Beneficiario", 'beneficiario');
        //$edit->beneficiario->size = 50;
        //$edit->beneficiario->rule = "required";
        $edit->observa = new textAreaField("Observaciones", 'observa');
        $edit->observa->cols = 60;
        $edit->observa->rows = 4;
        $edit->total = new inputField("Monto", 'total');
        $edit->total->rule = 'required|callback_positivo';
        $edit->total->css_class = 'inputnum';
        $edit->total->size = 15;
        $status = $edit->_dataobject->get('status');
        if ($status == 'G1') {
            $action = "javascript:window.location='" . site_url($this->url . 'actualizar/' . $edit->rapyd->uri->get_edited_id()) . "'";
            $edit->button_status("btn_status", 'Actualizar', $action, "TR", "show");
            $action = "javascript:btn_anulaf('" . $edit->rapyd->uri->get_edited_id() . "')";
            if ($this->datasis->puede(168)) {
                $edit->button_status("btn_anular", 'Anular', $action, "TR", "show");
            }
            $edit->buttons("modify", "save");
        } elseif ($status == 'G2') {
            //$action = "javascript:window.location='" .site_url($this->url.'reversar/'.$edit->rapyd->uri->get_edited_id()). "'";
            //$edit->button_status("btn_rever",'Reversar',$action,"TR","show");
            $action = "javascript:btn_anulaf('" . $edit->rapyd->uri->get_edited_id() . "')";
            if ($this->datasis->puede(168)) {
                $edit->button_status("btn_anular", 'Anular', $action, "TR", "show");
            }
        } elseif ($status == 'G') {
            $edit->buttons("modify", "save");
        } else {
            $edit->buttons("save");
        }
        $edit->buttons("undo", "back");
        $edit->build();
        if ($this->genesal) {
            $smenu['link'] = barra_menu('171');
            $data['smenu'] = $this->load->view('view_sub_menu', $smenu, true);
            $data['content'] = $edit->output;
            $data['title'] = "{$this->tits}";
            $data["head"] = script("jquery.pack.js") . script("plugins/jquery.numeric.pack.js") . script("plugins/jquery.floatnumber.js") . $this->rapyd->get_head();
            $this->load->view('view_ventanas', $data);
        } else {
            $edit->error_string;
        }
    }
开发者ID:enderochoa,项目名称:tortuga,代码行数:100,代码来源:anti.php

示例10: dataedit


//.........这里部分代码省略.........
        $edit->fecha->group = "Transaccion";
        $edit->monto = new inputField("Monto", 'monto');
        $edit->monto->size = 20;
        $edit->monto->group = "Transaccion";
        $edit->monto->css_class = 'inputnum';
        $edit->monto->rule = 'callback_positivo|required';
        if ($tipo == 'I') {
            $edit->monto->mode = "autohide";
        }
        $edit->benefi = new inputField("A nombre de", 'benefi');
        $edit->benefi->size = 100;
        $edit->benefi->rule = "required";
        $edit->benefi->group = "Transaccion";
        $edit->observa = new textAreaField("Concepto", 'observa');
        $edit->observa->cols = 80;
        $edit->observa->rows = 5;
        $edit->observa->group = "Transaccion";
        $edit->destino = new dropdownField("Destino", "destino");
        $edit->destino->option("C", "Caja");
        $edit->destino->option("I", "Interno");
        $edit->destino->style = "width:100px";
        $edit->rel = new textAreaField("Relaciones", 'rel');
        $edit->rel->cols = 60;
        $edit->rel->rows = 3;
        $edit->rel->group = "Transaccion";
        $edit->rel->mode = "autohide";
        $edit->rel->when = array("show");
        $edit->status = new textAreaField("Estado", 'status');
        $edit->status->cols = 60;
        $edit->status->rows = 3;
        $edit->status->group = "Transaccion";
        $edit->status->mode = "autohide";
        $edit->status->when = array("show");
        $edit->fecha2 = new dateonlyField("Fecha Aux", "fecha2");
        $edit->fecha2->group = "Otros";
        $edit->multiple = new inputField("Multiple", 'multiple');
        $edit->multiple->group = "Otros";
        $edit->multiple->when = array('show');
        $edit->pcodbanc = new inputField("Para Banco", 'pcodbanc');
        $edit->pcodbanc->size = 3;
        $edit->pcodbanc->rule = "callback_chexiste_codbanc";
        $edit->pcodbanc->append($bpBANC);
        $edit->pcodbanc->group = "Transaccion";
        $edit->pnombreb = new inputField("Nombre", "pnombreb");
        $edit->pnombreb->size = 50;
        $edit->pnombreb->readonly = true;
        $edit->pnombreb->pointer = true;
        $edit->pnombreb->in = "pcodbanc";
        $edit->pnombreb->group = "Transaccion";
        $edit->cuentab = new hiddenField("", "cuentab");
        $edit->cuentab->db_name = ' ';
        $edit->nom_bancb = new hiddenField("", "nom_bancb");
        $edit->nom_bancb->db_name = ' ';
        $status = $edit->_dataobject->get("status");
        $tipo_doc = $edit->_dataobject->get("tipo_doc");
        $staing = $edit->_dataobject->get("staing");
        if ($status == 'J1') {
            $action = "javascript:window.location='" . site_url($this->url . 'actualizar/' . $edit->rapyd->uri->get_edited_id()) . "'";
            $edit->button_status("btn_status", 'Actualizar', $action, "TR", "show");
            if ($this->datasis->puede(337)) {
                $edit->buttons("modify", "save");
            }
        } elseif ($status == 'J2') {
            if (in_array($tipo_doc, array('CH', 'ND'))) {
                $action = "javascript:window.location='" . site_url($this->url . 'creanc/' . $edit->rapyd->uri->get_edited_id()) . "'";
                $edit->button_status("btn_creanc", 'Crear NC', $action, "TR", "show");
            }
        } elseif ($status == 'J') {
            //			if($this->datasis->puede(337))
            $edit->buttons("modify", "save");
        } else {
            $edit->buttons("save");
        }
        if ($status != 'AN' && $status != 'A' && $status != 'A2' && $status != 'NC' && $staing != 'C') {
            $action = "javascript:window.location='" . site_url($this->url . 'anular/' . $edit->rapyd->uri->get_edited_id()) . "'";
            $edit->button_status("btn_rever", 'Anular', $action, "TR", "show");
        }
        $edit->buttons("undo", "back");
        if ($this->datasis->puede(313)) {
            $edit->buttons("delete");
        }
        if ($this->datasis->puede(336)) {
            $edit->buttons("add");
        }
        $edit->build();
        if ($this->genesal) {
            $smenu['link'] = barra_menu('204');
            $data['smenu'] = $this->load->view('view_sub_menu', $smenu, true);
            $data['content'] = $edit->output;
            $data['title'] = "{$this->tits}";
            $data["head"] = script("jquery.pack.js") . script("plugins/jquery.numeric.pack.js") . script("plugins/jquery.floatnumber.js") . $this->rapyd->get_head();
            $this->load->view('view_ventanas', $data);
        } else {
            if (!empty($edit->error_string)) {
                return $edit->error_string;
            } else {
                return $edit->_dataobject->get('id');
            }
        }
    }
开发者ID:enderochoa,项目名称:tortuga,代码行数:101,代码来源:mbanc.php

示例11: ordiva

    function ordiva($ordi)
    {
        $this->rapyd->load('dataobject', 'dataedit');
        $fecha = $this->datasis->dameval("SELECT fecha FROM ordi WHERE numero={$ordi}");
        $iva = $this->datasis->ivaplica($fecha);
        $jsc = 'function calcula(){
			if($("#tasa").val().length>0){
				tasa=parseFloat($("#tasa").val());
				if($("#base").val().length>0) base=parseFloat($("#base").val()); else base=0;
				$("#montoiva").val(roundNumber(base*(tasa/100),2));
			}
		}
		function calculaiva(){
			if($("#tasa").val().length>0){
				tasa=parseFloat($("#tasa").val());
				if($("#montoiva").val().length>0) montoiva=parseFloat($("#montoiva").val()); else montoiva=0;
				$("#base").val(roundNumber(montoiva*100/tasa,2));
			}
		}';
        $edit = new DataEdit(' ', 'ordiva');
        $edit->back_save = true;
        $edit->back_cancel = true;
        $edit->back_cancel_save = true;
        $edit->back_url = site_url('import/ordi/dataedit/show/' . $ordi);
        $edit->post_process('insert', '_post_ordiva');
        $edit->post_process('update', '_post_ordiva');
        $edit->post_process('delete', '_post_ordiva');
        $edit->id = new inputField2('Numero', 'id');
        $edit->id->mode = 'autohide';
        $edit->id->when = array('modify');
        $edit->tasa = new dropdownField('Tasa %', 'tasa');
        foreach ($iva as $nom => $val) {
            $edit->tasa->option($val, nformat($val) . '%');
        }
        $edit->tasa->rule = 'required|numeric';
        $edit->tasa->style = 'width:100px';
        $edit->tasa->mode = 'autohide';
        $edit->tasa->append('<span style="color:black;"> Vigente para la fecha <b>' . dbdate_to_human($fecha) . '</b></span>');
        $edit->base = new inputField('Base imponible', 'base');
        $edit->base->rule = 'required|numeric';
        $edit->base->size = 15;
        $edit->base->css_class = 'inputnum';
        $edit->base->autocomplete = false;
        $edit->montoiva = new inputField('IVA ', 'montoiva');
        $edit->montoiva->rule = 'required|numeric';
        $edit->montoiva->size = 15;
        $edit->montoiva->autocomplete = false;
        $edit->montoiva->css_class = 'inputnum';
        $edit->concepto = new inputField2('Concepto', 'concepto');
        $edit->concepto->rule = 'max_length[100]';
        $edit->concepto->max_size = 100;
        $edit->ordeni = new autoUpdateField('ordeni', $ordi, $ordi);
        $edit->script($jsc, 'create');
        //$edit->script($jsm,'modify');
        $accion = "javascript:window.location='" . site_url('import/ordi/cargarordi' . $edit->pk_URI()) . "'";
        $edit->button_status('btn_cargar', 'Cargar', $accion, 'TR', 'show');
        $edit->buttons('modify', 'save', 'undo', 'delete', 'back');
        $edit->build();
        if ($edit->_status != 'show') {
            $this->rapyd->jquery[] = '$(".inputnum").numeric(".");';
            $this->rapyd->jquery[] = '$("#tasa").change(function() { calcula(); });';
            $this->rapyd->jquery[] = '$("#base").bind("keyup",function() { calcula(); });';
            $this->rapyd->jquery[] = '$("#montoiva").bind("keyup",function() { calculaiva(); });';
        }
        if ($edit->_status == 'modify') {
            $jsm = '<script language="javascript" type="text/javascript">
			function calcula(){
				tasa=' . $edit->tasa->value . ';
				if($("#base").val().length>0) base=parseFloat($("#base").val()); else base=0;
				$("#montoiva").val(roundNumber(base*(tasa/100),2));
			}
			function calculaiva(){
				tasa=' . $edit->tasa->value . ';
				if($("#montoiva").val().length>0) montoiva=parseFloat($("#montoiva").val()); else montoiva=0;
				$("#base").val(roundNumber(montoiva*100/tasa,2));
			}
			</script>';
            $data['script'] = $jsm;
        }
        $data['content'] = $edit->output;
        $data['title'] = '<h1>Impuestos IVA</h1>';
        $data['head'] = $this->rapyd->get_head() . phpscript('nformat.js');
        $this->load->view('view_ventanas', $data);
    }
开发者ID:codethics,项目名称:proteoerp,代码行数:84,代码来源:ordi.php

示例12: dataedit

 function dataedit()
 {
     //$this->datasis->modulo_id(101,1);
     $this->rapyd->load('dataobject', 'dataedit');
     $mOCOMPRA = array('tabla' => 'ocompra', 'columnas' => array('numero' => 'N&uacute;mero', 'tipo' => 'Tipo', 'uejecutora' => 'uejecutora', 'cod_prov' => 'Beneficiario'), 'filtro' => array('numero' => 'N&uacute;mero', 'tipo' => 'Tipo', 'uejecutora' => 'uejecutora', 'cod_prov' => 'Beneficiario'), 'retornar' => array('numero' => 'compra', 'tipo' => 'tipo', 'uejecutora' => 'uejecutora', 'cod_prov' => 'cod_prov', 'fechafac' => 'fechafac', 'factura' => 'factura', 'controlfac' => 'controlfac', 'total' => 'ototal', 'abonado' => 'oabonado'), 'where' => 'total > abonado', 'titulo' => 'Buscar Ordenes de Compra');
     $bOCOMPRA = $this->datasis->p_modbus($mOCOMPRA, "ocompra");
     $do = new dataObject("odirect");
     $edit = new DataEdit($this->tits, "odirect");
     //numero,controlord,,tipo,uejecutora,estadmin,fondo,cod_prov,nombre,beneficiario,factura,controlfac,fechafac,subtotal,exento,ivag,ivar,ivaa,pago,creten,breten,reteiva,reten,total,iva,observa,anulado,status,user_comp,date_comp,reteiv
     $edit->back_url = site_url($this->url . "filteredgrid");
     $edit->pre_process('update', '_valida');
     $edit->pre_process('insert', '_valida');
     $edit->post_process('insert', '_post');
     $edit->post_process('update', '_post');
     $edit->compra = new inputField("Numero O. Compra", "compra");
     $edit->compra->mode = "autohide";
     $edit->compra->group = "Orden De Compra";
     $edit->compra->append($bOCOMPRA);
     $edit->numero = new inputField("N&uacute;mero O. Pago", "numero");
     $edit->numero->mode = "autohide";
     $edit->numero->when = array('show');
     $edit->numero->group = "Pago";
     $edit->factura = new inputField("Factura", "factura");
     $edit->factura->mode = "autohide";
     $edit->factura->group = "Orden De Compra";
     $edit->controlfac = new inputField("Control Fiscal", "controlfac");
     $edit->controlfac->mode = "autohide";
     $edit->controlfac->group = "Orden De Compra";
     $edit->fechafac = new inputField("Fecha Causaci&oacute;n", "fechafac");
     $edit->fechafac->mode = "autohide";
     $edit->fechafac->group = "Orden De Compra";
     $edit->tipo = new inputField("Orden de", "tipo");
     $edit->tipo->mode = "autohide";
     $edit->tipo->group = "Orden De Compra";
     $edit->uejecutora = new inputField("Unidad Ejecutora", "uejecutora");
     $edit->uejecutora->mode = "autohide";
     $edit->uejecutora->group = "Orden De Compra";
     $edit->cod_prov = new inputField("Beneficiario", 'cod_prov');
     $edit->cod_prov->size = 6;
     $edit->cod_prov->group = "Orden De Compra";
     $edit->cod_prov->mode = "autohide";
     $edit->oabonado = new inputField("Abonado", 'oabonado');
     $edit->oabonado->db_name = ' ';
     $edit->oabonado->size = 8;
     $edit->oabonado->mode = "autohide";
     $edit->oabonado->group = "Orden De Compra";
     $edit->oabonado->when = array('create');
     $edit->ototal = new inputField("Total O. Compra", 'ototal');
     $edit->ototal->db_name = ' ';
     $edit->ototal->size = 8;
     $edit->ototal->mode = "autohide";
     $edit->ototal->group = "Orden De Compra";
     $edit->ototal->when = array('create');
     $edit->fecha = new dateonlyField("Fecha de Pago", "fecha");
     $edit->fecha->insertValue = date('Y-m-d');
     $edit->fecha->size = 12;
     $edit->fecha->rule = "required";
     $edit->fecha->group = "Pago";
     $edit->pago = new inputField("Pagar", 'pago');
     $edit->pago->size = 8;
     $edit->pago->mode = "autohide";
     $edit->pago->group = "Pago";
     $n = $edit->_dataobject->get('numero');
     $status = $edit->_dataobject->get("status");
     if ($status == 'T') {
         //$action = "javascript:window.location='" .site_url($this->url.'actualizar/'.$edit->rapyd->uri->get_edited_id()). "'";
         //$action = "javascript:window.location='" .site_url($this->url.'actualizar/'.$n)."'";
         //$edit->button_status("btn_status",'Ordenar Pago',$action,"TR","show");
         $edit->buttons("modify", "save");
     } elseif ($status == 'O') {
         $action = "javascript:window.location='" . site_url($this->url . 'reversar/' . $edit->rapyd->uri->get_edited_id()) . "'";
         //$action = "javascript:window.location='" .site_url($this->url.'reversar/'.$n). "'";
         $edit->button_status("btn_rever", 'Deshacer Ordenar Pago', $action, "TR", "show");
     } else {
         $edit->buttons("save");
     }
     $edit->buttons("undo", "back");
     $edit->build();
     $data['content'] = $edit->output;
     $data['title'] = " {$this->tits} ";
     //$data['content'] = $edit->output;
     //$data['title']   = " $this->tits ";
     $data["head"] = script("jquery.pack.js") . script("plugins/jquery.numeric.pack.js") . script("plugins/jquery.floatnumber.js") . $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
开发者ID:enderochoa,项目名称:tortuga,代码行数:85,代码来源:opago5.php

示例13: dataedit

    function dataedit()
    {
        //$this->datasis->modulo_id(101,1);
        $this->rapyd->load('dataedit', 'dataobject');
        $mBANC = array('tabla' => 'banc', 'columnas' => array('codbanc' => 'C&oacute;odigo', 'banco' => 'Banco', 'saldo' => 'Saldo'), 'filtro' => array('codbanc' => 'C&oacute;odigo', 'banco' => 'Banco', 'saldo' => 'Saldo'), 'retornar' => array('codbanc' => 'codbanc', 'banco' => 'nombreb'), 'where' => 'activo = "S"', 'titulo' => 'Buscar Bancos');
        $bBANC = $this->datasis->p_modbus($mBANC, "banc");
        $mSPRV = array('tabla' => 'sprv', 'columnas' => array('proveed' => 'C&oacute;odigo', 'nombre' => 'Nombre', 'rif' => 'Rif', 'contacto' => 'Contacto'), 'filtro' => array('proveed' => 'C&oacute;digo', 'nombre' => 'Nombre', 'rif' => 'Rif'), 'retornar' => array('proveed' => 'cod_prov', 'nombre' => 'nombre'), 'titulo' => 'Buscar Proveedor');
        $bSPRV = $this->datasis->p_modbus($mSPRV, "proveed");
        $script = '
			$(".inputnum").numeric(".");
		';
        $do = new DataObject("pmov");
        //$do->pointer('sprv' ,'sprv.proveed = pmov.cod_prov',' sprv.nombre as nombre ',' LEFT ');
        $edit = new DataEdit($this->tits, $do);
        $edit->back_url = site_url($this->url . "filteredgrid");
        $edit->script($script, "create");
        $edit->script($script, "modify");
        //$edit->pre_process('insert'  ,'_valida');
        //$edit->pre_process('update'  ,'_valida');
        $edit->numero = new inputField("N&uacute;mero", "numero");
        $edit->numero->mode = "autohide";
        $edit->numero->when = array('show');
        $edit->orden = new inputField("Orden de Pago", "orden");
        $edit->orden->size = 10;
        $edit->orden->maxlength = 12;
        //$edit->orden->mode    = "autohide";
        //$edit->orden->when    = array('show');
        $edit->cod_prov = new inputField("Proveedor", 'cod_prov');
        $edit->cod_prov->size = 6;
        $edit->cod_prov->rule = "required";
        $edit->cod_prov->append($bSPRV);
        $edit->nombre = new inputField("Nombre", 'nombre');
        $edit->nombre->db_name = ' ';
        $edit->nombre->size = 50;
        $edit->nombre->readonly = true;
        $edit->nombre->pointer = true;
        $edit->nombre->in = "cod_prov";
        $edit->observa = new textAreaField("Observaciones", 'observa');
        $edit->observa->cols = 60;
        $edit->observa->rows = 3;
        $edit->banc_doc = new dropdownField("Banco Emisor", "banc_doc");
        $edit->banc_doc->option("", "Seccionar");
        $edit->banc_doc->options("SELECT cod_banc, CONCAT_WS(' ',cod_banc,nomb_banc) FROM tban ORDER BY cod_banc");
        //		$edit->banc_doc->group = "Cheque";
        $edit->tipo_doc = new dropdownField("Tipo Documento", "tipo_doc");
        $edit->tipo_doc->option("CH", "Cheque");
        $edit->tipo_doc->option("NC", "Nota de Credito");
        //$edit->tipo_doc->option("ND","Nota de Debito" );
        $edit->tipo_doc->option("DP", "Deposito");
        //$edit->tipo_doc->option("CH","Cheque"         );
        $edit->tipo_doc->style = "width:200px";
        $edit->numero_doc = new inputField("N&uacute;mero Documento", 'numero_doc');
        $edit->numero_doc->size = 30;
        $edit->numero_doc->maxlength = 30;
        $edit->numero_doc->rule = "required";
        //$edit->numero_doc->group     = "Deposito";
        $edit->fecha_doc = new dateonlyField("Fecha Documento", "fecha_doc");
        $edit->fecha_doc->insertValue = date('Y-m-d');
        $edit->fecha_doc->size = 12;
        //$edit->fecha_doc->group       = "Cheque/Deposito/Nota de Cr&eacute;dito";
        $edit->fecha_doc->rule = "required";
        //$edit->cheque = new inputField("Cheque Nº", 'cheque');
        //$edit->cheque->size      = 30;
        //$edit->cheque->maxlength = 30;
        //$edit->cheque->group     = "Cheque";
        $edit->monto = new inputField("Monto", 'monto');
        $edit->monto->size = 20;
        $edit->monto->css_class = 'inputnum';
        $edit->monto->rule = 'required|callback_positivo';
        //$edit->monto->group = "";
        $edit->fecha = new dateonlyField("Fecha", "fecha");
        $edit->fecha->insertValue = date('Y-m-d');
        $edit->fecha->size = 12;
        //$edit->fecha->group       = "Cheque/Deposito/Nota de Cr&eacute;dito";
        $edit->fecha->rule = "required";
        $edit->codbanc = new inputField("Banco*", 'codbanc');
        $edit->codbanc->size = 6;
        //$edit->codbanc->rule     = "required";
        $edit->codbanc->append($bBANC);
        $edit->codbanc->readonly = true;
        //$edit->codbanc->group = "Deposito";
        $edit->nombreb = new inputField("", 'nombreb');
        $edit->nombreb->db_name = 'nombreb';
        $edit->nombreb->size = 30;
        //$edit->nombreb->group       = "Deposito";
        $edit->nombreb->in = "codbanc";
        $status = $edit->_dataobject->get("status");
        if ($status == 'P') {
            $action = "javascript:window.location='" . site_url($this->url . 'actualizar/' . $edit->rapyd->uri->get_edited_id()) . "'";
            $edit->button_status("btn_status", 'Actualizar', $action, "TR", "show");
            $edit->buttons("modify", "delete", "save");
        } elseif ($status == 'C') {
            $action = "javascript:window.location='" . site_url($this->url . 'reversar/' . $edit->rapyd->uri->get_edited_id()) . "'";
            $edit->button_status("btn_rever", 'Reversar', $action, "TR", "show");
        } else {
            $edit->buttons("save");
        }
        $edit->buttons("undo", "back");
        $edit->build();
        $data['content'] = $edit->output;
//.........这里部分代码省略.........
开发者ID:enderochoa,项目名称:tortuga,代码行数:101,代码来源:pmov.php


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