local status=$1 id type net tax gross junk
grep -lxF "status ${status}" "$_DATA"/*.kvd \
- | sort \
+ | sort -r \
| while read file; do
id="${file##*/}" id="${id%.kvd}"
DB3 open "$file" || continue
[form .invoice method=POST
[h3 [a href="${_BASE}/doc/${id}" . $(DB3 get invnum |HTML)]]
[span .date . $(DB3 get date |HTML)]
- [span .rcpt . $(DB3 get rcpt |HTML)]
+ [span .rcpt . $(DB3 get rcpt |sed -E 's/ *;.*//g' |HTML)]
[span .total . ${gross} €]
[select name=status
[option value=open $([ "$status" = open ] && printf selected=selected) . $(_ Open)]