本文整理汇总了PHP中set_table_tpl函数的典型用法代码示例。如果您正苦于以下问题:PHP set_table_tpl函数的具体用法?PHP set_table_tpl怎么用?PHP set_table_tpl使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了set_table_tpl函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: listado_marcas
public function listado_marcas($offset = 0)
{
$data_tab_2 = "";
$filtro = $this->ajax_post('filtro') ? $this->ajax_post('filtro') : "";
$uri_view = $this->uri_modulo . '/listado';
$limit = 10;
$uri_segment = $this->uri_segment();
$lts_content = $this->catalogos_model->get_marcas($limit, $offset, $filtro);
$total_rows = count($this->catalogos_model->get_marcas($limit, $offset, $filtro, false));
$url = base_url($this->uri_modulo . $this->uri_submodulo . '/' . $this->uri_seccion . '/listado_marcas');
$paginador = $this->pagination_bootstrap->paginator_generate($total_rows, $url, $limit, $uri_segment, array('evento_link' => 'onclick', 'function_js' => 'load_content', 'params_js' => '1'));
if ($total_rows > 0) {
foreach ($lts_content as $value) {
$atrr = array('href' => '#', 'onclick' => 'detalle_marca(' . $value['id_compras_marca'] . ')');
$marcas = $this->catalogos_model->db_get_marcas_user($value['id_compras_marca']);
$eliminar = '<span style="color:red;" id="ico-eliminar_' . $value['id_compras_marca'] . '" class="ico_eliminar fa fa-times" onclick="confirm_delete(' . $value['id_compras_marca'] . ')" title="' . $this->lang_item("lbl_eliminar") . '"></span>';
$btn_acciones['eliminar'] = $marcas[0]['num_marcas'] == 0 ? $eliminar : '<span style="color:gray;" id="ico-eliminar_' . $value['id_compras_marca'] . '" class="ico_eliminar fa fa-times" title="' . $this->lang_item("lbl_eliminar") . '"></span>';
$btn_acciones['detalle'] = '<span id="ico-detalle_' . $value['id_compras_marca'] . '" class="ico_acciones ico_detalle fa fa-search-plus" onclick="detalle(' . $value['id_compras_marca'] . ')" title="' . $this->lang_item("detalle") . '"></span>';
$acciones = implode(' ', $btn_acciones);
$tbl_data[] = array('id' => $value['id_compras_marca'], 'marca' => tool_tips_tpl($value['marca'], $this->lang_item("tool_tip"), 'right', $atrr), 'clave_corta' => $value['clave_corta'], 'descripcion' => $value['descripcion'], 'acciones' => $acciones);
}
$tbl_plantilla = set_table_tpl();
$this->table->set_heading($this->lang_item("id"), $this->lang_item("marca"), $this->lang_item("cvl_corta"), $this->lang_item("descripcion"), $this->lang_item("acciones"));
$this->table->set_template($tbl_plantilla);
$tabla = $this->table->generate($tbl_data);
$buttonTPL = array('text' => $this->lang_item("btn_xlsx"), 'iconsweets' => 'fa fa-file-excel-o', 'href' => base_url($this->uri_modulo . $this->uri_seccion . '/export_xlsx?filtro=' . base64_encode($filtro)));
} else {
$buttonTPL = "";
$msg = $this->lang_item("msg_query_null");
$tabla = alertas_tpl('', $msg, false);
}
$data_tab_2['filtro'] = $filtro != "" ? sprintf($this->lang_item("msg_query_search"), $total_rows, $filtro) : "";
$data_tab_2['tabla'] = $tabla;
$data_tab_2['export'] = button_tpl($buttonTPL);
$data_tab_2['paginador'] = $paginador;
$data_tab_2['item_info'] = $this->pagination_bootstrap->showing_items($limit, $offset, $total_rows);
if ($this->ajax_post(false)) {
echo json_encode($this->load_view_unique($uri_view, $data_tab_2, true));
} else {
return $this->load_view_unique($uri_view, $data_tab_2, true);
}
}
开发者ID:minorusal,项目名称:admin_salon,代码行数:42,代码来源:marcas.php
示例2: listado_articulos
public function listado_articulos($offset = 0)
{
$data_tab_2 = "";
$filtro = $this->ajax_post('filtro') ? $this->ajax_post('filtro') : "";
$uri_view = $this->uri_modulo . '/listado';
$limit = 10;
$uri_segment = $this->uri_segment();
$lts_content = $this->catalogos_model->get_articulos($limit, $offset, $filtro);
$total_rows = count($this->catalogos_model->get_articulos($limit, $offset, $filtro, false));
$url = base_url($this->uri_modulo . $this->uri_seccion . '/listado_articulos');
$paginador = $this->pagination_bootstrap->paginator_generate($total_rows, $url, $limit, $uri_segment, array('evento_link' => 'onclick', 'function_js' => 'load_content', 'params_js' => '1'));
if ($total_rows > 0) {
foreach ($lts_content as $value) {
$atrr = array('href' => '#', 'onclick' => 'detalle_articulo(' . $value['id_compras_articulo'] . ')');
$tbl_data[] = array('id' => $value['articulo'], 'articulos' => tool_tips_tpl($value['articulo'], $this->lang_item("tool_tip"), 'right', $atrr), 'clave_corta' => $value['clave_corta'], 'articulo_tipo' => $value['articulo_tipo'], 'linea' => $value['linea'], 'um' => $value['um'], 'descripcion' => $value['descripcion']);
}
$tbl_plantilla = set_table_tpl();
$this->table->set_heading($this->lang_item("articulos"), $this->lang_item("articulos"), $this->lang_item("cvl_corta"), $this->lang_item("articulo_tipo"), $this->lang_item("lineas"), $this->lang_item("um"), $this->lang_item("descripcion"));
$this->table->set_template($tbl_plantilla);
$tabla = $this->table->generate($tbl_data);
$buttonTPL = array('text' => $this->lang_item("btn_xlsx"), 'iconsweets' => 'iconsweets-excel', 'href' => base_url($this->uri_modulo . $this->uri_seccion . '/export_xlsx?filtro=' . base64_encode($filtro)));
} else {
$buttonTPL = "";
$msg = $this->lang_item("msg_query_null");
$tabla = alertas_tpl('', $msg, false);
}
$data_tab_2['filtro'] = $filtro != "" ? sprintf($this->lang_item("msg_query_search", false), $total_rows, $filtro) : "";
$data_tab_2['tabla'] = $tabla;
$data_tab_2['export'] = button_tpl($buttonTPL);
$data_tab_2['paginador'] = $paginador;
$data_tab_2['item_info'] = $this->pagination_bootstrap->showing_items($limit, $offset, $total_rows);
if ($this->ajax_post(false)) {
echo json_encode($this->load_view_unique($uri_view, $data_tab_2, true));
} else {
return $this->load_view_unique($uri_view, $data_tab_2, true);
}
}
开发者ID:erick120191,项目名称:adminplayidea,代码行数:37,代码来源:articulos.php
示例3: listado
public function listado($offset = 0)
{
// Crea tabla con listado de ordenes aprobadas
$accion = $this->tab['listado'];
$limit = $this->limit_max;
$uri_view = $this->modulo . '/' . $accion;
$url_link = $this->modulo . '/' . $this->seccion . '/' . $accion;
$buttonTPL = '';
$filtro = $this->ajax_post('filtro') ? $this->ajax_post('filtro') : "";
$sqlData = array('buscar' => $filtro, 'offset' => $offset, 'limit' => $limit);
$uri_segment = $this->uri_segment();
$total_rows = count($this->db_model->db_get_data($sqlData));
$sqlData['aplicar_limit'] = false;
$list_content = $this->db_model->db_get_data($sqlData);
$url = base_url($url_link);
$paginador = $this->pagination_bootstrap->paginator_generate($total_rows, $url, $limit, $uri_segment, array('evento_link' => 'onclick', 'function_js' => 'load_content', 'params_js' => '1'));
if ($total_rows) {
foreach ($list_content as $value) {
// Evento de enlace
// Acciones
$accion_id = $value['id_compras_orden_articulo'];
$btn_acciones['agregar'] = '<span id="ico-articulos_' . $accion_id . '" class="ico_detalle fa fa-search-plus" onclick="detalle(' . $accion_id . ')" title="' . $this->lang_item("agregar_articulos") . '"></span>';
$acciones = implode(' ', $btn_acciones);
// Datos para tabla
$tbl_data[] = array('id' => $value['id_stock'], 'articulo' => $value['articulo'], 'presentacion' => $value['presentacion'], 'stock' => $value['stock'], 'clave_corta' => $value['clave_corta'], 'fecha_recepcion' => $value['fecha_recepcion'], 'almacenes' => $value['almacenes'], 'gavetas' => $value['gavetas'], 'acciones' => $acciones);
}
// Plantilla
$tbl_plantilla = set_table_tpl();
// Titulos de tabla
$this->table->set_heading($this->lang_item("id_stock"), $this->lang_item("articulo"), $this->lang_item("presentacion"), $this->lang_item("stock"), $this->lang_item("clave_corta"), $this->lang_item("fecha_recepcion"), $this->lang_item("almacenes"), $this->lang_item("gavetas"), $this->lang_item("acciones"));
// Generar tabla
$this->table->set_template($tbl_plantilla);
$tabla = $this->table->generate($tbl_data);
// XLS
$buttonTPL = array('text' => $this->lang_item("btn_xlsx"), 'iconsweets' => 'fa fa-file-excel-o', 'href' => base_url($this->modulo . '/' . $this->seccion) . '/export_xlsx?filtro=' . base64_encode($filtro));
} else {
$msg = $this->lang_item("msg_query_null");
$tabla = alertas_tpl('', $msg, false);
}
$tabData['filtro'] = isset($filtro) && $filtro != "" ? sprintf($this->lang_item("msg_query_search", false), $total_rows, $filtro) : "";
$tabData['tabla'] = $tabla;
$tabData['paginador'] = $paginador;
$tabData['item_info'] = $this->pagination_bootstrap->showing_items($limit, $offset, $total_rows);
$tabData['export'] = button_tpl($buttonTPL);
if ($this->ajax_post(false)) {
echo json_encode($this->load_view_unique($uri_view, $tabData, true));
} else {
return $this->load_view_unique($uri_view, $tabData, true);
}
}
开发者ID:minorusal,项目名称:admin_salon,代码行数:50,代码来源:entradas_almacen.php
示例4: tbl_multiples_perfiles
/**
* En caso de multiples perfiles genera
* una tabla para selecionar perfil de ingreso
* @param array $data
* @return string
*/
function tbl_multiples_perfiles($data)
{
$bool = true;
foreach ($data as $value) {
$img_path = './assets/avatar/users/';
$avatar_image = $img_path . $value['avatar_user'];
$avatar_foto = file_exists($avatar_image) ? $avatar_image : $img_path . 'sin_foto.png';
$avatar = array('data' => '<img src=' . $avatar_foto . ' style="max-width:80px;max-height:90px;" />');
$name_user = $value['name'];
$attr = array('name' => 'perfil_ingreso', 'type' => 'radio', 'value' => $value['id_usuario'], 'checked' => $bool ? 'true' : 'false');
$tbl_data[] = array('pais' => '<img src=' . base_url() . 'assets/avatar/' . $value['avatar_pais'] . ' />' . $value['pais'], 'perfil' => '<a href="#" onclick="authentication_perfil(' . $value['id_usuario'] . ')"><span>' . $value['perfil'] . '</span></a>');
$bool = false;
}
$tbl_plantilla = set_table_tpl();
$this->table->set_heading($this->lang_item('row_pais'), $this->lang_item('row_perfil'));
$this->table->set_template($tbl_plantilla);
$tbl_info[] = array('image' => $avatar, 'msg' => $this->lang_item('modal_msg', false));
$perfiles = $this->table->generate($tbl_data);
$this->table->set_heading($this->lang_item('modal_saludo'), $name_user);
$this->table->set_template($tbl_plantilla);
$info = $this->table->generate($tbl_info);
return $info . $perfiles;
}
开发者ID:erick120191,项目名称:adminplayidea,代码行数:29,代码来源:login.php
示例5: listado
public function listado($offset = 0)
{
// Crea tabla con listado de elementos capturados
$accion = $this->tab['listado'];
$tab_detalle = $this->tab['detalle'];
$limit = $this->limit_max;
$uri_view = $this->modulo . '/' . $accion;
$url_link = $this->modulo . '/' . $this->submodulo . '/' . $accion;
$buttonTPL = '';
$filtro = $this->ajax_post('filtro') ? $this->ajax_post('filtro') : "";
$sqlData = array('buscar' => $filtro, 'offset' => $offset, 'limit' => $limit);
$uri_segment = $this->uri_segment();
$total_rows = count($this->db_model->db_get_data($sqlData));
$sqlData['aplicar_limit'] = false;
$list_content = $this->db_model->db_get_data($sqlData);
$url = base_url($url_link);
$paginador = $this->pagination_bootstrap->paginator_generate($total_rows, $url, $limit, $uri_segment, array('evento_link' => 'onclick', 'function_js' => 'load_content', 'params_js' => '1'));
if ($total_rows) {
foreach ($list_content as $value) {
// Evento de enlace
$atrr = array('href' => '#', 'onclick' => $tab_detalle . '(' . $value['id_compras_orden'] . ')');
// Acciones
$accion_id = $value['id_compras_orden'];
$btn_acciones['detalle'] = '<span id="ico-detalle_' . $accion_id . '" class="ico_acciones ico_detalle fa fa-search-plus" onclick="detalle(' . $accion_id . ')" title="' . $this->lang_item("detalle") . '"></span>';
$btn_acciones['agregar'] = '<span id="ico-articulos_' . $accion_id . '" class="ico_acciones ico_articulos fa fa-cart-plus" onclick="articulos(' . $accion_id . ')" title="' . $this->lang_item("agregar_articulos") . '"></span>';
$btn_acciones['eliminar'] = '<span id="ico-eliminar_' . $accion_id . '" class="ico_acciones ico_eliminar fa fa-times" onclick="eliminar(' . $accion_id . ')" title="' . $this->lang_item("eliminar") . '"></span>';
$btn_acciones['imprimir'] = '<span id="ico-imprimir_' . $accion_id . '" class="ico_acciones ico_imprimir fa fa-print" onclick="ver_pdf(\'' . base_url($this->modulo . '/' . $this->submodulo) . '/export_imprimir?id=' . $accion_id . '\');" title="' . $this->lang_item("imprimir") . '"></span>';
$acciones = implode(' ', $btn_acciones);
// Datos para tabla
$tbl_data[] = array('id' => $value['id_compras_orden'], 'orden_num' => tool_tips_tpl($value['orden_num'], $this->lang_item("tool_tip"), 'right', $atrr), 'descripcion' => tool_tips_tpl($value['descripcion'], $this->lang_item("tool_tip"), 'right', $atrr), 'sucursal' => $value['sucursal'], 'timestamp' => $value['timestamp'], 'entrega_fecha' => $value['entrega_fecha'], 'estatus' => $value['estatus'], 'acciones' => $acciones);
}
// Plantilla
$tbl_plantilla = set_table_tpl();
// Titulos de tabla
$this->table->set_heading($this->lang_item("id"), $this->lang_item("orden_num"), $this->lang_item("descripcion"), $this->lang_item("sucursal"), $this->lang_item("fecha_registro"), $this->lang_item("entrega_fecha"), $this->lang_item("estatus"), $this->lang_item("acciones"));
// Generar tabla
$this->table->set_template($tbl_plantilla);
$tabla = $this->table->generate($tbl_data);
// XLS
$buttonTPL = array('text' => $this->lang_item("btn_xlsx"), 'iconsweets' => 'iconsweets-excel', 'href' => base_url($this->modulo . '/' . $this->submodulo) . '/export_xlsx?filtro=' . base64_encode($filtro));
} else {
$msg = $this->lang_item("msg_query_null");
$tabla = alertas_tpl('', $msg, false);
}
$tabData['filtro'] = isset($filtro) && $filtro != "" ? sprintf($this->lang_item("msg_query_search", false), $total_rows, $filtro) : "";
$tabData['tabla'] = $tabla;
$tabData['paginador'] = $paginador;
$tabData['item_info'] = $this->pagination_bootstrap->showing_items($limit, $offset, $total_rows);
$tabData['export'] = button_tpl($buttonTPL);
if ($this->ajax_post(false)) {
echo json_encode($this->load_view_unique($uri_view, $tabData, true));
} else {
return $this->load_view_unique($uri_view, $tabData, true);
}
}
开发者ID:erick120191,项目名称:adminplayidea,代码行数:55,代码来源:ordenes.php
示例6: listado
public function listado($offset = 0)
{
$data_tab_2 = "";
$filtro = $this->ajax_post('filtro') ? $this->ajax_post('filtro') : "";
$uri_view = $this->uri_modulo . 'listado';
$limit = 10;
$uri_segment = $this->uri_segment();
$lts_content = $this->clientes_model->consulta_clientes($limit, $offset, $filtro);
$total_rows = count($this->clientes_model->consulta_clientes($limit, $offset, $filtro, false));
$url = base_url($this->uri_modulo . $this->uri_submodulo . 'listado');
$paginador = $this->pagination_bootstrap->paginator_generate($total_rows, $url, $limit, $uri_segment, array('evento_link' => 'onclick', 'function_js' => 'load_content', 'params_js' => '1'));
if ($total_rows > 0) {
foreach ($lts_content as $value) {
$atrr = array('href' => '#', 'onclick' => 'detalle(' . $value['id_ventas_clientes'] . ')');
$tbl_data[] = array('id' => $value['nombre'], 'nombre_cliente' => tool_tips_tpl($value['nombre'] . ' ' . $value['paterno'] . ' ' . $value['materno'], $this->lang_item("tool_tip"), 'right', $atrr), 'razon_social' => $value['razon_social'], 'clave_corta' => $value['clave_corta'], 'rfc' => $value['rfc'], 'telefonos' => $value['telefonos'], 'id_entidad' => $value['entidad'], 'id_sucursal' => $value['sucursal']);
}
$tbl_plantilla = set_table_tpl();
$this->table->set_heading($this->lang_item("nombre_cliente"), $this->lang_item("nombre_cliente"), $this->lang_item("razon_social"), $this->lang_item("clave_corta"), $this->lang_item("rfc_clientes"), $this->lang_item("telefonos"), $this->lang_item("entidad"), $this->lang_item("sucursal"));
$this->table->set_template($tbl_plantilla);
$tabla = $this->table->generate($tbl_data);
$buttonTPL = array('text' => $this->lang_item("btn_xlsx"), 'iconsweets' => 'iconsweets-excel', 'href' => base_url($this->uri_modulo . $this->uri_submodulo . 'export_xlsx?filtro=' . base64_encode($filtro)));
} else {
$msg = $this->lang_item("msg_query_null");
$tabla = alertas_tpl('', $msg, false);
$buttonTPL = "";
}
$data_tab_2['filtro'] = $filtro != "" ? sprintf($this->lang_item("msg_query_search"), $total_rows, $filtro) : "";
$data_tab_2['export'] = button_tpl($buttonTPL);
//$data_tab_2['import'] = button_tpl($buttonIPX);
$data_tab_2['tabla'] = $tabla;
$data_tab_2['paginador'] = $paginador;
$data_tab_2['item_info'] = $this->pagination_bootstrap->showing_items($limit, $offset, $total_rows);
if ($this->ajax_post(false)) {
echo json_encode($this->load_view_unique($uri_view, $data_tab_2, true));
} else {
return $this->load_view_unique($uri_view, $data_tab_2, true);
}
}
开发者ID:erick120191,项目名称:adminplayidea,代码行数:38,代码来源:clientes.php
示例7: agregar
public function agregar()
{
$id_articulo = $this->ajax_post('id_articulo');
$id_almacen = $this->ajax_post('id_almacen');
$id_pasillo = $this->ajax_post('id_pasillo');
$id_gaveta = $this->ajax_post('id_gaveta');
$stock_mov = $this->ajax_post('stock_mov');
$stock_um_mov = $this->ajax_post('stock_um_mov');
$id_almacen_ajuste = $this->ajax_post('id_almacen_ajuste');
$view = $this->tab['listado_afectado'];
$view_lineas = 'listado_afectado_lineas';
$uri_view = $this->modulo . '/' . $this->seccion . '/' . $this->submodulo . '/' . $view;
$uri_view_lineas = $this->modulo . '/' . $this->seccion . '/' . $this->submodulo . '/' . $view_lineas;
$sqlData = array('id_almacen' => $id_almacen, 'id_pasillo' => $id_pasillo, 'id_gaveta' => $id_gaveta, 'id_articulo' => $id_articulo);
$articulo_detalle = $this->db_model->get_data_stock($sqlData);
for ($i = 0; count($articulo_detalle) > $i; $i++) {
$muestra_tabla = true;
if ($i == 0) {
$cantidad = $articulo_detalle[$i]['stock'] - $stock_mov;
if ($cantidad <= 0) {
$stock = 0;
$stock_um = 0;
$articulo_detalle[$i]['id_articulo_tipo'] == 2 ? $etiqueta = $articulo_detalle[$i]['clave_corta'] : ($etiqueta = $this->lang_item("pieza_abrev"));
} else {
$stock = $cantidad;
$stock_um = $this->regla_de_tres($articulo_detalle[$i]['stock'], $articulo_detalle[$i]['stock_um'], $cantidad);
$articulo_detalle[$i]['id_articulo_tipo'] == 2 ? $stock_um = $stock_um : ($stock_um = $cantidad);
$articulo_detalle[$i]['id_articulo_tipo'] == 2 ? $etiqueta = $articulo_detalle[$i]['clave_corta'] : ($etiqueta = $this->lang_item("pieza_abrev"));
}
} else {
if ($cantidad <= 0) {
$cantidad = $cantidad * -1;
$stock_mov = $cantidad;
$cantidad = $articulo_detalle[$i]['stock'] - $cantidad;
$stock_um = $this->regla_de_tres($articulo_detalle[$i]['stock'], $articulo_detalle[$i]['stock_um'], $cantidad);
$stock_um_mov = $stock_um;
if ($cantidad <= 0) {
$stock = 0;
$stock_um_mov = $articulo_detalle[$i]['stock_um'];
$stock_um = 0;
} else {
$stock = $cantidad;
$stock_um = $this->regla_de_tres($articulo_detalle[$i]['stock'], $articulo_detalle[$i]['stock_um'], $cantidad);
$articulo_detalle[$i]['id_articulo_tipo'] == 2 ? $stock_um = $stock_um : ($stock_um = $cantidad);
$articulo_detalle[$i]['id_articulo_tipo'] == 2 ? $etiqueta = $articulo_detalle[$i]['clave_corta'] : ($etiqueta = $this->lang_item("pieza_abrev"));
}
} else {
$muestra_tabla = false;
}
}
if ($muestra_tabla) {
if ($stock == 0) {
$id_estatus = 0;
} else {
$id_estatus = 1;
}
$slqDatastock = array('id_stock' => $articulo_detalle[$i]['id_stock'], 'stock' => $stock, 'stock_um' => $stock_um, 'activo' => $id_estatus, 'edit_timestamp' => $this->timestamp(), 'edit_id_usuario' => $this->session->userdata('id_usuario'));
$stock_update = $this->stock_model->update_data_stock($slqDatastock);
if ($stock == 0) {
$delete = array('fisico' => true, 'id_stock' => $articulo_detalle[$i]['id_stock']);
$this->eliminar_stock_en_cero($delete);
}
$slqDatastockLogs = array('id_accion' => 4, 'id_stock' => $articulo_detalle[$i]['id_stock'], 'id_compras_orden_articulo' => $articulo_detalle[$i]['id_compras_orden_articulo'], 'id_almacen_entradas_recepcion' => $articulo_detalle[$i]['id_almacen_entradas_recepcion'], 'log_id_almacen_origen' => $articulo_detalle[$i]['id_almacen'], 'log_id_pasillo_origen' => $articulo_detalle[$i]['id_pasillo'], 'log_id_gaveta_origen' => $articulo_detalle[$i]['id_gaveta'], 'log_stock_origen' => $articulo_detalle[$i]['stock'], 'log_stock_um_origen' => $articulo_detalle[$i]['stock_um'], 'log_id_almacen_destino' => $articulo_detalle[$i]['id_almacen'], 'log_id_pasillo_destino' => $articulo_detalle[$i]['id_pasillo'], 'log_id_gaveta_destino' => $articulo_detalle[$i]['id_gaveta'], 'log_stock_destino' => $stock, 'log_stock_um_destino' => $stock_um, 'log_lote' => $articulo_detalle[$i]['lote'], 'log_caducidad' => $articulo_detalle[$i]['caducidad'], 'timestamp' => $this->timestamp(), 'id_usuario' => $this->session->userdata('id_usuario'));
//tabla a mostrar
$this->stock_model->insert_stock_log($slqDatastockLogs);
//DATA
$tbl_data[] = array('id' => $articulo_detalle[$i]['articulo'], 'articulo' => $articulo_detalle[$i]['articulo'], 'almacenes' => $articulo_detalle[$i]['almacenes'], 'pasillos' => $articulo_detalle[$i]['pasillos'], 'gavetas' => $articulo_detalle[$i]['gavetas'], 'stock' => $stock . ' ' . $etiqueta, 'stock_um' => $stock_um . ' ' . $articulo_detalle[$i]['clave_corta']);
}
}
$tbl_plantilla = set_table_tpl();
// Titulos de tabla
$this->table->set_heading($this->lang_item("id"), $this->lang_item("articulo"), $this->lang_item("almacen_lbl"), $this->lang_item("pasillo_lbl"), $this->lang_item("gaveta_lbl"), $this->lang_item("stock_afec"), $this->lang_item("stock_um_afec"));
// Generar tabla
$this->table->set_template($tbl_plantilla);
$tabla = $this->table->generate($tbl_data);
$tabData['tabla'] = $tabla;
$data = $this->load_view_unique($uri_view, $tabData, true);
$slqDataajuste = array('id_almacen_ajuste' => $id_almacen_ajuste, 'estatus' => 2, 'edit_timestamp' => $this->timestamp(), 'edit_id_usuario' => $this->session->userdata('id_usuario'));
$insert = $this->db_model->update_data($slqDataajuste);
if ($insert) {
$msg = $this->lang_item("msg_update_success", false);
echo json_encode(array('success' => 'true', 'mensaje' => $msg, 'table' => $data));
} else {
$msg = $this->lang_item("msg_campos_obligatorios", false);
echo json_encode(array('success' => 'false', 'mensaje' => alertas_tpl('error', $msg, false)));
}
}
开发者ID:erick120191,项目名称:adminplayidea,代码行数:87,代码来源:aprobar_ajustes.php
示例8: listado
public function listado($offset = 0)
{
$seccion = '/listado';
$tab_detalle = $this->tab3;
$limit = $this->limit_max;
$uri_view = $this->modulo . $seccion;
$url_link = $this->path . 'listado';
$filtro = $this->ajax_post('filtro') ? $this->ajax_post('filtro') : "";
$sqlData = array('buscar' => $filtro, 'offset' => $offset, 'limit' => $limit, 'aplicar_limit' => true);
$uri_segment = $this->uri_segment();
$list_content = $this->db_model->db_get_data($sqlData);
$sqlData['aplicar_limit'] = null;
$total_rows = count($this->db_model->db_get_data($sqlData));
$url = base_url($url_link);
$paginador = $this->pagination_bootstrap->paginator_generate($total_rows, $url, $limit, $uri_segment, array('evento_link' => 'onclick', 'function_js' => 'load_content', 'params_js' => '1'));
if ($total_rows > 0) {
foreach ($list_content as $value) {
$atrr = array('href' => '#', 'onclick' => 'detalle(' . $value['id_compras_articulo_precios'] . ')');
// Acciones
$accion_id = $value['id_compras_articulo_precios'];
$btn_acciones['detalle'] = '<span id="ico-detalle_' . $accion_id . '" class="ico_detalle fa fa-search-plus" onclick="detalle(' . $accion_id . ')" title="' . $this->lang_item("detalle") . '"></span>';
$btn_acciones['eliminar'] = '<span id="ico-eliminar_' . $accion_id . '" class="ico_eliminar fa fa-times" onclick="eliminar(' . $accion_id . ')" title="' . $this->lang_item("eliminar") . '"></span>';
$acciones = implode(' ', $btn_acciones);
$tbl_data[] = array('id' => $value['id_compras_articulo_precios'], 'upc' => tool_tips_tpl($value['upc'], $this->lang_item("tool_tip"), 'right', $atrr), 'sku' => tool_tips_tpl($value['sku'], $this->lang_item("tool_tip"), 'right', $atrr), 'articulo' => tool_tips_tpl($value['articulo'], $this->lang_item("tool_tip"), 'right', $atrr), 'cl_region' => $value['cl_region'], 'nombre_comercial' => $value['nombre_comercial'], 'marca' => $value['marca'], 'presentacion' => $value['presentacion'], 'costo_sin_impuesto' => $this->session->userdata('moneda') . ' ' . $value['costo_sin_impuesto'], 'acciones' => $acciones);
}
// Plantilla
$tbl_plantilla = set_table_tpl();
// Titulos de tabla
$this->table->set_heading($this->lang_item("listado_precios"), $this->lang_item("upc"), $this->lang_item("sku"), $this->lang_item("articulo"), $this->lang_item("cl_region"), $this->lang_item("proveedor"), $this->lang_item("marca"), $this->lang_item("presentacion"), $this->lang_item("costo"), $this->lang_item("acciones"));
// Generar tabla
$this->table->set_template($tbl_plantilla);
$tabla = $this->table->generate($tbl_data);
$buttonTPL = array('text' => $this->lang_item("btn_xlsx"), 'iconsweets' => 'iconsweets-excel', 'href' => base_url($this->path . 'export_xlsx?filtro=' . base64_encode($filtro)));
} else {
$buttonTPL = "";
$msg = $this->lang_item("msg_query_null");
$tabla = alertas_tpl('', $msg, false);
}
$tabData['filtro'] = isset($filtro) && $filtro != "" ? sprintf($this->lang_item("msg_query_search"), $total_rows, $filtro) : "";
$tabData['tabla'] = $tabla;
$tabData['export'] = button_tpl($buttonTPL);
$tabData['paginador'] = $paginador;
$tabData['item_info'] = $this->pagination_bootstrap->showing_items($limit, $offset, $total_rows);
if ($this->ajax_post(false)) {
echo json_encode($this->load_view_unique($uri_view, $tabData, true));
} else {
return $this->load_view_unique($uri_view, $tabData, true);
}
}
开发者ID:erick120191,项目名称:adminplayidea,代码行数:49,代码来源:listado_precios.php
示例9: detalle
public function detalle()
{
$id_almacen_ajuste = $this->ajax_post('id_almacen_ajuste');
$view = $this->tab['detalle'];
$uri_view = $this->modulo . '/' . $this->seccion . '/' . $this->submodulo . '/' . $view;
$detalle = $this->db_model->get_data_unico_x_historial($id_almacen_ajuste);
$id_articulo = $detalle[0]['id_articulo'];
$id_almacen = $detalle[0]['id_almacen'] != 0 ? $detalle[0]['id_almacen'] : '';
$id_pasillo = $detalle[0]['id_pasillo'] != 0 ? $detalle[0]['id_pasillo'] : '';
$id_gaveta = $detalle[0]['id_gaveta'] != 0 ? $detalle[0]['id_gaveta'] : '';
$stock_mov = $detalle[0]['stock_mov'];
$stock_um_mov = $detalle[0]['stock_um_mov'];
$id_compras_articulo_precios = $detalle[0]['id_compras_articulo_precios'];
$sqlData = array('id_almacen' => $id_almacen, 'id_pasillo' => $id_pasillo, 'id_gaveta' => $id_gaveta, 'id_articulo' => $id_articulo, 'id_compras_articulo_precios' => $id_compras_articulo_precios, 'id_almacen_ajuste' => $id_almacen_ajuste);
$articulo_detalle = $this->db_model->get_data_stock_logs($sqlData);
$total_rows = count($this->db_model->get_data_stock_logs($sqlData));
if ($total_rows) {
foreach ($articulo_detalle as $value) {
$value['id_articulo_tipo'] == 2 ? $etiqueta = $value['clave_corta'] : ($etiqueta = $this->lang_item("pieza_abrev"));
$tbl_data[] = array('orgen' => '<th>' . $this->lang_item("origen") . '</th><th>' . $this->lang_item("existencia") . '</th>');
$tbl_data[] = array('id' => $value['pasillos'], 'pasillos_ori' => $value['pasillos'], 'pasillos_des' => $value['pasillos']);
$tbl_data[] = array('id' => $value['gavetas'], 'gavetas_ori' => $value['gavetas'], 'gavetas_de' => $value['gavetas']);
$tbl_data[] = array('id' => $value['log_stock_origen'], 'stock_origen' => $value['log_stock_origen'] . ' ' . $etiqueta, 'stock' => $value['log_stock_destino'] . ' ' . $etiqueta);
$tbl_data[] = array('id' => $value['log_stock_um_origen'], 'stock_um_origen' => $value['log_stock_um_origen'] . ' ' . $value['clave_corta'], 'stock_um' => $value['log_stock_um_destino'] . ' ' . $value['clave_corta']);
}
}
//dump_var($tbl_data);
$detalle[0]['id_articulo_tipo'] == 2 ? $etiqueta = $articulo_detalle[0]['clave_corta'] : ($etiqueta = $this->lang_item("pieza_abrev"));
$tabData['articulo'] = $detalle[0]['articulo'];
$tabData['cl_almacen'] = $detalle[0]['cl_almacen'];
$tabData['cl_gaveta'] = $detalle[0]['cl_gaveta'];
$tabData['cl_pasillo'] = $detalle[0]['cl_pasillo'];
$tabData['stock_mov'] = $detalle[0]['stock_mov'];
$tabData['stock_um_mov'] = $detalle[0]['stock_um_mov'];
$tabData['cl_um'] = $detalle[0]['cl_um'];
$tabData['cl_stock'] = $etiqueta;
$tbl_plantilla = set_table_tpl();
//DIC
$tabData['lbl_articulo'] = $this->lang_item("articulo", false);
$tabData['lbl_cl_almacen'] = $this->lang_item("almacen_lbl", false);
$tabData['lbl_cl_gaveta'] = $this->lang_item("gaveta_lbl", false);
$tabData['lbl_cl_pasillo'] = $this->lang_item("pasillo_lbl", false);
$tabData['lbl_stock_mov'] = $this->lang_item("stock_mov", false);
$tabData['lbl_stock_um_mov'] = $this->lang_item("stock_um_mov", false);
$tabData['lbl_stock'] = $this->lang_item("lblstock", false);
$tabData['lbl_stock_um'] = $this->lang_item("stock_um_lbl", false);
// Titulos de tabla
/*$this->table->set_heading( $this->lang_item("id"),
$this->lang_item("origen"),
$this->lang_item("existencia")
);*/
$this->table->set_template($tbl_plantilla);
$tabla = $this->table->generate($tbl_data);
$tabData['tabla'] = $tabla;
echo json_encode($this->load_view_unique($uri_view, $tabData, true));
}
开发者ID:minorusal,项目名称:admin_salon,代码行数:56,代码来源:historial_ajuste.php
示例10: listado
public function listado($offset = 0)
{
$seccion = '/listado';
$tab_detalle = $this->tab3;
$limit = $this->limit_max;
$uri_view = $this->modulo . $seccion;
$url_link = $this->path . 'listado';
$filtro = $this->ajax_post('filtro') ? $this->ajax_post('filtro') : "";
$sqlData = array('buscar' => $filtro, 'offset' => $offset, 'limit' => $limit);
$uri_segment = $this->uri_segment();
$total_rows = count($this->db_model->db_get_data_almacen($sqlData));
$sqlData['aplicar_limit'] = false;
$list_content = $this->db_model->db_get_data_almacen($sqlData);
$url = base_url($url_link);
$paginador = $this->pagination_bootstrap->paginator_generate($total_rows, $url, $limit, $uri_segment, array('evento_link' => 'onclick', 'function_js' => 'load_content', 'params_js' => '1'));
if ($total_rows > 0) {
foreach ($list_content as $value) {
$atrr = array('href' => '#', 'onclick' => 'detalle(' . $value['id_almacen_almacenes'] . ')');
// Validación de pasillos y/o gavetas en almacen
$pasillos = $this->db_model->db_get_data_pasillos_por_almacen(array('id_almacen' => $value['id_almacen_almacenes']));
$gavetas = $this->db_model->db_get_data_gavetas_por_almacen(array('id_almacen' => $value['id_almacen_almacenes']));
// Acciones
$accion_id = $value['id_almacen_almacenes'];
$btn_acciones['detalle'] = '<span id="ico-detalle_' . $accion_id . '" class="ico_acciones ico_detalle fa fa-search-plus" onclick="detalle(' . $accion_id . ')" title="' . $this->lang_item("detalle") . '"></span>';
$btn_acciones['eliminar'] = $value['edit'] && !$pasillos && !$gavetas ? '<span id="ico-eliminar_' . $accion_id . '" class="ico_acciones ico_eliminar fa fa-times" onclick="eliminar(' . $accion_id . ')" title="' . $this->lang_item("eliminar") . '"></span>' : '';
$acciones = implode(' ', $btn_acciones);
$edit = !$value['edit'] ? '*' : '';
// Datos para tabla
$tbl_data[] = array('id' => $value['clave_corta'], 'almacenes' => $edit . tool_tips_tpl($value['almacenes'], $this->lang_item("tool_tip"), 'right', $atrr), 'clave_corta' => $edit . $value['clave_corta'], 'sucursal' => $value['sucursal'], 'tipos' => $value['tipos'], 'descripcion' => $value['descripcion'], 'acciones' => $acciones);
}
// Plantilla
$tbl_plantilla = set_table_tpl();
// Titulos de tabla
$this->table->set_heading($this->lang_item("cvl_corta"), $this->lang_item("almacen"), $this->lang_item("cvl_corta"), $this->lang_item("sucursal"), $this->lang_item("tipo"), $this->lang_item("descripcion"), $this->lang_item("acciones"));
// Generar tabla
$this->table->set_template($tbl_plantilla);
$tabla = $this->table->generate($tbl_data);
$buttonTPL = array('text' => $this->lang_item("btn_xlsx"), 'iconsweets' => 'iconsweets-excel', 'href' => base_url($this->path . 'export_xlsx?filtro=' . base64_encode($filtro)));
} else {
$buttonTPL = "";
$msg = $this->lang_item("msg_query_null");
$tabla = alertas_tpl('', $msg, false);
}
$tabData['filtro'] = isset($filtro) && $filtro != "" ? sprintf($this->lang_item("msg_query_search"), $total_rows, $filtro) : "";
$tabData['tabla'] = $tabla;
$tabData['export'] = button_tpl($buttonTPL);
$tabData['paginador'] = $paginador;
$tabData['item_info'] = $this->pagination_bootstrap->showing_items($limit, $offset, $total_rows);
if ($this->ajax_post(false)) {
echo json_encode($this->load_view_unique($uri_view, $tabData, true));
} else {
return $this->load_view_unique($uri_view, $tabData, true);
}
}
开发者ID:erick120191,项目名称:adminplayidea,代码行数:54,代码来源:almacenes.php
示例11: guarda_cotizacion_by_insumo
public function guarda_cotizacion_by_insumo()
{
$objData = $this->ajax_post('objData');
if ($objData['incomplete'] == 0 && $objData['lts_insumo'] > 0) {
$delete = $this->db_model->eliminar_registro_insumo_sucursal($objData['lts_sucursales']);
$arr_insumo = explode(',', $objData['lts_insumo']);
$sqlData = array();
foreach ($arr_insumo as $key => $value) {
$sqlData = array('id_sucursal' => $objData['lts_sucursales'], 'id_articulo' => $value, 'id_usuario' => $this->session->userdata('id_usuario'), 'timestamp' => $this->timestamp());
$insert = $this->db_model->db_insert_cotizacion_insumo($sqlData);
}
$sqlData = array('lts_sucursales' => $objData['lts_sucursales'], 'lts_insumos' => $objData['lts_insumo']);
$insumos = $this->db_model->db_get_insumos_from_sucursales($sqlData);
if ($insumos) {
foreach ($insumos as $value) {
$insumos_total[$value['articulo_nombre']] = $value['articulo_nombre'];
if (in_array($value['articulo_nombre'], $value)) {
$costo_porcion = $costo_porcion + $value['porciones_articulo'] * $value['costo_x_um'] / $value['porciones'];
$insumos_con_costo[$value['articulo_nombre']] = $costo_porcion;
}
}
$suma_precio_insumo = 0;
$count_insumos = count($insumos_total);
foreach ($insumos_con_costo as $key => $value) {
$suma_precio_insumo = $suma_precio_insumo + $value;
// Datos para tabla
$tbl_data[] = array('insumos_o' => $key, 'insumos' => $key, 'costo' => '$ ' . $value);
}
$promedio = $suma_precio_insumo / $count_insumos;
$tbl_data[] = array('total_o' => $suma_precio_insumo, 'total' => '<strong>' . $this->lang_item('total', false) . '</strong>', 'suma_total' => '$ ' . $suma_precio_insumo);
$tbl_data[] = array('promedio_o' => $promedio, 'promedio' => '<strong>' . $this->lang_item('promedio', false) . '</strong>', 'promedio_total' => $promedio);
// Plantilla
$tbl_plantilla = set_table_tpl();
// Titulos de tabla
$this->table->set_heading('id', $this->lang_item("insumos"), $this->lang_item("costo_x_insumo"));
// Generar tabla
$plantilla_column = array('table_open' => '<table class="table table-striped responsive" >');
$this->table->set_template($plantilla_column);
$this->table->set_template($plantilla_column);
$tabla = $this->table->generate($tbl_data);
$array_json = array('success' => true, 'contenido' => $tabla);
}
} else {
$msg = $this->lang_item("msg_err_receta_vacio");
$array_json = array('success' => 'vacio', 'contenido' => alertas_tpl('error', $msg, false));
}
echo json_encode($array_json);
}
开发者ID:minorusal,项目名称:admin_salon,代码行数:48,代码来源:cotizador_recetas.php
示例12: asignar_perfil
public function asignar_perfil()
{
$id_perfil = $this->ajax_post('id_perfil');
$id_personal = $this->ajax_post('id_personal');
$id_usuario = $this->ajax_post('id_usuario');
$perfiles = $this->db_model->search_data_perfil($id_personal);
$detalle = $this->db_model->get_user($id_usuario);
$tbl_plantilla = set_table_tpl();
$info_user = array('lbl_nombre_usuario' => $this->lang_item("lbl_nombre"), 'txt_nombre_usuario' => $detalle[0]['name'] ? $detalle[0]['name'] : $this->lang_item("lbl_x_asignar"), 'lbl_email' => $this->lang_item("lbl_email"), 'txt_email' => $detalle[0]['mail'], 'lbl_telefono' => $this->lang_item("lbl_telefono"), 'txt_telefono' => $detalle[0]['telefono'], 'lbl_user' => $this->lang_item("lbl_user"), 'txt_user' => $detalle[0]['user'], 'lbl_area' => $this->lang_item("lbl_area"), 'txt_area' => $detalle[0]['area'], 'lbl_puesto' => $this->lang_item("lbl_puesto"), 'txt_puesto' => $detalle[0]['puesto']);
$plantilla = array('table_open' => '<table class="table table-bordered table-invoice">');
$this->table->set_template($plantilla);
$info_user = $this->table->make_columns($info_user, 2);
$tabla = $this->table->generate($info_user);
if ($perfiles) {
$boton = array('class' => 'btn btn-primary', 'name' => 'agregar_perfil', 'onclick' => 'agregar_perfil()', 'content' => $this->lang_item("btn_guardar"));
$btn_save = form_button($boton);
$perfil_array = array('data' => $perfiles, 'value' => 'id_perfil', 'text' => array('clave_corta', 'perfil'), 'name' => "lts_perfiles", 'class' => "requerido", 'selected' => $id_perfil, 'event' => array('event' => 'onchange', 'function' => 'load_tree_view_perfil_usuario', 'params' => array($id_personal, 'this.value'), 'params_type' => array(0, 0)));
$list_perfiles = dropdown_tpl($perfil_array);
$arr_sucursales = explode(',', $detalle[0]['id_sucursales']);
foreach ($arr_sucursales as $key => $value) {
$sucursales[] = $value;
}
$sucursales_array = array('data' => $this->sucursales->get_sucursales_usuarios(), 'value' => 'id_sucursal', 'text' => array('clave_corta', 'sucursal'), 'name' => "lts_sucursales", 'selected' => $sucursales);
$sucursales = multi_dropdown_tpl($sucursales_array);
$tabData['list_sucursales'] = $sucursales;
$tabData['id_usuario'] = $detalle[0]['id_usuario'];
$tabData['tabla'] = $tabla;
$tabData['lbl_perfiles'] = $this->lang_item("lbl_perfiles");
$tabData['lbl_sucursales'] = $this->lang_item("lbl_sucursales");
$tabData['id_personal'] = $id_personal;
$tabData['list_perfiles'] = $list_perfiles;
$tabData['tree_view'] = $this->treeview_perfiles_usuarios($id_personal, $id_perfil);
$tabData['button_save'] = $btn_save;
$uri_view = $this->modulo . '/' . $this->seccion . '/ficha_asignar_perfiles';
echo json_encode($this->load_view_unique($uri_view, $tabData, true));
}
}
开发者ID:minorusal,项目名称:administrador,代码行数:37,代码来源:usuarios.php
-
librespeed/speedtest: Self-hosted Speedtest for HTML5 and more. Easy setup, exam
阅读:1218|2022-08-30
-
avehtari/BDA_m_demos: Bayesian Data Analysis demos for Matlab/Octave
阅读:1130|2022-08-17
-
女人怀孕后,为了有一个健康聪明的宝宝,经历各种体检、筛查。其实这些体检和筛查中的
阅读:938|2022-11-06
-
medfreeman/markdown-it-toc-and-anchor: markdown-it plugin to add a toc and ancho
阅读:1334|2022-08-18
-
百度掘金 是一个在线提交信息或是提取地址的操作,可根据个人的时间去选择相应的任务
阅读:986|2022-07-30
-
sydney0zq/covid-19-detection: The implementation of A Weakly-supervised Framewor
阅读:484|2022-08-16
-
D:ProgramFilesMATLABR2012btoolboxstatsstatsMATLAB统计工具箱包括概率分布、
阅读:568|2022-07-18
-
离中国最远的国家是阿根廷。从太平洋直线计算,即往东线走,北京到阿根廷的布宜诺斯艾
阅读:636|2022-11-06
-
A CWE-787: Out-of-bounds Write vulnerability exists that could cause a denial of
阅读:458|2022-07-29
-
shem8/MaterialLogin: Login view with material design
阅读:725|2022-08-17
|
请发表评论