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


PHP DataForm::on_success方法代码示例

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


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

示例1: wol

 function wol()
 {
     if (!extension_loaded('sockets')) {
         show_error('La extension "sockets" no esta cargada, debe cargarla para poder usar estas opciones');
     }
     $this->load->library('rapyd');
     $this->rapyd->load('dataform');
     $form = new DataForm('supervisor/monitoreo/wol/process');
     $form->mac = new inputField('Dirección MAC', 'mac');
     $form->mac->append('Ejemplo: 00:01:02:03:04:05');
     $form->mac->rule = 'required|mac';
     $form->mac->maxlength = 17;
     $form->mac->size = 20;
     $form->submit('btnsubmit', 'Enviar');
     $form->build_form();
     if ($form->on_success()) {
         $mac = $form->mac->newValue;
         $rt = $this->_wol($mac);
         if (!$rt) {
             $form->error_string = $this->error;
             $form->build_form();
             $salida = $form->output . br();
         } else {
             $salida = $form->output . br() . 'Señal enviada satisfactoriamente';
         }
     } else {
         $salida = $form->output;
     }
     $this->rapyd->jquery[] = '$(".inputnum").numeric(".");';
     $data['content'] = $salida;
     $data['title'] = heading('Envio de señal de encendido por LAN');
     $data['head'] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:34,代码来源:monitoreo.php

示例2: busca

 function busca()
 {
     $this->rapyd->load("dataform");
     $mBANC = array('tabla' => 'banc', 'columnas' => array('codbanc' => 'Cóodigo', 'banco' => 'Banco', 'saldo' => 'Saldo'), 'filtro' => array('codbanc' => 'Cóodigo', 'banco' => 'Banco', 'saldo' => 'Saldo'), 'retornar' => array('codbanc' => 'codbanc'), 'where' => 'activo = "S"', 'titulo' => 'Buscar Bancos');
     $bBANC = $this->datasis->p_modbus($mBANC, "banc");
     $mSPRV = array('tabla' => 'sprv', 'columnas' => array('proveed' => 'Cóodigo', 'nombre' => 'Nombre', 'rif' => 'Rif', 'contacto' => 'Contacto'), 'filtro' => array('proveed' => 'Código', 'nombre' => 'Nombre', 'rif' => 'Rif'), 'retornar' => array('proveed' => 'cod_prov'), 'titulo' => 'Buscar Beneficiario');
     $bSPRV = $this->datasis->p_modbus($mSPRV, "sprv");
     $filter = new DataForm($this->url . "busca/process");
     $filter->cod_prov = new inputField("Proveedor", "cod_prov");
     $filter->cod_prov->rule = 'required';
     $filter->cod_prov->size = 5;
     $filter->cod_prov->append($bSPRV);
     $filter->codbanc = new inputField("Banco", 'codbanc');
     $filter->codbanc->size = 5;
     $filter->codbanc->rule = "required";
     $filter->codbanc->append($bBANC);
     $filter->submit("btnsubmit", "Buscar");
     $filter->build_form();
     //exit('=============');
     if ($filter->on_success()) {
         $cod_prov = $filter->cod_prov->newValue;
         $codbanc = $filter->codbanc->newValue;
         redirect($this->url . "selecciona/" . raencode($cod_prov) . "/" . raencode($codbanc));
     }
     $data['content'] = $filter->output;
     $data['title'] = "Pago de Deducciones de nómina";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
开发者ID:enderochoa,项目名称:tortuga,代码行数:29,代码来源:pagorete.php

示例3: carga

 function carga()
 {
     $this->rapyd->load("dataform");
     $form = new DataForm("sincro/cargasinv/carga/procesa");
     $form->title('Cargar Archivo de Productos (*.txt)');
     $form->archivo = new uploadField("Archivo", "archivo1");
     $form->archivo->upload_path = $this->upload_path;
     $form->archivo->allowed_types = "TXT";
     $form->archivo->delete_file = false;
     $form->archivo->rule = "required";
     $form->archivo->file_name = 'precios.txt';
     $form->submit("btnsubmit", "Cargar");
     $form->build_form();
     if ($form->on_success()) {
         set_time_limit(600);
         $nombre = $form->archivo->upload_data['file_name'];
         $dir = './uploads/archivos/' . $nombre;
         $msg = 'Carga Éxitosa';
         redirect("sincro/cargasinv/procesa/{$nombre}");
         //$this->procesa();
     }
     $data['content'] = $form->output;
     $data['title'] = "<h1>Actualizaci&oacute;n de Inventario</h1>";
     $data["head"] = script("jquery.pack.js") . $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:26,代码来源:cargasinv.php

示例4: cargazip

 function cargazip()
 {
     set_time_limit(600);
     $this->rapyd->load('dataform');
     $this->load->library('Sqlinex');
     $form = new DataForm("cargasarch/cargazip/process");
     $form->upl = new uploadField("Archivo Zip", "arch");
     $form->upl->upload_path = $this->dir;
     $form->upl->max_size = 6000;
     $form->upl->allowed_types = "zip";
     $form->submit("btnsubmit", "Cargar");
     $form->build_form();
     $msg = '';
     if ($form->on_success()) {
         $nombre = $form->upl->upload_data['file_name'];
         $rt = $this->_cargazip($nombre);
         if (!empty($rt)) {
             $form->error_string = $rt;
             $form->build_form();
         } else {
             $msg = '<p>Carga completada</p>';
         }
     }
     $data['content'] = $form->output . $msg;
     $data['title'] = '<h1>Cargas de Zip</h1>';
     $data['script'] = '';
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:29,代码来源:cargasarch.php

示例5: index

 function index()
 {
     $mSCLId = array('tabla' => 'scli', 'columnas' => array('cliente' => 'Código Cliente', 'nombre' => 'Nombre', 'contacto' => 'Contacto'), 'filtro' => array('cliente' => 'Código Cliente', 'nombre' => 'Nombre'), 'retornar' => array('cliente' => 'cod_cli'), 'titulo' => 'Buscar Cliente');
     $bsclid = $this->datasis->modbus($mSCLId);
     $this->rapyd->load("datafilter", "datagrid");
     $filter = new DataForm("ventas/cobrocli/index/process");
     $filter->cliente = new inputField("Cliente", "cod_cli");
     $filter->cliente->rule = "required";
     $filter->cliente->append($bsclid);
     $filter->cliente->size = 10;
     $filter->caja = new inputField("Caja", "caja");
     $filter->caja->rule = "required";
     $filter->caja->group = "Selecci&oacute;n de caja";
     $filter->caja->size = 4;
     /*$filter->clave= new inputField("Clave", "clave");
     		$filter->clave->rule = "required";
     		$filter->clave->group = "Selecci&oacute;n de caja";
     		$filter->clave->type  = "password";
     		$filter->clave->size  =4;*/
     $filter->submit("btnsubmit", "aceptar");
     $filter->build_form();
     if ($filter->on_success()) {
     }
     $data['content'] = $filter->output;
     $data['title'] = "<h1>Cobro a clientes</h1>";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:28,代码来源:cobrocli.php

示例6: index

 function index()
 {
     $this->rapyd->load('dataform', 'datagrid');
     $form = new DataForm("supermercado/cupones/index/process");
     $form->fecha = new dateonlyField("Fecha", "fecha", 'd/m/Y');
     $form->fecha->insertValue = date("Y-m-d");
     $form->fecha->size = 11;
     $form->fecha->rule = "required";
     $form->fecha->maxlength = 11;
     $form->fecha->rule = "trim";
     /*$form->monto= new inputField("Monto por cupon", "monto");
     		$form->monto->size = 15;
     		$form->monto->rule = "required"; 
       		$form->monto->insertValue = $this->datasis->traevalor('FMAYCUPON');
     		*/
     $form->caja = new dropdownField("Caja", "ipcaj");
     $form->caja->rule = "required";
     $form->caja->options("SELECT caja AS value, caja FROM caja ORDER BY caja");
     $form->submit("reset", "Resetear");
     $form->submit("btnsubmit", "Buscar");
     $form->build_form();
     $ggri = '';
     if ($form->on_success()) {
         $mSQL = "SELECT caja,cliente, gtotal,numero FROM viefac WHERE fecha={$form->fecha->newValue} AND caja='{$form->caja->newValue}'";
         //echo $mSQL;
         $query = $this->db->query($mSQL);
         $cupones = 0;
         $facturas = array();
         if ($query->num_rows() > 0) {
             foreach ($query->result() as $row) {
                 if (array_key_exists($row->numero, $facturas)) {
                     $facturas[$row->numero] += $row->gtotal;
                 } else {
                     $facturas[$row->numero] = $row->gtotal;
                 }
                 /*$pivocli='';
                 		$monto=0;
                 		foreach ($query->result() as $row){
                 			if ($pivocli!=$row->cliente){
                 				$cupones+=floor($monto/$form->monto->newValue);
                 				$pivocli=$row->cliente;
                 				$monto=0;
                 			}
                 			$monto+=$row->gtotal;
                 			
                 		}*/
             }
         }
         $monto = $this->datasis->traevalor('FMAYCUPON');
         foreach ($facturas as $key => $value) {
             $cupones += round($facturas[$key] / $monto, 0);
         }
         $ggri = "Fueron entregados <b>{$cupones}</b> cupones";
     }
     $data['content'] = $form->output . $ggri;
     $data['title'] = "<h1>Tikes repartidos</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,代码行数:59,代码来源:cupones.php

示例7: filteredgrid

 function filteredgrid()
 {
     $this->rapyd->load('dataform', 'datagrid');
     $this->load->library('encrypt');
     $filter = new DataForm('ejecutasql/filteredgrid/process');
     $filter->sql = new textareaField('', 'sql');
     $filter->sql->cols = 90;
     $filter->sql->rows = 9;
     $filter->sql->rule = 'required';
     $filter->submit('btnsubmit', 'Ejecutar');
     $filter->build_form();
     $salida = '';
     if ($filter->on_success()) {
         $data = array();
         $mSQL = $filter->sql->value;
         $link = @mysql_connect($this->db->hostname, $this->db->username, $this->db->password) or die('Error de coneccion');
         mysql_select_db($this->db->database, $link) or die('Base de datos no seleccionable');
         $result = mysql_query($mSQL, $link);
         if (!$result) {
             $salida = mysql_errno($link) . ": " . mysql_error($link);
         } else {
             if (is_resource($result)) {
                 $num_rows = mysql_num_rows($result);
                 $afectados = 0;
             } elseif (is_bool($result)) {
                 $num_rows = 0;
                 $afectados = mysql_affected_rows();
             } else {
                 $num_rows = 0;
                 $afectados = 0;
             }
             if ($num_rows > 0) {
                 $colunas = mysql_num_fields($result);
                 while ($row = mysql_fetch_assoc($result)) {
                     $data[] = $row;
                 }
                 $grid = new DataGrid("Filas : {$num_rows}, Columnas : {$colunas} ,Afectados :{$afectados}", $data);
                 $grid->per_page = 100000;
                 foreach ($data[0] as $campos => $value) {
                     $grid->column($campos, $campos);
                 }
                 $grid->build();
                 $salida = $grid->output;
                 if (stristr($mSQL, 'SELECT')) {
                     $mSQL2 = $this->encrypt->encode($mSQL);
                     $salida .= "<form action='/../../proteoerp/xlsauto/repoauto2/'; method='post'>\n \t\t\t\t\t\t<input size='100' type='hidden' name='mSQL' value='{$mSQL2}'>\n \t\t\t\t\t\t<input type='submit' value='Descargar a Excel' name='boton'/>\n \t\t\t\t\t\t</form>";
                 }
             } elseif ($afectados > 0) {
                 $salida = "Filas afectadas {$afectados}";
             } else {
                 $salida = 'Esta consulta no genero resultados';
             }
         }
     }
     $data['content'] = $filter->output . $salida;
     $data['title'] = heading('Consulta SQL');
     $data['head'] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:59,代码来源:ejecutasql.php

示例8: sel

    function sel()
    {
        $this->rapyd->load("dataform");
        //echo $this->flongpres;
        //$script='
        //$(function() {
        //
        //		$("#codigoadm").change(function(){
        //			$.post("'.site_url('presupuesto/presupsoli/get_tipo').'",{ codigoadm:$("#codigoadm").val() },function(data){$("#tipo").html(data);})
        //		});
        //
        //		$("#tipo").change(function(){
        //			$.post("'.site_url('presupuesto/presupsoli/get_estrupres').'",{ tipo:$("#tipo").val(),codigoadm:$("#codigoadm").val() },function(data){$("#codigopres").html(data);})
        //		});
        //
        //});
        //';
        $script = '
		$(function() {

				$("#codigoadm").change(function(){
					$.post("' . site_url('presupuesto/presusol/get_tipo') . '",{ codigoadm:$("#codigoadm").val() },function(data){$("#tipo").html(data);})
				});

				$("#tipo").change(function(){
					$.post("' . site_url('presupuesto/presusol/get_estrupres') . '",{ codigoadm:$("#codigoadm").val(),tipo:$("#tipo").val() },function(data){$("#codigopres").html(data);})
				});
				
		});
		';
        $flong = $this->flongpres;
        $rlong = $this->flongadm;
        $filter = new DataForm("presupuesto/presupsoli/sel/process");
        $filter->script($script);
        $filter->codigoadm = new dropdownField("Estructura Administrativa", "codigoadm");
        $filter->codigoadm->option("", "Seleccione");
        $filter->codigoadm->rule = 'required';
        $filter->codigoadm->options("SELECT b.codigo, CONCAT_WS(' ',b.codigo,b.denominacion) AS val FROM presusol AS a JOIN estruadm AS b ON a.codigoadm=b.codigo  GROUP BY b.codigo");
        $filter->tipo = new dropdownField('Origen de fondos', 'tipo');
        $filter->tipo->option("", "Seleccione una Estructura Administrativa");
        $filter->tipo->rule = 'required';
        $filter->codigopres = new dropdownField("Presupuesto", "codigopres");
        $filter->codigopres->option("", "Seleccione un presupuesto");
        $filter->submit("btnsubmit", "Buscar");
        $filter->build_form();
        if ($filter->on_success()) {
            $ttipo = $filter->tipo->newValue;
            $codamd = $filter->codigoadm->newValue;
            $codpre = $filter->codigopres->newValue;
            redirect("presupuesto/presupsoli/asignar/{$ttipo}/{$codamd}/{$codpre}");
        }
        $data['content'] = $filter->output;
        $data['title'] = "Presupuesto Estimado";
        $data["head"] = script("jquery.js") . $this->rapyd->get_head();
        $this->load->view('view_ventanas', $data);
    }
开发者ID:enderochoa,项目名称:tortuga,代码行数:56,代码来源:presupsoli.php

示例9: index

 function index()
 {
     $this->rapyd->load('datatable', 'dataform');
     $form = new DataForm('supermercado/cargahisto/index/process');
     $form->title('Este modulo permite cargar manual las ventas sacadas de los historicos de las cajas');
     $form->fecha = new dateonlyField('Fecha', 'fecha', 'd/m/Y');
     $form->fecha->db_format = 'Ymd';
     $form->fecha->insertValue = date('Y-m-d');
     $form->fecha->size = 11;
     $form->fecha->autocomplete = false;
     $form->fecha->rule = 'required|chfecha';
     $form->hf = new uploadField('Facturas (<b>hf</b>YYYYMMCCCAAA.dbf)', 'hf');
     $form->hf->upload_path = 'tmp';
     $form->hf->upload_root = '/';
     $form->hf->rule = 'required';
     $form->hf->allowed_types = 'csv|dbf';
     $form->hi = new uploadField('Art&iacute;culos (<b>hi</b>YYYYMMCCCAAA.dbf)', 'hi');
     $form->hi->upload_path = 'tmp';
     $form->hi->upload_root = '/';
     $form->hi->rule = 'required';
     $form->hi->allowed_types = 'csv|dbf';
     $form->hs = new uploadField('Pagos (<b>hs</b>YYYYMMCCCAAA.dbf)', 'hs');
     $form->hs->upload_path = 'tmp';
     $form->hs->upload_root = '/';
     $form->hs->rule = 'required';
     $form->hs->allowed_types = 'csv|dbf';
     $form->submit('btnsubmit', 'Procesar');
     $form->build_form();
     if ($form->on_success()) {
         $fecha = $form->fecha->newValue;
         $encab = false;
         if (!empty($form->hf->upload_data['full_path'])) {
             if (substr($form->hf->upload_data['file_name'], 0, 2) == 'hf') {
                 $encab = true;
                 $this->_cargadbf($form->hf->upload_data['full_path'], $fecha);
                 unlink($form->hf->upload_data['full_path']);
             } else {
                 $form->error = 'Encabezado primero';
                 $form->build_form();
             }
         }
         if (!empty($form->hi->upload_data['full_path']) && $encab) {
             $this->_cargadbf($form->hi->upload_data['full_path'], $fecha);
             unlink($form->hi->upload_data['full_path']);
         }
         if (!empty($form->hs->upload_data['full_path']) && $encab) {
             $this->_cargadbf($form->hs->upload_data['full_path'], $fecha);
             unlink($form->hs->upload_data['full_path']);
         }
     }
     $data['content'] = $form->output;
     $data['title'] = heading('Cargar ventas de los hist&oacute;ricos de cajas');
     $data['script'] = script('jquery-1.2.6.js');
     $data['head'] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:56,代码来源:cargahisto.php

示例10: index

    function index()
    {
        $this->rapyd->load('dataform');
        $lscst = site_url('compras/scst/autocomplete/control');
        $script = '
		function formato(row) {
			return row[0]+" "+row[1]+" "+row[3];
		}

		$(function() {
			$("#control").autocomplete("' . $lscst . '",{
				delay:10,
				//minChars:2,
				matchSubset:1,
				matchContains:1,
				cacheLength:10,
				formatItem:formato,
				width:450,
				autoFill:true
				}
			);
		});';
        $form = new DataForm($this->url . 'index/process');
        $form->title('Pasar precios a cajas');
        $form->script($script);
        $form->control = new inputField('Control de compra', 'control');
        $form->control->rule = 'required|callback_chcontrol';
        $form->control->size = 12;
        $form->control->maxlength = 10;
        $form->control->append('Dejar vacio para enviar un masivo');
        $form->submit("btnsubmit", "Pasar precios a caja");
        $form->build_form();
        $error = '';
        if ($form->on_success()) {
            $control = $form->control->newValue;
            $usr = $this->session->userdata('usuario');
            $join = '';
            if (strlen($control > 0)) {
                $join = 'JOIN `itscst` AS b ON a.codigo=b.codigo AND b.codigo=' . $this->db->escape($control);
            }
            $mSQL = "INSERT INTO `enviapos` (codigo,numero,precio1,fecha,hora,usuario)\n\t\t\t\t  SELECT a.codigo,'INVENTAR',a.precio1,CURDATE(),CURTIME(),'{$usr}' FROM `maes` AS a {$join}";
            $ban = $this->db->simple_query($mSQL);
            if (!$ban) {
                $error .= "Hubo problemas al pasar los precios, comuniquese con servicio t&eacute;cnico";
                memowrite($mSQL, 'ENVIACAJA');
            } else {
                logusu('ENVIACAJA', "Fue enviado una actualizacion de precios");
            }
        }
        $data['content'] = "<div class='alert'>{$error}</div>";
        $data['content'] .= $form->output;
        $data['title'] = '<h1>Env&iacute;o de precios para las cajas</h1>';
        $data["head"] = script('jquery.pack.js') . script('plugins/jquery.autocomplete.js') . style('jquery.autocomplete.css') . $this->rapyd->get_head();
        $this->load->view('view_ventanas', $data);
    }
开发者ID:codethics,项目名称:proteoerp,代码行数:55,代码来源:enviacaja.php

示例11: index

 function index()
 {
     $this->rapyd->load('dataform');
     $this->rapyd->load('datagrid2');
     $this->load->library('encrypt');
     function dif($a, $b)
     {
         return number_format($a - $b, 2, ',', '.');
     }
     $form = new DataForm('supermercado/conciliacion/index/process');
     $form->fechad = new dateonlyField('Desde', 'fechad', 'd/m/Y');
     $form->fechad->insertValue = date('Y-m-d', mktime(0, 0, 0, date("m"), date("d") - 30, date("Y")));
     $form->fechad->rule = 'required';
     $form->fechah = new dateonlyField('Hasta', 'fechah', 'd/m/Y');
     $form->fechah->insertValue = date('Y-m-d');
     $form->fechah->rule = 'required';
     $form->submit('btnsubmit', 'Buscar');
     $form->build_form();
     $tabla = '';
     if ($form->on_success()) {
         $fechad = $form->fechad->newValue;
         $fechah = $form->fechah->newValue;
         //$mSQL="SELECT 'PV' ,caja,SUM(gtotal*IF(MID(numero,1,2)='NC',-1,1)) FROM viefac WHERE fecha BETWEEN '$fechad' AND '$fechah' GROUP BY caja UNION
         //SELECT 'PV' ,'MAYO',SUM(gtotal*IF(tipo='D',-1,1)) FROM fmay WHERE fecha BETWEEN '$fechad' AND '$fechah' UNION
         //SELECT 'CZ' ,caja,SUM(exento+base+iva+base1+iva1+base2+iva2-ncexento-ncbase-nciva-ncbase1-nciva1-ncbase2-nciva2) FROM fiscalz WHERE fecha BETWEEN '$fechad' AND '$fechah' GROUP BY caja";
         $mSQL = "SELECT a.fecha, a.caja, sum(a.gtotal*if(MID(a.numero,1,2)='NC',-1,1)) AS factura,\n\t\t\t(SELECT sum(exento+base+iva-ncexento-ncbase-nciva) venta FROM fiscalz c WHERE c.fecha=a.fecha AND c.caja=a.caja ) AS  cierrez,\n\t\t\t(SELECT sum(exento+base+iva-ncexento-ncbase-nciva) venta FROM fiscalz c WHERE c.fecha=a.fecha AND c.caja=a.caja )-\n\t\t\tsum(a.gtotal*if(MID(a.numero,1,2)='NC',-1,1)) AS dife\n\t\t\tFROM viefac a\n\t\t\tWHERE a.fecha BETWEEN '{$fechad}' AND '{$fechah}' GROUP BY a.fecha, a.caja ORDER BY a.caja,a.fecha";
         $grid = new DataGrid2('Res&uacute;men');
         $grid->db->_escape_char = '';
         $grid->db->_protect_identifiers = false;
         //$grid->per_page = 20;
         $grid->use_function('dif');
         $select = array('a.fecha', 'b.caja', '(SELECT sum(exento+base+iva+base1+iva1+base2+iva2-ncexento-ncbase-nciva-ncbase1-nciva1-ncbase2-nciva2) FROM fiscalz c WHERE c.fecha=a.fecha AND c.caja=b.caja) AS cierrez', '(SELECT sum(d.gtotal) FROM viefac AS d WHERE  d.fecha=a.fecha AND d.caja=b.caja) AS factura');
         $grid->db->select($select);
         $grid->db->from('tiempo AS a');
         $grid->db->join("caja AS b", "a.fecha BETWEEN '{$fechad}' AND '{$fechah}'");
         $grid->db->orderby("caja,fecha");
         $grid->db->having("cierrez IS NOT null OR factura IS NOT null");
         $grid->column("Fecha", "<dbdate_to_human><#fecha#></dbdate_to_human>", "align='center'");
         $grid->column("Caja", "caja", 'align=center');
         $grid->column("Factura", "<nformat><#factura#></nformat>", 'align=right');
         $grid->column("Cierre Z", "<nformat><#cierrez#></nformat>", 'align=right');
         $grid->column("Diferencia", "<dif><#factura#>|<#cierrez#></dif>", 'align=right');
         $grid->totalizar('factura', 'cierrez');
         $grid->build();
         //echo $grid->db->last_query();
         $tabla = $grid->output;
     }
     $reporte = anchor('reportes/ver/CONCILIACI', 'Imprimir');
     $data['content'] = $form->output . $reporte . $tabla;
     $data["head"] = script("jquery.pack.js") . script("plugins/jquery.numeric.pack.js") . script("plugins/jquery.floatnumber.js") . $this->rapyd->get_head();
     $data['title'] = heading('Concialiaciones de Cierre Z');
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:53,代码来源:conciliacion.php

示例12: repoauto

 function repoauto()
 {
     exit("hello");
     $this->load->library("XLSReporte");
     $this->rapyd->load("dataform", "datagrid");
     $filter = new DataForm("xlsauto2/repoauto/process");
     $filter->sql = new textareaField("Consulta SQL", "sql");
     $filter->sql->cols = 80;
     $filter->sql->rows = 6;
     $filter->sql->rule = "required";
     $filter->submit("btnsubmit", "Ejecutar");
     $filter->build_form();
     $salida = '';
     if ($filter->on_success()) {
         $data = array();
         $mSQL = $filter->sql->value;
         $link = @mysql_connect($this->db->hostname, $this->db->username, $this->db->password) or die('Error de coneccion');
         mysql_select_db($this->db->database, $link) or die('Base de datos no seleccionable');
         $result = mysql_query($mSQL, $link);
         if (!$result) {
             $salida = mysql_errno($link) . ": " . mysql_error($link);
         } else {
             if (preg_match('/[Ss][Ee][Ll][Ee][Cc][Tt]/', $mSQL) > 0) {
                 $num_rows = mysql_num_rows($result);
             } else {
                 $num_rows = 0;
             }
             if ($num_rows > 0) {
                 $colunas = mysql_num_fields($result);
                 while ($row = mysql_fetch_assoc($result)) {
                     $data[] = $row;
                 }
                 $xls = new XLSReporte($mSQL);
                 $xls->setTitulo("TARJETA");
                 $xls->setSubTitulo("Sub Titulo de Tarjeta");
                 $xls->setSobreTabla("Este es el titulo d la tabla");
                 $xls->setHeadValores('TITULO1');
                 $xls->setSubHeadValores('TITULO2', 'TITULO3');
                 foreach ($data[0] as $campos => $value) {
                     $xls->AddCol($campos, $campos);
                 }
                 $xls->Table();
                 $xls->Output();
             } else {
                 $salida = "Su consulta no arrojo algun resultado";
             }
         }
     }
     $data['content'] = $filter->output . $salida;
     $data['title'] = "<h1>Consulta SQL que muestra los resultados en extencion \".xls\"</h1>";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
开发者ID:enderochoa,项目名称:tortuga,代码行数:53,代码来源:xlsauto2.php

示例13: sel

 function sel()
 {
     $this->rapyd->load("dataform");
     $mBANC = array('tabla' => 'banc', 'columnas' => array('codbanc' => 'C&oacute;odigo', 'banco' => 'Banco', 'saldo' => 'Saldo'), 'filtro' => array('codbanc' => 'C&oacute;odigo', 'banco' => 'Banco', 'saldo' => 'Saldo'), 'retornar' => array('codbanc' => 'codbanc'), 'titulo' => 'Buscar Bancos');
     $bBANC = $this->datasis->p_modbus($mBANC, "mbanc");
     $filter = new DataForm($this->url . "sel/process");
     $filter->fechad = new dateonlyField("Desde", "fechad", 'd/m/Y');
     $filter->fechad->clause = "where";
     $filter->fechad->db_name = "fecha";
     $filter->fechad->operator = ">=";
     $filter->fechad->insertValue = date("Ymd", mktime(0, 0, 0, date("m"), date("d") - 30, date("Y")));
     $filter->fechad->group = "Fecha";
     //$filter->fechad->dbformat='Y-m-d';
     $filter->fechah = new dateonlyField("Hasta", "fechah", 'd/m/Y');
     $filter->fechah->clause = "where";
     $filter->fechah->insertValue = date("Ymd");
     $filter->fechah->db_name = "fecha";
     $filter->fechah->operator = "<=";
     $filter->fechah->group = "Fecha";
     //$filter->fechaH->dbformat='Y-m-d';
     $filter->codbanc = new inputField("Banco", 'codbanc');
     $filter->codbanc->db_name = 'codbanc';
     $filter->codbanc->rule = 'required';
     $filter->codbanc->size = 5;
     $filter->codbanc->clause = "where";
     $filter->codbanc->operator = "=";
     $filter->codbanc->append($bBANC);
     $filter->codbanc->clause = "where";
     $filter->codbanc->operator = "=";
     $filter->concilia = new dropDownField("", 'concilia');
     $filter->concilia->option("", "");
     $filter->concilia->option("S", "Conciliado");
     $filter->concilia->option("N", "Sin Conciliar");
     $filter->concilia->db_name = 'concilia';
     $filter->concilia->size = 3;
     $filter->submit("btnsubmit", "Buscar");
     $filter->build_form();
     if ($filter->on_success()) {
         $fechad = $filter->fechad->newValue;
         $fechah = $filter->fechah->newValue;
         $codbanc = $filter->codbanc->newValue;
         $concilia = $filter->concilia->newValue;
         redirect($this->url . "asignar/{$fechad}/{$fechah}/{$codbanc}/{$concilia}");
     }
     $data['content'] = $filter->output;
     $data['title'] = "Conciliaci&oacute;n";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
开发者ID:enderochoa,项目名称:tortuga,代码行数:49,代码来源:concilia.php

示例14: uig

 function uig()
 {
     $this->rapyd->load('dataform');
     $this->datasis->modulo_id('91D', 1);
     $sucu = $this->db->escape($this->sucu);
     $form = new DataForm('sincro/exportar/uig/process');
     $form->qtrae = new dropdownField('Que exportar?', 'qtrae');
     $form->qtrae->rule = 'required';
     $form->qtrae->option('', 'Selecionar');
     $form->qtrae->option('scli', 'Clientes');
     $form->qtrae->option('sprv', 'Proveedores');
     $form->qtrae->option('sinv', 'Inventario');
     $form->qtrae->option('sinvprec', 'Inventario solo precios');
     $form->qtrae->option('maes', 'Inventario Supermercado');
     $form->qtrae->option('smov', 'Movimientos de clientes');
     $form->qtrae->option('transacciones', 'Facturas y transferencias');
     $form->qtrae->option('supertransa', 'Ventas Supermercado');
     $form->qtrae->option('rcaj', 'Cierres de cajas');
     $form->qtrae->option('fiscalz', 'Cierres Z');
     $form->qtrae->option('sfacfis', 'Auditoria Fiscal');
     $form->fecha = new dateonlyField('Fecha', 'fecha');
     $form->fecha->insertValue = date('Y-m-d');
     $form->fecha->rule = 'required|chfecha';
     $form->fecha->size = 12;
     $form->submit('btnsubmit', 'Descargar');
     $form->build_form();
     $exito = '';
     if ($form->on_success()) {
         $fecha = $form->fecha->newValue;
         $obj = '_' . str_replace('_', '', $form->qtrae->newValue);
         if (method_exists($this, $obj)) {
             $rt = $this->{$obj}($fecha);
         } else {
             $rt = 'Metodo no definido (' . $form->qtrae->newValue . ')';
         }
         if (strlen($rt) > 0) {
             $form->error_string = $rt;
             $form->build_form();
         } else {
             $exito = 'Transferencia &Eacute;xitosa';
         }
     }
     $data['content'] = $form->output . $exito;
     $data['title'] = '<h1>Exportar data de Sucursal</h1>';
     $data['script'] = '';
     $data['head'] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:48,代码来源:exportar.php

示例15: margenes

 function margenes()
 {
     $this->rapyd->load("dataedit", "dataform");
     $script = '
             <script language="javascript" type="text/javascript">
             $(function(){
                     $(".inputnum").numeric(".");
             });
             </script>
             ';
     $form = new DataForm("inventario/margenes_sinv/margenes/modifica");
     $form->margen1 = new inputField2("Magen1", "margen1");
     $form->margen1->size = 10;
     $form->margen1->maxlength = 8;
     $form->margen1->css_class = 'inputnum';
     $form->margen1->rule = 'required|callback_chporcent';
     $form->margen2 = new inputField2("Magen2", "margen2");
     $form->margen2->size = 10;
     $form->margen2->maxlength = 8;
     $form->margen2->css_class = 'inputnum';
     $form->margen2->rule = 'required|callback_chporcent';
     $form->margen3 = new inputField2("Magen3", "margen3");
     $form->margen3->size = 10;
     $form->margen3->maxlength = 8;
     $form->margen3->css_class = 'inputnum';
     $form->margen3->rule = 'required|callback_chporcent';
     $form->margen4 = new inputField2("Magen4", "margen4");
     $form->margen4->size = 10;
     $form->margen4->maxlength = 8;
     $form->margen4->css_class = 'inputnum';
     $form->margen4->rule = 'required|callback_chporcent';
     $form->submit("btnsubmit", "MODIFICAR");
     $form->build_form();
     if ($form->on_success()) {
         set_time_limit(600);
         $margen1 = $_POST['margen1'];
         $margen2 = $_POST['margen2'];
         $margen3 = $_POST['margen3'];
         $margen4 = $_POST['margen4'];
         redirect("inventario/margenes_sinv/modifica/{$margen1}/{$margen2}/{$margen3}/{$margen4}");
         //$this->procesa();
     }
     $data['content'] = $form->output;
     $data['head'] = script('jquery.js') . script('jquery-ui.js') . script("plugins/jquery.numeric.pack.js") . script('plugins/jquery.meiomask.js') . style('vino/jquery-ui.css') . $this->rapyd->get_head() . $script;
     $data['title'] = '<h1>Cambiar Margenes</h1>';
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:47,代码来源:margenes_sinv.php


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