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


PHP form2uri函数代码示例

本文整理汇总了PHP中form2uri函数的典型用法代码示例。如果您正苦于以下问题:PHP form2uri函数的具体用法?PHP form2uri怎么用?PHP form2uri使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: index

 function index()
 {
     $this->rapyd->load('dataform');
     $this->load->helper('openflash');
     $dolar = $this->datasis->dameval("SELECT valor FROM valores WHERE nombre='dolar'");
     $filter = new DataForm("inventario/cambioprecio/consulta/");
     $filter->attributes = array('onsubmit' => "this.action='index/'+this.form.mes.value+'/'+this.form.anio.value+'/';return FALSE;");
     $filter->title('¿Desea cambiar el precio de sus artículos en el inventario según el precio del dólar?');
     $filter->dolar = new inputField("Precio del Dólar", "dolar");
     $filter->dolar->size = 12;
     $filter->dolar->maxlength = 10;
     $filter->dolar->insertValue = $dolar;
     $filter->desc2 = new inputField("Descuento Precio2", "desc2");
     $filter->desc2->size = 12;
     $filter->desc2->maxlength = 10;
     $filter->desc2->insertValue = '3';
     $filter->desc3 = new inputField("Descuento Precio3", "desc3");
     $filter->desc3->size = 12;
     $filter->desc3->maxlength = 10;
     $filter->desc3->insertValue = '5';
     $filter->desc4 = new inputField("Descuento Precio4", "desc4");
     $filter->desc4->size = 12;
     $filter->desc4->maxlength = 10;
     $filter->desc4->insertValue = '7';
     $filter->button("btnsubmit", "Aceptar", form2uri(site_url('inventario/cambioprecio/cambio'), array('dolar', 'desc2', 'desc3', 'desc4')), $position = "BL");
     $filter->build_form();
     $data['content'] = $filter->output;
     $data['head'] = $this->rapyd->get_head();
     $data['title'] = "<h1>Cambio de Precio</h1>";
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:31,代码来源:cambioprecio.php

示例2: index

 function index()
 {
     $this->rapyd->load("dataform");
     $this->load->helper('openflash');
     if ($this->uri->segment(4)) {
         $anio = $this->uri->segment(4);
     } elseif (isset($_POST['anio'])) {
         $anio = $_POST['anio'];
     }
     if (empty($anio)) {
         $anio = date("Y");
     }
     $filter = new DataForm('ventas/vendedoresanuales');
     $filter->title('Filtro de Ventas Anuales');
     $filter->anio = new inputField("A&ntilde;o", "anio");
     $filter->anio->size = 4;
     $filter->anio->insertValue = $anio;
     $filter->anio->rule = "max_length[4]";
     $filter->button("btnsubmit", "Buscar", form2uri(site_url('ventas/vendedoresanuales /index'), array('anio')), $position = "BL");
     $filter->build_form();
     $grafico = open_flash_chart_object(760, 300, site_url("ventas/vendedoresanuales/grafico/{$anio}/"));
     $data['content'] = $grafico;
     $data['content'] .= $filter->output;
     $data["head"] = $this->rapyd->get_head();
     $data['title'] = $this->rapyd->get_head() . "<h1>Ventas</h1>";
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:27,代码来源:anuales.php

示例3: imprimir

 function imprimir()
 {
     $this->rapyd->load("dataform");
     $scli = array('tabla' => 'scli', 'columnas' => array('cliente' => 'C&oacute;digo Cliente', 'nombre' => 'Nombre', 'contacto' => 'Contacto'), 'filtro' => array('cliente' => 'C&oacute;digo Cliente', 'nombre' => 'Nombre'), 'retornar' => array('cliente' => 'cliente'), 'titulo' => 'Buscar Cliente');
     $cboton = $this->datasis->modbus($scli);
     $filter = new DataForm('/tiketimp/index');
     $filter->title('Filtro de Impresion de Tiket');
     $filter->fechad = new dateonlyField("Desde", "fechad", 'Ymd');
     $filter->fechah = new dateonlyField("Hasta", "fechah", 'Ymd');
     $filter->fechad->clause = $filter->fechah->clause = "where";
     $filter->fechad->db_name = $filter->fechah->db_name = "fecha";
     //$filter->fechad->insertValue = $fechad;
     //$filter->fechah->insertValue = $fechah;
     $filter->fechah->size = $filter->fechad->size = 10;
     $filter->fechad->operator = ">=";
     $filter->fechah->operator = "<=";
     $filter->cliente = new inputField("Cliente", "cliente");
     $filter->cliente->size = 10;
     //$filter->cliente->insertValue=$cliente;
     $filter->cliente->maxlength = 10;
     $filter->cliente->append($cboton);
     $filter->button("btnsubmit", "Buscar", form2uri(site_url("/formatos/ver/TIKET/"), array('cliente', 'fechad', 'fechah')), $position = "BL");
     //
     $filter->build_form();
     $data['content'] = $filter->output;
     $data['title'] = "<h1>Imprimir</h1>";
     $data["head"] = script("jquery.pack.js") . script("plugins/jquery.numeric.pack.js") . script("plugins/jquery.floatnumber.js") . $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:29,代码来源:tiketimp.php

示例4: index

 function index()
 {
     $this->rapyd->load('datagrid2');
     $this->rapyd->load('datafilter');
     $diai = $this->uri->segment(4);
     $mesi = $this->uri->segment(5);
     $anoi = $this->uri->segment(6);
     if ($diai === FALSE or $mesi === FALSE or $anoi === FALSE) {
         $fechai = date('Y/m/d');
         $qfechai = date('Ymd');
     } else {
         $fechai = "{$anoi}/{$mesi}/{$diai}";
         $qfechai = $anoi . $mesi . $diai;
     }
     $filter = new DataForm('supermercado/poscuadre/index');
     $filter->title('Filtro de cajas');
     $filter->fechai = new dateField("Fecha", "fechai", "d/m/Y");
     $filter->fechai->insertValue = $fechai;
     $filter->fechai->size = 10;
     $filter->button("btnsubmit", "Buscar", form2uri(site_url('supermercado/poscuadre/index'), 'fechai'), $position = "BL");
     $filter->build_form();
     $grid = new DataGrid2();
     $select = array('a.caja caja', "IFNULL(b.nombre,'N/A') nombre", 'a.cajero AS cajero', 'SUM(a.gtotal) AS monto');
     $cupon = floatval($this->datasis->traevalor('FMAYCUPON'));
     if ($cupon > 0) {
         $select[] = "SUM(TRUNCATE(a.gtotal/{$cupon},0)) AS cupones";
     } else {
         $select[] = '(0) AS  cupones';
     }
     $grid->db->select($select);
     $grid->db->from('posfact AS a');
     $grid->db->where('SUBSTRING(numero,1,1)!=', 'X');
     $grid->db->where('fecha', $qfechai);
     $grid->db->join('scaj b', 'a.cajero=b.cajero', 'LEFT');
     $grid->db->groupby('a.caja,a.cajero');
     $link = anchor("supermercado/poscuadre/concaja/<#caja#>/<#cajero#>/{$qfechai}", '<#caja#>');
     $grid->column('Caja', $link);
     $grid->column('Nombre', 'nombre');
     $grid->column('Cajero', 'cajero', 'align="center"');
     $grid->column('Cupones', 'cupones', 'align="center"');
     $grid->column('Monto', '<nformat><#monto#></nformat>', 'align="right"');
     $grid->totalizar('monto');
     $grid->build();
     //echo $grid->db->last_query();
     $consul = new DataForm('supermercado/buscafac/index/search/osp');
     $consul->title('Buscar Factura');
     $consul->fechad = new dateField("Desde", "fechad", "d/m/Y");
     $consul->fechah = new dateField("Hasta", "fechah", "d/m/Y");
     $consul->nombre = new inputField("Nombre", "nombre");
     $consul->cedula = new inputField("C&eacute;dula/RIF", "cedula");
     $consul->fechad->insertValue = $consul->fechah->insertValue = date("Y/m/d");
     $consul->fechah->size = $consul->fechad->size = 10;
     $consul->submit("btn_submit", "Buscar");
     $consul->build_form();
     $data['content'] = $filter->output . $grid->output . $consul->output;
     $data['title'] = '<h1>Consulta de Cajas</h1>';
     $data['head'] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:59,代码来源:poscuadre.php

示例5: index

    function index()
    {
        $this->rapyd->load("datagrid2");
        $this->rapyd->load("dataform");
        $this->load->helper('openflash');
        if ($this->uri->segment(4)) {
            $anio = $this->uri->segment(4);
        } elseif (isset($_POST['anio'])) {
            $anio = $_POST['anio'];
        }
        if (empty($anio)) {
            $anio = date("Y");
        }
        $fechai = $anio . '0101';
        $fechaf = $anio . '1231';
        $filter = new DataForm('hospitalidad/anuales');
        $filter->title('Filtro de ventas Anuales');
        $filter->anio = new inputField("A&ntilde;o", "anio");
        $filter->anio->size = 4;
        $filter->anio->insertValue = $anio;
        $filter->anio->maxlength = 4;
        //$filter->anio->onkeypress="return acceptNum(event)";
        $filter->button("btnsubmit", "Buscar", form2uri(site_url('hospitalidad/anuales/index'), array('anio')), $position = "BL");
        $filter->build_form();
        $data = $this->_sincrodata($fechai, $fechaf);
        $grid = new DataGrid2('', $data);
        $grid->totalizar('impuesto', 'cobrado', 'contado', 'credito', 'subtotal', 'numfac');
        $grid->column("Mes", "mes");
        $grid->column("Sub-Total", "<number_format><#subtotal#>|2|,|.</number_format>", 'align=right');
        $grid->column("Impuesto", "<number_format><#impuesto#>|2|,|.</number_format>", 'align=right');
        $grid->column("Contado", "<number_format><#contado#>|2|,|.</number_format>", 'align=right');
        $grid->column("Credito", "<number_format><#credito#>|2|,|.</number_format>", 'align=right');
        $grid->column("Cobrado", "<number_format><#cobrado#>|2|,|.</number_format>", 'align=right');
        $grid->column("% Ventas", "<number_format><#porcentaje#>|2|,|.</number_format>", 'align=right');
        $grid->column("Cant. Fact", "numfac", 'align=right');
        $grid->build();
        $data['content'] = open_flash_chart_object(680, 300, site_url("hospitalidad/anuales/grafico/{$anio}"));
        $data['content'] .= $filter->output . $grid->output;
        $data['title'] = $this->rapyd->get_head() . "<h1>Ventas Anuales</h1>";
        $data['script'] = '<script type="text/javascript">
		$(document).ready(function() {
			$("#anio").keypress(function(event) {
				acceptNum(evt);
				return false;
			});
		});
	  var nav4 = window.Event ? true : false;
	  function acceptNum(evt)
    {	
    		var key = nav4 ? evt.which : evt.keyCode;	
    		return (key <= 13 || (key >= 48 && key <= 57));
    		
    }
		</script>';
        $data["head"] = script("jquery-1.2.6.pack.js") . $this->rapyd->get_head();
        $this->load->view('view_ventanas', $data);
    }
开发者ID:codethics,项目名称:proteoerp,代码行数:57,代码来源:anuales.php

示例6: index

 function index()
 {
     $this->rapyd->load("datagrid2");
     $this->rapyd->load("dataform");
     $this->load->helper('openflash');
     if ($this->uri->segment(4)) {
         $mes = $this->uri->segment(4);
     } elseif (isset($_POST['mes'])) {
         $mes = $_POST['mes'];
     }
     if ($this->uri->segment(5)) {
         $anio = $this->uri->segment(5);
     } elseif (isset($_POST['anio'])) {
         $anio = $_POST['anio'];
     }
     if (empty($mes) or empty($anio)) {
         $mes = date("n");
     }
     $anio = date("Y");
     $fechai = $anio . str_pad($mes, 2, "0", STR_PAD_LEFT) . '01';
     $fechaf = $anio . str_pad($mes, 2, "0", STR_PAD_LEFT) . '31';
     $filter = new DataForm('ventas/mensuales');
     $filter->attributes = array('onsubmit' => "this.action='index/'+this.form.mes.value+'/'+this.form.anio.value+'/';return FALSE;");
     $filter->title('Filtro de ventas mensuales');
     $filter->mes = new dropdownField("Mes/A&ntilde;o", "mes");
     for ($i = 1; $i < 13; $i++) {
         $filter->mes->option(str_pad($i, 2, '0', STR_PAD_LEFT), str_pad($i, 2, '0', STR_PAD_LEFT));
     }
     $filter->mes->size = 2;
     $filter->mes->style = '';
     $filter->mes->insertValue = $mes;
     $filter->anio = new inputField("A&ntilde;o", "anio");
     $filter->anio->in = 'mes';
     $filter->anio->size = 4;
     $filter->anio->insertValue = $anio;
     $filter->anio->maxlength = 4;
     $filter->button("btnsubmit", "Buscar", form2uri(site_url('hospitalidad/mensuales/index'), array('mes', 'anio')), $position = "BL");
     $filter->build_form();
     $data = $this->_sincrodata($fechai, $fechaf);
     $grid = new DataGrid2('', $data);
     $grid->totalizar('impuesto', 'cobrado', 'contado', 'credito', 'subtotal', 'numfac');
     $grid->column("Dia", "dia");
     $grid->column("Sub-Total", "<number_format><#subtotal#>|2|,|.</number_format>", 'align=right');
     $grid->column("Impuesto", "<number_format><#impuesto#>|2|,|.</number_format>", 'align=right');
     $grid->column("Contado", "<number_format><#contado#>|2|,|.</number_format>", 'align=right');
     $grid->column("Credito", "<number_format><#credito#>|2|,|.</number_format>", 'align=right');
     $grid->column("Cobrado", "<number_format><#cobrado#>|2|,|.</number_format>", 'align=right');
     $grid->column("% Ventas", "<number_format><#porcentaje#>|2|,|.</number_format>", 'align=right');
     $grid->column("Cant. Fact", "numfac", 'align=right');
     $grid->build();
     $data['content'] = open_flash_chart_object(680, 300, site_url("hospitalidad/mensuales/grafico/{$mes}/{$anio}"));
     $data['content'] .= $filter->output . $grid->output;
     $data['title'] = $this->rapyd->get_head() . "<h1>Ventas Mensuales</h1>";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:56,代码来源:mensuales.php

示例7: index

 function index()
 {
     //$this->rapyd->load("datagrid");
     $this->rapyd->load("dataform");
     $this->load->helper('openflash');
     if ($this->uri->segment(4)) {
         $anio = $this->uri->segment(4);
     } elseif (isset($_POST['anio'])) {
         $anio = $_POST['anio'];
     }
     if (empty($anio)) {
         $anio = date("Y");
     }
     $fechai = $anio . '0101';
     $fechaf = $anio . '1231';
     $filter = new DataForm('nomina/promediosueldos');
     $filter->title('Filtro de Promedio de Sueldos');
     $filter->anio = new inputField("A&ntilde;o", "anio");
     $filter->anio->size = 4;
     $filter->anio->insertValue = $anio;
     $filter->anio->rule = "max_length[4]";
     $filter->button("btnsubmit", "Buscar", form2uri(site_url('nomina/promediosueldos /index'), array('anio')), $position = "BL");
     $filter->build_form();
     /*
     		$grid = new DataGrid();
     		$select=array( "fecha","MONTH(fecha)as mes",                                            
     		"SUM(montonet*IF(tipo_doc='D', -1, 1)) AS anterior",                             
     		"SUM(credito*IF(tipo_doc='D', -1, 1)) as contado",        
     		"SUM(inicial*IF(tipo_doc='D', -1, 1)) as credito", 
         "FORMAT(sum(montotot*IF(tipo_doc='D',-1,1)),2) AS subtotal", 
         "FORMAT(sum(montoiva*IF(tipo_doc='D',-1,1)),2) AS impuesto", 
         "COUNT(*) AS numfac"); 
                  		
     		$grid->db->select($select);  
     		$grid->db->from("scst");
     		$grid->db->where('a.tipo<>','X');
     		$grid->db->where('fecha >= ', $fechai);  
     		$grid->db->where('fecha <= ',$fechaf); 
     		$grid->db->groupby("mes");
     		
     		$grid->column("Fecha"          , "fecha"    );
     		$grid->column("Sub-Total"      , "subtotal" ,'align=right');
     		$grid->column("Impuesto"       , "impuesto" ,'align=right');
     		$grid->column("Total"          , "anterior",'align=right');
     		$grid->column("Contado"        , "contado"  ,'align=right');
     		$grid->column("Credito"        , "credito"  ,'align=right');
     		$grid->column("N&uacute;mero"  , "numfac"   ,'align=right');
     		$grid->build();*/
     $grafico = open_flash_chart_object(760, 300, site_url("nomina/promediosueldos/grafico/{$anio}/"));
     $data['content'] = $grafico;
     $data['content'] .= $filter->output;
     $data["head"] = $this->rapyd->get_head();
     $data['title'] = $this->rapyd->get_head() . " Nomina ";
     $this->load->view('view_ventanas', $data);
 }
开发者ID:enderochoa,项目名称:tortuga,代码行数:55,代码来源:aumentosueldos.php

示例8: anuales

    function anuales()
    {
        $this->rapyd->load("datagrid2");
        $this->rapyd->load("dataform");
        $this->load->helper('openflash');
        $script = '
		$(function() {
			$(".inputnum").numeric(".");
		});
		';
        if ($this->uri->segment(4)) {
            $anio = $this->uri->segment(4);
        } elseif (isset($_POST['anio'])) {
            $anio = $_POST['anio'];
        }
        if (empty($anio)) {
            $anio = date("Y");
        }
        $fechai = $anio . '0101';
        $fechaf = $anio . '1231';
        $filter = new DataForm('ventas/productos/anuales');
        $filter->title('Filtro de Ventas Anuales');
        $filter->script($script, "create");
        $filter->script($script, "modify");
        $filter->anio = new inputField("A&ntilde;o", "anio");
        $filter->anio->size = 4;
        $filter->anio->insertValue = $anio;
        $filter->anio->rule = "max_length[4]";
        $filter->anio->rule = "trim";
        $filter->anio->css_class = 'inputnum';
        $filter->button("btnsubmit", "Buscar", form2uri(site_url('ventas/productos/anuales/'), array('anio')), $position = "BL");
        $filter->build_form();
        $grid = new DataGrid2();
        $select = array("a.codigo", "b.descrip AS nombre", "a.cantidad AS cantidad", "SUM(a.venta)AS grantotal", "COUNT(*) AS numfac");
        $grid->db->select($select);
        $grid->db->from("costos AS a");
        $grid->db->join("sinv AS b", "a.codigo=b.codigo");
        $grid->db->where('fecha >= ', $fechai);
        $grid->db->where('fecha <= ', $fechaf);
        $grid->db->groupby("a.codigo");
        $grid->db->orderby("grantotal DESC");
        $grid->per_page = 15;
        $grid->column("Producto", "nombre", "align='left'");
        $grid->column("Total", "<number_format><#grantotal#>|2|,|.</number_format>", 'align=right');
        $grid->column("Cantidad", "<number_format><#cantidad#>|2|,|.</number_format>", 'align=right');
        $grid->column("Cant. Fact", "numfac", 'align=right');
        $grid->totalizar('grantotal');
        $grid->build();
        $grafico = open_flash_chart_object(680, 450, site_url("ventas/productos/ganuales/{$anio}/"));
        $data['content'] = $grafico;
        $data['content'] .= $filter->output . $grid->output;
        $data["head"] = script("jquery.pack.js") . script("plugins/jquery.numeric.pack.js") . script("plugins/jquery.floatnumber.js") . $this->rapyd->get_head();
        $data['title'] = $this->rapyd->get_head() . "<h1>Ventas Anuales</h1>";
        $this->load->view('view_ventanas', $data);
    }
开发者ID:codethics,项目名称:proteoerp,代码行数:55,代码来源:productos.php

示例9: index

 function index()
 {
     $this->rapyd->load("datagrid");
     $this->rapyd->load("datafilter");
     $diai = $this->uri->segment(4);
     $mesi = $this->uri->segment(5);
     $anoi = $this->uri->segment(6);
     if ($diai === FALSE or $mesi === FALSE or $anoi === FALSE) {
         $fechai = date('Y/m/d');
         $qfechai = date('Ymd');
     } else {
         $fechai = "{$anoi}/{$mesi}/{$diai}";
         $qfechai = $anoi . $mesi . $diai;
     }
     $filter = new DataForm('supermercado/poscuadre/index');
     $filter->title('Filtro de cajas');
     $filter->fechai = new dateField("Fecha", "fechai", "d/m/Y");
     $filter->fechai->insertValue = $fechai;
     $filter->fechai->size = 10;
     $filter->button("btnsubmit", "Buscar", form2uri(site_url('supermercado/poscuadre/index'), 'fechai'), $position = "BL");
     $filter->build_form();
     $grid = new DataGrid();
     //$grid->db->select("a.caja caja,IFNULL(b.nombre,'N/A') nombre, a.cajero as cajero,FORMAT(SUM(a.gtotal),2) monto, sum(TRUNCATE(a.gtotal/50000,0)) cupones ");
     $select = array("a.caja caja", "IFNULL(b.nombre,'N/A') nombre", "a.cajero as cajero", "FORMAT(SUM(a.gtotal),2) monto", "sum(TRUNCATE(a.gtotal/50000,0)) cupones");
     $grid->db->select($select);
     $grid->db->from("posfact a");
     $grid->db->where("substring(numero,1,1)!=", 'X');
     $grid->db->where("fecha", $qfechai);
     $grid->db->join("scaj b", "a.cajero=b.cajero", "LEFT");
     $grid->db->groupby('a.caja,a.cajero');
     $grid->column_detail("Caja", "caja", site_url("supermercado/poscuadre/concaja/<#caja#>/<#cajero#>/{$qfechai}"));
     $grid->column("Nombre", "nombre");
     $grid->column("Cajero", "cajero", 'align="center"');
     $grid->column("Cupones", "cupones", 'align="center"');
     $grid->column("Monto", "monto", 'align="right"');
     $grid->build();
     //echo $grid->db->last_query();
     $consul = new DataForm('supermercado/buscafac/index/search/osp');
     $consul->title('Buscar Factura');
     $consul->fechad = new dateField("Desde", "fechad", "d/m/Y");
     $consul->fechah = new dateField("Hasta", "fechah", "d/m/Y");
     $consul->nombre = new inputField("Nombre", "nombre");
     $consul->cedula = new inputField("C&eacute;dula/RIF", "cedula");
     $consul->fechad->insertValue = $consul->fechah->insertValue = date("Y/m/d");
     $consul->fechah->size = $consul->fechad->size = 10;
     $consul->submit("btn_submit", "Buscar");
     $consul->build_form();
     $data['content'] = $filter->output . $grid->output . $consul->output;
     $data['title'] = "<h1>Consulta de Cajas</h1>";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:52,代码来源:poscuadre.php

示例10: dias

 function dias()
 {
     $this->rapyd->load("datagrid2", "dataform");
     $fechad = $this->uri->segment(4);
     if (empty($fechad)) {
         $fechad = date("Y-m-d");
         $date = new DateTime();
         $date->setDate(substr($fechad, 0, 4), substr($fechad, 5, 2), substr($fechad, 8, 2));
         $date->modify("-6 month");
         $fechad = $date->format("j-n-Y");
     }
     $fechah = $this->uri->segment(5);
     if (empty($fechah)) {
         $fechah = date("d-m-Y");
     }
     $filter = new DataForm();
     $filter->title('Filtro de Analisis de Gastos');
     $filter->fechad = new dateonlyField("Desde", "fechad", 'd-m-Y');
     $filter->fechah = new dateonlyField("Hasta", "fechah", 'd-m-Y');
     $filter->fechad->clause = $filter->fechah->clause = "where";
     $filter->fechad->db_name = $filter->fechah->db_name = "fecha";
     $filter->fechad->insertValue = $fechad;
     $filter->fechah->insertValue = $fechah;
     $filter->fechah->size = $filter->fechad->size = 10;
     $filter->fechad->operator = ">=";
     $filter->fechah->operator = "<=";
     $filter->button("btnsubmit", "Buscar", form2uri(site_url('/ventas/analisisventas/dias'), array('fechad', 'fechah')), $position = "BL");
     $filter->build_form();
     $link = "ventas/analisisventas/dia/<#fecha#>";
     $grid = new DataGrid2("Ventas Por D&iacute;as");
     $grid->column("Fecha", anchor($link, "<dbdate_to_human><#fecha#></dbdate_to_human>"), "align=center");
     $grid->column("Ventas", "<number_format><#ventas#>|2|,|.</number_format>", 'align=right');
     $grid->column("Anulaciones", "<number_format><#anulaciones#>|2|,|.</number_format>", 'align=right');
     $select = array("fecha", "sum(tota*(tipoa<>'X')) as ventas", "sum(tota*(tipoa='X')) as anulaciones");
     $grid->db->select($select);
     $grid->db->from('sitems');
     $fechad2 = substr($fechad, 6, 4) . substr($fechad, 3, 2) . substr($fechad, 0, 2);
     $fechah2 = substr($fechah, 6, 4) . substr($fechah, 3, 2) . substr($fechah, 0, 2);
     $grid->db->where('fecha >= ', $fechad2);
     $grid->db->where('fecha <= ', $fechah2);
     $grid->db->groupby("fecha");
     $grid->build();
     //echo $grid->db->last_query();
     $data['content'] = $filter->output . '<div style="overflow: auto; width: 100%;">' . $grid->output . '</div>';
     $data['title'] = "<h1>Analisis de Ventas</h1>";
     $data["head"] = script("jquery.pack.js") . script("plugins/jquery.numeric.pack.js") . script("plugins/jquery.floatnumber.js") . $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:48,代码来源:analisisventas.php

示例11: index

    function index()
    {
        $this->rapyd->load("datagrid", "dataform");
        $this->load->helper('openflash');
        $anio = $this->uri->segment(4);
        if (empty($anio)) {
            $anio = date("Y");
        }
        $script = '
			$(function() {
				$(".inputnum").numeric(".");
			});
			';
        $filter = new DataForm();
        $filter->title('Filtro de An&aacute;lisis de Ventas');
        $filter->script($script, "create");
        $filter->script($script, "modify");
        $filter->anio = new inputField("A&ntilde;o", "anio");
        $filter->anio->size = 4;
        $filter->anio->insertValue = $anio;
        $filter->anio->maxlength = 4;
        $filter->anio->rule = "trim";
        $filter->anio->css_class = 'inputnum';
        $filter->button("btnsubmit", "Buscar", form2uri(site_url('/supermercado/analisis/index'), array('anio')), $position = "BL");
        $filter->build_form();
        $link = "supermercado/analisis/departamento/<#depto#>/{$anio}";
        $select = array('a.fecha', 'a.depto', 'a.familia', 'a.grupo', 'a.codigo', 'a.impuesto', 'a.monto', 'a.cantidad', 'a.transac', 'a.tipo', 'b.descrip');
        $grid = new DataGrid('Ventas por Departamentos');
        $grid->column("Departamento", anchor($link, '<#descrip#>'), 'nowrap=yes');
        for ($i = 1; $i <= 12; $i++) {
            $nmes = $this->calendar->get_month_name(str_pad($i, 2, "0", STR_PAD_LEFT));
            $grid->column($nmes, "<nformat><#m{$i}#></nformat>", 'align=right');
            $select[] = "sum(a.monto*(month(a.fecha)={$i}))  AS m{$i}";
        }
        $grid->db->select($select);
        $grid->db->from('est_item  AS a');
        $grid->db->join('dpto  AS b', 'a.depto=b.depto');
        $grid->db->where('YEAR(a.fecha)', $anio);
        $grid->db->where("a.tipo", 'I');
        $grid->db->groupby('a.depto');
        $grid->build();
        //echo  $grid->db->last_query();
        $data['content'] = $filter->output . '<div style="overflow: auto; width: 100%;">' . $grid->output . '</div>';
        $data['title'] = "<h1>An&aacute;lisis de Ventas</h1>";
        $data["head"] = script("jquery.pack.js") . script("plugins/jquery.numeric.pack.js") . script("plugins/jquery.floatnumber.js") . $this->rapyd->get_head();
        $this->load->view('view_ventanas', $data);
    }
开发者ID:codethics,项目名称:proteoerp,代码行数:47,代码来源:analisis.php

示例12: anuales

 function anuales()
 {
     $this->rapyd->load("datagrid2");
     $this->rapyd->load("dataform");
     $this->load->helper('openflash');
     if ($this->uri->segment(4)) {
         $anio = $this->uri->segment(4);
     } elseif (isset($_POST['anio'])) {
         $anio = $_POST['anio'];
     }
     if (empty($anio)) {
         $anio = date("Y");
     }
     $fechai = $anio . '0101';
     $fechaf = $anio . '1231';
     $filter = new DataForm('finanzas/ggastos/anuales');
     $filter->title('Filtro de Gastos Anuales');
     $filter->anio = new inputField("A&ntilde;o", "anio");
     $filter->anio->size = 4;
     $filter->anio->insertValue = $anio;
     $filter->anio->maxlength = 4;
     $filter->button("btnsubmit", "Buscar", form2uri(site_url('finanzas/ggastos/anuales/'), array('anio')), $position = "BL");
     $filter->build_form();
     $grid = new DataGrid2();
     $select = array("fecha", "proveed", "nombre", "SUM(totneto)AS grantotal", "COUNT(*) AS numfac");
     $grid->db->select($select);
     $grid->db->from("gser");
     $grid->db->where('fecha >= ', $fechai);
     $grid->db->where('fecha <= ', $fechaf);
     $grid->db->groupby("proveed");
     $grid->db->orderby("grantotal DESC");
     $grid->column("Gasto", "nombre", "align='left'");
     $grid->column("Total", "<number_format><#grantotal#>|2|,|.</number_format>", 'align=right');
     $grid->column("Cant. Fact", "numfac", 'align=right');
     $grid->totalizar('grantotal');
     $grid->build();
     $grafico = open_flash_chart_object(680, 450, site_url("finanzas/ggastos/ganuales/{$anio}/"));
     $data['content'] = $grafico;
     $data['content'] .= $filter->output . $grid->output;
     $data["head"] = $this->rapyd->get_head();
     $data['title'] = $this->rapyd->get_head() . "<h1>Gastos Anuales</h1>";
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:43,代码来源:ggastos.php

示例13: index

 function index()
 {
     $this->rapyd->load("dataform");
     $this->load->helper('openflash');
     $mes = $this->uri->segment(4);
     $anio = $this->uri->segment(5);
     if (empty($mes)) {
         $mes = date("m");
     }
     if (empty($anio)) {
         $anio = date("Y");
     }
     $fechai = $anio . $mes . '01';
     $fechaf = $anio . $mes . '31';
     $filter = new DataForm();
     $filter->title('Filtro de ventas mensuales');
     $filter->mes = new dropdownField("Mes/A&ntilde;o", "mes");
     for ($i = 1; $i < 13; $i++) {
         $filter->mes->option(str_pad($i, 2, '0', STR_PAD_LEFT), str_pad($i, 2, '0', STR_PAD_LEFT));
     }
     $filter->mes->size = 2;
     $filter->mes->style = '';
     $filter->mes->insertValue = $mes;
     $filter->anio = new inputField("A&ntilde;o", "anio");
     $filter->anio->in = 'mes';
     $filter->anio->size = 4;
     $filter->anio->insertValue = $anio;
     $filter->anio->rule = "max_length[4]";
     $filter->button("btnsubmit", "Buscar", form2uri(site_url('compras/analisis/index'), array('mes', 'anio')), $position = "BL");
     $filter->build_form();
     $data['forma'] = '';
     $data['lista'] = $filter->output;
     $data['lista'] .= open_flash_chart_object(800, 300, site_url("compras/analisis/departa/{$mes}/{$anio}"));
     $data['titulo'] = $this->rapyd->get_head() . "<center><h2>VENTAS MENSUALES</h2></center>";
     $this->layout->buildPage('ventas/view_ventas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:36,代码来源:analisis.php

示例14: diarias

 function diarias($anio = '', $proveed = '', $mes = '')
 {
     $this->rapyd->load('datagrid2');
     $this->rapyd->load('dataform');
     $this->load->helper('openflash');
     $proveed = radecode($proveed);
     if (isset($_POST['anio']) && empty($anio)) {
         $anio = $_POST['anio'];
     }
     if (isset($_POST['mes']) && empty($mes)) {
         $mes = $_POST['mes'];
     }
     if (isset($_POST['proveed']) && empty($proveed)) {
         $proveed = $_POST['proveed'];
     }
     if (empty($mes)) {
         redirect("compras/proveedores/mensuales/{$anio}/{$proveed}");
     }
     $fechai = $anio . str_pad($mes, 2, '0', STR_PAD_LEFT) . '01';
     $fechaf = $anio . str_pad($mes, 2, '0', STR_PAD_LEFT) . '31';
     $scli = array('tabla' => 'sprv', 'columnas' => array('proveed' => 'Codigo proveedor', 'nombre' => 'Nombre'), 'filtro' => array('proveed' => 'Còdigo proveedor', 'nombre' => 'Nombre'), 'retornar' => array('proveed' => 'proveed'), 'titulo' => 'Buscar proveedor');
     $cboton = $this->datasis->modbus($scli);
     $filter = new DataForm('compras/proveedoresdiarios');
     $filter->attributes = array('onsubmit' => "this.action='index/'+this.form.mes.value+'/'+this.form.anio.value+'/';return FALSE;");
     $filter->title('Filtro de Compras Diarias');
     $filter->mes = new dropdownField('Mes/A&ntilde;o', 'mes');
     for ($i = 1; $i < 13; $i++) {
         $filter->mes->option(str_pad($i, 2, '0', STR_PAD_LEFT), str_pad($i, 2, '0', STR_PAD_LEFT));
     }
     $filter->mes->size = 2;
     $filter->mes->style = '';
     $filter->mes->insertValue = $mes;
     $filter->anio = new inputField('A&ntilde;o', 'anio');
     $filter->anio->in = 'mes';
     $filter->anio->size = 4;
     $filter->anio->insertValue = $anio;
     $filter->anio->rule = 'max_length[4]';
     $filter->proveedor = new inputField('Proveedor', 'proveed');
     $filter->proveedor->size = 10;
     $filter->proveedor->insertValue = $proveed;
     $filter->proveedor->rule = 'max_length[4]';
     $filter->proveedor->append($cboton);
     $filter->button('btnsubmit', 'Buscar', form2uri(site_url('compras/proveedores/diarias/'), array('anio', 'proveed', 'mes')), $position = 'BL');
     $filter->build_form();
     $grid = new DataGrid2();
     $select = array('proveed', "DATE_FORMAT(fecha,'%d/%m/%Y') AS fecha", "SUM(montonet*IF(tipo_doc='NC',-1,1)) AS grantotal", "SUM(inicial*IF( tipo_doc='NC',-1,1)) AS contado", "SUM(credito*IF( tipo_doc='NC',-1,1)) AS credito", "SUM(montotot*IF(tipo_doc='NC',-1,1)) AS subtotal", "SUM(montoiva*IF(tipo_doc='NC',-1,1)) AS impuesto", 'COUNT(*) AS numfac');
     $grid->db->select($select);
     $grid->db->from('scst');
     $grid->db->where('tipo_doc <> ', 'NE');
     $grid->db->where('fecha >= ', $fechai);
     $grid->db->where('fecha <= ', $fechaf);
     $grid->db->where('proveed', $proveed);
     $grid->db->where('actuali >= fecha');
     $grid->db->groupby('fecha');
     $grid->column('Fecha', "fecha", "align='center'");
     $grid->column('Sub-Total', "<number_format><#subtotal#>|2|,|.</number_format>", 'align=right');
     $grid->column('Impuesto', "<number_format><#impuesto#>|2|,|.</number_format>", 'align=right');
     $grid->column('Total', "<number_format><#grantotal#>|2|,|.</number_format>", 'align=right');
     $grid->column('Contado', "<number_format><#contado#>|2|,|.</number_format>", 'align=right');
     $grid->column('Credito', "<number_format><#credito#>|2|,|.</number_format>", 'align=right');
     $grid->column('Cant. Fact', "numfac", 'align=right');
     $grid->totalizar('impuesto', 'grantotal', 'contado', 'credito', 'subtotal');
     $grid->build();
     $proveed = raencode($proveed);
     $grafico = open_flash_chart_object(680, 350, site_url("compras/proveedores/gdiarias/{$anio}/{$proveed}/{$mes}"));
     $data['content'] = $grafico;
     $data['content'] .= $filter->output . $grid->output;
     $data['head'] = $this->rapyd->get_head();
     $data['title'] = '<h1>Compras Diarias</h1>';
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:71,代码来源:proveedores.php

示例15: mensuales

 function mensuales($anio = '', $mes = '')
 {
     $this->rapyd->load("datagrid2");
     $this->rapyd->load("dataform");
     $this->load->helper('openflash');
     if ($this->uri->segment(4)) {
         $mes = $this->uri->segment(4);
     } elseif (isset($_POST['mes'])) {
         $mes = $_POST['mes'];
     }
     if ($this->uri->segment(5)) {
         $anio = $this->uri->segment(5);
     } elseif (isset($_POST['anio'])) {
         $anio = $_POST['anio'];
     }
     if (empty($mes)) {
         $mes = date("m");
     }
     if (empty($anio)) {
         $anio = date("Y");
     }
     $fechai = $anio . str_pad($mes, 2, "0", STR_PAD_LEFT) . '01';
     $fechaf = $anio . str_pad($mes, 2, "0", STR_PAD_LEFT) . '31';
     $filter = new DataForm('nomina/gprestamos/mensuales');
     $filter->attributes = array('onsubmit' => "this.action='index/'+this.form.mes.value+'/'+this.form.anio.value+'/';return FALSE;");
     $filter->title('Filtro de Prestamos mensuales');
     $filter->mes = new dropdownField("Mes/A&ntilde;o", "mes");
     for ($i = 1; $i < 13; $i++) {
         $filter->mes->option(str_pad($i, 2, '0', STR_PAD_LEFT), str_pad($i, 2, '0', STR_PAD_LEFT));
     }
     $filter->mes->size = 2;
     $filter->mes->style = '';
     $filter->mes->insertValue = $mes;
     $filter->anio = new inputField("A&ntilde;o", "anio");
     $filter->anio->in = 'mes';
     $filter->anio->size = 4;
     $filter->anio->insertValue = $anio;
     $filter->anio->maxlength = 4;
     $filter->button("btnsubmit", "Buscar", form2uri(site_url('nomina/gprestamos/mensuales/'), array('mes', 'anio')), $position = "BL");
     $filter->build_form();
     $grid = new DataGrid2();
     $select = array("fecha", "DAYOFMONTH(fecha)AS dia", "SUM(monto)AS grantotal", "COUNT(*) AS numfac");
     $grid->db->select($select);
     $grid->db->from("pres ");
     $grid->db->where('fecha >= ', $fechai);
     $grid->db->where('fecha <= ', $fechaf);
     $grid->db->groupby("fecha");
     $grid->column("Dia", "dia", "align='left'");
     $grid->column("Total", "<number_format><#grantotal#>|2|,|.</number_format>", 'align=right');
     $grid->column("Cant. Prest", "numfac", 'align=right');
     $grid->totalizar('grantotal');
     $grid->build();
     $grafico = open_flash_chart_object(680, 350, site_url("nomina/gprestamos/gmensuales/{$mes}/{$anio}"));
     $data['content'] = $grafico;
     $data['content'] .= $filter->output . $grid->output;
     $data["head"] = $this->rapyd->get_head();
     $data['title'] = $this->rapyd->get_head() . " Prestamos Mensuales ";
     $this->load->view('view_ventanas', $data);
 }
开发者ID:enderochoa,项目名称:tortuga,代码行数:59,代码来源:gprestamos.php


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