コード例 #1
0
ファイル: su_trasla.php プロジェクト: enderochoa/tortuga
 function filteredgrid()
 {
     //$this->datasis->modulo_id(75,1);
     $this->rapyd->load("datafilter2", "datagrid");
     $filter = new DataFilter2("", "su_trasla");
     $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->de = new dropdownField("De", "de");
     $filter->de->option("", "");
     $filter->de->options("SELECT codigo,descrip FROM su_caub");
     $filter->para = new dropdownField("Para", "para");
     $filter->para->option("", "");
     $filter->para->options("SELECT codigo,descrip FROM su_caub");
     $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;
         }
     }
     $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&uacute;mero", $uri, "numero");
     $grid->column_orderby("Fecha", "<dbdate_to_human><#fecha#></dbdate_to_human>", "fecha", "align='center'");
     $grid->column_orderby("De", "de", "de", "align='right'");
     $grid->column_orderby("Para", "para", "para", "align='right'");
     $grid->column_orderby("Concepto", "concepto", "concepto", "align='left'  NOWRAP");
     $grid->column_orderby("Total", "total", "total", "align='right'");
     $grid->column_orderby("Estado", "<sta><#status#></sta>", "status", "align='center'NOWRAP");
     $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->titp;
     $data["head"] = script("jquery.js") . $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
