list_invoices(){
[ -d invoices/ ] || return 0
- printf '[h1 Open]'
+ printf '[h1 Offen]'
for i in invoices/*; do case "$(sed 1q <$i)" in
*status=open*) list_invoice "$i";;
*status=*) :;;
*) list_invoice "$i";;
esac; done
- for n in resent:Resent sent:Sent paid:Paid cancelled:Cancelled; do
+ for n in resent:Erinnert sent:Verschickt paid:Bezahlt cancelled:Storniert; do
printf '[h1 %s]' "${n#*:}"
for i in invoices/*; do case "$(sed 1q <$i)" in
*status=${n%:*}*) list_invoice "$i";;
printf '[div .invoice
[h2
%s]
- [label From:] %s [label To:] %s [label on] %s
- [label Amount:] %s
+ [label Von:] %s [label An:] %s [label am] %s
+ [label Über:] %s
[a href="/invoices/%s" Edit]
]' "$(UNSTRING "${number#number=}" |HTML)" \
"$(UNSTRING "${sender#address=}" |sed q |HTML)" \
[option value=open $( [ $status = open ] && printf selected=selected ) Offen]
[option value=sent $( [ $status = sent ] && printf selected=selected ) Verschickt]
[option value=resent $( [ $status = resent ] && printf selected=selected ) Erinnert]
- [option value=paid $( [ $status = paid ] && printf selected=selected ) Gezahlt]
+ [option value=paid $( [ $status = paid ] && printf selected=selected ) Bezahlt]
[option value=cancelled $( [ $status = cancelled ] && printf selected=selected ) Storniert]
]
[submit "genpdf" "$tid" PDF Exportieren]