function ver($id = NULL) { $this->rapyd->load("datatable"); $table = new DataTable(null); $table->cell_attributes = 'style="vertical-align:middle;"'; $select = array("envia", "mensaje", "recibe"); $table->db->select($select); $table->db->from("muro"); $table->db->where("recibe='Todos'"); $table->db->orderby("codigo DESC"); $table->per_row = 1; $table->per_page = 20; $table->cell_template = "<div class='marco1' ><#mensaje#><br><b class='mininegro'>Usuario: <#envia#></b></div><br>"; $table->build(); if ($this->datasis->login()) { $prop = array('type' => 'button', 'value' => 'Agregar', 'name' => 'mas', 'onclick' => "javascript:window.location='" . site_url("supervisor/noticias/dataedit/create") . "'"); $form = form_input($prop); } else { $form = ''; } $data['content'] = $table->output . $form; $data["head"] = $this->rapyd->get_head() . style('marcos.css') . style('estilos.css'); $data['title'] = " Noticias "; $this->load->view('view_ventanas', $data); }
function index() { $this->rapyd->load("datatable"); $mesonero = $this->session->userdata['mesonero']; $table = new DataTable(null); $table->cell_attributes = 'style="vertical-align:middle; text-align: center;"'; $table->db->select(array('numero', 'fecha', 'mesa', 'hora', 'mesonero')); $table->db->from("rfac"); $table->db->where('tipo', 'P'); $table->db->where('mesonero', $mesonero); $table->db->orderby("mesa"); $table->per_row = 4; $table->per_page = $this->datasis->dameval("SELECT COUNT(*) FROM rfac WHERE tipo='P' AND mesonero='{$mesonero}'"); $table->cell_template = '<div style="background-color: #FFFFFF;"><a href="' . site_url('hospitalidad/restaurante/modificar/<#numero#>') . '" >' . image('mesa.png', 'Agregar', array('border' => 0, 'align' => 'center')) . '</a>' . '<br><b><#mesa#></b><br> <b class="mininegro"><dbdate_to_human><#fecha#></dbdate_to_human> <#hora#></b></div>'; $table->build(); $link = site_url('hospitalidad/restaurante/mesa'); $prop2 = array('type' => 'button', 'value' => 'Agregar Mesa', 'name' => 'add', 'onclick' => "javascript:window.location = '{$link}';", 'style' => 'font-size:18'); $link = site_url('hospitalidad/restaurante/cese'); $prop1 = array('type' => 'button', 'value' => 'Cerrar', 'name' => 'cese', 'onclick' => "javascript:window.location = '{$link}';", 'style' => 'font-size:18'); $data['content'] = $table->output . '<br><center><p>' . form_input($prop2) . '</p><p>' . form_input($prop1) . '</p></center>'; $data['title'] = "{$mesonero}"; $data["head"] = script("keyboard.js") . script("prototype.js"); $data["head"] .= script("effects.js") . style("ventanas.css") . style("restaurant.css") . $this->rapyd->get_head(); $this->load->view('view_ventanas_sola', $data); }
function index() { //$this->datasis->modulo_id(123,1); $this->rapyd->load("dataform", "datatable"); $this->load->library('table'); $modbus = array('tabla' => 'maes', 'columnas' => array('codigo' => 'Código', 'descrip' => 'Descripción', 'precio1' => 'Precio 1', 'precio2' => 'Precio 2', 'precio3' => 'Precio 3', 'precio4' => 'Precio 4', 'precio5' => 'Precio 5'), 'filtro' => array('codigo' => 'Código', 'descrip' => 'Descripción'), 'retornar' => array('codigo' => 'codigo'), 'titulo' => 'Buscar en inventario'); $boton = $this->datasis->modbus($modbus); $filter = new DataForm('supermercado/consulcajas/index/process'); $filter->title('Seleccione un producto'); $filter->codigo = new inputField("Codigo", "codigo"); $filter->codigo->append($boton); $filter->codigo->size = 10; $filter->button("btnsubmit", "Consultar", '', $position = "BL"); $filter->build_form(); $table = new DataTable(null); $table->cell_attributes = 'style="vertical-align:middle;"'; $table->db->select(array('caja', 'ubica')); $table->db->from("caja"); $table->db->where("ubica REGEXP '^([1-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.(([0-9]{1,2}|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){2}([0-9]{1,2}|1[0-9]{2}|2[0-4][0-9]|25[0-5])\$' "); $table->db->orderby('caja'); $table->per_row = 2; $table->per_page = 30; $celda = array(array(image('caja_abierta.gif', "Caja <#caja#>", array('border' => 0, 'align' => 'center')) . '<br>Caja <#caja#>', '<div name="cc<#caja#>" id="<#ubica#>"></div>')); $table->cell_template = $this->table->generate($celda); $table->build(); $link = site_url('supermercado/consulcajas/preciocaj'); $script = <<<script \t\t<script type='text/javascript'> \t\t\$(document).ready(function() { \t\t\t\$("input[name='btnsubmit']").click(function () { \t\t\t \t\t\t var producto=jQuery.trim(\$('#codigo').val()); \t\t\t\tif (producto.length==0){ \t\t\t\t\talert('Debe introducir un producto'); \t\t\t\t\treturn false; \t\t\t\t} \t\t\t\t\$("div[name^='cc']").each(function (i) { \t\t\t \$(this).load("{$link}"+'/'+this.id+'/'+producto); \t\t\t }); \t\t\t \t\t\t}); \t\t}); \t\t</script> script; $data['content'] = $filter->output . $table->output; $data['title'] = "<h1>Consulta de productos en cajas</h1>"; $data["head"] = $this->rapyd->get_head() . script("jquery.js") . $script; $this->load->view('view_ventanas', $data); }
function dtable($articulos) { $per_row = 2; $per_page = 4; $table = new DataTable(null, $articulos); $table->per_row = $per_row; $table->per_page = $per_page; //$table->cell_attributes = 'style="vertical-align:middle;align:center; text-align: center;"'; //$table->cell_template = "<div align='center' style='width:180px; padding:10px; height:140px; background-color:#559955'><#1#><div/>"; //$table->cell_attributes ='align="center" height="220px" width="380px"'; $table->cell_template = '<#1#>'; $table->build(); return $table->output; }
function preciosgeneral() { $this->rapyd->load('dataform', 'datatable'); $cod = $this->uri->segment(4) == false ? $this->input->post('codigo') : $this->uri->segment(4); $script = '<script type="text/javascript" charset=ISO-8859-1"> $(document).ready(function() { $("#codigo").attr("value", ""); $("#codigo").focus(); }); function dbuscar(){ $("form").submit(); } </script>'; $barras = array('name' => 'codigo', 'id' => 'codigo', 'value' => '', 'size' => '16'); if ($this->tipo == 'sinv') { $modbus = array('tabla' => 'sinv', 'columnas' => array('codigo' => 'Código', 'barras' => 'Código barras', 'descrip' => 'Descripción', 'existen' => 'Existencia'), 'filtro' => array('descrip' => 'Descripción'), 'retornar' => array('codigo' => 'codigo'), 'where' => 'activo = "S"', 'titulo' => 'Buscar Artículo', 'script' => array('dbuscar()')); } else { $modbus = array('tabla' => 'maes', 'columnas' => array('codigo' => 'Código', 'descrip' => 'descrip'), 'filtro' => array('descrip' => 'descrip'), 'retornar' => array('codigo' => 'codigo'), 'titulo' => 'Buscar Articulo', 'script' => array('dbuscar()')); } $boton = $this->datasis->modbus($modbus); $out = '<h1>' . form_open('inventario/consultas/preciosgeneral'); $out .= 'Introduzca un Código '; $out .= form_input($barras) . $boton; $out .= form_submit('btnsubmit', 'Consultar') . form_close() . '</h1>'; $contenido = $out; if (!empty($cod)) { $data2 = $this->rprecios($cod); if ($data2 !== false) { $contenido .= $this->load->view('view_rprecios', $data2, true); } else { $t = array(); $t[1][1] = '<b>PRODUCTO NO CODIFICADO</b>'; $t[2][1] = ''; $t[3][1] = '<b>Por Favor consulte con el personal de pasillo</b>'; $table = new DataTable(null, $t); $table->cell_attributes = 'style="vertical-align:middle; text-align: center;"'; $table->per_row = 1; $table->cell_attributes = ''; $table->cell_template = "<div style='color:red;' align='center'><#1#></div></br>"; $table->build(); $contenido .= $table->output; } } $data['content'] = $contenido; $data['head'] = script('jquery.js') . style('ventanas.css') . style('estilos.css') . $this->rapyd->get_head() . $script; $this->load->view('view_ventanas', $data); }
function datatable() { //datatable// $this->rapyd->load("datatable"); $table = new DataTable(null, $this->data); $table->per_row = 3; $table->per_page = 6; $table->use_function("substr", "strtoupper"); $table->cell_template = ' <div style="padding:4px"> <div style="color:#119911; font-weight:bold"><#title#></div> This is the body number <substr><#body#>|5|100</substr> </div>'; $table->build(); $data["table"] = $table->output; //enddatatable// $content["content"] = $this->load->view('rapyd/datatable', $data, true); $content["rapyd_head"] = $this->rapyd->get_head(); $content["code"] = highlight_code_file(THISFILE, "//datatable//", "//enddatatable//"); $this->load->view('rapyd/template', $content); }
function index() { $this->datasis->modulo_id('123', 1); $this->rapyd->load("fields", "datatable"); $atts = array('width' => '530', 'height' => '600', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0'); $table = new DataTable(null); $table->cell_attributes = 'style="vertical-align:middle;"'; $table->db->select(array('caja', 'ubica')); $table->db->from("caja"); $table->db->where("ubica REGEXP '^([1-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]{1,2}|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}\$' "); $table->db->orderby('caja'); $table->per_row = 5; $table->per_page = 15; //$table->cell_template = "<a href='".site_url('/supermercado/envivo/caja/<#ubica#>')."' target='vencaja' >". image('caja_abierta.gif',"Caja <#caja#>", array('border'=>0,'align'=>'center')).'</a>'.'<br>Caja <#caja#>'; $table->cell_template = anchor_popup('/supermercado/envivo/caja/<#ubica#>', image('caja_abierta.gif', "Caja <#caja#>", array('border' => 0, 'align' => 'center')), $atts) . '<br>Caja <#caja#>'; $table->build(); $data['content'] = '<center>' . $table->output . '</center>'; $data['title'] = "<h1>Ventas en vivo</h1>"; $data["head"] = $this->rapyd->get_head(); $this->load->view('view_ventanas', $data); }
function enlistar() { //$this->session->_flashdata_sweep(); //echo '<pre>';print_r($this->session->userdata);echo '</pre>'; $repo = $this->uri->segment(3); $this->rapyd->load("datatable"); $this->rapyd->config->set_item("theme", "clean"); if ($repo) { $repo = strtoupper($repo); $grid = new DataTable(); //$grid->db->select('titulo, mensaje, SUBSTR(SUBSTRING_INDEX(REPLACE(ejecutar, "\'",\'"\'), \'"\', 2),10) AS nombre'); //$grid->db->from("tmenus"); //$grid->db->where("modulo='".$repo."LIS' AND TRIM(ejecutar) LIKE 'REPOSQL(%)'"); $grid->db->select('a.titulo, a.mensaje, a.nombre'); $grid->db->from("intrarepo AS a"); $grid->db->join("reportes AS b", "a.nombre=b.nombre"); $grid->db->where('a.modulo', $repo); $grid->db->where('a.activo', 'S'); $grid->per_row = 3; $grid->use_function("substr", "strtoupper"); $grid->cell_template = ' <div style="padding:4px"> <div style="color:#119911; font-weight:bold">' . anchor('reportes/ver/<#nombre#>/' . $repo, "<#titulo#>", array('onclick' => "parent.navegador.afiltro()")) . '</div> <htmlspecialchars><#mensaje#></htmlspecialchars> </div>'; $grid->build(); //echo $grid->db->last_query(); } if ($repo and $grid->recordCount > 0) { $data['forma'] = $grid->output; } else { $data['forma'] = '<p class="mainheader">No se encontrarón reportes.</p>'; } //echo $grid->db->last_query(); $data['head'] = $this->rapyd->get_head(); $data['titulo'] = "<center><h2>Listados Disponibles</h2></center>"; $data['repo'] = $repo; //$CI->session->set_userdata('estaba', $CI->uri->uri_string()); $this->load->view('view_reportes', $data); }
function index() { $this->datasis->modulo_id('11E', 1); $this->rapyd->load("fields", "datatable"); $table = new DataTable(null); $table->cell_attributes = 'style="vertical-align:middle;"'; $table->db->select(array('caja', 'ubica')); $table->db->from("caja"); $table->db->where("ubica REGEXP '^([1-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\.([0-9]{1,2}|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}\$' "); $table->db->orderby('caja'); $table->per_row = 5; $table->per_page = 15; //$table->cell_template = "<a href='".site_url('/supermercado/envivo/caja/<#ubica#>')."' target='vencaja' >". image('caja_abierta.gif',"Caja <#caja#>", array('border'=>0,'align'=>'center')).'</a>'.'<br>Caja <#caja#>'; $table->cell_template = image('caja_abierta.gif', "Caja <#caja#>", array('border' => 0, 'align' => 'center', 'id' => '<#caja#>')) . '<br>Caja <#caja#>'; $table->build(); $link = site_url('supermercado/apagar/capaga'); $data['script'] = "\n\t\t<script type='text/javascript'>\n\t\t\t\$(document).ready(function() {\n\t\t\t\t\$('img').click(function () { \n\t\t\t\t\tif (confirm('Seguro que desea apagar la caja '+this.id+'?')) { \n\t\t\t\t\t\t\$.ajax({\n\t\t\t\t\t\t\turl: '{$link}'+'/'+this.id,\n\t\t\t\t\t\t\tsuccess: function(msg){\n\t\t\t\t\t\t\t\talert(msg);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t});\n\t\t</script>\n\t\t"; $data['content'] = '<center>' . $table->output . '</center>'; $data['title'] = "<h1>Apagar las Cajas</h1>"; $data["head"] = $this->rapyd->get_head() . script('jquery.js'); $this->load->view('view_ventanas', $data); }
function ver($id = NULL) { if (empty($id)) { redirect("supervisor/tiketc/filteredgrid"); } $this->rapyd->load("datatable"); $query = $this->db->query("SELECT prioridad,estado FROM tiketc WHERE {$id}={$id}"); $estado = $prioridad = ''; if ($query->num_rows() > 0) { $row = $query->row(); $prioridad = $row->prioridad; $estado = $row->estado; } $link = $this->datasis->puede(908001) ? anchor('/supervisor/tiketc/dataedit/delete/<#id#>', 'borrar') : ''; $table = new DataTable(null); $table->cell_attributes = 'style="vertical-align:middle;"'; $select = array("usuario", "contenido", "prioridad", "estado", "estampa", "id", "padre"); $table->db->select($select); $table->db->from("tiketc"); $table->db->where("id={$id} OR pertenece={$id}"); $table->db->orderby("id"); $table->per_row = 1; $table->per_page = 50; $table->cell_template = "<div class='marco1' ><#contenido#><br><b class='mininegro'> <dbdate_to_human><#estampa#>|d/m/Y h:m:s</dbdate_to_human> Usuario: <#usuario#> {$link}</b></div><br>"; $table->build(); $prop = array('type' => 'button', 'value' => 'Agregar', 'name' => 'mas', 'onclick' => "javascript:window.location='" . site_url("supervisor/tiketc/dataedit/pertenece/{$id}/create") . "'"); $form = form_input($prop); $prop2 = array('type' => 'button', 'value' => 'Cambiar estado o prioridad', 'name' => 'mas', 'onclick' => "javascript:window.location='" . site_url("supervisor/tiketc/estapriori/modify/{$id}") . "'"); $form2 = form_input($prop2); $prop3 = array('type' => 'button', 'value' => 'Regresar', 'name' => 'mas', 'onclick' => "javascript:window.location='" . site_url("supervisor/tiketc/filteredgrid") . "'"); $form3 = form_input($prop3); $data['content'] = $table->output . $form . $form2 . $form3; $data["head"] = $this->rapyd->get_head() . style('marcos.css') . style('estilos.css'); $data['title'] = " tiketc Número: {$id} Prioridad: <b>" . $this->prioridad[$prioridad] . "</b>, Estado: <b>" . $this->estado[$estado] . "</b><br>"; $this->load->view('view_ventanas', $data); }
function index($var1 = '', $var2 = '', $var3 = '', $var4 = '') { $this->rapyd->load("dataform", "datatable"); $this->db->simple_query("ALTER TABLE `retenomi` ADD COLUMN `nombre` VARCHAR(100) NULL AFTER `status`"); $this->db->simple_query("ALTER TABLE `asignomi` ADD COLUMN `denominacion` TINYTEXT NULL AFTER `status`"); $form1 = new DataForm('nomina/prenom/index/process/aa'); $form1->contrato = new dropdownField("Contrato", "contrato"); $mSQL = $this->db->query("SHOW TABLES LIKE 'PRENOM%'"); foreach ($mSQL->result_array() as $row) { foreach ($row as $key => $value) { $c = $this->db->escape(substr($value, 6)); $nombre = $this->datasis->dameval("SELECT nombre FROM noco WHERE codigo={$c}"); $form1->contrato->option($value, $nombre); } } $form1->submit("btnsubmit", "Recuperar"); $form1->build_form(); if ($form1->on_success() && $var2 == 'aa') { $this->load->dbforge(); $tabla = 'prenom'; $tablap = 'pretab'; $this->db->query("TRUNCATE {$tabla}"); $this->db->query("TRUNCATE {$tablap}"); $contrato = $form1->contrato->newValue; $mSQL = "INSERT IGNORE INTO {$tabla} SELECT * FROM {$contrato} "; $this->db->query($mSQL); $mSQL = "DROP TABLE `{$contrato}`"; $this->db->query($mSQL); redirect('nomina/prenom/montos'); } $script = ' $(function() { $("#pagar").click(function(){ if(confirm("Esta Seguro de Crear Orden de Pago de Prenomina actual")) return true; else return false; }); $("#guarda").click(function(){ if(confirm("Esta Seguro que desea Guardar la Prenomina actual. Esto eliminara la prenomina guardada anteriormente")){ $.post("' . site_url('nomina/prenom/respalda') . '",{ partida:"a" },function(data){ if(data="_Si"){ alert("Se respaldo correctamente la Prenomina.") nueva=window.open("' . site_url('nomina/prenom') . '","_self"); }else{ alert("No se Pudo respaldar la Prenomina") } }) return false; }else{ return false; } }); $("#recibo").click(function(){ cant = $("#cant").val(); var caracteristicas = "height=240,width=420,scrollTo,resizable=1,scrollbars=1,location=0"; nueva=window.open("' . site_url('forma/ver/RECIBO/') . '/"+cant, "Popup", caracteristicas); return false; }); $("#contrato").change(function (){ c=$("#contrato").val(); $.post("' . site_url('nomina/noco/tipo') . '",{ con: c}, function(data){ $("#contrato2").html(data); }); }); }); '; $form = new DataForm('nomina/prenom/index/process'); $form->script($script); $form->contrato = new dropdownField("Contrato", "contrato"); $form->contrato->option("", "Seleccionar"); $form->contrato->options("SELECT codigo,CONCAT_ws(' ',codigo,nombre) nom FROM noco ORDER BY nombre"); $form->contrato->rule = 'required'; $form->contrato2 = new dropdownField("Aplicar a", "contrato2"); //$form->contrato2->options("SELECT codigo,CONCAT_ws(' ',codigo,nombre) nom FROM noco WHERE tipo<>'O' ORDER BY nombre"); $form->fechac = new dateonlyField("Fecha de corte", "fechac"); $form->fechac->rule = 'required|chfecha'; $form->fechac->insertValue = date("Y-m-d"); $form->fechac->size = 12; $form->fechap = new dateonlyField("Fecha de pago", "fechap"); $form->fechap->rule = 'required|chfecha'; $form->fechap->insertValue = date("Y-m-d"); $form->fechap->size = 12; $form->submit("btnsubmit", "Generar"); $form->build_form(); if ($form->on_success()) { $this->load->dbforge(); $contrato = $form->contrato->newValue; $contratoe = $this->db->escape($form->contrato->newValue); $trabajae = NULL; $contrato2 = $form->contrato2->newValue; $contrato2e = $this->db->escape($form->contrato2->newValue); $fechac = $form->fechac->newValue; $fechap = $form->fechap->newValue; $tabla = 'prenom'; $tablap = 'pretab'; $this->db->query("TRUNCATE {$tabla}"); $this->db->query("TRUNCATE {$tablap}"); if (!empty($contrato2)) { $scontratoe = $contratoe; $trabajae = $contrato2e; $wcontratoe = $contrato2e; $mSQL = "INSERT IGNORE INTO {$tabla} (contrato, codigo,nombre, concepto, grupo, tipo, descrip, formula, monto, fecha, fechap,cuota,cuotat,pprome,trabaja,modo,orden,vari1,vari2,vari3,vari4,vari5,vari6,vari7,vari8) "; $mSQL .= "SELECT {$scontratoe}, b.codigo, CONCAT(RTRIM(b.apellido),' ',b.nombre) nombre, "; $mSQL .= "a.concepto, a.grupo, a.tipo, a.descrip, a.formula, 0, {$fechac}, {$fechap} , 0, 0, 0, {$trabajae},modo,e.orden,b.vari1,b.vari2,b.vari3,b.vari4,b.vari5,b.vari6,b.vari7,b.vari8 "; $mSQL .= "FROM conc a "; $mSQL .= "JOIN itnoco c ON a.concepto=c.concepto "; $mSQL .= "JOIN noco d ON c.codigo=d.codigo "; $mSQL .= "JOIN itnoco e ON d.codigo=e.codigo "; $mSQL .= "JOIN pers b ON {$scontratoe}=c.codigo "; $mSQL .= "WHERE b.contrato={$wcontratoe} AND b.status='A' "; } else { $scontratoe = $contratoe; $trabajae = $this->db->escape(''); $wcontratoe = $contratoe; $mSQL = "INSERT IGNORE INTO {$tabla} (contrato, codigo,nombre, concepto, grupo, tipo, descrip, formula, monto, fecha, fechap,cuota,cuotat,pprome,trabaja,modo,orden,vari1,vari2,vari3,vari4,vari5,vari6,vari7,vari8) "; $mSQL .= "SELECT {$scontratoe}, b.codigo, CONCAT(RTRIM(b.apellido),'/',b.nombre) nombre, "; $mSQL .= "a.concepto, a.grupo, a.tipo, a.descrip, a.formula, 0, {$fechac}, {$fechap} , 0, 0, 0, {$trabajae},modo,c.orden,b.vari1,b.vari2,b.vari3,b.vari4,b.vari5,b.vari6,b.vari7,b.vari8 "; $mSQL .= "FROM conc a JOIN itnoco c ON a.concepto=c.concepto "; $mSQL .= "JOIN noco d ON c.codigo=d.codigo "; $mSQL .= "JOIN pers b ON b.contrato=d.codigo \r\n\t\t\t\tWHERE d.codigo={$wcontratoe} AND b.status='A' "; } $this->db->query($mSQL); $fields = $this->db->list_fields($tablap); $ii = count($fields); for ($i = 5; $i < $ii; $i++) { $this->dbforge->drop_column($tablap, $fields[$i]); } unset($fields); $query = $this->db->query("SELECT concepto FROM itnoco WHERE codigo={$scontratoe} ORDER BY concepto"); foreach ($query->result() as $row) { $ind = 'c' . trim($row->concepto); $fields[$ind] = array('type' => 'decimal(17,2)', 'default' => 0); } $this->dbforge->add_column($tablap, $fields); unset($fields); $frec = $this->datasis->dameval("SELECT tipo FROM noco WHERE codigo={$scontratoe}"); $this->calculaprenom(); redirect('nomina/prenom/montos'); } $atts = array('width' => '420', 'height' => '300', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '5', 'screeny' => '5'); $atts2 = array('width' => '1024', 'height' => '768', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0'); $atts3 = array('width' => '420', 'height' => '240', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '5', 'screeny' => '5', 'id' => 'recibo'); $contratoactual = $this->datasis->dameval("SELECT b.nombre FROM prenom a JOIN noco b ON a.contrato=b.codigo LIMIT 1"); $des01 = ''; if ($contratoactual) { $des01 = "<div style='background-color:black;padding:5px;color:red;' ><strong>{$contratoactual}</strong></div>"; } $des0 = new containerField("", $des01); $des0->build(); $des3 = "<strong>Prenomina:</strong> es el termino utilizado para referirse a la nomina en la cual se esta trabajando que pertenece a un contrato y a una fecha dada. En la prenomina es el momento donde se introducen valores extra para los conceptos de nomina. por ejemplo la cantidad de horas extra trabajadas. y de donde se imprimen los recibos de pagos para los empleados"; $des2 = new containerField("", "<div style='background-color:#EEDDEE;padding:5px;'> " . $des3 . "</div>"); $des2->build(); $des4 = new containerField("", "<div style='background-color:#FFDDFF;padding:5px;'> " . anchor('', '<span id="guarda">Guardar Prenomina Actual</span>') . " Este se utiliza para almacenar la prenomina en la que se esta trabajando y porder continuar con otra sin perder los cambios realizados a esta</div>"); $des4->build(); $des5 = new containerField("", "<div style='background-color:#DDDDFF;padding:5px;'> " . anchor('nomina/prenom/montos', 'Modificar Prenomina Actual') . " Este se utiliza para continuar introduciendo valores a conceptos de la prenomina actual</div>"); $des5->build(); $des10 = new containerField("", "<div style='background-color:#DDFFFF;padding:5px;'> " . anchor('nomina/prenom/calculaprenom', 'Recalcular Prenomina') . " Recalcular montos de la prenomina de haber cambiado sueldos formulas</div>"); $des10->build(); $des6 = new containerField("", "<div style='background-color:#EEFFEE;padding:5px;'> " . anchor_popup('reportes/ver/PRENOM/-1', 'Ver Listado de Prenomina', $atts) . " Este Muestra el listado de prenomina actual en formatos pdf. o .xls</div>"); $des6->build(); //$des8 = new containerField("","<div style='background-color:#CCEEEE;padding:5px;'> ".anchor_popup('nomina/recibo/','Imprimir recibos de pago',$atts2)." Abre el modulo de impresion de recibos de pago, donde hay distintas opciones de impresion</div>"); //$des8->build(); $des7 = new containerField("", "<div style='background-color:#FFCCFF;padding:5px;'> " . anchor_popup('nomina/prenom/creanomi', '<span id="pagar">Crear Nomina en Base a Prenomina</span>', $atts2) . "Esta es la ultima operacion a realizar para una prenomina, la cual convierte la prenomina actual en una nomina.</div>"); $des7->build(); $t = array(); $t[1][1] = $form->output; $t[2][1] = "<strong>Generar una Prenomina:</strong> </br>Se utiliza para calcular los saldos de un contrato y sus trabajadores para una fecha.</br> Este borra la prenomina anterior y genera la nueva prenomina con los nuevos datos, para luego introducir los valores necesarios por cada concepto de ser necesario."; $table = new DataTable(null, $t); $table->cell_attributes = 'style="vertical-align:middle; text-align: center;"'; $table->per_row = 2; $table->cell_attributes = 'style="vertical-align:top;background-color:#DDFFFF;text-align: left;"'; $table->cell_template = "<#1#>"; $table->build(); $t = array(); $t[1][1] = $form1->output; $t[2][1] = "<strong>Recuperar Prenomina:</strong> </br>Esta opcion es para utilizar un prenomina previamente almacenada y continuar modificandola o terminarla.</br>Esta opcion borra los datos de la prenomina actual"; $table2 = new DataTable(null, $t); $table2->cell_attributes = 'style="vertical-align:middle; text-align: center;"'; $table2->per_row = 2; $table2->cell_attributes = 'style="vertical-align:top;background-color:#FFFFDD;text-align: left;"'; $table2->cell_template = "<#1#>"; $table2->build(); $cant = new dropdownField("cant", "cant"); $cant->status = 'create'; for ($i = 1; $i < 5; $i++) { $cant->option($i, $i); } $cant->style = "width:40px;"; $cant->build(); $des9 = new containerField("", "<div style='background-color:#EEEECC;padding:5px;'> " . $cant->output . ' Copias de ' . anchor('#', 'Recibos de Pago', $atts3) . " Este genera los recibos de pagos para toda la prenomina.</div>"); $des9->build();
function agregar($numero) { $this->rapyd->load("datatable"); $query = $this->db->query("SELECT grupo,descri1 FROM grme"); $select = array("grupo", "descri1"); $table = new DataTable(null); $table->cell_attributes = 'style="vertical-align:middle;"'; $table->db->select($select); $table->db->from("grme"); $table->per_row = 1; $table->per_page = $this->datasis->dameval("SELECT COUNT(*) FROM grme"); $table->cell_template = "<a href='#' onclick=\"platos('<#grupo#>'); return false;\" >" . image('b1.png', 'Agregar', array('border' => 0, 'align' => 'center')) . '</a>' . '<#descri1#>'; $table->build(); $out = $grup = ''; $tablas = $pivote = array(); $mc = $this->db->query("SELECT codigo,grupo,descri1 FROM menu ORDER BY grupo"); $prop = array('border' => '0'); $pass = true; foreach ($mc->result() as $row) { if ($grup != $row->grupo) { $grup = $row->grupo; $out .= "</ul><ul id='{$row->grupo}' style='display: none;'>"; $pass = false; } $out .= '<li><a href=# onclick="enviar(\'' . $row->codigo . '\')" >' . $row->descri1 . '</a></li>'; } $out .= '</ul>'; $out = substr($out, 5); $prop = array('name' => 'codigo', 'id' => 'codigo', 'type' => 'hidden'); $prop2 = array('type' => 'button', 'value' => ' + ', 'name' => 'mas', 'onclick' => "suma();"); $prop3 = array('type' => 'button', 'value' => ' - ', 'name' => 'menos', 'onclick' => "resta();"); $attributes = array('id' => 'envform', 'style' => 'display: none;'); $form = form_open("hospitalidad/restaurante/registrar/{$numero}/", $attributes); $form .= 'Cantidad ' . form_input(array('name' => 'cantidad', 'id' => 'cantidad', 'value' => '1', 'size' => '4')); $form .= form_input($prop); $form .= form_input($prop2); $form .= form_input($prop3); $form .= form_submit('mysubmit', 'Guardar'); $form .= form_close(); $data['script'] = "<script type='text/javascript'> \n\t\tvar esta= new String ('');\n\t\tfunction platos(id){\n\t\t\tif (esta.length>0 & esta!=id) Effect.toggle(esta, 'appear');\n\t\t\tEffect.toggle(id, 'appear');\n\t\t\testa=id;\n\t\t}\n\t\tfunction enviar(valcod){\n\t\t\tvar codigo = document.getElementById('codigo');\n\t\t\tcodigo.value=valcod;\n\t\t\tEffect.toggle('envform', 'appear');\n\t\t}\n\t\tfunction suma(){\n\t\t\tvar cant = document.getElementById('cantidad');\n\t\t\tcant.value=parseInt(cant.value)+1;\n\t\t}\n\t\tfunction resta(){\n\t\t\tvar cant = document.getElementById('cantidad');\n\t\t\tcant.value=parseInt(cant.value)-1;\n\t\t}\n\t\t</script>"; $data['content'] = '<table><tr><td>' . $table->output . '</td><td>' . $form . $out . '</td></tr></table>'; $data['title'] = ""; $data["head"] = script("keyboard.js") . script("prototype.js"); $data["head"] .= script("effects.js") . style("ventanas.css") . $this->rapyd->get_head(); $this->load->view('view_ventanas_sola', $data); }
function ver($id) { $this->rapyd->load("datatable"); $table = new DataTable(null); $table->cell_attributes = 'style="vertical-align:middle; text-align: center;"'; $table->db->select(array('nombre', 'comentario')); $table->db->from("sinvfot"); $table->db->where('sinv_id', $id); $table->per_row = 1; $table->per_page = 1; $table->cell_template = "<img src='" . $this->upload_path . "<#nombre#>' width='300' border=0><br><#comentario#>"; $table->build(); $data['content'] = '<center>' . $table->output . '</center>'; $data['title'] = ""; $data["head"] = style("ventanas.css") . style("estilos.css") . $this->rapyd->get_head(); $this->load->view('view_ventanas_sola', $data); }
function rprecios($cod_bar = NULL) { $mSQL_p = 'SELECT precio1,precio2,base1, barras,existen,descrip, codigo,iva,unidad FROM maes'; $mSQL = $mSQL_p . " WHERE barras='{$cod_bar}'"; //or or $query = $this->db->query($mSQL); if ($query->num_rows() == 0) { $mSQL = $mSQL_p . " WHERE codigo='{$cod_bar}'"; $query = $this->db->query($mSQL); //echo $mSQL."------>"; //echo $query->num_rows(); if ($query->num_rows() == 0) { return false; $mSQL = $mSQL_p . " WHERE alterno='{$cod_bar}'"; $query = $this->db->query($mSQL); if ($query->num_rows() == 0) { return false; } } } $row = $query->row(); $data['precio1'] = number_format($row->precio1, 2, ',', '.'); $data['precio2'] = number_format($row->precio2, 2, ',', '.'); $data['descrip'] = $row->descrip; $data['base1'] = number_format($row->base1, 2, ',', '.'); $data['codigo'] = $row->codigo; //$data['alterno'] = $row->alterno; $data['unidad'] = $row->unidad; //$data['marca'] = $row->marca; $data['existen'] = $row->existen; $data['barras'] = $row->barras; //$data['modelo'] = $row->modelo; $data['iva'] = $row->iva; $data['iva2'] = number_format($row->base1 * ($row->iva / 100), 2, ',', '.'); //$data['img'] = site_url('inventario/fotos/obtener/'.$row->id); $data['moneda'] = 'Bs.F.'; $this->rapyd->load("datatable"); $this->load->helper('string'); $table = new DataTable(null); $table->cell_attributes = 'style="vertical-align:middle; text-align: center;"'; if (!empty($row->id)) { $table->db->select(array('nombre', 'id', 'comentario')); $table->db->from("sinvfot"); $table->db->where("sinv_id='{$row->id}' "); $prin = $this->datasis->dameval("select nombre from sinvfot where sinv_id='{$row->id}' and principal='S'"); $comment = $this->datasis->dameval("select comentario from sinvfot where nombre='{$prin}'"); $link = site_url('uploads/inventario/Image/ver/<#nombre#>/'); $link2 = site_url('uploads/inventario/Image/ver/<#nombre#>/'); $scr = reduce_double_slashes(base_url() . "uploads/inventario/Image/<#nombre#>"); $table->per_row = 6; $table->per_page = 60; //onclick='javascript:fancy();' $table->cell_attributes = 'style="vertical-align:top; width:126;"'; $table->cell_template = "</br><div align='center' class='dos'><a title='<#comentario#>' href='{$scr}' ><img style='margin: 0px 4px' title='<#comentario#>' src='{$scr}' width='100' height='75' border=0 /></a></div></br>"; //<div width='120'></div> $table->build(); $data['comment'] = $comment; $data['prin'] = $prin; $data['content'] = $table->output; } //$data["head"] = script("jquery.js").script("plugins/jquery.fancybox.pack.js").script("plugins/jquery.easing.js").style('fancybox/jquery.fancybox.css').$this->rapyd->get_head(); return $data; }
function html2($format = 'CATALOGOTE') { $this->rapyd->load("datatable"); $codigo = $this->input->post("codigo"); //if($codigo!==false){ //$html=$this->datasis->dameval("SELECT contenido FROM catalogo WHERE codigo='$codigo' LIMIT 1"); //if(!empty($id)){ // echo $html; //}else{ $id = $this->datasis->dameval("SELECT id FROM sinv WHERE codigo='{$codigo}' LIMIT 1"); if ($id != false) { $query = "SELECT proteo FROM formatos WHERE nombre='{$format}'"; $formato = $this->datasis->dameval($query); $scr = base_url() . "uploads/inventario/Image/<#nombre#>"; $table = new DataTable(null); $table->cell_attributes = 'style="vertical-align:middle; text-align: center;"'; $table->db->select(array('nombre', 'id')); $table->db->from("sinvfot"); $table->db->where("sinv_id='{$id}'"); $table->db->orderby("principal='S'"); $table->per_row = 3; $table->per_page = 18; $table->cell_attributes = 'width="150px"'; $table->cell_template = "<div align='center'><a class='imagen' title='<#comentario#>' href='{$scr}' ><img style='margin:10px' title='<#comentario#>' src='{$scr}' width='180' border=0 /></a></div>"; //<div width='120'></div> $table->build(); //$data['conf']=$this->layout->settings; //extract($data); ob_start(); echo eval('?>' . preg_replace("/;*\\s*\\?>/", "; ?>", str_replace('<?=', '<?php echo ', $formato)) . '<?php '); $_html = ob_get_contents(); @ob_end_clean(); echo ' <script language="JavaScript" type="text/javascript"> $(document).ready(function() { $("a imagen").fancybox(); }); </script> ' . $_html . $table->output; } //} //} }
function verCatalogo($codigo = NULL) { $this->rapyd->load("datatable"); $this->load->library('snoopy'); $this->load->library('htmlsql'); $table = new DataTable(null); $table->cell_attributes = 'style="vertical-align:middle; text-align: center;"'; $table->db->select(array('nombre', 'id', 'comentario')); $table->db->from("sinvfot"); //$table->db->where("codigo='$codigo'"); $table->per_row = 1; $table->per_page = 16; $table->cell_template = "<#comentario#>"; $table->build(); $data['content'] = $table->output; $data['title'] = ""; $data["head"] = style("ventanas.css") . style("estilos.css") . $this->rapyd->get_head(); $this->load->view('view_ventanas_sola', $data); }
function ver($actividad) { if (empty($actividad)) { redirect("supervisor/bitacorafyco/filteredgrid"); } $this->rapyd->load("datatable"); $link = $this->datasis->puede(908001) ? anchor('/supervisor/tiket/dataedit/delete/<#id#>', 'borrar') : ''; $table = new DataTable(null); $table->cell_attributes = 'style="vertical-align:middle;"'; $select = array("id", "usuario", "resultado", "fecha", "hora"); $table->db->select($select); $table->db->from("itbitacora"); $table->db->where('actividad', $actividad); $table->db->orderby("id"); $this->db->_escape_char = ''; $this->db->_protect_identifiers = false; $table->per_row = 1; $table->per_page = 50; $table->cell_template = "<div class='marco1' ><#resultado#><br><b class='mininegro'> <dbdate_to_human><#fecha#>|d/m/Y h:m:s</dbdate_to_human> Usuario: <#usuario#> {$link}</b></div><br>"; $table->build(); $data['content'] = $table->output; $data["head"] = $this->rapyd->get_head() . style('marcos.css') . style('estilos.css'); $this->load->view('view_ventanas_sola', $data); }