本文整理汇总了PHP中DataForm::button方法的典型用法代码示例。如果您正苦于以下问题:PHP DataForm::button方法的具体用法?PHP DataForm::button怎么用?PHP DataForm::button使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataForm
的用法示例。
在下文中一共展示了DataForm::button方法的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);
}
示例2: imprimir
function imprimir()
{
$this->rapyd->load("dataform");
$scli = array('tabla' => 'scli', 'columnas' => array('cliente' => 'Código Cliente', 'nombre' => 'Nombre', 'contacto' => 'Contacto'), 'filtro' => array('cliente' => 'Có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);
}
示例3: 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ñ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);
}
示例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é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);
}
示例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ñ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);
}
示例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ñ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ñ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);
}
示例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ñ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ú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);
}
示例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ñ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);
}
示例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é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);
}
示例10: index
function index()
{
//$this->datasis->modulo_id(123,1);
$this->rapyd->load("dataform", "datatable");
$this->load->library('table');
$modbus = array('tabla' => 'maes', 'columnas' => array('codigo' => 'Código', 'descrip' => 'Descripción', 'precio1' => 'Precio 1', 'precio2' => 'Precio 2', 'precio3' => 'Precio 3', 'precio4' => 'Precio 4', 'precio5' => 'Precio 5'), 'filtro' => array('codigo' => 'Código', 'descrip' => 'Descripción'), 'retornar' => array('codigo' => 'codigo'), 'titulo' => 'Buscar en inventario');
$boton = $this->datasis->modbus($modbus);
$filter = new DataForm('supermercado/consulcajas/index/process');
$filter->title('Seleccione un producto');
$filter->codigo = new inputField("Codigo", "codigo");
$filter->codigo->append($boton);
$filter->codigo->size = 10;
$filter->button("btnsubmit", "Consultar", '', $position = "BL");
$filter->build_form();
$table = new DataTable(null);
$table->cell_attributes = 'style="vertical-align:middle;"';
$table->db->select(array('caja', 'ubica'));
$table->db->from("caja");
$table->db->where("ubica REGEXP '^([1-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.(([0-9]{1,2}|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){2}([0-9]{1,2}|1[0-9]{2}|2[0-4][0-9]|25[0-5])\$' ");
$table->db->orderby('caja');
$table->per_row = 2;
$table->per_page = 30;
$celda = array(array(image('caja_abierta.gif', "Caja <#caja#>", array('border' => 0, 'align' => 'center')) . '<br>Caja <#caja#>', '<div name="cc<#caja#>" id="<#ubica#>"></div>'));
$table->cell_template = $this->table->generate($celda);
$table->build();
$link = site_url('supermercado/consulcajas/preciocaj');
$script = <<<script
\t\t<script type='text/javascript'>
\t\t\$(document).ready(function() {
\t\t\t\$("input[name='btnsubmit']").click(function () {
\t\t\t
\t\t\t var producto=jQuery.trim(\$('#codigo').val());
\t\t\t\tif (producto.length==0){
\t\t\t\t\talert('Debe introducir un producto');
\t\t\t\t\treturn false;
\t\t\t\t}
\t\t\t\t\$("div[name^='cc']").each(function (i) {
\t\t\t \$(this).load("{$link}"+'/'+this.id+'/'+producto);
\t\t\t });
\t\t\t
\t\t\t});
\t\t});
\t\t</script>
script;
$data['content'] = $filter->output . $table->output;
$data['title'] = "<h1>Consulta de productos en cajas</h1>";
$data["head"] = $this->rapyd->get_head() . script("jquery.js") . $script;
$this->load->view('view_ventanas', $data);
}
示例11: 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í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);
}
示例12: 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álisis de Ventas');
$filter->script($script, "create");
$filter->script($script, "modify");
$filter->anio = new inputField("Añ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á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);
}
示例13: 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ñ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);
}
示例14: 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ñ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ñ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);
}
示例15: traer
function traer()
{
$this->datasis->modulo_id($this->modulo, 1);
//$this->datasis->modulo_id(11D,1);
$this->rapyd->load("dataform", "datatable", 'datagrid');
$this->load->library('table');
$scli = array('tabla' => 'scli', 'columnas' => array('cliente' => 'Código Cliente', 'nombre' => 'Nombre', 'contacto' => 'Contacto'), 'filtro' => array('cliente' => 'Código Cliente', 'nombre' => 'Nombre'), 'retornar' => array('cliente' => 'cliente'), 'titulo' => 'Buscar Cliente');
$boton = $this->datasis->modbus($scli);
$filter = new DataForm('supervisor/tiketrpc/tiket/process');
$filter->title('Filtro de fecha');
//$filter->fechad = new dateonlyField("Fecha Desde", "fechad",'Ymd');
//$filter->fechad->insertValue = date("Y-m-d");
//$filter->fechad->size=12;
$filter->cliente = new inputField("Cliente", "cliente");
$filter->cliente->size = 15;
$filter->cliente->append($boton);
//$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();
$data = array();
$mSQL = "SELECT a.id,a.cliente,a.ubicacion,a.url,a.basededato,a.puerto,a.usuario,a.clave,a.observacion, b.nombre FROM tiketconec AS a JOIN scli AS b ON a.cliente=b.cliente WHERE url REGEXP '^([[:alnum:]]+\\.{0,1})+\$' ORDER BY id";
$query = $this->db->query($mSQL);
if ($query->num_rows() > 0) {
foreach ($query->result_array() as $row) {
$data[] = $row;
}
}
$grid = new DataGrid("Clientes", $data);
$grid->column("Cliente", '<b><#nombre#></b>');
$grid->column("URL", 'url');
$grid->build();
$data['content'] = $filter->output . $grid->output;
$data['title'] = " Traer tikets de clientes ";
$data["head"] = $this->rapyd->get_head() . script("jquery.js") . script("plugins/jquery.json.min.js");
$this->load->view('view_ventanas', $data);
}