Dokumente hinzugefügt und data.transfer mit attachments-transfer erweitert
This commit is contained in:
+27
-2
@@ -242,7 +242,7 @@ if (ok) {
|
||||
if (ok) {
|
||||
accounts <- dbxSelect(con_f, "
|
||||
SELECT id, konto, budget_id, bankname, updated_at, created_at,
|
||||
konto_hibiscus, konto_wiso, kontonummer_bank, notizen, b_spenden
|
||||
konto_hibiscus, konto_wiso, kontonummer_bank, notizen, ist_spende
|
||||
FROM Konten
|
||||
") %>%
|
||||
transmute(
|
||||
@@ -253,7 +253,7 @@ if (ok) {
|
||||
budget_id = as.integer(budget_id),
|
||||
wiso_account = konto_wiso,
|
||||
bank_account_no = kontonummer_bank,
|
||||
is_donations = as.integer(b_spenden),
|
||||
is_donations = as.integer(ist_spende),
|
||||
notes = notizen,
|
||||
created_at = created_at,
|
||||
updated_at = updated_at
|
||||
@@ -441,6 +441,30 @@ if(ok){
|
||||
} ## ------------------------------------------------------- 2026-03-19 16:38
|
||||
|
||||
|
||||
## * Daeien übertragen ----
|
||||
if(ok){
|
||||
pfad <- "~/Insync/Projekte/Gemeindefinanzen/gemfin-fm/gemfin04/Dokumente/datei/"
|
||||
zielpfad <- "~/Documents/workspace/gemfin-shiny/www/documents/"
|
||||
vorhanden <- list.files(pfad, pattern = "pdf")
|
||||
eintraege <- att$original_name
|
||||
anz <- length(eintraege)
|
||||
for(ind in 1:length(eintraege)){
|
||||
if( exists(paste0(zielpfad, eintraege[ind])) ){
|
||||
cat(ind, " von ", anz, "\n")
|
||||
file.copy(
|
||||
from = paste0(pfad, vorhanden[ind]),
|
||||
to = "~/Documents/workspace/gemfin-shiny/www/documents/")
|
||||
}
|
||||
}
|
||||
neue_dateien <- list.files("~/Documents/workspace/gemfin-shiny/www/documents/")
|
||||
length(neue_dateien)
|
||||
eintraege <- att$original_name
|
||||
length(eintraege)
|
||||
nv <- att[-which(eintraege %in% neue_dateien),]
|
||||
error_f <- fehler_add("Alle Dateien übertragen", nrow(nv) == 0, error_f)
|
||||
} ## ------------------------------------------------------- 2026-04-28 18:40
|
||||
|
||||
|
||||
# Transfer Bankverbindungen ----
|
||||
if (ok) {
|
||||
bank_connections <- dbxSelect(con_f, "
|
||||
@@ -460,6 +484,7 @@ if (ok) {
|
||||
updated_at = as.character(updated_at)
|
||||
)
|
||||
|
||||
sum(duplicated(bank_connections$id))
|
||||
dbWriteTable(con_s, "bank_connections", bank_connections, append = TRUE)
|
||||
error_f <- fehler_add(
|
||||
paste(nrow(bank_connections), "Bankverbindungen übertragen"), TRUE, error_f
|
||||
|
||||
Reference in New Issue
Block a user