<?php define("BYPASS_INSTANCE_CHECK", false); require_once "../../../server//bootstrap.php"; $page = new GerenciaComponentPage(); $page->addComponent(new TitleComponent("Ingresos")); $page->addComponent(new MessageComponent("Lista de ingresos ")); $lista = CargosYAbonosController::ListaIngreso(); $tabla = new TableComponent(array("id_ingreso" => "id_ingreso", "id_empresa" => "id_empresa", "id_usuario" => "id_usuario", "id_concepto_ingreso" => "concpto", "fecha_del_ingreso" => "fecha", "monto" => "monto"), $lista["resultados"]); function funcion_cancelado($cancelado) { return $cancelado ? "Cancelado" : "Activo"; } $tabla->addColRender("cancelado", "funcion_cancelado"); $tabla->addOnClick("id_ingreso", "(function(a){ window.location = 'cargos_y_abonos.lista.ingreso.php'; })"); $page->addComponent($tabla); $page->render();
protected function GenerateResponse() { try { $this->response = CargosYAbonosController::ListaIngreso(isset($_GET['cancelado']) ? $_GET['cancelado'] : null, isset($_GET['fecha_actual']) ? $_GET['fecha_actual'] : null, isset($_GET['fecha_final']) ? $_GET['fecha_final'] : null, isset($_GET['fecha_inicial']) ? $_GET['fecha_inicial'] : null, isset($_GET['id_caja']) ? $_GET['id_caja'] : null, isset($_GET['id_concepto_ingreso']) ? $_GET['id_concepto_ingreso'] : null, isset($_GET['id_empresa']) ? $_GET['id_empresa'] : null, isset($_GET['id_sucursal']) ? $_GET['id_sucursal'] : null, isset($_GET['id_usuario']) ? $_GET['id_usuario'] : null, isset($_GET['orden']) ? $_GET['orden'] : null); } catch (Exception $e) { //Logger::error($e); throw new ApiException($this->error_dispatcher->invalidDatabaseOperation($e->getMessage())); } }