From d55c2e8d7ae537ef9f6365ff620a08d3fa7aa79c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Tue, 14 May 2024 12:31:01 +0200 Subject: [PATCH] transaction list on account page --- ledgers/account.sh | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/ledgers/account.sh b/ledgers/account.sh index 2cc279b..a92694f 100755 --- a/ledgers/account.sh +++ b/ledgers/account.sh @@ -16,9 +16,9 @@ if [ ! -f "$cardfile" ]; then REDIRECT "${_BASE}/ledgers/" fi -{ - card="$(pdi_load "$cardfile")" +{ card="$(pdi_load "$cardfile")" cat <<-EOF + [h1 $(l10n Payments)] [div .card #${cardfile##*/} [div .section .basic . $( card_item "$card" FN GENDER NICKNAME BDAY X-ZACK-JOINDATE X-ZACK-LEAVEDATE SOUND PHOTO LOGO @@ -36,6 +36,19 @@ fi $(card_item "$card" CATEGORIES) ] ] + [ul .transactions + $(cnt="$(pdi_count "$card" X-IBAN)" + while [ "$cnt" -gt 0 ]; do + pdi_value X-IBAN "$cnt" |RXLITERAL + cnt=$((cnt - 1)) + done \ + | while read -r iban; do + printf '[li . ' + grep -E "^[^\t]+ [^\t]+ ${iban} " |HTML + printf ']' + done + )] EOF + } \ | yield_page ledgers -- 2.39.2