本文整理汇总了PHP中DataGrid::button方法的典型用法代码示例。如果您正苦于以下问题:PHP DataGrid::button方法的具体用法?PHP DataGrid::button怎么用?PHP DataGrid::button使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataGrid
的用法示例。
在下文中一共展示了DataGrid::button方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: detalle
function detalle()
{
$this->rapyd->load("datagrid", "dataform");
$modulo = $this->uri->segment(4) ? $this->uri->segment(4) : $this->input->post('modulo');
if (!$modulo) {
redirect('/contabilidad/reglas');
}
$form = new DataForm('contabilidad/reglas/ejecutar');
$form->title('Fecha para la ejecución');
$form->fecha = new dateonlyField("Fecha", "fecha", "d/m/Y");
$form->fecha->size = 10;
$form->fecha->insertValue = $this->input->post('fecha') ? $this->input->post('fecha') : date("Ymd");
$form->fecha->append("<input type='hidden' name='modulo' value='{$modulo}' id='modulo'>");
$form->submit = new submitField("Ejecutar", "btn_submit");
$form->submit->in = 'fecha';
$form->build_form();
$link = anchor('/contabilidad/reglas/dataedit/<#modulo#>/show/<#modulo#>/<#regla#>', 'Ver regla');
$link2 = anchor('/contabilidad/reglas/duplicar/<#modulo#>/<#regla#>', 'Duplicar');
$action = "javascript:window.location='" . site_url('contabilidad/reglas') . "'";
$grid = new DataGrid();
$grid->add("contabilidad/reglas/dataedit/{$modulo}/create", 'Agregar Regla');
$grid->button('cancelar', RAPYD_BUTTON_BACK, $action);
$grid->db->select('modulo, regla, tabla, descripcion,condicion');
$grid->db->from('`reglascont`');
$grid->db->where('modulo', $modulo);
$grid->db->orderby('modulo,tabla,regla');
$grid->column("Modulo", "modulo");
$grid->column("Regla", "regla");
$grid->column("Tabla", "tabla");
$grid->column("Descripcion", "descripcion");
//$grid->column("Condicion", "condicion");
$grid->column('', $link, 'align="center"');
$grid->column('', $link2, 'align="center"');
$grid->build();
$data['content'] = $form->output . $grid->output;
$data["head"] = $this->rapyd->get_head();
$data['title'] = "Detalle de regla {$modulo}";
$this->load->view('view_ventanas', $data);
}
示例2: filteredgrid
function filteredgrid()
{
$this->rapyd->load("datafilter2", "datagrid");
//$this->rapyd->uri->keep_persistence();
$mSPRV = array('tabla' => 'sprv', 'columnas' => array('proveed' => 'Cóodigo', 'nombre' => 'Nombre', 'contacto' => 'Contacto'), 'filtro' => array('proveed' => 'Código', 'nombre' => 'Nombre'), 'retornar' => array('proveed' => 'cod_prov'), 'titulo' => 'Buscar Beneficiario');
$bSPRV = $this->datasis->p_modbus($mSPRV, "proveed");
$filter = new DataFilter2("");
$filter->db->select(array("b.ocompra", "a.reverso", "b.codigoadm", "b.fondo", "b.partida", "b.ordinal", "a.numero", "a.fecha", "a.tipo", "a.compra", "a.uejecutora", "a.estadmin", "a.fondo", "a.cod_prov", "a.nombre", "a.beneficiario", "a.pago", "a.total2", "a.status", "MID(a.observa,1,50) observa", "c.nombre nombre2"));
$filter->db->from("odirect a");
$filter->db->join("itodirect b", "a.numero=b.numero", "LEFT");
$filter->db->join("sprv c", "c.proveed =a.cod_prov", "LEFT");
$filter->db->groupby("a.numero");
$filter->numero = new inputField("Número", "numero");
$filter->numero->size = 12;
//$filter->numero->clause="likerigth";
$filter->numero->db_name = 'a.numero';
$filter->ocompra = new inputField("Compromiso Ref", "ocompra");
$filter->ocompra->size = 12;
$filter->ocompra->db_name = 'b.ocompra';
$filter->tipo = new dropdownField("Orden de ", "a.tipo");
$filter->tipo->option("", "");
$filter->tipo->option("Compra", "Compra");
$filter->tipo->option("Servicio", "Servicio");
$filter->tipo->style = "width:100px;";
$filter->tipo->db_name = 'a.tipo';
$filter->fecha = new dateonlyField("Fecha", "fecha");
$filter->fecha->size = 12;
$filter->fecha->db_name = 'a.fecha';
$filter->fecha->dbformat = 'Y-m-d';
$filter->cod_prov = new inputField("Beneficiario", 'cod_prov');
$filter->cod_prov->size = 6;
$filter->cod_prov->append($bSPRV);
$filter->cod_prov->db_name = 'a.cod_prov';
$filter->cod_prov->clause = 'where';
$filter->cod_prov->operator = '=';
$filter->codigo = new inputField("Codigo Presupuestario", "codigo");
$filter->codigo->db_name = 'CONCAT(b.codigoadm,".",b.partida)';
$filter->fondo = new dropdownField("Fondo", "fondo");
$filter->fondo->option("", "");
$filter->fondo->options("SELECT fondo,CONCAT_WS(' ',fondo,descrip)a FROM fondo");
$filter->fondo->db_name = 'b.fondo';
$filter->observa = new inputField("Observacion", "observa");
$filter->observa->size = 20;
$filter->observa->db_name = 'a.observa';
$filter->total2 = new inputField("Monto", "total2");
$filter->total2->size = 20;
$filter->tipo = new dropdownField("Tipo O.P.", "tipo");
$filter->tipo->option("", "");
$filter->tipo->option("M", "O.P Sin Imputacion");
$filter->tipo->option("C", "O.P General");
$filter->tipo->option("B", "O.P Directo");
$filter->tipo->option("K", "O.P Nomina");
$filter->tipo->style = "width:150px";
$filter->tipo->db_name = 'MID(a.status,1,1)';
$filter->status = new dropdownField("Estado", "status");
$filter->status->option("", "");
$filter->status->option("2", "Causado");
$filter->status->option("1", "Por Causar");
$filter->status->option("3", "Pagado");
$filter->status->option("A", "Anulado");
$filter->status->style = "width:150px";
$filter->status->db_name = 'MID(a.status,2,1)';
$filter->buttons("reset", "search");
$filter->build();
$uri = anchor($this->url . 'dataedit/show/<#numero#>', '<#numero#>');
$uri_2 = anchor($this->url . 'dataedit/create/<#numero#>', 'Duplicar');
function sta($status)
{
switch (substr($status, 1, 1)) {
case "1":
return "Por Causar";
break;
case "2":
return "Causado";
break;
case "3":
return "Pagado";
break;
case "A":
return "Anulado";
break;
}
}
function tipo($tipo)
{
switch ($tipo) {
case "C":
return "Contrato";
break;
case "T":
return "Transferencia";
break;
case "N":
return "Nómina";
break;
}
}
function select_url($status, $numero)
{
$atts2 = array('width' => '1024', 'height' => '768', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0');
//.........这里部分代码省略.........
示例3: cierregserchi
function cierregserchi()
{
$this->rapyd->load('datafilter', 'datagrid');
$this->rapyd->uri->keep_persistence();
$uri = anchor('finanzas/gser/gserchipros/<#codbanc#>', '<#codbanc#>');
$grid = new DataGrid('');
$select = array('MAX(fechafac) AS fdesde', 'MIN(fechafac) AS fhasta', 'SUM(tasa+sobretasa+reducida) AS totiva', 'SUM(montasa+monadic+monredu+tasa+sobretasa+reducida+exento) AS total', 'TRIM(codbanc) AS codbanc', 'COUNT(*) AS cana');
$grid->db->select($select);
$grid->db->from('gserchi');
$grid->db->where('ngasto IS NULL');
$grid->db->where('aceptado', 'S');
$grid->db->groupby('codbanc');
$grid->order_by('codbanc', 'desc');
$grid->per_page = 15;
$grid->column_orderby('Caja', $uri, 'codbanc');
$grid->column('N.facturas', 'cana', 'align=\'center\'');
$grid->column_orderby('Fecha inicial', '<dbdate_to_human><#fdesde#></dbdate_to_human>', 'fdesde', 'align=\'center\'');
$grid->column_orderby('Fecha final', '<dbdate_to_human><#fhasta#></dbdate_to_human>', 'fdesde', 'align=\'center\'');
$grid->column_orderby('IVA', '<nformat><#totiva#></nformat>', 'totiva', 'align=\'right\'');
$grid->column_orderby('Monto', '<nformat><#total#></nformat>', 'total', 'align=\'right\'');
$action = "javascript:window.location='" . site_url('finanzas/gser/agregar') . "'";
$grid->button('btn_regresa', 'Regresar', $action, 'TR');
$grid->build();
//echo $grid->db->last_query();
$data['content'] = $grid->output;
$data['head'] = $this->rapyd->get_head();
$data['title'] = heading('Cajas pendientes por cerrar');
$this->load->view('view_ventanas', $data);
}
示例4: detitfact
function detitfact()
{
$this->rapyd->load('datagrid');
$caja = $this->uri->segment(4);
$cajero = $this->uri->segment(5);
$fecha = $this->uri->segment(6);
$menvia = site_url("supermercado/poscuadre/concaja/{$caja}/{$cajero}/{$fecha}");
$grid = new DataGrid('Ventas por artículos');
$grid->per_page = 20;
$select = array('codigo', 'descrip', 'SUM(cantidad) cantidad', 'SUM(monto) monto', 'SUM(impuesto) impuesto', 'referen');
$grid->db->select($select);
$grid->db->from('positfact');
$grid->db->where('fecha', $fecha);
$grid->db->where('cajero', $cajero);
$grid->db->where('caja', $caja);
$grid->db->groupby('codigo');
$grid->column('Código', 'codigo');
$grid->column('Descripción', 'descrip');
$grid->column('Cantidad', 'cantidad', 'align="right"');
$grid->column('Monto', '<nformat><#monto#></nformat>', 'align="right"');
$grid->column('Referencia', 'referen');
$grid->button('btn_reg', 'Regresar', "javascript:window.location='" . site_url("supermercado/poscuadre/concaja/{$caja}/{$cajero}/{$fecha}") . "'", 'TR');
$grid->build();
if ($grid->recordCount > 0) {
$data['content'] = $grid->output;
} else {
$data['content'] = '<p class="mainheader">No se encontrarón resultados.</p>';
$data['content'] .= "<a href='{$menvia}'>Regresar</a>";
}
$data['title'] = '<h1>Ventas por artículo ' . $cajero . ' caja ' . $caja . ' fecha ' . dbdate_to_human($fecha) . '</h1>';
$data['head'] = $this->rapyd->get_head();
$this->load->view('view_ventanas', $data);
}
示例5: detalle
function detalle()
{
$this->rapyd->load('datagrid', 'dataform');
$modulo = $this->uri->segment(4) ? $this->uri->segment(4) : $this->input->post('modulo');
if (!$modulo) {
redirect('/contabilidad/reglas');
}
$form = new DataForm('contabilidad/reglas/ejecutar');
$form->title('Fecha para la ejecución');
$form->fecha = new dateonlyField('Fecha', 'fecha', 'd/m/Y');
$form->fecha->size = 10;
$form->fecha->insertValue = $this->input->post('fecha') ? $this->input->post('fecha') : date('Ymd');
$form->fecha->append("<input type='hidden' name='modulo' value='{$modulo}' id='modulo'>");
$form->submit = new submitField('Ejecutar', 'btn_submit');
$form->submit->in = 'fecha';
$form->build_form();
function marca($encab, $val)
{
if ($encab == 'CASI') {
return '';
}
if (!empty($val)) {
if (is_numeric($val) && floatval($val) == 0) {
return '';
} else {
return '<div style="background:green"> - </div>';
}
}
return '';
}
$sel = array('modulo', 'descripcion', 'regla', 'tabla', 'debe', 'haber');
$link = anchor('/contabilidad/reglas/dataedit/<#modulo#>/show/<#modulo#>/<#regla#>', 'Ver regla');
$link2 = anchor('/contabilidad/reglas/duplicar/<#modulo#>/<#regla#>', 'Duplicar');
$action = "javascript:window.location='" . site_url('contabilidad/reglas') . "'";
$grid = new DataGrid();
$grid->use_function('marca');
$grid->add("contabilidad/reglas/dataedit/{$modulo}/create", 'Agregar Regla');
$grid->button('cancelar', RAPYD_BUTTON_BACK, $action);
$grid->db->select($sel);
$grid->db->from('`reglascont`');
$grid->db->where('modulo', $modulo);
$grid->db->orderby('modulo,tabla,regla');
$grid->column('Modulo', 'modulo');
$grid->column('Regla', 'regla');
$grid->column('Tabla', 'tabla');
$grid->column('Descripcion', 'descripcion');
$grid->column('Debe', '<marca><#tabla#>|<#debe#></marca>', 'align="center"');
$grid->column('Haber', '<marca><#tabla#>|<#haber#></marca>', 'align="center"');
$grid->column('', $link, 'align="center"');
$grid->column('', $link2, 'align="center"');
$grid->build();
$data['content'] = $form->output . $grid->output;
$data['head'] = $this->rapyd->get_head();
$data['title'] = "<h1>Detalle de regla {$modulo}</h1>";
$this->load->view('view_ventanas', $data);
}
示例6: agregar
function agregar()
{
$this->rapyd->load('datafilter', 'datagrid');
$atts = array('width' => '800', 'height' => '600', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0');
$recep = anchor('ventas/rcaj/forcierre/', 'Recepcion de Caja');
$data['content'] = '';
function iconcaja($cajero, $audi)
{
if (empty($audi)) {
return image('caja_abierta.gif', "Caja disponible");
} else {
return image('caja_precerrada.gif', "En auditoria");
}
}
$data['forma'] = '';
$urip = anchor('formatos/ver/RECAJA/<#numero#>', 'Descargar html');
$urih = anchor_popup('formatos/verhtml/RECAJA/<#numero#>', ' Ver cuadre pantalla', $atts);
$grid = new DataGrid('Lista de caja');
$grid->order_by('fecha', 'desc');
$grid->per_page = 15;
$grid = new DataGrid('Arqueo de cajas');
$select = array('a.codbanc AS cajero', 'a.banco AS nombre', 'a.saldo', 'b.id AS audi');
$grid->db->select($select);
$grid->db->from('banc AS a');
$grid->db->join('caudi AS b', 'a.codbanc=b.caja AND b.status=\'P\'', 'left');
$grid->db->where('a.tbanco', 'CAJ');
$grid->use_function('iconcaja');
$link = anchor('finanzas/caudi/auditoria/<#cajero#>', 'Arquear');
$grid->column('Caja', '<iconcaja><#cajero#>|<#audi#></iconcaja>');
$grid->column('Cajero', '<#cajero#>-<#nombre#>');
$grid->column('Saldo', '<nformat><#saldo#></nformat>', 'align=\'right\'');
$grid->column('Arqueo', $link);
//$grid->column('Ver html' ,"<siinulo><#numero#>|---|$urih</siinulo>",'align=\'center\'');
$action = 'javascript:window.location=\'' . site_url($this->url . '/filteredgrid') . '\'';
$grid->button('btn_reg', 'Regresar', $action, 'TR');
$grid->build();
//echo $grid->db->last_query();
$data['content'] .= $grid->output;
$data['title'] = '<h1>Recepción de cajas</h1>';
$data['head'] = $this->rapyd->get_head();
$this->load->view('view_ventanas', $data);
}
示例7: cmetas
function cmetas()
{
$this->rapyd->uri->keep_persistence();
$this->rapyd->load('datagrid', 'fields');
$error = $msj = '';
if ($this->input->post('pros') !== false) {
$pmargen = $this->input->post('pmargen');
if (is_array($pmargen)) {
$sum = array_sum($pmargen);
if (round($sum, 2) == 100.0) {
foreach ($pmargen as $id => $pm) {
if (is_numeric($pm) && $pm >= 0) {
$this->db->where('id', $id);
$this->db->update('vend', array('pmargen' => $pm));
} else {
$error .= 'Valor no numérico o negativo ' . $id;
}
}
} else {
$error .= 'La suma de los valores debe dar exactamente 100';
}
} else {
$error = 'No se puede procesar el requerimiento';
}
}
$ggrid = form_open('/ventas/metas/cmetas');
$grid = new DataGrid('Ajuste de distribución de la meta');
$grid->order_by('nombre');
$select = array('vendedor', 'nombre', 'pmargen', 'id');
$grid->db->select($select);
$grid->db->from('vend AS a');
$campo = new inputField('Campo', 'pmargen');
$campo->grid_name = 'pmargen[<#id#>]';
//$campo->pattern ='';
$campo->status = 'modify';
$campo->size = 6;
$campo->autocomplete = false;
$campo->css_class = 'inputnum';
$campo->disable_paste = true;
$grid->column_orderby('Vendedor', 'vendedor', 'vendedor');
$grid->column_orderby('Nombre', 'nombre', 'nombre');
$grid->column('Margen %', $campo, 'align=\'center\'');
$action = "javascript:window.location='" . site_url('ventas/metas/filteredgrid') . "'";
$grid->button('btn_regresa', 'Regresar', $action, 'TR');
$grid->submit('pros', 'Guardar', 'BR');
$grid->build();
$ggrid .= $grid->output;
$ggrid .= form_close();
$script = '<script language="javascript" type="text/javascript">
$(function(){
$(".inputnum").numeric(".");
$(\'input[name^="pmargen"]\').focus(function() {
obj = $(this);
vval = Number(obj.val());
tota=0;
$(\'input[name^="pmargen"]\').each(function (i) {
tota+=Number(this.value);
});
val=roundNumber(100-(tota-vval),2);
obj.val(val);
obj.select();
});
});
</script>';
$data['content'] = '<div class="alert">' . $error . '</div>';
$data['content'] .= '<div>' . $msj . '</div>';
$data['content'] .= $ggrid;
$data['title'] = heading('Cambio en las metas para vendedores');
$data['script'] = $script;
$data['script'] .= phpscript('nformat.js');
$data['head'] = $this->rapyd->get_head() . script('jquery.pack.js') . script('plugins/jquery.numeric.pack.js') . script('plugins/jquery.floatnumber.js');
$data['head'] .= style('estilos.css');
$data['head'] .= phpscript('nformat.js');
$this->load->view('view_ventanas', $data);
}
示例8: filteredgrid
function filteredgrid()
{
$this->rapyd->load('datafilter', 'datagrid');
$mBANC = array('tabla' => 'banc', 'columnas' => array('codbanc' => 'Cóodigo', 'banco' => 'Banco', 'numcuent' => 'Cuenta', 'saldo' => 'Saldo'), 'filtro' => array('codbanc' => 'Cóodigo', 'banco' => 'Banco', 'numcuent' => 'Cuenta'), 'retornar' => array('codbanc' => 'codbanc'), 'where' => 'activo = "S"', 'titulo' => 'Buscar Bancos');
$bBANC = $this->datasis->modbus($mBANC);
$filter = new DataFilter($this->titp, 'r_mbancrel a');
$filter->db->select(array('a.id', 'a.codbanc', 'a.tipo_doc', 'a.cheque', 'a.monto', 'a.total', 'a.fecha', 'a.fechaing', 'a.concepto'));
$filter->db->join('r_mbanc b', 'a.id=b.id_mbancrel');
$filter->db->group_by('a.id');
$filter->id = new inputField('Id', 'id');
$filter->id->rule = 'trim';
$filter->id->size = 13;
$filter->id->maxlength = 11;
$filter->id->db_name = 'a.id';
$filter->codbanc = new inputField('Codbanc', 'codbanc');
$filter->codbanc->rule = 'trim';
$filter->codbanc->size = 12;
$filter->codbanc->maxlength = 10;
$filter->codbanc->append($bBANC);
$filter->codbanc->db_name = 'a.codbanc';
$filter->tipo_doc = new dropdownField("Tipo Doc", "tipo_doc");
$filter->tipo_doc->option("", "");
$filter->tipo_doc->option("ND", "Nota de Debito");
$filter->tipo_doc->option("NC", "Nota de Credito");
$filter->tipo_doc->option("CH", "Cheque");
$filter->tipo_doc->option("DP", "Deposito");
$filter->tipo_doc->db_name = 'a.tipo_doc';
$filter->cheque = new inputField('Transaccion', 'cheque');
$filter->cheque->rule = 'trim';
$filter->cheque->size = 10;
$filter->cheque->db_name = 'a.cheque';
$filter->monto = new inputField('Monto', 'monto');
$filter->monto->rule = 'trim|numeric';
$filter->monto->css_class = 'inputnum';
$filter->monto->size = 21;
$filter->monto->maxlength = 19;
$filter->monto->db_name = 'a.monto';
$filter->total = new inputField('Total Items', 'total');
$filter->total->rule = 'trim|numeric';
$filter->total->css_class = 'inputnum';
$filter->total->size = 21;
$filter->total->maxlength = 19;
$filter->total->db_name = 'a.total';
$filter->fecha = new dateOnlyField('Fecha Transaccion', 'fecha');
$filter->fecha->db_name = 'a.fecha';
$filter->fecha->rule = 'chfecha';
$filter->fecha->size = 10;
$filter->fecha->maxlength = 8;
$filter->fecha->db_name = 'fecha';
$filter->fecha->clause = 'where';
$filter->fecha->operator = '=';
$filter->fechaing = new dateOnlyField('Fecha Ingreso', 'fechaing');
$filter->fechaing->rule = 'chfecha';
$filter->fechaing->size = 10;
$filter->fechaing->maxlength = 8;
$filter->fechaing->db_name = 'fechaing';
$filter->fechaing->clause = 'where';
$filter->fechaing->operator = '=';
$filter->concepto = new inputField('Concepto', 'concepto');
$filter->concepto->rule = 'trim';
$filter->concepto->size = 20;
$filter->concepto->db_name = 'a.concepto';
$filter->transacciones = new inputField('Transaccion Detalle', 'transacciones');
$filter->transacciones->rule = 'trim';
$filter->transacciones->size = 10;
$filter->transacciones->db_name = 'b.cheque';
$filter->buttons('reset', 'search');
$filter->build();
$uri = anchor($this->url . 'dataedit/show/<raencode><#id#></raencode>', '<#id#>');
$grid = new DataGrid('');
$grid->order_by('a.id', 'desc');
$grid->per_page = 10000;
$grid->column_orderby('Id', "{$uri}", 'id', 'align="left"');
$grid->column_orderby('Codbanc', "codbanc", 'codbanc', 'align="left"');
$grid->column_orderby('Tipo_doc', "tipo_doc", 'tipo_doc', 'align="left"');
$grid->column_orderby('Cheque', "cheque", 'cheque', 'align="left"');
$grid->column_orderby('Monto', "<nformat><#monto#></nformat>", 'monto', 'align="right"');
$grid->column_orderby('Total', "<nformat><#total#></nformat>", 'total', 'align="right"');
$grid->column_orderby('Fecha', "<dbdate_to_human><#fecha#></dbdate_to_human>", 'fecha', 'align="center"');
$grid->column_orderby('Fecha Ingreso', "<dbdate_to_human><#fechaing#></dbdate_to_human>", 'fechaing', 'align="center"');
$grid->column_orderby('Concepto', "concepto", 'concepto', 'align="left"');
$action = "javascript:window.location='" . site_url($this->url . 'reparafecha') . "'";
$grid->button("reperafecha", "Reparar Fechas de Efectivo", $action, "TL");
$grid->add($this->url . 'selectr_mbanc');
$grid->build();
$data['filtro'] = $filter->output;
$data['content'] = $grid->output;
$data['head'] = $this->rapyd->get_head() . script('jquery.js');
$data['title'] = $this->titp;
$this->load->view('view_ventanas', $data);
}
示例9: cprecios
function cprecios($control)
{
$this->rapyd->uri->keep_persistence();
$this->rapyd->load('datagrid', 'fields');
$error = '';
$msj = '';
if ($this->input->post('scstp_1') !== false) {
$precio1 = $this->input->post('scstp_1');
$precio2 = $this->input->post('scstp_2');
$precio3 = $this->input->post('scstp_3');
$precio4 = $this->input->post('scstp_4');
foreach (array_keys($precio1) as $ind) {
$pt1 = $precio1[$ind] >= $precio2[$ind] && $precio2[$ind] >= $precio3[$ind] && $precio3[$ind] >= $precio4[$ind];
$pt2 = $precio1[$ind] > 0 && $precio2[$ind] > 0 && $precio3[$ind] > 0 && $precio4[$ind] > 0;
if ($pt1 && $pt2) {
$data = array('precio1' => $precio1[$ind], 'precio2' => $precio2[$ind], 'precio3' => $precio3[$ind], 'precio4' => $precio4[$ind]);
$where = 'id = ' . $this->db->escape($ind);
$mSQL = $this->db->update_string('itscst', $data, $where);
$ban = $this->db->simple_query($mSQL);
} else {
$error = 'Los precios deben cumplir esta regla (precio 1 >= precio 2 >= precio 3 >= precio 4) y mayores a cero';
}
}
if (strlen($error) == 0) {
$msj = 'Nuevos Precios guardados';
}
if ($this->solo) {
return '{"status":"C","id":"' . $control . '" ,"mensaje":"' . $msj . $error . '"}';
}
}
if ($this->solo) {
$ggrid = form_open('/compras/scst/solo/cprecios/' . $control, array("id" => "df1"));
} else {
$ggrid = form_open('/compras/scst/cprecios/' . $control);
}
function costo($formcal, $pond, $ultimo, $standard, $existen, $itcana)
{
$CI =& get_instance();
$costo_pond = $CI->_pond($existen, $itcana, $pond, $ultimo);
return $CI->_costos($formcal, $costo_pond, $ultimo, $standard);
}
function margen($formcal, $pond, $ultimo, $standard, $existen, $itcana, $precio, $iva)
{
$costo = costo($formcal, $pond, $ultimo, $standard, $existen, $itcana);
if ($precio == 0) {
return 0;
}
return round(100 - $costo * 100 / ($precio / (1 + $iva / 100)), 2);
}
function tcosto($id, $iva, $formcal, $pond, $ultimo, $standard, $existen, $itcana)
{
$costo = costo($formcal, $pond, $ultimo, $standard, $existen, $itcana);
$rt = nformat($costo);
$rt .= '<input type="hidden" id="costo[' . $id . ']" name="costo[' . $id . ']" value="' . $costo . '" />';
$rt .= '<input type="hidden" id="iva[' . $id . ']" name="iva[' . $id . ']" value="' . $iva . '" />';
return $rt;
}
$grid = new DataGrid('Precios de artículos');
$grid->use_function('costo', 'margen', 'tcosto');
$grid->order_by('descrip');
$select = array('b.codigo', 'b.descrip', 'b.formcal', 'a.costo', 'b.ultimo', 'b.pond', 'b.standard', 'a.id', 'a.precio1 AS scstp_1', 'a.precio2 AS scstp_2', 'a.precio3 AS scstp_3', 'a.precio4 AS scstp_4', 'b.precio1 AS sinvp1', 'b.precio2 AS sinvp2', 'b.precio3 AS sinvp3', 'b.precio4 AS sinvp4', 'b.formcal', 'a.cantidad', 'b.existen', 'b.iva');
$grid->db->select($select);
$grid->db->from('itscst AS a');
$grid->db->join('sinv AS b', 'a.codigo=b.codigo');
$grid->db->where('control', $control);
//$grid->column('Código' , '' );
$grid->column_orderby('Descripción', '<b class=\'mininegro\'><#codigo#></b><br><#descrip#>', 'descrip');
$ittt = array('sinvp1', 'sinvp2', 'sinvp3', 'sinvp4');
$itt = array('scstp_1', 'scstp_2', 'scstp_3', 'scstp_4');
foreach ($itt as $id => $val) {
$ind = $val;
$campo = new inputField('Campo', $ind);
$campo->grid_name = $ind . '[<#id#>]';
$campo->status = 'modify';
$campo->size = 8;
$campo->autocomplete = false;
$campo->css_class = 'inputnum';
$campo->append('<#' . $ittt[$id] . '#>');
$campo->disable_paste = true;
$grid->column('Precio ' . ($id + 1), $campo, 'align=\'center\'');
}
$itt = array('margen_1', 'margen_2', 'margen_3', 'margen_4');
foreach ($itt as $id => $val) {
$ind = $val;
$campo = new inputField('Campo', $ind);
$campo->grid_name = $ind . '[<#id#>]';
$campo->pattern = '<margen><#formcal#>|<#pond#>|<#costo#>|<#standard#>|<#existen#>|<#cantidad#>|<#scstp_' . ($id + 1) . '#>|<#iva#></margen>';
$campo->status = 'modify';
$campo->size = 3;
$campo->autocomplete = false;
$campo->css_class = 'inputnum';
$campo->disable_paste = true;
$grid->column('Marg.' . ($id + 1), $campo, 'align=\'center\'');
}
$grid->column('Costo', '<tcosto><#id#>|<#iva#>|<#formcal#>|<#pond#>|<#costo#>|<#standard#>|<#existen#>|<#cantidad#></tcosto>', 'align=\'right\'');
if (!$this->solo) {
$action = "javascript:window.location='" . site_url('compras/scst/dataedit/show/' . $control) . "'";
$grid->button('btn_regresa', 'Regresar', $action, 'TR');
$grid->submit('pros', 'Guardar', 'BR');
}
//.........这里部分代码省略.........
示例10: inven
//.........这里部分代码省略.........
$filter->linea = new inputField("Linea", "nom_linea");
$filter->linea->db_name = "c.descrip";
$filter->linea->size = 10;
$filter->linea2 = new dropdownField("Línea", "linea");
$filter->linea2->db_name = 'c.linea';
$filter->linea2->option('', 'Seleccione un Departamento primero');
$filter->linea2->in = 'linea';
$depto = $filter->getval('depto');
if ($depto !== false) {
$filter->linea2->options("SELECT linea, descrip FROM line WHERE depto='{$depto}' ORDER BY descrip");
} else {
$filter->linea2->option('', 'Seleccione un Departamento primero');
}
$filter->grupo2 = new inputField('Grupo', 'nom_grupo');
$filter->grupo2->db_name = 'b.nom_grup';
$filter->grupo2->size = 10;
$filter->grupo = new dropdownField('Grupo', 'grupo');
$filter->grupo->db_name = 'b.grupo';
$filter->grupo->option('', 'Seleccione una Línea primero');
$filter->grupo->in = 'grupo2';
$linea = $filter->getval('linea2');
if ($linea !== false) {
$filter->grupo->options("SELECT grupo, nom_grup FROM grup WHERE linea='{$linea}' ORDER BY nom_grup");
} else {
$filter->grupo->option('', 'Seleccione un Departamento primero');
}
$filter->marca = new dropdownField('Marca', 'marca');
$filter->marca->option('', 'Todas');
$filter->marca->options("SELECT TRIM(marca) AS clave, TRIM(marca) AS valor FROM marc ORDER BY marca");
$filter->marca->style = 'width:220px;';
$filter->ubica = new inputField('Ubicacion', 'ubica');
$filter->ubica->db_name = 'a.ubica';
$filter->ubica->size = 15;
$filter->buttons('reset', 'search');
$filter->build();
function caja($campo2, $valor, $codigo, $readonly = false, $fila, $desp, $ccana)
{
$campo = new inputField2('Title', $campo2);
$campo->status = 'create';
$campo->css_class = 'inputnum';
$campo->size = 5;
$campo->insertValue = $valor;
$campo->readonly = $readonly;
if ($campo2 == 'c') {
$campo->type = 'inputhidden';
}
$campo->name = $codigo;
//$campo->name = 'I'.$campo2.'_'.$codigo;
$campo->id = 'I' . $campo2 . '_' . $codigo;
$campo->tabindex = $desp * $ccana + $fila;
$campo->build();
return $campo->output;
}
function pinta($modifi, $cont, $idfis, $pos)
{
$iidfis = "{$idfis}class";
if (empty($modifi)) {
$rt = '<span class="' . $iidfis . '">' . $cont . '</span>';
} else {
$rt = '<span class="' . $iidfis . '" style="color : red;">' . $cont . '</span>';
}
return $rt;
}
$atts = array('width' => '800', 'height' => '600', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0');
$titulo1 = anchor_popup("reportes/ver/INVFIS/{$tabla}", 'Conteo', $atts);
$titulo2 = anchor_popup('reportes/ver/SINVFIS', 'Hoja de trabajo', $atts);
示例11: clinconsissobreapl
function clinconsissobreapl($id_scli)
{
$this->rapyd->load('datagrid');
$this->rapyd->uri->keep_persistence();
$persistence = $this->rapyd->session->get_persistence('supervisor/mantenimiento/clinconsis', $this->rapyd->uri->gfid);
$back = isset($persistence['back_uri']) ? $persistence['back_uri'] : 'supervisor/mantenimiento/clinconsis';
$dbid_scli = intval($id_scli);
$cod_cli = $this->datasis->dameval("SELECT TRIM(cliente) AS val FROM scli WHERE id={$dbid_scli}");
if (empty($cod_cli)) {
show_error('Error en los parametros');
/*redirect($back);*/
}
$dbcod_cli = $this->db->escape($cod_cli);
$mSQL = "SELECT\n\t\t\taa.tipo_doc,aa.transac,aa.numero,aa.monto,bb.monto AS aplicado\n\t\t\tFROM smov AS aa\n\t\t\tJOIN\n\t\t\t\t(SELECT\n\t\t\t\t\ta.tipoccli,a.numccli,SUM(a.abono) AS monto\n\t\t\t\tFROM itccli AS a\n\t\t\t\tWHERE a.cod_cli={$dbcod_cli} AND a.tipoccli IN ('NC','AB','ND')\n\t\t\t\tGROUP BY a.tipoccli,a.numccli ) AS bb\n\t\t\tON aa.tipo_doc=bb.tipoccli AND aa.numero=bb.numccli\n\t\t\tWHERE bb.monto>aa.monto";
$query = $this->db->query($mSQL);
$data = array();
foreach ($query->result() as $row) {
$data[] = array('tipo_doc' => $row->tipo_doc, 'transac' => $row->transac, 'numero' => $row->numero, 'monto' => $row->monto, 'aplicado' => $row->aplicado);
}
$grid = new DataGrid('Lista', $data);
$grid->per_page = 1000;
//$grid->use_function('str_replace');
$grid->column('Tipo Doc', 'tipo_doc');
$grid->column('Numero', 'numero');
$grid->column('Monto', '<nformat><#monto#></nformat>', 'align=\'right\'');
$grid->column('Aplicado', '<nformat><#aplicado#></nformat>', 'align=\'right\'');
$action = 'javascript:window.location=\'' . site_url($back) . '\'';
$grid->button('btn_reg', 'Regresar', $action, 'TR');
$grid->build();
$data['content'] = $grid->output;
$data['title'] = heading('Efectos sobre-aplicados al cliente ' . $cod_cli);
$data['head'] = script('jquery.js');
$data['head'] .= script('plugins/jquery.checkboxes.pack.js') . $this->rapyd->get_head();
$this->load->view('view_ventanas', $data);
}
示例12: arancif
function arancif($id)
{
$this->rapyd->load('datagrid', 'fields');
$error = '';
if ($this->input->post('pros') !== FALSE) {
$pmontos = $this->input->post('arancif');
foreach ($pmontos as $iid => $cant) {
if (!is_numeric($cant)) {
$error .= "{$cant} no es un valor numérico<br>";
} else {
$data = array('arancif' => $cant);
$dbid = $this->db->escape($iid);
$where = "id = {$dbid}";
$mSQL = $this->db->update_string('itordi', $data, $where);
$this->db->simple_query($mSQL);
}
}
}
$this->_calcula($id);
$ggrid = form_open('/import/ordi/arancif/' . $id);
$monto = new inputField('Arancif', 'arancif');
$monto->grid_name = 'arancif[<#id#>]';
$monto->status = 'modify';
$monto->size = 12;
$monto->autocomplete = false;
$monto->css_class = 'inputnum';
$expli = 'En caso de que en la aduana calcule el valor del arancel en base a un costo estadístico diferente puede asignar el nuevo costo en los campos siguientes, en caso de dejarlo en cero se tomará el valor del importe CIF real.';
$select = array('a.codigo', 'a.descrip', 'a.cantidad', 'a.importecif', 'a.id', 'a.arancif', 'a.montoaran', 'a.arancel', 'a.importeciflocal');
$grid = new DataGrid($expli);
$grid->db->select($select);
$grid->db->from('itordi AS a');
$grid->db->join('ordi AS b', 'a.numero=b.numero');
$grid->db->where('a.numero', $id);
//$grid->order_by('a.numero','desc');
$grid->column_orderby('Código', 'codigo', 'codigo');
$grid->column_orderby('Descripción', 'descrip', 'descrip');
$grid->column_orderby('Cantidad', '<nformat><#cantidad#></nformat>', 'cantidad', 'align=\'right\'');
$grid->column_orderby('Importe CIF Real', '<nformat><#importeciflocal#></nformat>', 'importeciflocal', 'align=\'right\'');
$grid->column_orderby('Monto del arancel', '<b><nformat><#montoaran#></nformat></b> (<nformat><#arancel#></nformat>%)', 'montoaran', 'align=\'right\'');
$grid->column('Importe CIF estadístico en moneda local', $monto, 'align=\'right\'');
$grid->submit('pros', 'Guardar y calcular', 'BR');
$grid->button('btn_reg', 'Regresar', "javascript:window.location='" . site_url('/import/ordi/dataedit/show/' . $id) . "'", 'BR');
$grid->build();
//echo $grid->db->last_query();
$ggrid .= $grid->output;
$ggrid .= form_close();
$script = '
<script type="text/javascript">
$(function() {
$(".inputnum").numeric(".");
});
</script>';
$data['content'] = '<div class=\'alert\'>' . $error . '</div>' . $ggrid;
$data['title'] = '<h1>Asignación en los montos estadísticos para el cálculo de los aranceles</h1>';
$data['script'] = $script;
$data['head'] = $this->rapyd->get_head() . script('jquery.pack.js') . script('plugins/jquery.numeric.pack.js') . script('plugins/jquery.floatnumber.js');
$this->load->view('view_ventanas', $data);
}
示例13: filteredgrid
function filteredgrid()
{
$this->rapyd->load('datafilter', 'datagrid');
$filter = new DataFilter($this->titp, 'r_recibo');
$user = $this->session->userdata('usuario');
$usere = $this->db->escape($user);
$r_caja = $this->datasis->damerow("SELECT r_caja.id,punto_codbanc FROM r_caja JOIN usuario ON r_caja.id=usuario.caja WHERE us_codigo ={$usere}");
if (count($r_caja) > 0) {
$caja = $r_caja['id'];
$punto_codbanc = $r_caja['punto_codbanc'];
} else {
$caja = 0;
}
if ($caja > 0) {
$filter->db->where('caja', $caja);
}
$filter->id = new inputField('Ref.', 'id');
$filter->id->rule = 'max_length[11]';
$filter->id->size = 13;
$filter->id->maxlength = 11;
$filter->id->clause = 'where';
$filter->id->operator = '=';
$filter->fecha = new dateField('Fecha', 'fecha');
$filter->fecha->rule = 'chfecha';
$filter->fecha->size = 10;
$filter->fecha->maxlength = 8;
$filter->fecha->clause = 'where';
$filter->fecha->operator = '=';
$filter->numero = new inputField('Numero.', 'numero');
$filter->numero->rule = 'max_length[11]';
$filter->numero->size = 13;
$filter->numero->maxlength = 11;
$filter->numero->clause = 'where';
$filter->numero->operator = '=';
$filter->rifci = new inputField('rifci', 'rifci');
$filter->rifci->rule = 'max_length[12]';
$filter->rifci->size = 14;
$filter->rifci->maxlength = 12;
$filter->nombre = new inputField('Nombre', 'nombre');
$filter->nombre->rule = 'max_length[100]';
$filter->nombre->size = 40;
$filter->nombre->maxlength = 100;
$filter->monto = new inputField('Monto.', 'monto');
$filter->monto->rule = 'max_length[11]';
$filter->monto->size = 13;
$filter->monto->maxlength = 11;
$filter->caja = new dropdownField("Caja", "cajas");
$filter->caja->option("", "");
$filter->caja->options("SELECT id,nombre FROM r_caja ");
$filter->caja->db_name = 'r_recibo.caja';
$filter->buttons('reset', 'search');
$filter->build();
$uri = anchor($this->url . 'dataedit/show/<raencode><#id#></raencode>', '<#id#>');
$grid = new DataGrid('');
$grid->order_by('id', 'desc');
$grid->per_page = 40;
$grid->column_orderby('Ref.', "{$uri}", 'id', 'align="left"');
$grid->column_orderby('Numero', "numero", 'numero', 'align="left"');
$grid->column_orderby('Fecha', "<dbdate_to_human><#fecha#></dbdate_to_human>", 'fecha', 'align="center"');
$grid->column_orderby('Rif/CI', "rifci", 'rifci', 'align="left"');
$grid->column_orderby('Nombre', "nombre", 'nombre', 'align="left"');
$grid->column_orderby('Monto', "<numbre_format><#monto#></numbre_format>", 'monto', 'align="left"');
$grid->column_orderby('Caja', "caja", 'caja', 'align="left"');
$action = "javascript:window.location='" . site_url('recaudacion/r_abonos/filteredgrid') . "'";
$grid->button("ir_cobranza", "Ir a Cobranza", $action, "TL");
$grid->add($this->url . 'dataedit/create');
$grid->build();
$data['filtro'] = $filter->output;
$data['content'] = $grid->output;
$data['head'] = $this->rapyd->get_head() . script('jquery.js');
$data['title'] = $this->titp . ($this->cajan ? " CAJA {$this->cajan}" : "");
$this->load->view('view_ventanas', $data);
}
示例14: auditsprv
function auditsprv()
{
$this->rapyd->load('datagrid', 'dataform');
$qformato = $this->datasis->formato_cpla();
$mCPLA = array('tabla' => 'cpla', 'columnas' => array('codigo' => 'Código', 'descrip' => 'Descripción'), 'filtro' => array('codigo' => 'Código', 'descrip' => 'Descripción'), 'retornar' => array('codigo' => 'cuenta'), 'titulo' => 'Buscar Cuenta', 'where' => "codigo LIKE \"{$qformato}\"");
$bcpla = $this->datasis->modbus($mCPLA);
$atts = array('width' => '800', 'height' => '600', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0');
$uri = anchor_popup('compras/sprv/dataedit/modify/<#id#>', '<#proveed#>', $atts);
$grid = new DataGrid('Registros cuya cuenta no existe en el plan de cuentas');
$grid->db->select(array('a.proveed', 'a.rif', 'a.nombre', 'a.cuenta', 'a.grupo', 'a.id'));
$grid->db->from('sprv AS a');
$grid->db->join('cpla AS b', 'a.cuenta=b.codigo', 'LEFT');
$grid->db->where('b.codigo IS NULL');
$grid->per_page = 40;
$grid->column_orderby('Código', $uri, 'proveed');
$grid->column_orderby('Grupo', 'grupo', 'grupo');
$grid->column_orderby('Nombre', 'nombre', 'nombre');
$grid->column_orderby('Rif', 'rif', 'rif');
$grid->column_orderby('Cuenta', 'cuenta', 'cuenta');
$action = "javascript:window.location='" . site_url('contabilidad/casi/auditoria') . "'";
$grid->button('btn_regresa', 'Regresar', $action, 'TR');
$grid->build();
$form = new DataForm('contabilidad/casi/auditsprv/process');
$form->cuenta = new inputField('Cuenta contable', 'cuenta');
$form->cuenta->rule = 'trim|required|existecpla';
$form->cuenta->size = 15;
$form->cuenta->append($bcpla . 'Coloque la cuenta contable para ser asginada a todos los registros encontrados y presione cambiar.');
$form->grupo = new dropdownField('Grupo', 'grupo');
$form->grupo->option('', 'Todos');
$form->grupo->options("SELECT grupo,grupo AS val FROM sprv GROUP BY grupo");
$form->grupo->style = 'width:140px';
$form->grupo->append('Adicionalmente puede elegir un grupo para condicionar la asignación');
$form->submit('btnsubmit', 'Cambiar');
$form->build_form();
if ($form->on_success()) {
$cuenta = $this->db->escape($form->cuenta->newValue);
$grupo = $form->grupo->newValue;
if (!empty($grupo)) {
$ww = ' AND a.grupo=' . $this->db->escape($grupo);
} else {
$ww = '';
}
$mSQL = 'UPDATE sprv AS a LEFT JOIN cpla AS b ON a.cuenta=b.codigo SET a.cuenta=' . $cuenta . ' WHERE b.codigo IS NULL' . $ww;
$this->db->simple_query($mSQL);
redirect('contabilidad/casi/auditsprv');
}
$data['content'] = $grid->recordCount > 0 ? $form->output : '';
$data['content'] .= $grid->output;
$data['head'] = $this->rapyd->get_head();
$data['title'] = heading('Auditoria de cuentas en proveedores');
$this->load->view('view_ventanas', $data);
}
示例15: procesar
function procesar($id_tabla = null)
{
$this->rapyd->load('dataedit', 'datagrid', 'fields');
if (empty($id_tabla)) {
show_error('Faltan parametros');
}
$id_tabla = intval($id_tabla);
if ($id_tabla <= 0) {
show_error('Error en parametros');
}
$tabla = $this->tabla;
$select = $titu = array();
//Se trae la cantidad de columnas
$dbide_tabla = $this->db->escape($id_tabla);
$ccolum = $this->datasis->dameval("SELECT MAX(aa.cana) FROM (SELECT COUNT(*) AS cana FROM {$tabla} WHERE id_tabla={$dbide_tabla} GROUP BY fila) AS aa");
//Se trae la definicion de la tabla
//$query = $this->db->query("SELECT columna,valor,tipo FROM `impor_data` WHERE fila=0 AND id_tabla=${dbide_tabla}");
//if($query->num_rows()>0){
// foreach ($query->result() as $row){
// $titu[$row->columna]=$row->valor;
// }
//}
$options = array('' => 'Ignorar', 'codigo' => 'Código', 'descrip' => 'Descripción', 'standard' => 'Costo Estandar', 'exmin' => 'Mínimo', 'exmax' => 'Máximo', 'marca' => 'Marca');
if ($this->secu->essuper()) {
$options['ultimo'] = 'Costo Último';
$options['pond'] = 'Costo Promedio';
}
$colunma = new dropdownField('Tabla', 'tabla');
$colunma->options($options);
$colunma->status = 'create';
$colunma->style = 'width:100%;';
$colunma->rule = 'required';
$grid = new DataGrid('Tabla importada');
$grid->db->from($tabla);
$grid->db->where('id_tabla', $id_tabla);
//$grid->db->where('fila >',0);
$grid->db->groupby('fila');
$grid->db->orderby('fila');
$grid->per_page = 25;
$select[] = '(fila+1) AS fila';
$grid->column('Fila', '<b><#fila#></b>', 'align="right"');
for ($i = 0; $i < $ccolum; $i++) {
$select[] = "GROUP_CONCAT(IF(columna={$i},valor,NULL)) AS c{$i}";
//$titulo=(isset($titu[$i]))? $titu[$i]: 'Columna '.($i+1);
$colunma->name = $colunma->id = "c{$i}";
$colunma->build();
$titulo = 'Columna ' . ($i + 1) . $colunma->output;
$grid->column_orderby($titulo, "c{$i}", "c{$i}");
}
$grid->db->select($select);
$action = "javascript:window.location='" . site_url($this->url . 'load') . "'";
$grid->button('btn_regresa', 'Regresar', $action, 'TR');
$grid->build();
//echo $grid->db->last_query();
$form = new DataForm($this->url . 'procesar/' . $id_tabla . '/process');
$form->tabla = new dropdownField('Tabla', 'tabla');
$form->tabla->option('sinv', 'Inventario');
//$form->tabla->option('sinvpromo','Promociones');
$form->tabla->rule = 'required|enum[sinv,sinvpromo]';
$form->fila = new inputField('Procesar a partir de la fila', 'fila');
$form->fila->append(' Incluyente.');
$form->fila->size = 5;
$form->fila->insertValue = '1';
$form->fila->rule = 'numeric|positive';
$form->errores = new checkboxField('Ignorar Errores', 'errores', 'S', 'N');
$form->errores->insertValue = 'N';
$form->errores->rule = 'enum[S,N]';
$form->container = new containerField('tabla', $grid->output);
$form->submit('btnsubmit', 'Procesar');
$form->build_form();
if ($form->on_success()) {
$def = array();
$val = false;
for ($o = 0; $o < $i; $o++) {
$itdef = $this->input->post('c' . $o);
if (!empty($itdef)) {
if (!in_array($itdef, $def)) {
$def[$o] = $itdef;
} else {
$val = true;
$form->error_string = 'Columna ' . ($o + 1) . ' tiene la defición repetida.';
$form->build_form();
break;
}
}
}
if (!$val) {
$rt = $this->_validar($form->tabla->newValue, $id_tabla, $def, intval($form->fila->newValue), $form->errores->newValue);
if (!$rt) {
$form->error_string = $this->val_error;
$form->build_form();
} else {
$rt = $this->_procesar($form->tabla->newValue, $id_tabla, $def);
if ($rt) {
redirect($this->url . 'resultado/' . $this->afecta);
} else {
$form->error_string = 'Hubo problemas para cagar la data.';
$form->build_form();
}
}
//.........这里部分代码省略.........