]> git.plutz.net Git - confetti/commitdiff
transaction list on account page
authorPaul Hänsch <paul@plutz.net>
Tue, 14 May 2024 10:31:01 +0000 (12:31 +0200)
committerPaul Hänsch <paul@plutz.net>
Tue, 14 May 2024 10:31:01 +0000 (12:31 +0200)
ledgers/account.sh

index 2cc279bb10e8b3f82cc79b64f379d64b3551f241..a92694ffee0cd9801a79001b413f5851a6d6ed00 100755 (executable)
@@ -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