コード例 #2
0
ファイル: bi_trasla.php プロジェクト: enderochoa/tortuga
    function filteredgrid()
    {
        $this->rapyd->load("datafilter2", "datagrid");
        $script = '
		$(function() {
		
		});
		';
        $filter = new DataFilter2("", "bi_trasla");
        $filter->script($script);
        $filter->numero = new inputField("N&uacute;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&uacute;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);
    }
コード例 #3
0
ファイル: crudsamples.php プロジェクト: codethics/proteoerp
 function filteredgrid()
 {
     //filteredgrid//
     $this->rapyd->load("datafilter", "datagrid");
     $this->rapyd->uri->keep_persistence();
     //filter
     $filter = new DataFilter("Filtro de Facturas");
     $filter->db->select("fmay.*, scli.*");
     $filter->db->from("fmay");
     $filter->db->join("scli", "scli.cliente=fmay.cod_cli", "LEFT");
     $filter->numero = new inputField("Numero", "numero");
     $filter->fecha = new dateField("Fecha", "fecha", "d/m/Y");
     //    $filter->cod_cli = new inputField("Numero", "numero");
     //    $filter->title = new inputField("Numero", "numero");
     $filter->cod_cli = new dropdownField("Cliente", "cod_cli");
     $filter->cod_cli->option("", "");
     $filter->cod_cli->options("SELECT cliente, nombre FROM scli ORDER BY nombre");
     $filter->buttons("reset", "search");
     $filter->build();
     $uri = "import/crudsamples/dataedit/show/<#numero#>";
     //grid
     $grid = new DataGrid("Article List");
     $grid->use_function("callback_test");
     $grid->order_by("numero", "desc");
     $grid->per_page = 5;
     $grid->use_function("substr");
     $grid->column_detail("Numero", "numero", $uri, "size=14");
     $grid->column_orderby("fecha", "fecha", "fecha");
     $grid->column("Nombre", "nombre");
     $grid->column("stotal", "<number_format><#stotal#>|2</number_format>", "align=right");
     $grid->column("impuesto", "<number_format><#impuesto#>|2</number_format>", "align=right");
     $grid->column("gtotal", "<number_format><#gtotal#>|2</number_format>", "align=right");
     $grid->column("callback test", "<callback_test><#numero#>|3</callback_test>");
     $grid->add("import/crudsamples/dataedit/create");
     $grid->build();
     $data["crud"] = $filter->output . $grid->output;
     //endfilteredgrid//
     //$this->_session_dump();
     $content["content"] = $this->load->view('rapyd/crud', $data, true);
     $content["rapyd_head"] = $this->rapyd->get_head();
     $content["code"] = '';
     /*
         $content["code"] = highlight_code_file(THISFILE, "//filteredgrid//", "//endfilteredgrid//");
         $content["code"] .= '<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #FF8000">//callback test function<br /></span><br/>';
         $content["code"] .= highlight_code_file(THISFILE, "//callbacktest//", "//endcallbacktest//");
     */
     $this->load->view('rapyd/template', $content);
 }
コード例 #4
0
ファイル: retenomi.php プロジェクト: enderochoa/tortuga
 function filteredgrid2()
 {
     $this->rapyd->load("datafilter2", "datagrid");
     $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'), 'titulo' => 'Buscar Beneficiario');
     $bSPRV = $this->datasis->p_modbus($mSPRV, "sprv");
     $filter = new DataFilter2($this->titp);
     $filter->nomi = new inputField("N&uacute;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&oacute;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&uacute;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);
 }
コード例 #5
0
ファイル: reintegros.php プロジェクト: enderochoa/tortuga
 function filteredgrid()
 {
     //$this->datasis->modulo_id(101,1);
     $this->rapyd->load("datafilter", "datagrid");
     $mSPRV = array('tabla' => 'sprv', 'columnas' => array('proveed' => 'C&oacute;odigo', 'nombre' => 'Nombre', 'contacto' => 'Contacto'), 'filtro' => array('proveed' => 'C&oacute;digo', 'nombre' => 'Nombre'), 'retornar' => array('proveed' => 'cod_prov'), 'titulo' => 'Buscar Beneficiario');
     $bSPRV = $this->datasis->p_modbus($mSPRV, "proveed");
     $filter = new DataFilter("", "rendi");
     $filter->db->where('MID(status,1,1) ', 'R');
     $filter->fecha = new dateonlyField("Fecha", "fecha");
     $filter->fecha->dbformat = "Y-m-d";
     $filter->fecha->size = 12;
     $filter->buttons("reset", "search");
     $filter->build();
     $uri = anchor($this->url . 'dataedit/show/<#numero#>', '<str_pad><#numero#>|8|0|STR_PAD_LEFT</str_pad>');
     $grid = new DataGrid("");
     $grid->order_by("numero", "desc");
     $grid->per_page = 20;
     $grid->use_function('substr', 'str_pad');
     $grid->column_orderby("N&uacute;mero", $uri, "numero");
     $grid->column_orderby("Fecha", "<dbdate_to_human><#fecha#></dbdate_to_human>", "fecha", "align='center'");
     $grid->column_orderby("Pago", "<number_format><#total#>|2|,|.</number_format>", "total", "align='right'");
     $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);
 }
コード例 #6
0
ファイル: stra.php プロジェクト: enderochoa/tortuga
 function filteredgrid()
 {
     $this->rapyd->load("datafilter", "datagrid");
     $filter = new DataFilter("Filtro de Transferencias", "stra");
     $filter->numero = new inputField("N&uacute;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('inventario/stra/dataedit/show/<#numero#>', '<#numero#>');
     $grid = new DataGrid("Lista de transferencias");
     $grid->order_by("numero", "desc");
     $grid->per_page = 20;
     $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("inventario/stra/dataedit/create");
     $grid->build();
     $data['content'] = $filter->output . $grid->output;
     $data['title'] = " Transferencias ";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
コード例 #7
0
ファイル: barras.php プロジェクト: enderochoa/tortuga
 function filteredgrid()
 {
     $this->rapyd->load("datafilter2", "datagrid");
     $mSPRV = array('tabla' => 'sprv', 'columnas' => array('proveed' => 'C&oacute;odigo', 'nombre' => 'Nombre', 'contacto' => 'Contacto'), 'filtro' => array('proveed' => 'C&oacute;digo', 'nombre' => 'Nombre'), 'retornar' => array('proveed' => 'proveed'), 'titulo' => 'Buscar Beneficiario');
     $bSPRV = $this->datasis->modbus($mSPRV);
     $filter = new DataFilter2("Filtro por Producto", 'sinv');
     $filter->codigo = new inputField("C&oacute;digo", "codigo");
     $filter->descrip = new inputField("Descripci&oacute;n", "descrip");
     $filter->descrip->db_name = 'CONCAT_WS(" ",descrip,descrip2)';
     $filter->clave = new inputField("Clave", "clave");
     $filter->proveed = new inputField("Beneficiario", "proveed");
     $filter->proveed->append($bSPRV);
     $filter->proveed->clause = "in";
     $filter->proveed->db_name = '( prov1, prov2, prov3 )';
     $filter->marca = new dropdownField("Marca", "marca");
     $filter->marca->option("", "Todas");
     $filter->marca->options("SELECT TRIM(marca) AS clave, TRIM(marca) AS valor FROM marc ORDER BY marca");
     $filter->buttons("reset", "search");
     $filter->build();
     $link = anchor('/inventario/barras/dataedit/modify/<#id#>', '<#codigo#>');
     $grid = new DataGrid("Lista de Art&iacute;culos");
     $grid->order_by("codigo", "asc");
     $grid->per_page = 20;
     $grid->use_function('str_replace');
     $grid->column("C&oacute;digo", $link);
     $grid->column("Descripci&oacute;n", "descrip");
     $grid->column("Precio 1", "precio1");
     $grid->column("Barras", "barras");
     $grid->build();
     $data['content'] = $filter->output . $grid->output;
     $data['title'] = " Lista de Art&iacute;culos ";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
コード例 #8
0
ファイル: contenedor.php プロジェクト: codethics/proteoerp
 function index()
 {
     $this->rapyd->load('datafilter', 'datagrid');
     $this->rapyd->uri->keep_persistence();
     $filter = new DataFilter('Contenedor', $this->prefijo . 'contenedor');
     $filter->descripcion = new inputField('Descripci&oacute;n', 'descripcion');
     $filter->titulo = new inputField('Titulo', 'titulo');
     $filter->buttons('reset', 'search');
     $filter->build();
     $uri = anchor('crm/contenedor/dataedit/show/<#id#>', '<str_pad><#id#>|8|0|0</str_pad>');
     $curl = anchor('crm/contenedor/comentario/<#id#>/create', 'Comentario');
     $grid = new DataGrid('Lista de Contenedores');
     $grid->use_function('str_pad');
     //$grid->order_by('caja','asc');
     $grid->per_page = 7;
     $grid->column('N&uacute;mero', $uri);
     $grid->column_orderby('Derivado', 'derivado', 'derivado');
     $grid->column_orderby('Tipo', 'tipo', 'tipo');
     $grid->column_orderby('Estatus', 'status', 'status');
     $grid->column_orderby('Fecha', '<dbdate_to_human><#fecha#></dbdate_to_human>', 'fecha');
     $grid->column_orderby('Cierre', '<dbdate_to_human><#cierre#></dbdate_to_human>', 'cierre');
     $grid->column_orderby('Titulo', 'titulo', 'titulo');
     $grid->column_orderby('Cliente', 'cliente', 'cliente');
     $grid->column_orderby('Proveed', 'proveed', 'proveed');
     $grid->column_orderby('Resumen', 'resumen', 'resumen');
     $grid->column_orderby('Condiciones', 'condiciones', 'condiciones');
     //$grid->column('Accion',$curl);
     $grid->add('crm/contenedor/dataedit/create');
     $grid->build();
     $data['content'] = $filter->output . $grid->output;
     $data['title'] = '<h1>Contenedor</h1>';
     $data['head'] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
コード例 #9
0
ファイル: ocompra.php プロジェクト: enderochoa/tortuga
 function filteredgrid()
 {
     $this->rapyd->load("datafilter", "datagrid");
     $filter = new DataFilter("Filtro", "ocompra");
     $filter->numero = new inputField("N&uacute;mero", "numero");
     $filter->numero->size = 15;
     $filter->fecha = new dateonlyField("Fecha", "fecha");
     $filter->fecha->size = 12;
     $filter->uejecutora = new inputField("Unidad Ejecutora", "uejecutora");
     $filter->uejecutora->size = 40;
     $filter->beneficiario = new inputField("Beneficiario", "beneficiario");
     $filter->beneficiario->size = 40;
     $filter->buttons("reset", "search");
     $filter->build();
     $uri = anchor('presupuesto/ocompra/dataedit/show/<#numero#>', '<str_pad><#numero#>|8|0|STR_PAD_LEFT</str_pad>');
     $grid = new DataGrid("Ordenes de compras");
     $grid->order_by("numero", "desc");
     $grid->per_page = 20;
     $grid->use_function('substr', 'str_pad');
     $grid->column("N&uacute;mero", $uri);
     $grid->column("Fecha", "<dbdate_to_human><#fecha#></dbdate_to_human>", "align='center'");
     $grid->column("Unidad Ejecutora", "uejecutora");
     $grid->column("Beneficiario", "beneficiario");
     //echo $grid->db->last_query();
     $grid->add("presupuesto/ocompra/dataedit/create");
     $grid->build();
     $data['content'] = $filter->output . $grid->output;
     $data['title'] = " Ordenes de Compra ";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
コード例 #10
0
ファイル: itfac.php プロジェクト: enderochoa/tortuga
 function filteredgrid()
 {
     $this->rapyd->load("datafilter", "datagrid");
     $mSPRV = array('tabla' => 'sprv', 'columnas' => array('proveed' => 'C&oacute;odigo', 'nombre' => 'Nombre', 'contacto' => 'Contacto'), 'filtro' => array('proveed' => 'C&oacute;digo', 'nombre' => 'Nombre'), 'retornar' => array('proveed' => 'cod_prov'), 'titulo' => 'Buscar Beneficiario');
     //$bSPRV=$this->datasis->p_modbus($mSPRV,"proveed");
     $filter = new DataFilter("");
     $filter->db->select(array("a.numero", "a.fecha", "a.tipo", "a.uejecutora", "a.estadmin", "a.fondo", "a.cod_prov", "a.pago", "a.total2", "a.status", "b.nombre nombre1", "c.nombre nombre2"));
     $filter->db->from("odirect a");
     $filter->db->join("uejecutora b", "a.uejecutora=b.codigo");
     $filter->db->join("sprv c", "c.proveed =a.cod_prov");
     $filter->db->where('MID(status,1,1) ', 'B');
     $filter->db->where('multiple =', 'S');
     $filter->numero = new inputField("N&uacute;mero", "numero");
     $filter->numero->size = 12;
     $filter->tipo = new dropdownField("Orden de ", "tipo");
     $filter->tipo->option("", "");
     $filter->tipo->option("Compra", "Compra");
     $filter->tipo->option("Servicio", "Servicio");
     $filter->tipo->style = "width:100px;";
     $filter->fecha = new dateonlyField("Fecha", "fecha");
     $filter->fecha->size = 12;
     //$filter->uejecutora = new inputField("Unidad Ejecutora", "uejecutora");
     //$filter->uejecutora->size=12;
     $filter->uejecutora = new dropdownField("U.Ejecutora", "uejecutora");
     $filter->uejecutora->option("", "Seccionar");
     $filter->uejecutora->options("SELECT codigo,nombre FROM uejecutora ORDER BY nombre");
     $filter->uejecutora->onchange = "get_uadmin();";
     $filter->cod_prov = new inputField("Beneficiario", 'cod_prov');
     $filter->cod_prov->size = 6;
     //$filter->cod_prov->append($bSPRV);
     $filter->cod_prov->rule = "required";
     $filter->beneficiario = new inputField("Beneficiario", "beneficiario");
     $filter->beneficiario->size = 60;
     $filter->buttons("reset", "search");
     $filter->build();
     $uri = anchor($this->url . 'dataedit/modify/<#numero#>', '<str_pad><#numero#>|8|0|STR_PAD_LEFT</str_pad>');
     $grid = new DataGrid("");
     $grid->order_by("numero", "desc");
     $grid->per_page = 20;
     $grid->use_function('substr', 'str_pad');
     $grid->column_orderby("N&uacute;mero", $uri, "numero");
     $grid->column_orderby("Fecha", "<dbdate_to_human><#fecha#></dbdate_to_human>", "fecha", "align='center'");
     $grid->column_orderby("Unidad Ejecutora", "nombre1", "uejecutora", "NOWRAP");
     $grid->column_orderby("Beneficiario", "nombre2", "c.nombre", "NOWRAP");
     $grid->column_orderby("Pago", "<number_format><#total2#>|2|,|.</number_format>", "total", "align='right'");
     //$grid->column("Beneficiario"        ,"cod_prov"                                          ,"cod_prov"   );
     //$grid->column("Tipo"             ,"tipo"                                        ,"align='center'");
     //	$grid->column("Devoluci&oacute;n","<number_format><#devo#>|2|,|.</number_format>","align='rigth'");
     $grid->build();
     //echo $grid->db->last_query();
     $data['filtro'] = $filter->output;
     $data['content'] = $grid->output;
     $data['script'] = script("jquery.js") . "\n";
     $data['title'] = "{$this->titp}";
     //"";
     //$data['content'] = $filter->output.$grid->output;
     //$data['title']   = " $this->titp ";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
コード例 #11
0
ファイル: catalogo.php プロジェクト: enderochoa/tortuga
 function filteredgrid()
 {
     $this->bSINV = $this->datasis->modbus($this->sinv);
     $this->rapyd->load("datafilter2", "datagrid");
     //$this->rapyd->uri->keep_persistence();
     rapydlib("prototype");
     $filter = new DataFilter2("Filtro por Producto", 'catalogo');
     $filter->codigo = new inputField("C&oacute;digo", "codigo");
     $filter->codigo->size = 15;
     $filter->codigo->append($this->bSINV);
     $filter->buttons("reset", "search");
     $filter->build();
     $grid = new DataGrid("Lista de Art&iacute;culos");
     $grid->add("inventario/catalogo/dataedit/create");
     $grid->order_by("codigo", "asc");
     $grid->per_page = 20;
     $link = anchor('/inventario/catalogo/dataedit/show/<#id#>', '<#codigo#>');
     $grid->use_function('str_replace');
     $grid->column("C&oacute;digo", $link);
     $grid->column("Fecha", "<dbdate_to_human><#estampa#></dbdate_to_human>");
     $grid->build();
     $data['content'] = $filter->output . $grid->output;
     $data["head"] = script("tabber.js") . script("prototype.js") . $this->rapyd->get_head() . script("scriptaculous.js") . script("effects.js");
     $data['title'] = ' Lista de Art&iacute;culos ';
     $this->load->view('view_ventanas', $data);
 }
コード例 #12
0
ファイル: oreinte.php プロジェクト: enderochoa/tortuga
 function filteredgrid()
 {
     //$this->datasis->modulo_id(101,1);
     $this->rapyd->load("datafilter", "datagrid");
     $filter = new DataFilter("Filtro de {$this->titp}", "oreinte");
     $filter->fecha = new dateonlyField("Fecha", "fecha");
     $filter->fecha->size = 12;
     $filter->odirect = new dropdownField("Pago Directo", "odirect");
     $filter->odirect->option("", "");
     $filter->odirect->options("SELECT numero,numero a FROM odirect ORDER BY numero");
     $filter->observa = new inputField("Observaci&oacute;n", "observa");
     $filter->observa->size = 60;
     $filter->buttons("reset", "search");
     $filter->build();
     $uri = anchor($this->url . 'dataedit/show/<#numero#>', '<str_pad><#numero#>|8|0|STR_PAD_LEFT</str_pad>');
     $grid = new DataGrid("Lista de " . $this->titp);
     $grid->order_by("numero", "desc");
     $grid->per_page = 20;
     $grid->use_function('substr', 'str_pad');
     $grid->column("N&uacute;mero", $uri);
     $grid->column("Fecha", "<dbdate_to_human><#fecha#></dbdate_to_human>", "align='center'");
     $grid->column("Pago Directo", "odirect");
     //$grid->column("Monto"            ,"<number_format><#total#>|2|,|.</number_format>","align='rigth'");
     $grid->column("Observaci&oacute;n", "observa");
     //echo $grid->db->last_query();
     $grid->add($this->url . "dataedit/create");
     $grid->build();
     $data['content'] = $filter->output . $grid->output;
     $data['title'] = " {$this->titp} ";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
コード例 #13
0
ファイル: cheque.php プロジェクト: enderochoa/tortuga
 function filteredgrid()
 {
     $this->datasis->modulo_id(138, 1);
     $mSPRV = array('tabla' => 'sprv', 'columnas' => array('proveed' => 'C&oacute;odigo', 'nombre' => 'Nombre', 'contacto' => 'Contacto'), 'filtro' => array('proveed' => 'C&oacute;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&oacute;odigo', 'banco' => 'Banco', 'numcuent' => 'Cuenta', 'saldo' => 'Saldo'), 'filtro' => array('codbanc' => 'C&oacute;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&uacute;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);
 }
コード例 #14
0
ファイル: conversiones.php プロジェクト: codethics/proteoerp
 function datafilter()
 {
     $this->rapyd->load("datafilter", "datagrid");
     $this->rapyd->uri->keep_persistence();
     $filter = new DataFilter("Filtro de Conversiones", 'conv');
     $filter->fecha = new dateonlyField("Fecha", "fecha");
     $filter->fecha->size = 15;
     $filter->fecha->maxlength = 15;
     $filter->fecha->rule = "trim";
     $filter->numero = new inputField("N&uacute;mero", "numero");
     $filter->numero->size = 15;
     $filter->almacen = new inputField("Almacen", "almacen");
     $filter->almacen->size = 15;
     $filter->buttons("reset", "search");
     $filter->build();
     $uri = anchor('inventario/conversiones/dataedit/show/<#numero#>', '<#numero#>');
     $grid = new DataGrid("Lista de Conversiones");
     $grid->use_function('dbdate_to_human');
     $grid->order_by("numero", "asc");
     $grid->per_page = 10;
     $grid->column("N&uacute;mero", $uri);
     $grid->column("Fecha", "<dbdate_to_human><#fecha#></dbdate_to_human>");
     $grid->column("Almacen", "almacen");
     $grid->column("Usuario", "usuario");
     $grid->add("inventario/conversiones/dataedit/create");
     $grid->build();
     $data['content'] = $filter->output . $grid->output;
     $data['title'] = "<h1>Conversiones</h1>";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
コード例 #15
0
ファイル: consulta.php プロジェクト: enderochoa/tortuga
 function filteredgrid()
 {
     $this->rapyd->load("datafilter2", "datagrid");
     $script = '';
     $filter = new DataFilter2("");
     $filter->db->from("view_sumi_saldo");
     $filter->script($script);
     $filter->codigo = new inputField("C&oacute;digo", "codigo");
     $filter->codigo->size = 15;
     $filter->descrip = new inputField("Descripci&oacute;n", "descrip");
     $filter->descrip->size = 40;
     $filter->unidad = new inputField("Unidad", "unidad");
     $filter->unidad->size = 40;
     $filter->buttons("reset", "search");
     $filter->build();
     $uri = anchor($this->url . 'redi/<raencode><#codigo#></raencode>', '<#codigo#>');
     $grid = new DataGrid("");
     $grid->order_by("codigo", "asc");
     $grid->per_page = 100;
     $grid->use_function('substr', 'str_pad', 'sta');
     $grid->column_orderby("C&oacute;digo", $uri, "codigo");
     $grid->column_orderby("Descripci&oacute;n", "descrip", "descrip", "align='left'        ");
     $grid->column_orderby("Unidad", "unidad", "unidad", "align='left'      ");
     $grid->column_orderby("Cantidad", "cantidad", "cantidad", "align='left'  NOWRAP");
     //$grid->add($this->url."/dataedit/create");
     $grid->build();
     //$data['content'] = $filter->output.$grid->output;
     $data['filtro'] = $filter->output;
     $data['content'] = $grid->output;
     $data['title'] = $this->t**s;
     $data['script'] = script("jquery.js") . "\n";
     $data["head"] = script("jquery.js") . $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
コード例 #16
0
ファイル: rpers.php プロジェクト: codethics/proteoerp
 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);
 }
コード例 #17
0
ファイル: econo.php プロジェクト: enderochoa/tortuga
 function filteredgrid()
 {
     $this->rapyd->load('datafilter', 'datagrid');
     $filter = new DataFilter($this->titp, 'econo');
     $filter->numero = new inputField('Numero', 'numero');
     $filter->numero->rule = 'max_length[11]';
     $filter->numero->size = 13;
     $filter->numero->maxlength = 11;
     $filter->fecha = new dateField('Fecha', 'fecha');
     $filter->fecha->rule = 'chfecha';
     $filter->fecha->size = 10;
     $filter->fecha->maxlength = 8;
     $filter->total = new inputField('Total', 'total');
     $filter->total->rule = 'max_length[19]|numeric';
     $filter->total->css_class = 'inputnum';
     $filter->total->size = 21;
     $filter->total->maxlength = 19;
     $filter->status = new dropDownField('Estado', 'status');
     $filter->status->option('', '');
     $filter->status->option('P', 'Pendiente');
     $filter->status->option('C', 'Finalizado');
     $filter->status->option('A', 'Anulado');
     $filter->buttons('reset', 'search');
     $filter->build();
     $uri = anchor($this->url . 'dataedit/show/<raencode><#numero#></raencode>', '<#numero#>');
     function status($status = '')
     {
         switch ($status) {
             case 'C':
                 $status = "Ejecutado";
                 break;
             case 'A':
                 $status = "Anulado";
                 break;
             case 'P':
                 $status = "Pendiente";
                 break;
         }
         return $status;
     }
     $grid = new DataGrid('');
     $grid->order_by('numero');
     $grid->per_page = 40;
     $grid->use_function('status');
     $grid->column_orderby('Numero', "{$uri}", 'numero', 'align="left"');
     $grid->column_orderby('Fecha', "<dbdate_to_human><#fecha#></dbdate_to_human>", 'fecha', 'align="center"');
     $grid->column_orderby('Concepto', "concepto", 'concepto', 'align="left"');
     $grid->column_orderby('total', "<nformat><#total#></nformat>", 'total', 'align="right"');
     $grid->column_orderby('status', "<status><#status#></status>", 'status', 'align="left"');
     $grid->column_orderby('fondo', "fondo", 'fondo', 'align="left"');
     $grid->add($this->url . 'dataedit/create');
     $grid->build();
     $data['filtro'] = $filter->output;
     $data['content'] = $grid->output;
     $data['head'] = $this->rapyd->get_head() . script('jquery.js');
     $data['title'] = $this->titp;
     $this->load->view('view_ventanas', $data);
 }
コード例 #18
0
ファイル: caub.php プロジェクト: enderochoa/tortuga
 function filteredgrid()
 {
     $this->rapyd->load("datafilter", "datagrid");
     $this->rapyd->uri->keep_persistence();
     $filter = new DataFilter("Filtro por Ubicación");
     $filter->db->select("ubica, ubides,gasto,a.cu_caja AS cu_caja, a.cu_cost AS cu_cost,invfis,a.sucursal as codigo");
     //b.sucursal AS sucursal,
     $filter->db->from("caub AS a");
     //$filter->db->join("sucu AS b","a.sucursal=b.codigo","LEFT");
     $filter->ubica = new inputField("Ubicaci&oacute;n", "ubica");
     $filter->ubica->size = 20;
     $filter->descrip = new inputField("Descripci&oacute;n", "ubides");
     $filter->descrip->size = 20;
     $filter->gasto = new dropdownField("Gasto", "gasto");
     $filter->gasto->option("", "");
     $filter->gasto->option("S", "Si");
     $filter->gasto->option("N", "No");
     $filter->gasto->style = 'width:150px;';
     $filter->invfis = new dropdownField("Inventario F&iacute;sico", "invfis");
     $filter->invfis->option("", "");
     $filter->invfis->option("S", "Si");
     $filter->invfis->option("N", "No");
     $filter->invfis->style = 'width:150px;';
     //$filter->sucursal = new dropdownField("Sucursal","codigo");
     //$filter->sucursal->option("","");
     //$filter->sucursal->options("SELECT codigo, sucursal FROM sucu ORDER BY sucursal");
     //$filter->sucursal->style='width:150px;';
     $filter->buttons("reset", "search");
     $filter->build();
     function si_no($valor)
     {
         if ($valor == 'S') {
             return 'Si';
         } elseif ($valor == 'N') {
             return 'No';
         }
     }
     $uri = anchor('inventario/caub/dataedit/show/<#ubica#>', '<#ubica#>');
     $uri_2 = anchor('inventario/departamentos/dataedit/create/<raencode><#ubica#></raencode>', 'Duplicar');
     $grid = new DataGrid("Lista de Almacenes");
     $grid->order_by("ubica", "asc");
     $grid->per_page = 20;
     $grid->use_function('si_no');
     $grid->column("Ubicación", $uri, "align='center'");
     $grid->column("Descripción", "ubides", "align='left'");
     $grid->column("Gasto", "<si_no><#gasto#></si_no>", "align='center'");
     $grid->column("Cuenta Almac&eacute;n", "cu_cost", "align='center'");
     $grid->column("Cuenta Caja", "cu_caja", "align='center'");
     $grid->column("Inventario Físico", "<si_no><#invfis#></si_no>", "align='center'");
     $grid->column("Sucursal", "sucursal", "align='left'");
     $grid->column("Duplicar", $uri_2, "align='center'");
     $grid->add("inventario/caub/dataedit/create");
     $grid->build();
     $data['content'] = $filter->output . $grid->output;
     $data['title'] = " Almacenes ";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
コード例 #19
0
ファイル: suminr.php プロジェクト: enderochoa/tortuga
 function filteredgrid()
 {
     $this->rapyd->load("datafilter", "datagrid");
     $script = '';
     $filter = new DataFilter("Lista");
     $filter->db->from("suminr");
     $filter->db->join("sprv", "suminr.proveed=sprv.proveed", "LEFT");
     $filter->script($script);
     $filter->numero = new inputField("Numero", "numero");
     $filter->numero->size = 15;
     $filter->fecha = new dateonlyField("Fecha", "fecha");
     $filter->fecha->dbformat = "Y-m-d";
     $filter->fecha->size = 12;
     $modbus = array('tabla' => 'sprv', 'columnas' => array('proveed' => 'Codigo', 'nombre' => 'Nombre'), 'filtro' => array('proveed' => 'Codigo', 'nombre' => 'Nombre'), 'retornar' => array('proveed' => 'proveed'), 'titulo' => 'Buscar Beneficiario');
     $bproveed = $this->datasis->modbus($modbus);
     $filter->proveed = new inputField("Beneficiario", "proveed");
     $filter->proveed->append($bproveed);
     $filter->proveed->size = 7;
     $filter->observacion = new inputField("Observaci&oacute;n", "observacion");
     $filter->observacion->size = 40;
     $filter->buttons("reset", "search");
     $filter->build();
     $uri = anchor('suministros/suminr/dataedit/show/<#numero#>', '<str_pad><#numero#>|8|0|STR_PAD_LEFT</str_pad>');
     function sta($status)
     {
         switch ($status) {
             case "P":
                 return "Pendiente";
                 break;
             case "A":
                 return "Anulado";
                 break;
             case "C":
                 return "Recibida";
                 break;
         }
     }
     $grid = new DataGrid();
     $grid->order_by("numero", "desc");
     $grid->per_page = 20;
     $grid->use_function('substr', 'str_pad', 'sta');
     $grid->column_orderby("N&uacute;mero", $uri, "numero");
     $grid->column_orderby("Fecha", "<dbdate_to_human><#fecha#></dbdate_to_human>", "fecha", "align='center'");
     $grid->column_orderby("Beneficiario", "nombre", "proveed", "align='left'");
     $grid->column_orderby("Total", "total", "total", "align='rigth'");
     $grid->column_orderby("Observaci&oacute;n", "<wordwrap><#observacion#>|50|\n|true</wordwrap>", "observacion", "align='left'");
     $grid->column_orderby("Estado", "<sta><#status#></sta>", "status", "align='center'      ");
     $grid->add("suministros/suminr/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'] = "Notas de Recepci&oacute;n";
     $data["head"] = script("jquery.js") . $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
コード例 #20
0
ファイル: banc.php プロジェクト: enderochoa/tortuga
 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&oacute;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&oacute;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);
 }
コード例 #21
0
ファイル: reglas.php プロジェクト: codethics/proteoerp
 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&oacute;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);
 }
コード例 #22
0
ファイル: rpers.php プロジェクト: enderochoa/tortuga
 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);
 }
コード例 #23
0
ファイル: cierre.php プロジェクト: codethics/proteoerp
 function index()
 {
     $this->rapyd->load("datagrid");
     $this->rapyd->load("datafilter");
     $atts = array('width' => '800', 'height' => '600', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0');
     $titulo = anchor_popup('supermercado/lresumen', ' Ver Resumen de caja', $atts) . " <---> ";
     $titulo .= anchor_popup('supermercado/lresumen/indext', ' Ver Resumen de todas las cajas', $atts);
     $filter = new DataFilter($titulo);
     $filter->fecha = new dateonlyField("Fecha", "fecha", "d/m/Y");
     $filter->fecha->size = 11;
     $filter->fecha->clause = "where";
     $filter->fecha->operator = "=";
     $filter->fecha->insertValue = date("Y-m-d");
     //$filter->fecha->append();
     $filter->buttons("reset", "search");
     $filter->build();
     $data['content'] = $filter->output;
     function iconcaja($caja, $cajero, $fecha)
     {
         $CI =& get_instance();
         $cerrado = $CI->datasis->dameval("SELECT numero FROM dine WHERE caja='{$caja}' AND cajero='{$cajero}' AND fecha='{$fecha}' ");
         $atts = array('align' => 'LEFT', 'border' => '0');
         $fecha = str_replace('-', '', $fecha);
         $atRI = array('width' => '800', 'height' => '600', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0');
         if (!empty($cerrado)) {
             return image('caja_cerrada.gif', "Caja Cerrada: {$caja}", $atts) . "<h3>Caja: {$caja}</h3><br><center>" . anchor_popup("/supermercado/cierre/doccierre/{$cerrado}", 'Ver Cuadre', $atRI) . ' ' . anchor_popup("/supermercado/cierre/ventasdia/{$fecha}/{$caja}", 'Detalle de Ventas', $atRI) . '</center>';
         } else {
             return image('caja_abierta.gif', "Caja Abierta: {$caja}", $atts) . "<h3>Caja: {$caja}</h3>" . '<center><a href=' . site_url("supermercado/cierre/forcierre/{$caja}/{$cajero}/{$fecha}") . '>Cerrar Cajero</a></center>';
         }
     }
     $data['forma'] = '';
     if ($this->rapyd->uri->is_set("search") and !empty($filter->fecha->value)) {
         $fecha = $filter->fecha->value;
         $grid = new DataGrid('Cierre de cajas para la fecha: ' . $filter->fecha->value);
         $select = array('viefac.caja', 'viefac.cajero', 'fecha as qfecha', 'SUM(viefac.gtotal) monto', 'scaj.nombre as name', 'sum(TRUNCATE(gtotal/60000,0)) cupon');
         $grid->db->select($select);
         $grid->db->from('viefac');
         $grid->db->join('scaj', 'scaj.cajero=viefac.cajero', 'LEFT');
         $grid->db->groupby("viefac.caja,viefac.cajero");
         $grid->use_function('iconcaja', 'number_format');
         $grid->column("Status/Caja", "<iconcaja><#caja#>|<#cajero#>|<#qfecha#></iconcaja>", 'align="RIGHT"');
         $grid->column("Cajero", "cajero", 'align="RIGHT"');
         $grid->column("Nombre", "name");
         $grid->column("Ventas Bs", "<number_format><#monto#>|2|,|.</number_format>", 'align="RIGHT"');
         $grid->column("Cupones", "<number_format><#cupon#>|0|,|.</number_format>", 'align="RIGHT"');
         $grid->build();
         $data['content'] .= $grid->output;
         //echo $grid->db->last_query();
     }
     $data['title'] = "<h1>Cierre de Caja</h1>";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
     //$data['titulo'] = $this->rapyd->get_head()."<center><h2>CIERRE DE CAJA </h2></center>\n";
     //$this->layout->buildPage('ventas/view_ventas', $data);
 }
コード例 #24
0
 function filteredgrid($barras = '', $farmacia = '')
 {
     $this->rapyd->load('datafilter', 'datagrid');
     $modbus = array('tabla' => 'sinv', 'columnas' => array('codigo' => 'C&oacute;digo', 'barras' => 'Barras', 'descrip' => 'Descripci&oacute;n', 'precio1' => 'Precio 1', 'precio2' => 'Precio 2', 'precio3' => 'Precio 3', 'precio4' => 'Precio 4'), 'filtro' => array('codigo' => 'C&oacute;digo', 'barras' => 'Barras', 'descrip' => 'Descripci&oacute;n'), 'retornar' => array('barras' => 'barras'), 'titulo' => 'Buscar en inventario', 'dbgroup' => 'consolidado');
     $boton = $this->datasis->modbus($modbus);
     $barrase = $this->db->escape($barras);
     $sql = "\n\t\tSELECT fecha,fe,fa,descrip,venta,compras,saldo,semanal FROM (\n\t\tselect '' fe,farmacia fa,fecha,farmacia,descrip,venta,compras,saldo,(venta/4)  semanal\n\t\tfrom  vieventascompras \n\t\twhere barras={$barrase} AND farmacia is not null\n\t\tUNION ALL\n\t\tselect '','',fecha,farmacia,'TOTALES',SUM(venta),SUM(compras),SUM(saldo),(venta/4)  semanal \n\t\tfrom  vieventascompras \n\t\twhere barras={$barrase} AND farmacia is not null\n\t\tGROUP BY fecha with rollup\n\t\tUNION ALL\n\t\tselect CONCAT(MID(fecha,1,4),'-',MID(fecha,5,5)) fe,'',fecha,farmacia,'','','','','' \n\t\tfrom  vieventascompras \n\t\twhere barras={$barrase} AND farmacia is not null\n\t\tGROUP BY fecha \n\t\t)todo\n\t\tORDER BY fecha is null,fecha ,fe='',descrip='TOTALES',farmacia\n\t\t";
     $atts = array('width' => '800', 'height' => '600', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0');
     $descrip = $this->datasis->dameval("SELECT descrip FROM sinv WHERE barras={$barrase} LIMIT 10 ");
     $uri = anchor_popup($this->url . "kardex/{$barras}/<#fa#>/<#fecha#>", '<#fa#>', $atts);
     $sql = $this->db->query($sql);
     $sql = $sql->result_array();
     function negrita($descrip, $fecha = NULL)
     {
         if ($descrip == 'TOTALES' && !(strlen($fecha) > 0)) {
             return "<span style='font-size:1.5em'><strong>TOTAL GENERAL</strong></span>";
         } elseif ($descrip == 'TOTALES') {
             return "<span style='font-size:1.2em'><strong>TOTALES</strong></span>";
         } else {
             return $descrip;
         }
     }
     function negrita2($descrip, $monto)
     {
         if ($descrip == 'TOTALES') {
             return "<span style='font-size:1.2em'><strong>" . nformat($monto) . "</strong></span>";
         } elseif (strlen($monto) > 0) {
             return nformat($monto);
         } else {
             return '';
         }
     }
     $grid = new DataGrid(anchor($this->url . 'viewinventario', 'Ir al Inventario por sucursales'), $sql);
     $grid->db->_escape_char = '';
     $grid->db->_protect_identifiers = false;
     $grid->use_function('negrita', 'negrita2');
     //$grid->column_orderby('Barras'            ,$uri                                           ,'align="left"'  );
     $grid->column('A&ntilde;o/Mes', "fe", 'align="center"');
     $grid->column('Farmacia', $uri, 'align="left"');
     $grid->column('Descripci&oacute;n', "<negrita><#descrip#>|<#fecha#></negrita>", 'align="left"');
     $grid->column('Mensual', "<negrita2><#descrip#>|<#venta#></negrita2>", 'align="right"');
     $grid->column('Semanal', "<negrita2><#descrip#>|<#semanal#></negrita2>", 'align="right"');
     $grid->column('Compras', "<negrita2><#descrip#>|<#compras#></negrita2>", 'align="right"');
     $grid->column('Saldo', "<negrita2><#descrip#>|<#saldo#></negrita2>", 'align="right"');
     $grid->build();
     //echo $grid->db->last_query();
     //$data['filtro']  = $filter->output;
     $data['content'] = $grid->output;
     $data['head'] = $this->rapyd->get_head() . script('jquery.js');
     $data['title'] = heading($descrip);
     $this->load->view('view_ventanas', $data);
 }
コード例 #25
0
ファイル: grup.php プロジェクト: codethics/proteoerp
 function filteredgrid()
 {
     $this->rapyd->load("datafilter", "datagrid");
     $this->rapyd->uri->keep_persistence();
     function blanco($num)
     {
         if (empty($num) || $num == 0) {
             return '';
         } else {
             return number_format($num, 2, ',', '.');
         }
     }
     $filter = new DataFilter("Filtro de Grupo de Inventario");
     $filter->db->select("a.grupo AS grupo, a.nom_grup AS nom_grup, a.comision AS comision, b.descrip AS linea,c.descrip AS depto, a.cu_inve AS cu_inve, a.cu_venta AS cu_venta, a.cu_cost AS cu_cost, a.cu_devo AS cu_devo");
     $filter->db->from("grup AS a");
     $filter->db->join("line AS b", "a.linea=b.linea");
     $filter->db->join("dpto AS c", "b.depto=c.depto");
     $filter->grupo = new inputField("Grupo", "grupo");
     $filter->grupo->size = 20;
     $filter->nombre = new inputField("Descripci&oacute;n", "nom_grup");
     $filter->nombre->size = 20;
     $filter->comision = new inputField("Comisi&oacute;n", "comision");
     $filter->comision->size = 20;
     $filter->depto = new inputField("Departamento", "c.descrip");
     $filter->depto->size = 20;
     $filter->linea = new inputField("L&iacute;nea", "b.descrip");
     $filter->linea->size = 20;
     $filter->buttons("reset", "search");
     $filter->build();
     $uri = anchor('inventario/grup/dataedit/show/<raencode><#grupo#></raencode>', '<#grupo#>');
     $uri_2 = anchor('inventario/grup/dataedit/create/<raencode><#grupo#></raencode>', 'Duplicar');
     $grid = new DataGrid("Lista de Grupos de Inventario");
     $grid->order_by("grupo", "asc");
     $grid->per_page = 20;
     $grid->use_function('blanco');
     $grid->column("Grupo", $uri, "align='center'");
     $grid->column("Descripci&oacute;n", "nom_grup", "align='left'");
     $grid->column("Comisi&oacute;n", "<blanco><#comision#></blanco>", "align='right'");
     $grid->column("Departamento", "depto", "align='left'");
     $grid->column("Linea", "linea", "align='left'");
     $grid->column("Cuenta Inventario", "cu_inve", "align='center'");
     $grid->column("Cuenta Costo", "cu_cost", "align='center'");
     $grid->column("Cuenta Venta", "cu_venta", "align='center'");
     $grid->column("Cuenta Devoluci&oacute;n", "cu_devo", "align='center'");
     $grid->column("Duplicar", $uri_2, "align='center'");
     $grid->add("inventario/grup/dataedit/create");
     $grid->build();
     $data['content'] = $filter->output . $grid->output;
     $data['title'] = "<h1>Grupos de Inventario</h1>";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
コード例 #26
0
ファイル: movi.php プロジェクト: enderochoa/tortuga
 function filteredgrid()
 {
     //$this->datasis->modulo_id(101,1);
     $this->rapyd->load("datafilter", "datagrid");
     $mSPRV = array('tabla' => 'sprv', 'columnas' => array('proveed' => 'C&oacute;odigo', 'nombre' => 'Nombre', 'contacto' => 'Contacto'), 'filtro' => array('proveed' => 'C&oacute;digo', 'nombre' => 'Nombre'), 'retornar' => array('proveed' => 'cod_prov'), 'titulo' => 'Buscar Beneficiario');
     $bSPRV = $this->datasis->p_modbus($mSPRV, "proveed");
     $filter = new DataFilter("Filtro de {$this->titp}", "mbanc");
     //$filter->tipo = new dropdownField("Orden de ", "tipo");
     //$filter->tipo->option("","");
     //$filter->tipo->option("A","Anticipo");
     //$filter->tipo->option("R","Reintegro");
     //$filter->tipo->style="width:100px;";
     $filter->fecha = new dateonlyField("Fecha", "fecha");
     $filter->fecha->size = 12;
     $filter->uejecutora = new inputField("Unidad Ejecutora", "uejecutora");
     $filter->uejecutora->size = 12;
     //$filter->cod_prov = new inputField("Beneficiario", 'cod_prov');
     //$filter->cod_prov->size = 6;
     //$filter->cod_prov->append($bSPRV);
     //$filter->cod_prov->rule = "required";
     $filter->benefi = new inputField("Beneficiario", "benefi");
     $filter->benefi->size = 60;
     //$filter->status = new dropdownField("Estado","status");
     //$filter->status->option("","");
     //$filter->status->option("A","Procesado");
     //$filter->status->option("B","Sin Procesar");
     //$filter->status->style="width:150px";
     $filter->db->where("tipo", "C");
     $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("Lista de " . $this->titp);
     $grid->order_by("numero", "desc");
     $grid->per_page = 20;
     $grid->use_function('substr', 'str_pad');
     $grid->column("N&uacute;mero", $uri);
     //$grid->column("Tipo"             ,"tipo"                                        ,"align='center'");
     $grid->column("Fecha", "<dbdate_to_human><#fecha#></dbdate_to_human>", "align='center'");
     $grid->column("Unidad Ejecutora", "uejecutora");
     //$grid->column("Beneficiario"        ,"cod_prov");
     //$grid->column("Beneficiario"     ,"beneficiario");
     $grid->column("Monto", "<number_format><#monto#>|2|,|.</number_format>", "align='right'");
     //$grid->column("Demostrado"       ,"<number_format><#saldo#>|2|,|.</number_format>","align='right'");
     //$grid->column("Estado"           ,"status"                                        ,"align='center'");
     $grid->add($this->url . "dataedit/create");
     $grid->build();
     $data['content'] = $filter->output . $grid->output;
     $data['title'] = " {$this->titp} ";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
コード例 #27
0
ファイル: opago2.php プロジェクト: enderochoa/tortuga
 function filteredgrid()
 {
     $this->datasis->modulo_id(102, 1);
     $this->rapyd->load("datafilter", "datagrid");
     $mSPRV = array('tabla' => 'sprv', 'columnas' => array('proveed' => 'C&oacute;odigo', 'nombre' => 'Nombre', 'contacto' => 'Contacto'), 'filtro' => array('proveed' => 'C&oacute;digo', 'nombre' => 'Nombre'), 'retornar' => array('proveed' => 'cod_prov'), 'titulo' => 'Buscar Beneficiario');
     $bSPRV = $this->datasis->p_modbus($mSPRV, "proveed");
     $filter = new DataFilter("Filtro de Ordenes de Pago", "opago");
     $filter->numero = new inputField("N&uacute;mero", "numero");
     $filter->numero->size = 15;
     $filter->fecha = new dateonlyField("Fecha", "fecha");
     $filter->fecha->size = 12;
     $filter->uejecutora = new inputField("Unidad Ejecutora", "uejecutora");
     $filter->uejecutora->size = 12;
     //
     //$filter->cod_prov = new inputField("Beneficiario", 'cod_prov');
     //$filter->cod_prov->size = 6;
     //$filter->cod_prov->append($bSPRV);
     //$filter->cod_prov->rule = "required";
     //
     //$filter->beneficiario = new inputField("Beneficiario", "beneficiario");
     //$filter->beneficiario->size=12;
     $filter->observa = new inputField("Observaci&oacute;n", "observa");
     $filter->observa->size = 12;
     $filter->status = new dropdownField("Estado", "status");
     $filter->status->option("", "");
     $filter->status->option("P", "Pendiente");
     $filter->status->option("C", "Pagado");
     $filter->status->style = "width:100px";
     $filter->buttons("reset", "search");
     $filter->build();
     $uri = anchor('presupuesto/opago2/dataedit/show/<#numero#>', '<str_pad><#numero#>|8|0|STR_PAD_LEFT</str_pad>');
     $grid = new DataGrid("Lista de Ordenes de Pago");
     $grid->order_by("numero", "desc");
     $grid->per_page = 20;
     $grid->use_function('substr', 'str_pad');
     $grid->column("N&uacute;mero", $uri);
     $grid->column("Fecha", "<dbdate_to_human><#fecha#></dbdate_to_human>", "align='center'");
     $grid->column("Unidad Ejecutora", "uejecutora");
     //$grid->column("Beneficiario"       ,"cod_prov");
     //$grid->column("Beneficiario"    ,"beneficiario");
     $grid->column("Observaci&oacute;n", "observa");
     $grid->column("Estado", "status", "align='center'");
     //echo $grid->db->last_query();
     $grid->add("presupuesto/opago2/dataedit/create");
     $grid->build();
     $data['content'] = $filter->output . $grid->output;
     $data['title'] = " Ordenes de Pago ";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
コード例 #28
0
ファイル: pagorete.php プロジェクト: enderochoa/tortuga
 function selecciona($cod_prov, $codbanc)
 {
     $this->rapyd->load("datagrid", "dataobject", "fields");
     $cod_prov = radecode($cod_prov);
     $codbanc = radecode($codbanc);
     $codbance = $this->db->escape($codbanc);
     function asigna($id, $value = "D")
     {
         $campo = new dropdownField("Title", "gt[{$id}]");
         $campo->status = "modify";
         $campo->option("D", "Pendiente");
         $campo->option("E", "Cancelar");
         $campo->value = $value;
         $campo->style = "width:100px";
         $campo->build();
         return $campo->output;
     }
     $tabla = form_open($this->url . "carga/");
     $ddata = array('cod_prov' => $cod_prov, 'codbanc' => $codbanc);
     $grid = new DataGrid("Lista de Deducciones de N&oacute;mina por Pagar");
     $grid->db->select(array("a.id", "a.numero nomina", "b.numero opago", "d.numero desembolso", "a.monto", "a.status", "b.observa"));
     $grid->db->from('retenomi a');
     $grid->db->join('odirect b', 'a.numero=b.nomina');
     $grid->db->join('pades c', 'b.numero=c.pago');
     $grid->db->join('desem d', 'c.desem=d.numero');
     $grid->db->where("a.cod_prov ", $cod_prov);
     $grid->db->where("a.status ", "D");
     $grid->db->where("d.status ", "D2");
     $grid->db->where("(SELECT COUNT(*) FROM mbanc WHERE d.numero=mbanc.desem AND  codbanc={$codbance})>", "0");
     $grid->use_function('asigna');
     $grid->column("Nomina", "nomina", 'align=left');
     $grid->column("O.Pago", "opago", 'align=left');
     $grid->column("Desembolso", "desembolso", 'align=left');
     $grid->column("Monto", "<number_format><#monto#>|2|,|.</number_format>", "align='right'");
     $grid->column("Accio&oacute;n", "<asigna><#id#>|<#status#></asigna>", "align='right'");
     $grid->build();
     //$grid->db->last_query();
     $tabla .= $salida = anchor($this->url . 'busca', 'Regresar');
     $tabla .= $grid->output . form_submit('mysubmit', 'Guardar') . form_hidden($ddata);
     $tabla .= form_close();
     if ($grid->recordCount == 0) {
         $tabla .= $salida = anchor($this->url . 'busca', 'Regresar');
         $tabla = "<p>No hay deducciones pendientes por pagar al proveedor ({$cod_prov})</p>";
         $tabla .= $salida = anchor($this->url . 'busca', 'Regresar');
     }
     $data['content'] = $tabla;
     $data['title'] = " Pago de  Deducciones de N&oacute;mina ";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
コード例 #29
0
ファイル: sbanc.php プロジェクト: enderochoa/tortuga
 function filteredgrid()
 {
     $this->rapyd->load("datafilter", "datagrid", "dataobject");
     $where = 'activo = "S"';
     $mf = $this->datasis->puede(333);
     $mo = $this->datasis->puede(334);
     if ($mf && $mo) {
     } elseif ($mf) {
         $where .= ' AND tipocta="F"';
     } elseif ($mo) {
         $where .= ' AND tipocta<>"F"';
     }
     $mBANC = array('tabla' => 'banc', 'columnas' => array('codbanc' => 'C&oacute;odigo', 'banco' => 'Banco', 'numcuent' => 'Cuenta', 'saldo' => 'Saldo'), 'filtro' => array('codbanc' => 'C&oacute;odigo', 'banco' => 'Banco', 'saldo' => 'Saldo', 'numcuent' => 'Cuenta'), 'retornar' => array('codbanc' => 'codbanc', 'banco' => 'nombreb'), 'where' => $where, 'titulo' => 'Buscar Bancos');
     $bBANC = $this->datasis->p_modbus($mBANC, "banc");
     $filter = new DataFilter("");
     $filter->db->select(array("a.saldo", "a.codbanc", "a.mes", "a.ano", "b.banco", "b.numcuent", "a.fecha"));
     $filter->db->from("sbanc a");
     $filter->db->join("banc b ", "a.codbanc=b.codbanc");
     $filter->ano = new inputField("A&ntilde;o", 'ano');
     $filter->mes = new inputField("Mes", 'mes');
     $filter->codbanc = new inputField("Banco", 'codbanc');
     $filter->codbanc->size = 5;
     $filter->codbanc->append($bBANC);
     $filter->codbanc->db_name = 'a.codbanc';
     $filter->codbanc->readnoly = true;
     $filter->buttons("reset", "search");
     $filter->build();
     $uri = anchor($this->url . 'dataedit/show/<raencode><#codbanc#></raencode>/<raencode><#fecha#></raencode>', '<#codbanc#><#fecha#>');
     $grid = new DataGrid("");
     $grid->order_by("ano desc,mes desc,a.codbanc ");
     $grid->per_page = 20;
     $grid->use_function('substr', 'str_pad');
     $grid->column_orderby("C&oacute;digo", $uri, "codbanc");
     $grid->column_orderby("C&oacute;digo banco", "codbanc", "codbanc", "align='left'    ");
     $grid->column_orderby("Fecha", "<dbdate_to_human><#fecha#></dbdate_to_human>", "fecha", "align='center'    ");
     $grid->column_orderby("Nombre Cuenta", "banco", "banco", "align='left'    ");
     $grid->column_orderby("Cuenta", "numcuent", "numcuent", "align='left'    ");
     //$grid->column_orderby("A&ntilde;o"   ,"ano"                                           ,"ano"       ,"align='left'    ");
     //$grid->column_orderby("Mes"          ,"mes"                                           ,"mes"       ,"align='left'    ");
     $grid->column_orderby("Saldo", "<nformat><#saldo#></nformat>", "saldo", "align='right'   ");
     $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->titp}";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
コード例 #30
0
ファイル: asig.php プロジェクト: enderochoa/tortuga
 function filteredgrid()
 {
     $this->rapyd->load("datafilter2", "datagrid");
     $this->rapyd->uri->keep_persistence();
     $filter = new DataFilter2("", 'asig');
     $filter->codigo = new inputField("Codigo", "codigo");
     $filter->codigo->size = 15;
     $filter->codigo->clause = "likerigth";
     $filter->buttons("reset", "search");
     $filter->build();
     $uri = anchor('nomina/asig/dataedit/show/<#codigo#>', '<#codigo#>');
     function sta($status)
     {
         switch ($status) {
             case "A":
                 return "Asignaci&oacute;n";
                 break;
             case "O":
                 return "Otros";
                 break;
             case "D":
                 return "Devoluciones";
                 break;
         }
     }
     $grid = new DataGrid("");
     $grid->order_by("codigo", "asc");
     $grid->per_page = 20;
     $grid->use_function('sta');
     $grid->column_orderby("C&oacute;digo", $uri, "codigo");
     $grid->column_orderby("Nombre", "nombre", "nombre", "align='left'NOWRAP  ");
     $grid->column_orderby("Concepto", "concepto", "concepto", "align='left'NOWRAP  ");
     $grid->column_orderby("Tipo", "<sta><#tipo#></sta>", "tipo", "align='center'NOWRAP");
     $grid->column_orderby("Descripci&oacute;n", "descrip", "descrip", "align='left'NOWRAP  ");
     $grid->column_orderby("F&oacute;rmula", "formula", "formula", "align='left'NOWRAP  ");
     $grid->column_orderby("Monto", "<number_format><#monto#>|2|,|.</number_format>", "monto", "align='right'");
     $grid->column_orderby("Fecha", "<dbdate_to_human><#fecha#></dbdate_to_human>", "fecha", "align='center'");
     $grid->column_orderby("Cuota", "<number_format><#cuota#>|2|,|.</number_format>", "cuota", "align='right'");
     $grid->column_orderby("Cuota Total", "<number_format><#cuotat#>|2|,|.</number_format>", "cuotat", "align='right'");
     $grid->add("nomina/asig/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'] = "Asignaciones";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }