diff --git a/frontend/pages/banking/statements/[mode]/[[id]].vue b/frontend/pages/banking/statements/[mode]/[[id]].vue index 184289d..6b20c98 100644 --- a/frontend/pages/banking/statements/[mode]/[[id]].vue +++ b/frontend/pages/banking/statements/[mode]/[[id]].vue @@ -36,6 +36,8 @@ const setup = async () => { loading.value = true if (route.params.id) { itemInfo.value = await useEntities("bankstatements").selectSingle(route.params.id, "*, statementallocations(*, cd_id(*), ii_id(*))", undefined, undefined, true) + + console.log(itemInfo.value) } if (itemInfo.value) oldItemInfo.value = JSON.parse(JSON.stringify(itemInfo.value)) @@ -72,8 +74,10 @@ const displayCurrency = (value, currency = "€") => { return `${Number(value).toFixed(2).replace(".", ",")} ${currency}` } -const separateIBAN = (input = "") => { - const separates = input.match(/.{1,4}/g) +// Angepasst: Prüft nun auch auf null/undefined, nicht nur auf leeren String +const separateIBAN = (input) => { + if (!input) return "" + const separates = input.toString().match(/.{1,4}/g) return separates ? separates.join(" ") : input } @@ -226,8 +230,14 @@ setup()
{{ dayjs(itemInfo.date).format("DD.MM.YYYY") }} - - {{ separateIBAN(itemInfo.debIban || itemInfo.credIban) }} + +