$page->addComponent("</table>"); } $page->addComponent(new TitleComponent("Seguimientos de esta orden", 2)); $seguimientos = SeguimientoDeServicioDAO::seguimientosPorServicio($_GET["oid"]); $header = array("estado" => "Estado", "fecha_seguimiento" => "Fecha", "id_usuario" => "Usuario que registro"); // // // // // // // // // $table = new TableComponent($header, $seguimientos); $table->renderRowId("comments"); $table->addNoData(""); function funcion_sucursal($id_sucursal) { return SucursalDAO::getByPK($id_sucursal) ? SucursalDAO::getByPK($id_sucursal)->getRazonSocial() : "---------"; } function funcion_usuario($id_usuario) { if (is_null($u = UsuarioDAO::getByPK($id_usuario))) { return "ERROR"; } return $u->getNombre(); } $table->addColRender("id_localizacion", "funcion_sucursal"); $table->addColRender("id_usuario", "funcion_usuario"); $table->addColRender("id_usuario_venta", "funcion_usuario");