function filteredgrid2() { $this->rapyd->load("datafilter2", "datagrid"); $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'), 'titulo' => 'Buscar Beneficiario'); $bSPRV = $this->datasis->p_modbus($mSPRV, "sprv"); $filter = new DataFilter2($this->titp); $filter->nomi = new inputField("Número", "nomina"); $filter->nomi->size = 15; //$filter->numero->clause="likerigth"; $filter->cod_prov = new inputField("Proveedor", "cod_prov"); $filter->cod_prov->rule = 'required'; $filter->cod_prov->size = 5; $filter->cod_prov->append($bSPRV); $filter->buttons("reset", "search"); $filter->build(); $uri = anchor($this->url . '/dataedit/show/<#nomina#>', '<str_pad><#nomina#>|8|0|STR_PAD_LEFT</str_pad>'); $grid = new DataGrid("Lista de Deducciones de Nómina"); $grid->db->select(array("nomina", "b.nombre", "SUM(monto)total")); $grid->db->from('retenomi'); $grid->db->join('sprv b', 'retenomi.cod_prov = b.proveed', 'LEFT'); $grid->db->groupby('nomina'); $grid->db->orderby('nomina', 'desc'); $grid->use_function('substr', 'str_pad'); $grid->per_page = 20; $grid->column("Número", $uri); $grid->column("Proveedor", "nombre", 'align="left"'); $grid->column("Total", "<number_format><#total#>|2|,|.</number_format>", 'align="right"'); $grid->add($this->url . "dataedit/create"); $grid->build(); $data['content'] = $filter->output . $grid->output; $data['title'] = " {$this->titp} "; $data["head"] = script("jquery.js") . $this->rapyd->get_head(); $this->load->view('view_ventanas', $data); }
function index() { $this->rapyd->load("datagrid", "datafilter2"); $filter = new DataFilter2("Filtro de " . $this->titp, 'horarios'); $filter->id = new inputField("Id", "id"); $filter->id->size = 10; $filter->id->clause = "likerigth"; $filter->codigo = new inputField("Código", "codigo"); $filter->codigo->size = 10; $filter->codigo->clause = "likerigth"; $filter->denomi = new inputField("Denominación", "denomi"); $filter->denomi->size = 10; $filter->denomi->clause = "likerigth"; $filter->turno = new inputField("Turno", "turno"); $filter->turno->size = 10; $filter->buttons("reset", "search"); $filter->build(); $uri = anchor($this->url . 'dataedit/show/<#id#>', '<#id#>'); $grid = new DataGrid(); $grid->order_by("codigo", "asc"); $grid->per_page = 15; $grid->column("Id", $uri); $grid->column("Cóndigo", "codigo"); $grid->column("Denominaón", "denomi"); $grid->column("Turno", "turno", "align='left'"); $grid->column("Entrada", "entrada", "align='left'"); $grid->column("Salida", "salida", "align='left'"); $grid->add($this->url . "dataedit/create"); $grid->build(); $data['content'] = $filter->output . $grid->output; $data["head"] = $this->rapyd->get_head(); $data['title'] = "<h1>{$this->titp}</h1>"; $this->load->view('view_ventanas', $data); }
function detalles($codigo = NULL) { $this->rapyd->load("datagrid"); $mSQL = "SELECT DATE_FORMAT(fecha, '%d/%m/%Y')as fecha,codigo,descri1,precio,costo,rela FROM rece WHERE codigo='{$codigo}'"; $query = $this->db->query($mSQL); if ($query->num_rows() > 0) { $pdata = $query->row_array(); } $grid = new DataGrid(); $grid->db->select = array('codigo', 'descrip', 'cantidad', 'costo', 'monto', 'rendi'); $grid->db->from('itrece'); $grid->db->where('menu', $codigo); $grid->order_by("codigo", "asc"); //$grid->per_page = 15; $uri = anchor("/hospitalidad/agregarrec/mdetalle/{$codigo}/<#codigo#>/modify", '<#codigo#>'); $grid->column("Código", $uri); $grid->column("Descripción", "descrip"); $grid->column("Cantidad", "cantidad", "align='right'"); $grid->column("Rendimiento", "rendi", "align='center'"); $grid->column("Costo", "costo", "align='right'"); $grid->column("Monto", "monto", "align='right'"); $grid->add("hospitalidad/agregarrec/mdetalle/{$codigo}/create"); $grid->build(); $pdata['items'] = $grid->output; $data['content'] = $this->load->view('view_agrecetas', $pdata, true); $data["head"] = $this->rapyd->get_head(); $data['title'] = '<h1>Agregar Receta</h1>'; $this->load->view('view_ventanas', $data); }
function filteredgrid() { $this->rapyd->load("datafilter", "datagrid"); $this->rapyd->uri->keep_persistence(); $filter = new DataFilter("Filtro por Código", 'rete'); $filter->codigo = new inputField("Código", "codigo"); $filter->codigo->size = 15; $filter->buttons("reset", "search"); $filter->build(); $uri = anchor('finanzas/rete/dataedit/show/<#codigo#>', '<#codigo#>'); $grid = new DataGrid("Lista de Retenciones"); $grid->order_by("codigo", "asc"); $grid->per_page = 20; $grid->column("Código", $uri); $grid->column("Pago de", "activida"); $grid->column("Base Imponible", "base1"); $grid->column("Porcentaje de Retención", "tari1"); $grid->column("Para pagos mayores a", "pama1"); $grid->column("Tipo", "tipo"); $grid->add("finanzas/rete/dataedit/create"); $grid->build(); $data['content'] = $filter->output . $grid->output; $data['title'] = "<h1>Retenciones</h1>"; $data["head"] = $this->rapyd->get_head(); $this->load->view('view_ventanas', $data); }
function filteredgrid() { $this->rapyd->load("datafilter", "datagrid"); $filter = new DataFilter("Filtro de Transferencias", "stra"); $filter->numero = new inputField("Número", "numero"); $filter->numero->size = 15; $filter->fecha = new dateonlyField("Fecha", "fecha"); $filter->fecha->size = 12; $filter->envia = new inputField("Envia", "envia"); $filter->envia->size = 12; $filter->recibe = new inputField("Recibe", "recibe"); $filter->recibe->size = 12; $filter->buttons("reset", "search"); $filter->build(); $uri = anchor('supermercado/stra/dataedit/show/<#numero#>', '<#numero#>'); $grid = new DataGrid("Lista de transferencias"); $grid->order_by("numero", "desc"); $grid->per_page = 5; $grid->use_function("substr"); $grid->column("Número", $uri); $grid->column("Fecha", "<dbdate_to_human><#fecha#></dbdate_to_human>", "align='center'"); $grid->column("Envía", "envia", "envia"); $grid->column("Recibe", "recibe"); $grid->column("Observación", "observ1"); //echo $grid->db->last_query(); $grid->add("supermercado/stra/dataedit/create"); $grid->build(); $data['content'] = $filter->output . $grid->output; $data['title'] = "<h1>Transferencias</h1>"; $data["head"] = $this->rapyd->get_head(); $this->load->view('view_ventanas', $data); }
public function Load() { $eUsuario = unserialize($_SESSION['eUsuario']); if ($eUsuario == null) { die; } $sPage = "index.php?Page=BBImprimirr&Action="; $lVars['usuario'] = $eUsuario->Apellidos . ', ' . $eUsuario->Nombres; $oCelularBBMod = new CelularBBMod(); $oUbicacionMod = new UbicacionMod(); $CelID = $_SESSION["sCelID"]; $FechaMax = $_GET["max"]; $FechaMin = $_GET["min"]; $oCelular = $oCelularBBMod->GetCelulaByrID($CelID); $lVars['persona'] = $oCelular->Apellidos . ', ' . $oCelular->Nombres; $lVars['celular'] = $oCelular->Numero; $lVars['imei'] = $oCelular->IMEI; $lVars["btnImprimir"] = $this->oHtml->button("btnImprimir", "btnPrincipal", "Imprimir", array('onclick', "window.print();")); $dsUbicaciones = $oUbicacionMod->ListarUbicaciones($CelID, $FechaMax, $FechaMin); $dgView = new DataGrid($dsUbicaciones, '', 'DataGridA'); $dgView->lCabecera = array(array('12%', 'Fecha'), array('40%', 'Direccion'), array('12%', 'Distrito'), array('12%', 'Ciudad'), array('12%', 'Departamento'), array('12%', 'Pais')); $dgView->lCampos = array(array('d', 'Fecha'), array('d', 'Calle'), array('d', 'Distrito'), array('d', 'Ciudad'), array('d', 'Departamento'), array('d', 'Pais')); $lVars['dgUbicaciones'] = $dgView->Imprimir(); $lVars['Ajax'] = $this->oAjax->ImprimirJs(); $this->lView->show($this->lPage, $lVars); }
function index() { $this->rapyd->load("datagrid", "datafilter"); $this->datasis->modulo_id(715, 1); $filter = new DataFilter("Filtro de noco"); $filter->db->select("codigo,tipo,nombre,CONCAT_WS('',observa1,observa2 ) AS observa"); $filter->db->from('noco'); $filter->nombre = new inputField("Nombre", "nombre"); $filter->nombre->size = 40; //$filter->status = new dropdownField("Status", "tipo"); //$filter->status->option("S","Semanal"); //$filter->status->option("Q","Quincenal"); //$filter->status->option("M","Mensual"); //$filter->status->option("O","Otro"); //$filter->status->style='width:100px'; $filter->buttons("reset", "search"); $filter->build(); $uri = anchor('nomina/noco/dataedit/show/<#codigo#>', '<#codigo#>'); $grid = new DataGrid(); $grid->order_by("codigo", "asc"); $grid->per_page = 15; $grid->column("Código", $uri); //$grid->column("Título","nombre"); //$grid->column("Observación","observa"); //$grid->column("Tipo" ,"tipo" ,"align='center'"); $grid->add("nomina/noco/dataedit/create"); $grid->build(); //echo $grid->db->last_query(); $data['content'] = $filter->output . $grid->output; $data["head"] = $this->rapyd->get_head(); $data['title'] = '<h1>Contratos</h1>'; $this->load->view('view_ventanas', $data); }
function filteredgrid() { $this->rapyd->load("datafilter2", "datagrid"); $this->rapyd->uri->keep_persistence(); $filter = new DataFilter2("", 'carg'); $filter->cargo = new inputField("Código", "cargo"); $filter->cargo->size = 3; $filter->cargo->clause = "likerigth"; $filter->descrip = new inputField("Descripción", "descrip"); $filter->cargo->clause = "likerigth"; $filter->buttons("reset", "search"); $filter->build(); $uri = anchor('nomina/carg/dataedit/show/<raencode><#cargo#></raencode>', '<#cargo#>'); $grid = new DataGrid(""); $grid->order_by("cargo", "asc"); $grid->per_page = 20; $grid->column_orderby("Cargo", $uri, "cargo"); $grid->column_orderby("Descripción", "descrip", "descrip", "align='left'NOWRAP"); $grid->column_orderby("Sueldo", "<number_format><#sueldo#>|2|,|.</number_format>", "sueldo", "align='right' "); $grid->column_orderby("Estructura Administrativa", "codigoadm", "codigoadm", "align='left' "); $grid->column_orderby("Codigo Presupuestario", "codigopres", "codigopres", "align='left' "); $grid->column_orderby("F. Financiamiento", "fondo", "fondo", "align='left' "); $grid->add("nomina/carg/dataedit/create"); $grid->build(); //$data['content'] = $filter->output.$grid->output; $data['filtro'] = $filter->output; $data['content'] = $grid->output; $data['script'] = script("jquery.js") . "\n"; $data['title'] = "Cargos"; $data["head"] = $this->rapyd->get_head(); $this->load->view('view_ventanas', $data); }
function filteredgrid() { $this->rapyd->load("datafilter", "datagrid"); $this->rapyd->uri->keep_persistence(); $filter = new DataFilter("Filtro de Tarifas Telefónicas", 'tari'); $filter->gr_desc = new inputField("Código", "serial"); $filter->gr_desc->size = 15; $filter->buttons("reset", "search"); $filter->build(); $uri = anchor('hospitalidad/taritele/dataedit/show/<#serial#>', '<#serial#>'); $grid = new DataGrid("Lista de Tarifas Telefónicas"); $grid->order_by("serial", "asc"); $grid->per_page = 7; $grid->column("Código", $uri); $grid->column("Descripción", "descrip", "descrip"); $grid->column("Banda", "banda"); $grid->column("Pulso", "pulso"); $grid->column("Tarifa 1", "tarifa1"); $grid->column("Tarifa2", "tarifa2"); $grid->add("hospitalidad/taritele/dataedit/create"); $grid->build(); $data['content'] = $filter->output . $grid->output; $data['title'] = "<h1>Tarifas Telefónicas</h1>"; $data["head"] = $this->rapyd->get_head(); $this->load->view('view_ventanas', $data); }
function filteredgrid() { $this->rapyd->load("datafilter", "datagrid", "dataobject"); $filter = new DataFilter("", "contribu"); $filter->codigo = new inputField("Código", 'codigo'); $filter->nombre = new inputField("Nombre", 'nombre'); $filter->rifci = new inputField("RIF / Cédula", 'rifci'); $filter->nacionali = new inputField("Nacionalidad", 'nacionali'); $filter->nacionali->option('', ''); $filter->nacionali->option('VENEZOLANA', 'VENEZOLANA'); $filter->nacionali->option('EXTRANJERA', 'EXTRANJERA'); $filter->direccion = new inputField("Dirección", 'direccion'); $filter->telefono = new inputField("Telefono", 'telefono'); $filter->buttons("reset", "search"); $filter->build(); $uri = anchor($this->url . 'dataedit/show/<raencode><#codigo#></raencode>', '<#codigo#>'); $grid = new DataGrid(""); $grid->order_by("codigo "); $grid->per_page = 40; $grid->column_orderby("Código", $uri, "codigo"); $grid->column_orderby("Nombre", "nombre", "nombre", "align='left' "); $grid->column_orderby("Nacionalidad", "nacionali", "numcuent", "align='left' "); $grid->column_orderby("RIF/Cédula", "rifci", "cedula", "align='left' "); $grid->column_orderby("Dirección", "direccion", "direccion", "align='left' "); $grid->column_orderby("Telefono", "telefono", "direccion", "align='left' "); $grid->add($this->url . "dataedit/create"); $grid->build(); //$data['content'] = $filter->output.$grid->output; $data['filtro'] = $filter->output; $data['content'] = $grid->output; $data['script'] = script("jquery.js") . "\n"; $data['title'] = "{$this->titp}"; $data["head"] = $this->rapyd->get_head(); $this->load->view('view_ventanas', $data); }
function detalles($control = NULL) { $this->rapyd->load("datagrid"); $mSQL = "SELECT * FROM scst WHERE control='{$control}'"; $query = $this->db->query($mSQL); if ($query->num_rows() > 0) { $pdata = $query->row_array(); } $grid = new DataGrid(); $grid->db->select = array('codigo', 'descrip', 'cantidad', 'costo', 'importe'); $grid->db->from('itscst'); $grid->db->where('control', $control); $grid->order_by("codigo", "desc"); //$grid->per_page = 15; $uri = anchor("/compras/agregar/mdetalle/{$control}/modify/<#id#>", '<#codigo#>'); $grid->column("Código", $uri); $grid->column("Descripción", "descrip"); $grid->column("Cantidad", "cantidad", "align='right'"); $grid->column("Precio", "costo", "align='right'"); $grid->column("Importe", "importe", "align='right'"); $grid->add("compras/agregar/mdetalle/{$control}/create"); $grid->add("compras/agregar/encab/modify/{$control}/", 'Modificar encabezado'); $grid->build(); $pdata['items'] = $grid->output; $data['content'] = $this->load->view('view_agcompras', $pdata, true); $data["head"] = $this->rapyd->get_head(); $data['title'] = '<h1>Agregar Artículos</h1>'; $this->load->view('view_ventanas', $data); }
/** * Component factory. * @see Nette/ComponentContainer#createComponent() */ protected function createComponentDataGrid($name) { $grid = new DataGrid(); $grid->bindDataTable(dibi::getConnection()->dataSource('SELECT authorId as id, name, surname, class,', Model::sqlClassName(Model::getSchoolYear()) . 'as classMark, (SELECT COUNT(workId) FROM [works] WHERE author=authorId) as sum FROM [authors] ')); $grid->addColumn('name', 'Jméno'); $grid->addColumn('surname', 'Příjmení')->addDefaultSorting('asc'); $grid->addColumn('class', 'Maturita')->getCellPrototype()->style('text-align: center;'); $grid->addColumn('classMark', 'Třída')->getCellPrototype()->style('text-align: right;'); $grid->addColumn('sum', 'Počet prací')->getCellPrototype()->style('text-align: right;')->class('pages'); $grid->addActionColumn('Akce'); $grid->keyName = 'id'; $grid->addAction('Smazat', 'delete!', NULL, FALSE, DataGridAction::WITH_KEY); $grid['name']->addFilter(); $grid['surname']->addFilter(); $grid['class']->addSelectboxFilter(); $grid['classMark']->addSelectboxFilter(); $grid['sum']->addSelectboxFilter(); $grid->multiOrder = FALSE; $grid->itemsPerPage = $this->getCookiesItemsCount(15); $renderer = $grid->getRenderer(); $renderer->paginatorFormat = '%label% %input% z %count%'; $renderer->infoFormat = 'Autoři %from%. - %to%. z %count% | Zobrazit: %selectbox% | %reset%'; $renderer->onRowRender[] = array($this, 'OnRowRendered'); //$grid->rememberState = TRUE; $this->addComponent($grid, $name); return; }
function filteredgrid() { $this->rapyd->load("datafilter", "datagrid"); // $this->rapyd->uri->keep_persistence(); $filter = new DataFilter("Filtro por Expediente", "bi_terreno"); $filter->expediente = new inputField("Numero expediente", "expediente"); $filter->expediente->size = 20; $filter->denominacion = new inputField("Denominación", "denominacion"); $filter->denominacion->size = 20; $filter->buttons("reset", "search"); $filter->build(); $uri = anchor('bienes/bi_terreno/dataedit/show/<#id#>', '<#id#>'); $grid = new DataGrid("Lista de terrenos"); $grid->order_by("expediente", "asc"); $grid->per_page = 20; $grid->column("Id", $uri, "align='center'"); $grid->column("Expediente", "expediente", "align='center'"); $grid->column_orderby("Est.Propietario", "est_propietario", "est_propietario", "align='left'"); $grid->column_orderby("Denominación", "denominacion", "denominacion"); // $grid->column_orderby("Uso","uso" ,"uso" ,"align='center'"); // $grid->column_orderby("Estado" ,"estado","estado" ,"align='center'"); $grid->column_orderby("Municipio", "municipio", "municipio", "align='center'"); $grid->column_orderby("Direccion", "direccion", "direccion", "align='left'"); $grid->add("bienes/bi_terreno/dataedit/create"); $grid->build(); $data['content'] = $filter->output . $grid->output; $data['title'] = "Terrenos"; $data["head"] = $this->rapyd->get_head(); $this->load->view('view_ventanas', $data); }
function filteredgrid() { $this->rapyd->load("dataform", "datagrid"); $modbus = array('tabla' => 'usuario', 'columnas' => array('us_codigo' => 'Código', 'us_nombre' => 'Nombre'), 'filtro' => array('us_nombre' => 'nombre'), 'retornar' => array('us_codigo' => 'usuario'), 'titulo' => 'Buscar Usuario'); $filter = new DataForm('/supervisor/trabajo/filteredgrid/search/osp'); $filter->mes = new dateonlyField("Mes", "mes", 'm/Y'); $filter->mes->clause = "where"; $filter->mes->operator = "="; $filter->mes->size = 8; $filter->mes->dbformat = 'Ym'; $filter->mes->insertValue = date("Y-m-d"); $filter->usuario = new inputField("Código de usuario", "usuario"); $filter->usuario->size = 11; $filter->usuario->append($this->datasis->modbus($modbus)); $filter->submit('manda', 'Buscar'); $filter->build_form(); /* $mSQL="(SELECT fecha, count(*) AS cant FROM bitacora WHERE usuario='DAVID' GROUP BY fecha ) UNION (SELECT a.fecha, 0 AS cant FROM dim_tiempo AS a LEFT JOIN bitacora as b ON a.fecha=b.fecha AND b.usuario='DAVID' WHERE a.fecha BETWEEN (SELECT MIN(fecha) FROM bitacora) AND (SELECT MAX(fecha) FROM bitacora) AND b.fecha IS NULL) ORDER BY fecha"; */ $content = ''; if ($this->input->post('manda')) { $usr = $this->input->post('usuario') ? ' AND b.usuario="' . $this->input->post('usuario') . '"' : ''; $fechad = '(SELECT MIN(fecha) FROM bitacora)'; $fechah = '(SELECT MAX(fecha) FROM bitacora)'; if ($this->input->post('mes')) { $acum = explode('/', $filter->mes->value); $fechad = $acum[1] . $acum[0] . '01'; $fechah = $acum[1] . $acum[0] . '31'; } $mSQL = "SELECT a.fecha, semana FROM dim_tiempo AS a LEFT JOIN bitacora as b ON a.fecha=b.fecha {$usr} WHERE a.fecha BETWEEN {$fechad} AND {$fechah} AND b.fecha IS NULL"; //echo $mSQL; $sema = array('Lunes', 'Martes', 'Miercoles', 'Jueves', 'Viernes', 'Sabado', 'Domingo'); $query = $this->db->query($mSQL); $data = array(); foreach ($query->result() as $row) { $pasa = array(); $pasa['fecha'] = $row->fecha; if ($row->semana > 5) { $pasa['cant'] = $sema[$row->semana - 1]; } else { $pasa['cant'] = '<b>' . $sema[$row->semana - 1] . '</b>'; } $data[] = $pasa; } $query->free_result(); //grid $grid = new DataGrid("Lista de Bitacora", $data); $grid->per_page = 31; $grid->column("Fecha", "<dbdate_to_human><#fecha#></dbdate_to_human>"); $grid->column("Semana", "<#cant#>"); $grid->build(); $content = $grid->output; } $data['content'] = $filter->output . $content; $data["head"] = $this->rapyd->get_head(); $data['title'] = ' Dias NO trabajados '; $this->load->view('view_ventanas', $data); }
function filteredgrid() { $this->rapyd->load("datafilter", "datagrid"); $filter = new DataFilter("", 'prof'); $filter->codigo = new inputField("Codigo", "codigo"); $filter->codigo->size = 20; $filter->codigo->maxlength = 8; $filter->profesion = new inputField("Profesion", "profesion"); $filter->profesion->size = 20; $filter->profesion->maxlength = 40; $filter->buttons("reset", "search"); $filter->build(); $uri = anchor('nomina/prof/dataedit/show/<#codigo#>', '<#codigo#>'); $grid = new DataGrid(""); $grid->per_page = 15; $grid->column_orderby("Codigo", $uri, "codigo"); $grid->column_orderby("Profesiones", "profesion", "profesion", "align='left'NOWRAP"); $grid->add("nomina/prof/dataedit/create"); $grid->build(); //$data['content'] = $filter->output.$grid->output; $data['title'] = "Profesiones"; $data['filtro'] = $filter->output; $data['content'] = $grid->output; $data['script'] = script("jquery.js") . "\n"; $data["head"] = $this->rapyd->get_head(); $this->load->view('view_ventanas', $data); }
function detalles($numero = NULL) { $this->rapyd->load("datagrid"); $mSQL = "SELECT tipo_doc, numero,DATE_FORMAT(fecha, '%d/%m/%Y')as fecha, cod_cli, rifci, nombre, direc, dire1,totals, iva, totalg,DATE_FORMAT(vence, '%d/%m/%Y')as vence, observa1, observa2,orden FROM otin WHERE numero='{$numero}'"; $query = $this->db->query($mSQL); if ($query->num_rows() > 0) { $pdata = $query->row_array(); } $grid = new DataGrid(); $grid->db->select = array('codigo', 'descrip', 'cantidad', 'precio', 'importe'); $grid->db->from('itotin'); $grid->db->where('numero', $numero); $grid->order_by("codigo", "desc"); //$grid->per_page = 15; $uri = anchor("/ventas/agregaroi/mdetalle/{$numero}/modify/<#id#>", '<#codigo#>'); $grid->column("Código", $uri); $grid->column("Descripción", "descrip"); $grid->column("Cantidad", "cantidad", "align='right'"); $grid->column("Precio", "precio", "align='right'"); $grid->column("Importe", "importe", "align='right'"); $grid->add("ventas/agregaroi/mdetalle/{$numero}/create"); $grid->build(); $pdata['items'] = $grid->output; $data['content'] = $this->load->view('view_agotrosingresos', $pdata, true); $data["head"] = $this->rapyd->get_head(); $data['title'] = '<h1>Agregar Artículos</h1>'; $this->load->view('view_ventanas', $data); }
function index() { $this->rapyd->load("datagrid", "datafilter"); $filter = new DataFilter("Filtro de Recetas", 'rece'); $filter->codigo = new inputField("Código", "codigo"); $filter->codigo->size = 10; $filter->descri1 = new inputField("Descripción", "descri1"); $filter->descri1->size = 30; $filter->buttons("reset", "search"); $filter->build(); $uri = anchor('hospitalidad/recetas/dataedit/show/<#codigo#>/', '<#codigo#>'); $grid = new DataGrid(); $grid->order_by("fecha", "desc"); $grid->per_page = 15; $grid->column("Código", $uri); $grid->column("Descripción", "descri1"); $grid->column("Precio", "<number_format><#precio#>|2</number_format>", "align=right"); $grid->column("Fecha", "<dbdate_to_human><#fecha#></dbdate_to_human>", "align='center'"); $grid->column("Costo", "<number_format><#costo#>|2</number_format>", "align=right"); $grid->column("Rela", "rela", "align='center'"); $grid->add("hospitalidad/agregarrec"); $grid->build(); //echo $grid->db->last_query(); $data['content'] = $filter->output . $grid->output; $data["head"] = $this->rapyd->get_head(); $data['title'] = '<h1>Recetas</h1>'; $this->load->view('view_ventanas', $data); }
function filteredgrid() { $this->rapyd->load('datafilter2', 'datagrid'); $filter = new DataFilter2('', 'tban'); $filter->codbanc = new inputField('Código', 'cod_banc'); $filter->codbanc->size = 5; $filter->codbanc->clause = 'likerigth'; $filter->banco = new inputField('Nombre de Banco', 'nomb_banc'); $filter->banco->size = 30; $filter->banco->clause = 'likerigth'; $filter->buttons('reset', 'search'); $filter->build(); $uri = anchor('tesoreria/tban/dataedit/show/<#cod_banc#>', '<#cod_banc#>'); $grid = new DataGrid(""); $grid->per_page = 20; $grid->column_orderby('Código', $uri, 'cod_banc'); $grid->column_orderby('Banco', 'nomb_banc', 'nomb_banc', "align='left' NOWRAP"); //$grid->column_orderby("Tipo" ,"tipotra" ,"tipotra" ); //$grid->column_orderby("Formaca","formaca" ,"formaca" ); $grid->add('tesoreria/tban/dataedit/create'); $grid->build(); $data['content'] = $filter->output . $grid->output; $data['title'] = 'Tabla de Bancos'; $data['head'] = $this->rapyd->get_head(); $this->load->view('view_ventanas', $data); }
function index() { $this->datasis->modulo_id($this->modulo, 1); $this->rapyd->load("datagrid", "dataform", "fields"); $control = $this->uri->segment(4); $checkbox = '<input type="checkbox" name="genera[]" value="<#modulo#>" CHECKED>'; $grid = new DataGrid('Seleccione los módulos que desea generar'); $grid->db->select('modulo, descripcion'); $grid->db->from('`reglascont`'); $grid->db->groupby('modulo'); $grid->db->orderby('modulo,regla'); $grid->column("Módulo", "modulo"); $grid->column("Descripción", "descripcion"); $grid->column('Generar', $checkbox, 'align="center"'); $grid->build(); $form = new DataForm('contabilidad/generar/procesar'); $form->title('Rango de fecha para la Generación'); $form->fechai = new dateonlyField("Fecha Desde", "fechai", "d/m/Y"); $form->fechaf = new dateonlyField("Fecha Hasta", "fechaf", "d/m/Y"); $form->fechaf->size = $form->fechai->size = 10; $form->fechai->insertValue = $this->input->post('fechai') ? $this->input->post('fechai') : date("Ymd"); $form->fechaf->insertValue = $this->input->post('fechaf') ? $this->input->post('fechaf') : date("Ymd"); $form->tabla = new containerField('tabla', $grid->output); if ($control) { $form->control = new containerField('control', 'Contabilidad Generada'); } //$form->submit("btn_submit","Generar Depurado"); $form->build_form(); $data['script'] = "<script type='text/javascript'>\n\t\tvar handlerFunc = function(t) {\n\t\t\tdocument.getElementById('preloader').style.display='none';\n\t\t\tnew Effect.Opacity('contenido', {duration:0.5, from:0.3, to:1.0});\n\t\t\talert(t.responseText);\n\t\t}\n\n\t\tvar errFunc = function(t) {\n\t\t\tdocument.getElementById('preloader').style.display='none';\n\t\t\tnew Effect.Opacity('contenido', {duration:0.5, from:0.3, to:1.0});\n\t\t\talert('Error ' + t.status + ' -- ' + t.statusText);\n\t\t}\n\n\t\tfunction generar() {\n\t\t\tnew Effect.toggle('preloader', 'appear');\n\t\t\tnew Effect.Opacity('contenido', {duration:0.5, from:1.0, to:0.3});\n\t\t\tnew Ajax.Request('" . site_url('contabilidad/generar/procesar') . "',{\n\t\t\t method: 'post',\n\t\t\t parameters : Form.serialize('df1'),\n\t\t\t onSuccess:handlerFunc,\n\t\t\t onFailure:errFunc});\n\t\t}\n\t\t</script>"; $data['extras'] = "<div id='preloader' style='display: none;\tposition:absolute; left:40%; top:40%; font-family:Verdana, Arial, Helvetica, sans-serif;'>\n\t\t\t<center>" . image("loading4.gif") . "<br>" . image("loadingBarra.gif") . "<br>\n\t\t\t<b>Generando . . . </b>\n\t\t\t</center>\n\t\t</div>"; $data['content'] = $form->output . "<input type=button value='Generar' onclick='generar()'>"; $data["head"] = $this->rapyd->get_head() . script("prototype.js") . script("scriptaculous.js") . script("effects.js"); $data['title'] = "<h1>Generar Contabilidad</h1>"; $this->load->view('view_ventanas', $data); }
function filteredgrid() { $this->datasis->modulo_id(138, 1); $mSPRV = array('tabla' => 'sprv', 'columnas' => array('proveed' => 'Cóodigo', 'nombre' => 'Nombre', 'contacto' => 'Contacto'), 'filtro' => array('proveed' => 'Código', 'nombre' => 'Nombre'), 'retornar' => array('proveed' => 'cod_prov'), 'titulo' => 'Buscar Beneficiario'); $this->rapyd->load("datafilter", "datagrid"); $bSPRV = $this->datasis->p_modbus($mSPRV, "proveed"); $mBANC = array('tabla' => 'banc', 'columnas' => array('codbanc' => 'Cóodigo', 'banco' => 'Banco', 'numcuent' => 'Cuenta', 'saldo' => 'Saldo'), 'filtro' => array('codbanc' => 'Cóodigo', 'banco' => 'Banco', 'numcuent' => 'Cuenta', 'saldo' => 'Saldo'), 'retornar' => array('codbanc' => 'codbanc'), 'where' => 'activo = "S"', 'titulo' => 'Buscar Bancos'); $bBANC = $this->datasis->p_modbus($mBANC, "banc"); $filter = new DataFilter(""); // $filter->db->select(array("fecha","a.tipo tipo","a.cod_prov cod_prov","a.codbanc codbanc1","cheque","a.id id","a.monto","a.observa observa","a.benefi benefi")); $filter->db->from("mbanc"); //$filter->db->join("banc b" ,"a.codbanc=b.codbanc","left"); //$filter->db->join("sprv c" ,"a.cod_prov=c.proveed","left"); $filter->db->where("(status = 'A' OR status='AN' OR status='A2' OR status='NC' OR status='AN') "); $filter->db->_escape_char = ''; $filter->db->_protect_identifiers = false; $filter->id = new inputField("Ref.", 'id'); $filter->fecha = new dateonlyField("Fecha", "fecha"); $filter->fecha->dbformat = "Y-m-d"; $filter->fecha->size = 12; $filter->cod_prov = new inputField("Beneficiario", 'cod_prov'); // $filter->cod_prov->db_name = "a.cod_prov"; $filter->cod_prov->size = 6; $filter->cod_prov->append($bSPRV); $filter->cod_prov->rule = "required"; $filter->codbanc = new inputField("Banco", 'codbanc'); // $filter->codbanc->db_name = "a.codbanc"; $filter->codbanc->size = 5; $filter->codbanc->append($bBANC); $filter->cheque = new inputField("Cheque", "cheque"); // $filter->cheque->size = 60; // $filter->cheque->db_name = "a.cheque"; $filter->buttons("reset", "search"); $filter->build(); $uri = anchor($this->url . 'dataedit/show/<#id#>', '<str_pad><#id#>|8|0|' . STR_PAD_LEFT . '</str_pad>'); $grid = new DataGrid(""); $grid->db->_escape_char = ''; $grid->db->_protect_identifiers = false; $grid->order_by("numero", "asc"); $grid->per_page = 20; $grid->use_function('substr', 'str_pad'); $grid->column_orderby("Número", $uri, "id"); $grid->column_orderby("Fecha", "<dbdate_to_human><#fecha#></dbdate_to_human>", "fecha", "align='center' "); // $grid->column_orderby("Banco" ,"nombanco" ,"nombanco","align='left'NOWRAP"); $grid->column_orderby("Cheque", "cheque", "cheque"); $grid->column_orderby("Monto", "<number_format><#monto#>|2|,|.</number_format>", "monto", "align='right' "); // $grid->column_orderby("Beneficiario" ,"proveed1" ,"proveed1" ,"align='left'NOWRAP"); $grid->column_orderby("Observasion", "observa", "observa", "align='left'NOWRAP"); //$grid->column("Tipo" ,"tipo" ,"align='center'"); //$grid->column("Estado" ,"status" ,"align='center'"); $grid->add($this->url . "dataedit/create"); $grid->build(); //$data['content'] = $filter->output.$grid->output; $data['filtro'] = $filter->output; $data['content'] = $grid->output; $data['script'] = script("jquery.js") . "\n"; $data['title'] = "{$this->titp}"; $data["head"] = $this->rapyd->get_head(); $this->load->view('view_ventanas', $data); }
function filteredgrid() { $this->rapyd->load("datafilter", "datagrid"); $this->rapyd->uri->keep_persistence(); $filter = new DataFilter("Filtro de Conceptos", 'icon'); $filter->codigo = new inputField("Código", "codigo"); $filter->codigo->size = 20; $filter->cedula = new inputField("Concepto", "concepto"); $filter->cedula->size = 20; $filter->buttons("reset", "search"); $filter->build(); $uri = anchor('inventario/concepto/dataedit/show/<#codigo#>', '<#codigo#>'); $grid = new DataGrid("Lista de Conceptos"); $grid->order_by("codigo", "asc"); $grid->per_page = 20; $grid->column("Código", $uri); $grid->column("Concepto ", "concepto"); $grid->column("Gasto", "gasto"); $grid->column("Gastos de:", "gastode"); $grid->column("Ingreso", "ingreso"); $grid->column("Ingresos de:", "ingresod"); $grid->add("hospitalidad/concepto/dataedit/create"); $grid->build(); $data['content'] = $filter->output . $grid->output; $data['title'] = " Otros Conceptos "; $data["head"] = $this->rapyd->get_head(); $this->load->view('view_ventanas', $data); }
function detalles($numero = NULL) { $this->rapyd->load("datagrid"); $mSQL = "SELECT numero, fecha, vd,cod_cli, rifci,nombre, direc,dire1,iva, inicial,totals,totalg,condi1,condi2,peso FROM spre WHERE numero='{$numero}'"; $query = $this->db->query($mSQL); if ($query->num_rows() > 0) { $pdata = $query->row_array(); } $grid = new DataGrid(); $grid->db->select = array('codigo', 'desca', 'cana', 'preca', 'importe'); $grid->db->from('itspre'); $grid->db->where('numero', $numero); $grid->order_by("codigo", "desc"); //$grid->per_page = 15; $uri = anchor("/ventas/agregarpre/mdetalle/{$numero}/modify/<#id#>", '<#codigo#>'); $grid->column("Código", $uri); $grid->column("Descripción", "desca"); $grid->column("Cantidad", "cana", "align='right'"); $grid->column("Precio", "preca", "align='right'"); $grid->column("Importe", "importe", "align='right'"); $grid->add("ventas/agregarpre/mdetalle/{$numero}/create"); $grid->build(); $pdata['items'] = $grid->output; $data['content'] = $this->load->view('view_agpresupuesto', $pdata, true); $data["head"] = $this->rapyd->get_head(); $data['title'] = '<h1>Agregar Artículos</h1>'; $this->load->view('view_ventanas', $data); }
function filteredgrid() { $this->rapyd->load("datafilter", "datagrid"); $this->rapyd->uri->keep_persistence(); $filter = new DataFilter("Filtro por Número", 'apan'); $filter->numero = new inputField("Número", "numero"); $filter->numero->size = 12; $filter->numero->maxlength = 8; $filter->nombre = new inputField("Nombre", "nombre"); $filter->nombre->size = 12; $filter->nombre->maxlength = 30; $filter->tipo = new dropdownField("Tipo", "tipo"); $filter->tipo->option("", ""); $filter->tipo->option("C", "C"); $filter->tipo->option("P", "P"); $filter->tipo->style = "width:100px"; $filter->buttons("reset", "search"); $filter->build(); $uri = anchor('finanzas/apan/dataedit/show/<#numero#>', '<#numero#>'); $grid = new DataGrid("Lista de Aplicación de Anticipos"); $grid->order_by("numero", "asc"); $grid->per_page = 20; $grid->column("Número", $uri); $grid->column("Fecha", "<dbdate_to_human><#fecha#></dbdate_to_human>", "align='center'"); $grid->column("Tipo", "tipo"); $grid->column("Clipro", "clipro"); $grid->column("Nombre", "nombre"); $grid->column("Monto", "<number_format><#monto#>|2|,|.</number_format>", 'align=right'); $grid->add("finanzas/apan/dataedit/create"); $grid->build(); $data['content'] = $filter->output . $grid->output; $data['title'] = "<h1>Aplicación de Anticipos</h1>"; $data["head"] = $this->rapyd->get_head(); $this->load->view('view_ventanas', $data); }
function filteredgrid() { $this->rapyd->load('dataform', 'datagrid'); $this->load->library('encrypt'); $filter = new DataForm('ejecutasql/filteredgrid/process'); $filter->sql = new textareaField('', 'sql'); $filter->sql->cols = 90; $filter->sql->rows = 9; $filter->sql->rule = 'required'; $filter->submit('btnsubmit', 'Ejecutar'); $filter->build_form(); $salida = ''; if ($filter->on_success()) { $data = array(); $mSQL = $filter->sql->value; $link = @mysql_connect($this->db->hostname, $this->db->username, $this->db->password) or die('Error de coneccion'); mysql_select_db($this->db->database, $link) or die('Base de datos no seleccionable'); $result = mysql_query($mSQL, $link); if (!$result) { $salida = mysql_errno($link) . ": " . mysql_error($link); } else { if (is_resource($result)) { $num_rows = mysql_num_rows($result); $afectados = 0; } elseif (is_bool($result)) { $num_rows = 0; $afectados = mysql_affected_rows(); } else { $num_rows = 0; $afectados = 0; } if ($num_rows > 0) { $colunas = mysql_num_fields($result); while ($row = mysql_fetch_assoc($result)) { $data[] = $row; } $grid = new DataGrid("Filas : {$num_rows}, Columnas : {$colunas} ,Afectados :{$afectados}", $data); $grid->per_page = 100000; foreach ($data[0] as $campos => $value) { $grid->column($campos, $campos); } $grid->build(); $salida = $grid->output; if (stristr($mSQL, 'SELECT')) { $mSQL2 = $this->encrypt->encode($mSQL); $salida .= "<form action='/../../proteoerp/xlsauto/repoauto2/'; method='post'>\n \t\t\t\t\t\t<input size='100' type='hidden' name='mSQL' value='{$mSQL2}'>\n \t\t\t\t\t\t<input type='submit' value='Descargar a Excel' name='boton'/>\n \t\t\t\t\t\t</form>"; } } elseif ($afectados > 0) { $salida = "Filas afectadas {$afectados}"; } else { $salida = 'Esta consulta no genero resultados'; } } } $data['content'] = $filter->output . $salida; $data['title'] = heading('Consulta SQL'); $data['head'] = $this->rapyd->get_head(); $this->load->view('view_ventanas', $data); }
function index() { $this->rapyd->load('dataform', 'datatable', 'datagrid'); $this->load->library('table'); $base_process_uri = $this->rapyd->uri->implode_uri("base_uri", "gfid", "orderby"); $filter = new DataForm($this->rapyd->uri->add_clause($base_process_uri, "search")); $filter->title('Elija una tabla'); $filter->attributes = array('onsubmit' => 'is_loaded()'); $filter->tabla = new dropdownField("Tabla", "tabla"); $filter->tabla->option("pers", "Personal"); $filter->tabla->option("nomina", "Nomina"); $filter->tabla->option("sprv", "Proveedores"); $filter->tabla->option("abonotros", "Abono Otros"); $filter->tabla->clause = ""; //$filter->obra = new dropdownField("Obra", "depto"); //$filter->obra->db_name='depto'; //$filter->obra->clause="where"; //$filter->obra->option(" ","Todos"); //$filter->obra->options("SELECT depto, descrip FROM dpto ORDER BY depto "); //$filter->obra->operator="="; //$filter->status = new dropdownField("Status","status"); //$filter->status->option("","Todos"); //$filter->status->option("A","Activos"); //$filter->status->option("I","Inactivos"); //$filter->status->style='width:100px'; $filter->submit('btnsubmit', 'Descargar'); $filter->build_form(); if ($this->rapyd->uri->is_set("search")) { $table = $filter->tabla->newValue; $mSQL = "DESCRIBE {$table}"; $query = $this->db->query($mSQL); if ($query->num_rows() > 0) { foreach ($query->result_array() as $row) { $data[] = $row; } } function ractivo($field) { $data2 = array('name' => 'campos[]', 'id' => 'c' . $field, 'value' => $field, 'checked' => FALSE, 'style' => 'margin:5px'); $retorna = form_checkbox($data2); return $retorna; } $grid = new DataGrid("Resultados", $data); $grid->use_function('ractivo', 'ucwords'); $grid->column('Campos', '<ucwords><#Field#></ucwords>'); $grid->column('Mostrar', "<ractivo><#Field#></ractivo>", 'align="center"'); $grid->build(); $tabla = $grid->output; $filter->build_form(); $conten = $filter->output . form_open("nomina/rpers/crear/{$table}") . $tabla . form_submit('mysubmit', 'Generar') . form_close(); } else { $conten = $filter->output; } $data['content'] = $conten; $data['title'] = heading('Reporte'); $data["head"] = script("jquery.js") . $this->rapyd->get_head(); $this->load->view('view_ventanas', $data); }
function detalle() { $this->rapyd->load('datagrid', 'dataform'); $modulo = $this->uri->segment(4) ? $this->uri->segment(4) : $this->input->post('modulo'); if (!$modulo) { redirect('/contabilidad/reglas'); } $form = new DataForm('contabilidad/reglas/ejecutar'); $form->title('Fecha para la ejecución'); $form->fecha = new dateonlyField('Fecha', 'fecha', 'd/m/Y'); $form->fecha->size = 10; $form->fecha->insertValue = $this->input->post('fecha') ? $this->input->post('fecha') : date('Ymd'); $form->fecha->append("<input type='hidden' name='modulo' value='{$modulo}' id='modulo'>"); $form->submit = new submitField('Ejecutar', 'btn_submit'); $form->submit->in = 'fecha'; $form->build_form(); function marca($encab, $val) { if ($encab == 'CASI') { return ''; } if (!empty($val)) { if (is_numeric($val) && floatval($val) == 0) { return ''; } else { return '<div style="background:green"> - </div>'; } } return ''; } $sel = array('modulo', 'descripcion', 'regla', 'tabla', 'debe', 'haber'); $link = anchor('/contabilidad/reglas/dataedit/<#modulo#>/show/<#modulo#>/<#regla#>', 'Ver regla'); $link2 = anchor('/contabilidad/reglas/duplicar/<#modulo#>/<#regla#>', 'Duplicar'); $action = "javascript:window.location='" . site_url('contabilidad/reglas') . "'"; $grid = new DataGrid(); $grid->use_function('marca'); $grid->add("contabilidad/reglas/dataedit/{$modulo}/create", 'Agregar Regla'); $grid->button('cancelar', RAPYD_BUTTON_BACK, $action); $grid->db->select($sel); $grid->db->from('`reglascont`'); $grid->db->where('modulo', $modulo); $grid->db->orderby('modulo,tabla,regla'); $grid->column('Modulo', 'modulo'); $grid->column('Regla', 'regla'); $grid->column('Tabla', 'tabla'); $grid->column('Descripcion', 'descripcion'); $grid->column('Debe', '<marca><#tabla#>|<#debe#></marca>', 'align="center"'); $grid->column('Haber', '<marca><#tabla#>|<#haber#></marca>', 'align="center"'); $grid->column('', $link, 'align="center"'); $grid->column('', $link2, 'align="center"'); $grid->build(); $data['content'] = $form->output . $grid->output; $data['head'] = $this->rapyd->get_head(); $data['title'] = "<h1>Detalle de regla {$modulo}</h1>"; $this->load->view('view_ventanas', $data); }
function filteredgrid() { $this->rapyd->load("datafilter2", "datagrid"); $script = ' $(function() { }); '; $filter = new DataFilter2("", "bi_trasla"); $filter->script($script); $filter->numero = new inputField("Número", "numero"); $filter->numero->size = 15; $filter->fecha = new dateonlyField("Fecha", "fecha"); $filter->fecha->dbformat = "Y-m-d"; $filter->fecha->size = 12; $filter->concepto = new inputField("Concepto", "concepto"); $filter->concepto->size = 40; $filter->status = new dropdownField("Estado", "status"); $filter->status->option("", ""); $filter->status->option("P", "Sin Ejecutar"); $filter->status->option("C", "Ejecutado"); $filter->status->style = "width:100px"; $filter->buttons("reset", "search"); $filter->build(); $uri = anchor($this->url . '/dataedit/show/<#numero#>', '<str_pad><#numero#>|8|0|STR_PAD_LEFT</str_pad>'); function sta($status) { switch ($status) { case "P": return "Sin Ejecutar"; break; case "C": return "Ejecutado"; break; //case "O":return "Ordenado Pago";break; //case "A":return "Anulado";break; } } $grid = new DataGrid(""); $grid->order_by("numero", "desc"); $grid->per_page = 20; $grid->use_function('substr', 'str_pad'); $grid->use_function('sta'); $grid->column_orderby("Número", $uri, "numero"); $grid->column_orderby("Fecha", "<dbdate_to_human><#fecha#></dbdate_to_human>", "fecha"); $grid->column_orderby("Concepto", "concepto", "concepto"); $grid->column_orderby("Estado", "<sta><#status#></sta>", "status"); $grid->add($this->url . "/dataedit/create"); $grid->build(); $data['filtro'] = $filter->output; $data['content'] = $grid->output; $data['script'] = script("jquery.js") . "\n"; $data['title'] = $this->t**s; $data["head"] = script("jquery.js") . $this->rapyd->get_head(); $this->load->view('view_ventanas', $data); }
function index() { $this->rapyd->load("dataform", "datatable", 'datagrid'); $this->load->library('table'); //$mSQL=$this->db->query("SHOW tables"); //$row = $mSQL->result_array(); //$tables =$row; //$base_process_uri= $this->rapyd->uri->implode_uri("base_uri","gfid","orderby"); //$filter = new DataForm($this->rapyd->uri->add_clause($base_process_uri, "search")); $filter = new DataForm('nomina/rpers/process'); $filter->title('Filtro del Reporte'); //$filter->attributes=array('onsubmit'=>'is_loaded()'); $filter->tabla = new dropdownField("Tabla", "tabla"); $filter->tabla->option("pers", "Personal"); $filter->tabla->clause = ""; $filter->obra = new dropdownField("Obra", "depto"); $filter->obra->db_name = 'depto'; $filter->obra->clause = "where"; $filter->obra->option(" ", "Todos"); $filter->obra->options("SELECT depto, descrip FROM dpto ORDER BY depto "); $filter->obra->operator = "="; $filter->status = new dropdownField("Status", "status"); $filter->status->option("", "Todos"); $filter->status->option("A", "Activos"); $filter->status->option("I", "Inactivos"); $filter->status->style = 'width:100px'; //if($this->rapyd->uri->is_set("search")){ $mSQL = 'DESCRIBE pers'; $query = $this->db->query($mSQL); if ($query->num_rows() > 0) { foreach ($query->result_array() as $row) { $data[] = $row; } } function ractivo($field) { $data2 = array('name' => 'campos[]', 'id' => 'c' . $field, 'value' => $field, 'checked' => FALSE, 'style' => 'margin:5px'); $retorna = form_checkbox($data2); return $retorna; } $grid = new DataGrid("Resultados", $data); $grid->use_function('ractivo'); $grid->column("Campos", 'Field'); $grid->column("Mostrar", "<ractivo><#Field#></ractivo>", 'align="center"'); $grid->build(); $tabla = $grid->output; //$filter->button("btnsubmit", "Consultar",'', $position="BL"); //$filter->button("btnsubmit", "Traer Tikets", form2uri(site_url("/supervisor/tiket/traertiket"),array('cliente')), $position="BL");// //$filter->button("btnsubmit", "Traer Tikets", form2uri(site_url("/supervisor/tiket/traertiket"), $position="BL");// $filter->build_form(); $obra = 'hola'; $data['content'] = $filter->output . form_open("nomina/rpers/crear/{$obra}") . $tabla . form_submit('mysubmit', 'Generar') . form_close(); $data['title'] = " Reporte "; $data["head"] = script("jquery.js") . $this->rapyd->get_head(); $this->load->view('view_ventanas', $data); }
function filteredgrid() { $this->rapyd->load("datafilter", "datagrid"); $filter = new DataFilter(""); $filter->db->from("banc a"); $filter->db->join("tban b", "a.tbanco=b.cod_banc"); $filter->codbanc = new inputField("Código", "codbanc"); $filter->codbanc->size = 12; $filter->banco = new inputField("Nombre de la Cuenta", "banco"); $filter->banco->size = 12; $filter->nom_banc = new inputField("Entidad Bancaria", "nomb_banc"); $filter->nom_banc->db_name = "b.nomb_banc"; $filter->nom_banc->size = 12; $filter->numcuent = new inputField("Numero de Cuenta", "numcuent"); $filter->numcuent->db_name = "a.numcuent"; $filter->numcuent->size = 12; $filter->tipocta = new dropdownField("Tipo de Cuenta", "tipocta"); $filter->tipocta->style = "width:100px;"; $filter->tipocta->option("", ""); $mf = $this->datasis->puede(333); $mo = $this->datasis->puede(334); if (!($mf && $mo)) { $filter->tipocta->options(array("K" => "Caja", "C" => "Corriente", "A" => "Ahorros", "P" => "Plazo Fijo")); } elseif ($mf && $mo) { $filter->tipocta->option("F", "FideComiso"); $filter->tipocta->options(array("K" => "Caja", "C" => "Corriente", "A" => "Ahorros", "P" => "Plazo Fijo")); } elseif ($mf) { $filter->db->where("tipocta", "F"); $filter->tipocta->option("F", "FideComiso"); } elseif ($mo) { $filter->db->where("tipocta <>", "F"); $filter->tipocta->options(array("K" => "Caja", "C" => "Corriente", "A" => "Ahorros", "P" => "Plazo Fijo")); } $filter->buttons("reset", "search"); $filter->build(); $uri = anchor('tesoreria/banc/dataedit/show/<#codbanc#>', '<#codbanc#>'); $grid = new DataGrid(anchor('tesoreria/banc/recalcular', 'Recalcular Saldo en Bancos')); $grid->order_by("codbanc", "desc"); $grid->use_function("number_format"); $grid->per_page = 20; $grid->column_orderby("Código", $uri, "codbanc"); $grid->column_orderby("Nombre de la Cuenta", "banco", "banco"); $grid->column_orderby("Entidad bancaria", "nomb_banc", "nom_banc"); $grid->column_orderby("Nro Cuenta", "numcuent", "numcuent"); $grid->column_orderby("Saldo", "<nformat><#saldo#>|2</nformat>", "saldo", "align='right' "); $grid->add("tesoreria/banc/dataedit/create"); $grid->build(); //echo $grid->db->last_query(); //$data['content'] = $filter->output.$grid->output; $data['filtro'] = $filter->output; $data['content'] = $grid->output; $data['script'] = script("jquery.js") . "\n"; $data['title'] = "Bancos"; $data["head"] = $this->rapyd->get_head(); $this->load->view('view_ventanas', $data); }
function filteredgrid() { $this->rapyd->load("datafilter", "datagrid"); $this->rapyd->uri->keep_persistence(); $filter = new DataFilter("Buscar", 'tarjeta'); $filter->tipo = new dropdownField("Tipo", "tipo"); $filter->tipo->options("SELECT tipo, nombre from tarjeta ORDER BY tipo"); $filter->tipo->style = "width:180px"; $filter->buttons("reset", "search"); $filter->build(); $uri = anchor('ventas/tarjeta/dataedit/show/<#tipo#>', '<#tipo#>'); $grid = new DataGrid("Lista de Formas de Pago"); $grid->order_by("nombre", "asc"); $grid->per_page = 10; $grid->column("Tipo", $uri); $grid->column("Nombre", "nombre", "nombre"); $grid->column("Comisión", "comision"); $grid->column("Impuesto", "impuesto"); $grid->column("Mensaje", "mensaje"); $grid->add("ventas/tarjeta/dataedit/create"); $grid->build(); $data['content'] = $filter->output . $grid->output; $data['title'] = "<h1>Formas de Pago</h1>"; $data["head"] = $this->rapyd->get_head(); $this->load->view('view_ventanas', $data); }