本文整理汇总了PHP中DataEdit::pk_URI方法的典型用法代码示例。如果您正苦于以下问题:PHP DataEdit::pk_URI方法的具体用法?PHP DataEdit::pk_URI怎么用?PHP DataEdit::pk_URI使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataEdit
的用法示例。
在下文中一共展示了DataEdit::pk_URI方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dataedit
//.........这里部分代码省略.........
return $tprecio . ' ' . $link;
}
//Campos para el detalle
$this->_autoasignar($numero);
$this->_autoprecios($numero);
$tabla = $this->db->database;
$detalle = new DataGrid('');
$detalle->use_function('similar', 'ofertas');
$select = array('a.*', 'a.codigo AS barras', 'COALESCE(b.descrip, d.descrip) AS sinvdesc', 'a.costo AS pond', 'COALESCE( b.codigo , c.abarras) AS sinv', 'c.id AS farmaid', 'e.margen');
$detalle->db->select($select);
$detalle->db->from('itscst AS a');
$detalle->db->where('a.control', $numero);
$detalle->db->join($tabla . '.sinv AS b', 'a.codigo=b.codigo', 'LEFT');
$detalle->db->join($tabla . '.farmaxasig AS c', "a.codigo=c.barras AND c.proveed={$proveed}", 'LEFT');
$detalle->db->join($tabla . '.sinv AS d', 'd.codigo=c.abarras', 'LEFT');
$detalle->db->join($tabla . '.grup AS e', 'e.grupo=COALESCE(b.grupo,d.grupo)', 'LEFT');
$detalle->db->order_by('a.id');
$detalle->use_function('exissinv');
$detalle->column('Barras', '<#codigo#>');
$detalle->column('Semejanza% -Descripción', '<similar><#descrip#>|<#sinvdesc#>|<#farmaid#></similar> - <#descrip#>');
$detalle->column('Cantidad', '<nformat><#cantidad#></nformat>', 'align=\'right\'');
$detalle->column('PVP', $llink, 'align=\'right\'');
$detalle->column('Costo', '<nformat><#ultimo#></nformat>', 'align=\'right\'');
$detalle->column('Importe', '<nformat><#importe#></nformat>', 'align=\'right\'');
$detalle->column('Código local', '<exissinv><#sinv#>|<#dg_row_id#></exissinv>', "bgcolor='#D7F7D7' align='center'");
$detalle->column('Desc.', '<ofertas><#sinv#>|<#margen#>|<#precio1#>|<#ultimo#></ofertas>', 'align=\'right\'');
$detalle->build();
//echo $detalle->db->last_query();
$c_articulos = $detalle->recordCount;
$query = $this->rapyd->db->query('SELECT SUM(a.cantidad) AS cant FROM itscst AS a WHERE a.control=' . $this->db->escape($numero));
if ($query->num_rows() > 0) {
$row = $query->row_array();
$unid = $row['cant'];
} else {
$unid = 0;
}
$edit->unidades = new freeField('Unidades', 'unidades', nformat($unid));
$script = '
function pcrear(id){
var pasar=["barras","descrip","ultimo","iva","codigo","pond","precio1","precio2","precio3","precio4"];
var url = "' . site_url('farmacia/sinv/dataedit/create') . '";
form_virtual(pasar,id,url);
}
function pasig(id){
var pasar=["barras","proveed","descrip"];
var url = "' . site_url('farmacia/scst/asignardataedit/scst/create') . '";
form_virtual(pasar,id,url);
}
function form_virtual(pasar,id,url){
var data=' . json_encode($detalle->data) . ';
var w = window.open("' . site_url('farmacia/scst/dummy') . '","asignar","width=800,height=600,scrollbars=Yes,status=Yes,resizable=Yes,screenx="+((screen.availWidth/2)-400)+",screeny="+((screen.availHeight/2)-300)+"");
var fform = document.createElement("form");
fform.setAttribute("target", "asignar");
fform.setAttribute("action", url );
fform.setAttribute("method", "post");
for(i=0;i<pasar.length;i++){
Val=eval("data[id]."+pasar[i]);
iinput = document.createElement("input");
iinput.setAttribute("type", "hidden");
iinput.setAttribute("name", pasar[i]);
iinput.setAttribute("value", Val);
fform.appendChild(iinput);
}
var cuerpo = document.getElementsByTagName("body")[0];
cuerpo.appendChild(fform);
fform.submit();
w.focus();
cuerpo.removeChild(fform);
}';
$edit->detalle = new freeField('detalle', 'detalle', $detalle->output);
$accion = "javascript:window.location='" . site_url('farmacia/scst/cargar' . $edit->pk_URI()) . "'";
$pcontrol = $edit->_dataobject->get('pcontrol');
if ($this->_btn_cargar($pcontrol)) {
$edit->button_status('btn_cargar', 'Cargar', $accion, 'TR', 'show');
}
$edit->buttons('save', 'undo', 'back');
$edit->script($script, 'show');
$edit->build();
$this->rapyd->jquery[] = '$("#dialog").dialog({
autoOpen: false,
show: "blind",
hide: "explode"
});
$( "#opener" ).click(function() {
$( "#dialog" ).dialog( "open" );
return false;
});';
$conten['form'] =& $edit;
$conten['carti'] = $c_articulos;
$data['content'] = $this->load->view('view_farmax_compras', $conten, true);
$data['head'] = $this->rapyd->get_head();
$data['title'] = '<h1>Compras Descargadas</h1>';
$this->load->view('view_ventanas', $data);
}
示例2: dataedit
//.........这里部分代码省略.........
$edit->subt = new inputField("Subt", "montotot");
$edit->subt->size = 20;
$edit->subt->css_class = 'inputnum';
$edit->iva = new inputField("IVA", "montoiva");
$edit->iva->size = 20;
$edit->iva->css_class = 'inputnum';
$edit->total = new inputField("Total", "montonet");
$edit->total->size = 20;
$edit->total->css_class = 'inputnum';
$edit->anticipo = new inputField("Anticipo", "anticipo");
$edit->anticipo->size = 20;
$edit->anticipo->css_class = 'inputnum';
$edit->contado = new inputField("Contado", "inicial");
$edit->contado->size = 20;
$edit->contado->css_class = 'inputnum';
$edit->rislr = new inputField("R.ISLR", "reten");
$edit->rislr->size = 20;
$edit->rislr->css_class = 'inputnum';
$edit->riva = new inputField("R.IVA", "reteiva");
$edit->riva->size = 20;
$edit->riva->css_class = 'inputnum';
$edit->pcontrol = new inputField('Control', 'pcontrol');
$edit->pcontrol->size = 12;
$edit->monto = new inputField("Monto US \$", "mdolar");
$edit->monto->size = 20;
$edit->monto->css_class = 'inputnum';
$numero = $edit->_dataobject->get('control');
$proveed = $this->db->escape($edit->_dataobject->get('proveed'));
//Campos para el detalle
$tabla = $this->db->database;
$detalle = new DataGrid('');
$select = array('a.*', 'a.codigo AS barras', 'a.costo AS pond', 'COALESCE( b.codigo , c.abarras) AS sinv');
$detalle->db->select($select);
$detalle->db->from('itscst AS a');
$detalle->db->where('a.control', $numero);
$detalle->db->join($tabla . '.sinv AS b', 'a.codigo=b.codigo', 'LEFT');
$detalle->db->join($tabla . '.farmaxasig AS c', "a.codigo=c.barras AND c.proveed={$proveed}", 'LEFT');
$detalle->use_function('exissinv');
$detalle->column("Barras", "<#codigo#>");
$detalle->column("Descripción", "<#descrip#>");
$detalle->column("Cantidad", "<#cantidad#>", "align='right'");
$detalle->column("Precio", "<#ultimo#>", "align='right'");
$detalle->column("Importe", "<#importe#>", "align='right'");
$detalle->column("Acciones ", "<exissinv><#sinv#>|<#dg_row_id#></exissinv>", "bgcolor='#D7F7D7' align='center'");
$detalle->build();
//echo $detalle->db->last_query();
$script = '
function pcrear(id){
var pasar=["barras","descrip","ultimo","iva","codigo","pond"];
var url = "' . site_url('inventario/sinv/dataedit/create') . '";
form_virtual(pasar,id,url);
}
function pasig(id){
var pasar=["barras","proveed"];
var url = "' . site_url('farmacia/scst/asignardataedit/create') . '";
form_virtual(pasar,id,url);
}
function form_virtual(pasar,id,url){
var data=' . json_encode($detalle->data) . ';
var w = window.open("' . site_url('farmacia/scst/dummy') . '","asignar","width=800,height=600,scrollbars=Yes,status=Yes,resizable=Yes,screenx="+((screen.availWidth/2)-400)+",screeny="+((screen.availHeight/2)-300)+"");
var fform = document.createElement("form");
fform.setAttribute("target", "asignar");
fform.setAttribute("action", url );
fform.setAttribute("method", "post");
for(i=0;i<pasar.length;i++){
Val=eval("data[id]."+pasar[i]);
iinput = document.createElement("input");
iinput.setAttribute("type", "hidden");
iinput.setAttribute("name", pasar[i]);
iinput.setAttribute("value", Val);
fform.appendChild(iinput);
}
var cuerpo = document.getElementsByTagName("body")[0];
cuerpo.appendChild(fform);
fform.submit();
w.focus();
cuerpo.removeChild(fform);
}';
$edit->detalle = new freeField("detalle", 'detalle', $detalle->output);
$accion = "javascript:window.location='" . site_url('farmacia/scst/cargar' . $edit->pk_URI()) . "'";
$pcontrol = $edit->_dataobject->get('pcontrol');
if (is_null($pcontrol)) {
$edit->button_status('btn_cargar', 'Cargar', $accion, 'TR', 'show');
}
$edit->buttons('save', 'undo', 'back');
$edit->script($script, 'show');
$edit->build();
$smenu['link'] = barra_menu('201');
$data['smenu'] = $this->load->view('view_sub_menu', $smenu, true);
$conten['form'] =& $edit;
$data['content'] = $this->load->view('view_farmax_compras', $conten, true);
$data['head'] = script("tabber.js") . script("prototype.js") . $this->rapyd->get_head() . script("scriptaculous.js") . script("effects.js");
$data['title'] = '<h1>Compras Descargadas</h1>';
$this->load->view('view_ventanas', $data);
}
示例3: ordiva
function ordiva($ordi)
{
$this->rapyd->load('dataobject', 'dataedit');
$fecha = $this->datasis->dameval("SELECT fecha FROM ordi WHERE numero={$ordi}");
$iva = $this->datasis->ivaplica($fecha);
$jsc = 'function calcula(){
if($("#tasa").val().length>0){
tasa=parseFloat($("#tasa").val());
if($("#base").val().length>0) base=parseFloat($("#base").val()); else base=0;
$("#montoiva").val(roundNumber(base*(tasa/100),2));
}
}
function calculaiva(){
if($("#tasa").val().length>0){
tasa=parseFloat($("#tasa").val());
if($("#montoiva").val().length>0) montoiva=parseFloat($("#montoiva").val()); else montoiva=0;
$("#base").val(roundNumber(montoiva*100/tasa,2));
}
}';
$edit = new DataEdit(' ', 'ordiva');
$edit->back_save = true;
$edit->back_cancel = true;
$edit->back_cancel_save = true;
$edit->back_url = site_url('import/ordi/dataedit/show/' . $ordi);
$edit->post_process('insert', '_post_ordiva');
$edit->post_process('update', '_post_ordiva');
$edit->post_process('delete', '_post_ordiva');
$edit->id = new inputField2('Numero', 'id');
$edit->id->mode = 'autohide';
$edit->id->when = array('modify');
$edit->tasa = new dropdownField('Tasa %', 'tasa');
foreach ($iva as $nom => $val) {
$edit->tasa->option($val, nformat($val) . '%');
}
$edit->tasa->rule = 'required|numeric';
$edit->tasa->style = 'width:100px';
$edit->tasa->mode = 'autohide';
$edit->tasa->append('<span style="color:black;"> Vigente para la fecha <b>' . dbdate_to_human($fecha) . '</b></span>');
$edit->base = new inputField('Base imponible', 'base');
$edit->base->rule = 'required|numeric';
$edit->base->size = 15;
$edit->base->css_class = 'inputnum';
$edit->base->autocomplete = false;
$edit->montoiva = new inputField('IVA ', 'montoiva');
$edit->montoiva->rule = 'required|numeric';
$edit->montoiva->size = 15;
$edit->montoiva->autocomplete = false;
$edit->montoiva->css_class = 'inputnum';
$edit->concepto = new inputField2('Concepto', 'concepto');
$edit->concepto->rule = 'max_length[100]';
$edit->concepto->max_size = 100;
$edit->ordeni = new autoUpdateField('ordeni', $ordi, $ordi);
$edit->script($jsc, 'create');
//$edit->script($jsm,'modify');
$accion = "javascript:window.location='" . site_url('import/ordi/cargarordi' . $edit->pk_URI()) . "'";
$edit->button_status('btn_cargar', 'Cargar', $accion, 'TR', 'show');
$edit->buttons('modify', 'save', 'undo', 'delete', 'back');
$edit->build();
if ($edit->_status != 'show') {
$this->rapyd->jquery[] = '$(".inputnum").numeric(".");';
$this->rapyd->jquery[] = '$("#tasa").change(function() { calcula(); });';
$this->rapyd->jquery[] = '$("#base").bind("keyup",function() { calcula(); });';
$this->rapyd->jquery[] = '$("#montoiva").bind("keyup",function() { calculaiva(); });';
}
if ($edit->_status == 'modify') {
$jsm = '<script language="javascript" type="text/javascript">
function calcula(){
tasa=' . $edit->tasa->value . ';
if($("#base").val().length>0) base=parseFloat($("#base").val()); else base=0;
$("#montoiva").val(roundNumber(base*(tasa/100),2));
}
function calculaiva(){
tasa=' . $edit->tasa->value . ';
if($("#montoiva").val().length>0) montoiva=parseFloat($("#montoiva").val()); else montoiva=0;
$("#base").val(roundNumber(montoiva*100/tasa,2));
}
</script>';
$data['script'] = $jsm;
}
$data['content'] = $edit->output;
$data['title'] = '<h1>Impuestos IVA</h1>';
$data['head'] = $this->rapyd->get_head() . phpscript('nformat.js');
$this->load->view('view_ventanas', $data);
}
示例4: certifi
//.........这里部分代码省略.........
//$municipio = $row->municipio;
//$estado = $row->estado;
//$cpostal = $row->cpostal;
//$ctelefono1 = $row->ctelefono1;
//$telefono1 = $row->telefono1;
//$ctelefono2 = $row->ctelefono2;
//$telefono2 = $row->telefono2;
$data = array();
if (empty($row->nombre)) {
$data['nombre'] = $nombre;
$where = 'id = ' . $this->db->escape($id);
$str = $this->db->update_string('sinvehiculo', $data, $where);
$this->db->simple_query($str);
}
}
$this->rapyd->load('dataedit');
$edit = new DataEdit($this->tits, 'sinvehiculo');
$edit->back_url = site_url($this->url . 'index');
$edit->nombre = new inputField('Nombre', 'nombre');
$edit->nombre->rule = 'max_length[200]|required';
$edit->nombre->maxlength = 200;
$edit->casa = new inputField('Casa Quinta Edificio Apto', 'casa');
$edit->casa->rule = 'max_length[100]|required';
//$edit->casa->size =102;
$edit->casa->maxlength = 100;
$edit->calle = new inputField('Avenida, calle, plaza, esquina', 'calle');
$edit->calle->rule = 'max_length[100]|required';
//$edit->calle->size =102;
$edit->calle->maxlength = 100;
$edit->urb = new inputField('Urbanización, Bario, Residencia', 'urb');
$edit->urb->rule = 'max_length[100]|required';
//$edit->urb->size =102;
$edit->urb->maxlength = 100;
$edit->ciudad = new inputField('Ciudad', 'ciudad');
$edit->ciudad->rule = 'max_length[100]|required';
//$edit->ciudad->size =102;
$edit->ciudad->maxlength = 100;
$edit->municipio = new inputField('Parroquia, distrito, Municipio', 'municipio');
$edit->municipio->rule = 'max_length[100]|required';
//$edit->municipio->size =102;
$edit->municipio->maxlength = 100;
$edit->estado = new inputField('Estado', 'estado');
$edit->estado->rule = 'max_length[100]|required';
//$edit->estado->size =102;
$edit->estado->maxlength = 100;
$edit->cpostal = new inputField('Código Postal', 'cpostal');
$edit->cpostal->rule = 'max_length[10]|numeric|required';
$edit->cpostal->size = 10;
$edit->cpostal->maxlength = 10;
$edit->ctelefono1 = new inputField('Teléfono de Habitación', 'ctelefono1');
$edit->ctelefono1->rule = 'max_length[100]|numeric|required';
$edit->ctelefono1->size = 6;
$edit->ctelefono1->maxlength = 100;
$edit->telefono1 = new inputField('', 'telefono1');
$edit->telefono1->rule = 'max_length[100]|numeric|required';
$edit->telefono1->size = 10;
$edit->telefono1->maxlength = 10;
$edit->telefono1->in = 'ctelefono1';
$edit->ctelefono2 = new inputField('Teléfono de Trabajo', 'ctelefono2');
$edit->ctelefono2->rule = 'max_length[100]|numeric|required';
$edit->ctelefono2->size = 6;
$edit->ctelefono2->maxlength = 4;
$edit->telefono2 = new inputField('', 'telefono2');
$edit->telefono2->rule = 'max_length[100]|numeric|required';
$edit->telefono2->size = 10;
$edit->telefono2->maxlength = 10;
$edit->telefono2->in = 'ctelefono2';
$edit->distrito = new inputField('Distrito', 'distrito');
$edit->distrito->rule = 'max_length[100]';
$edit->aseguradora = new inputField('Nombre de la aseguradora', 'aseguradora');
$edit->aseguradora->rule = 'max_length[100]';
$edit->aseguradora->group = 'Datos del seguro';
$edit->poliza = new inputField('Poliza', 'poliza');
$edit->poliza->rule = 'max_length[100]';
$edit->poliza->group = 'Datos del seguro';
$edit->vence = new dateonlyField('Vencimiento de la póliza', 'vence');
$edit->vence->rule = 'chfecha';
$edit->vence->group = 'Datos del seguro';
$edit->nomban = new inputField('Nombre del banco', 'nomban');
$edit->nomban->rule = 'max_length[100]';
$edit->nomban->group = 'Reserva de dominio';
$edit->banrif = new inputField('Rif del banco', 'banrif');
$edit->banrif->rule = 'max_length[10]';
$edit->banrif->group = 'Reserva de dominio';
$edit->representante = new inputField('Representación', 'representante');
$edit->representante->rule = 'max_length[100]';
$edit->concesionario = new inputField('Concesionario B', 'concesionario');
$edit->concesionario->rule = 'max_length[100]';
$edit->concesionariorif = new inputField('Concesionario B Rif', 'concesionariorif');
$edit->concesionariorif->rule = 'max_length[10]';
$accion = "javascript:window.location='" . site_url($this->url . 'certificado' . $edit->pk_URI()) . "'";
$edit->button_status('btn_imprime', 'Certificado', $accion, 'BR', 'show');
$edit->buttons('modify', 'save', 'undo', 'delete', 'back');
//$edit->submit = new submitField("login","btn_submit");
$edit->build();
$data['content'] = $edit->output;
$data['head'] = $this->rapyd->get_head() . script('jquery.js');
$data['title'] = heading($this->titp);
$this->load->view('view_ventanas', $data);
}
示例5: dataprintser
function dataprintser($st, $uid)
{
$this->rapyd->load('dataedit');
$edit = new DataEdit('Imprimir factura', 'sfac');
$id = $edit->get_from_dataobjetct('id');
$urlid = $edit->pk_URI();
$sfacforma = $this->datasis->traevalor('FORMATOSFAC', 'Especifica el metodo a ejecutar para descarga de formato de factura en Proteo Ej. descargartxt...');
if (empty($sfacforma)) {
$sfacforma = 'descargartxt';
}
$url = site_url('formatos/' . $sfacforma . '/FACTURA' . $urlid);
if (isset($this->back_url)) {
$edit->back_url = site_url($this->back_url);
} else {
$edit->back_url = site_url('ajax/reccierraventana');
}
$edit->back_save = true;
$edit->back_delete = true;
$edit->back_cancel = true;
$edit->back_cancel_save = true;
$edit->back_cancel_delete = true;
$edit->pre_process('insert', '_pre_print_insert');
$edit->pre_process('delete', '_pre_print_delete');
$edit->nfiscal = new inputField('Control Físcal', 'nfiscal');
$edit->nfiscal->rule = 'max_length[12]|required';
$edit->nfiscal->size = 14;
$edit->nfiscal->maxlength = 12;
$edit->nfiscal->autocomplete = false;
$edit->tipo_doc = new inputField('Factura', 'tipo_doc');
$edit->tipo_doc->rule = 'max_length[1]';
$edit->tipo_doc->size = 3;
$edit->tipo_doc->mode = 'autohide';
$edit->tipo_doc->maxlength = 1;
$edit->numero = new inputField('Número', 'numero');
$edit->numero->rule = 'max_length[8]';
$edit->numero->mode = 'autohide';
$edit->numero->size = 10;
$edit->numero->in = 'tipo_doc';
$edit->numero->maxlength = 8;
$edit->fecha = new dateField('Fecha', 'fecha');
$edit->fecha->rule = 'chfecha';
$edit->fecha->mode = 'autohide';
$edit->fecha->size = 10;
$edit->fecha->maxlength = 8;
$edit->cod_cli = new inputField('Cliente', 'cod_cli');
$edit->cod_cli->rule = 'max_length[5]';
$edit->cod_cli->size = 7;
$edit->cod_cli->mode = 'autohide';
$edit->cod_cli->maxlength = 5;
$edit->nombre = new inputField('Nombre', 'nombre');
$edit->nombre->rule = 'max_length[40]';
$edit->nombre->size = 42;
$edit->nombre->mode = 'autohide';
$edit->nombre->in = 'cod_cli';
$edit->nombre->maxlength = 40;
$edit->rifci = new inputField('Rif/Ci', 'rifci');
$edit->rifci->rule = 'max_length[13]';
$edit->rifci->size = 15;
$edit->rifci->mode = 'autohide';
$edit->rifci->maxlength = 13;
$total = $edit->get_from_dataobjetct('totalg');
$edit->totalg = new freeField('<b>Monto a pagar</b>', 'monto', '<b id="vh_monto" style="font-size:2em">' . nformat($total) . '</b>');
$edit->build();
if ($edit->on_success()) {
$rt = array('status' => 'A', 'mensaje' => 'Registro guardado', 'pk' => $edit->_dataobject->pk);
echo json_encode($rt);
} else {
$rt = array('status' => 'B', 'mensaje' => utf8_encode(html_entity_decode(preg_replace('/<[^>]*>/', '', $edit->error_string))), 'pk' => '');
//echo json_encode($rt);
echo $edit->output;
}
}