Umsatz-Suche funktioniert mit kommazahlen und negativ

This commit is contained in:
2026-04-28 11:10:42 +02:00
parent d0a5cebdcd
commit 85ad80add7
3 changed files with 20 additions and 6 deletions
+15 -1
View File
@@ -59,7 +59,21 @@ umsatzServer <- function(id, conn, r_global) {
betrag, zweck, gebucht, posting_id, entry_id),
striped = TRUE,
highlight = TRUE,
filterable = TRUE, # ← das reicht
searchable = T,
searchMethod = JS("function(rows, columnIds, filterValue) {
var filter = filterValue.toLowerCase().replace(',', '.').replace(/\\s/g, '');
return rows.filter(function(row) {
return columnIds.some(function(col) {
var val = row.values[col];
var str = val === null || val === undefined ? '' : String(val);
var strNorm = str.toLowerCase().replace(',', '.').replace(/\\s/g, '');
return strNorm.includes(filter) ||
(typeof val === 'number' &&
String(Math.abs(val)).includes(filter));
});
});
}"),
filterable = F, # ← das reicht
pagination = F,
selection = "single",
onClick = "select",