umsatzliste verbessert

This commit is contained in:
2026-04-28 10:23:20 +02:00
parent 2d2eb2fa1c
commit d0a5cebdcd
27 changed files with 37 additions and 23 deletions
Regular → Executable
+2 -1
View File
@@ -15,7 +15,8 @@ read_hibiscus <- function(conn) {
datum = as.Date(datum), # einfach as.Date reicht da Text "2023-12-25"
valuta = as.Date(valuta),
gebucht = !is.na(posting_id)
)
) %>%
filter(datum >= "2026-01-01")
}
# R/read_functions.R — Kontakt aus bank_connections auflösen
Regular → Executable
+28 -19
View File
@@ -2,15 +2,20 @@ umsatzUI <- function(id) {
ns <- NS(id)
tagList(
useShinyjs(),
# Sync-Button oben
div(
style = "display: flex; justify-content: flex-end; margin-bottom: 8px;",
actionBttn(ns("sync"), "Sync Hibiscus",
size = "xs", style = "minimal",
icon = icon("rotate"), color = "primary")
),
reactableOutput(ns("umsatz_table")),
hr(),
uiOutput(ns("buchungs_panel"))
# Buchungspanel immer sichtbar unten
uiOutput(ns("buchungs_panel")),
# Tabelle mit begrenzter Höhe und Scroll
div(
style = "max-height: 70vh; overflow-y: auto;",
reactableOutput(ns("umsatz_table"))
)
)
}
@@ -18,7 +23,7 @@ umsatzServer <- function(id, conn, r_global) {
moduleServer(id, function(input, output, session) {
ns <- session$ns
# ── Daten ──────────────────────────────────────────────────────────────────
# ── Daten ----
refresh <- reactiveVal(0)
zeige_alle <- reactiveVal(FALSE)
@@ -30,7 +35,7 @@ umsatzServer <- function(id, conn, r_global) {
})
# ── Filter-Buttons ─────────────────────────────────────────────────────────
# ── Filter-Buttons ----
observeEvent(input$filter_ungebucht, { zeige_alle(FALSE) })
observeEvent(input$filter_alle, { zeige_alle(TRUE) })
@@ -55,6 +60,7 @@ umsatzServer <- function(id, conn, r_global) {
striped = TRUE,
highlight = TRUE,
filterable = TRUE, # ← das reicht
pagination = F,
selection = "single",
onClick = "select",
defaultSorted = list(valuta = "desc"),
@@ -110,34 +116,37 @@ umsatzServer <- function(id, conn, r_global) {
tagList(
h4("Buchen"),
fluidRow(
column(6,
column(4,
selectizeInput(ns("konto"), "Konto:",
choices = get_account_choices(conn),
selected = 0,
width = "100%")
),
column(6,
column(3,
selectizeInput(ns("projekt"), "Projekt:",
choices = get_project_choices(conn),
width = "100%")
)
),
fluidRow(
column(6,
),
column(3,
selectizeInput(ns("kontakt"), "Kontakt:",
choices = get_contact_choices(conn),
selected = resolve_contact(conn, u$empfaenger_name, u$empfaenger_konto),
width = "100%")
),
column(6,
br(),
actionBttn(ns("new_contact"), "Neuer Kontakt",
size = "xs", style = "minimal", icon = icon("plus"))
column(1,
div(style = "margin-top: 25px;", # Label-Höhe ausgleichen
actionBttn(ns("new_contact"), "Neuer Kontakt",
size = "xs", style = "minimal", icon = icon("plus"), color = "warning")
)
),
column(1,
div(style = "margin-top: 25px;",
actionBttn(ns("buchen"), "Buchen",
size = "sm", style = "minimal", color = "success",
icon = icon("check"))
)
)
),
actionBttn(ns("buchen"), "Buchen",
size = "sm", style = "minimal", color = "success",
icon = icon("check"))
)
)
}
})