#!/bin/awk -f
+function dbg( text ) { print text >>"/dev/stderr"; }
+
function STRING( inp ) {
gsub(/\\/, "\\\\", inp);
gsub(/\n/, "\\n", inp);
fn = n = uid = iban = tmp = ""; split("", ibans);
}
-strftime("%Y-%m-%d", $1, "UTC") == $2 && strftime("%Y-%m-%d", $3, "UTC") == $4 { ledger = 1; }
+/^BEGIN:LEDGERS$/ { ledger = 1; }
ledger && strftime("%Y-%m-%d", $2, "UTC") == $1 {
if ($3 in iban_uid) {
printf ']'
l10n_attendant="$(l10n attendant)"
{ pdi_load "${_DATA}"/vcard/*.vcf
+ printf 'BEGIN:LEDGERS\n'
cat "${_DATA}"/ledgers/????-??-??\ -\ ????-??-??\ -\ ????.tbl
} | "${_EXEC}"/ledgers/iban_assign.awk \
| while read -r state iban data; do