- case $taxtype in
- nett) total="${nett} € + VAT";;
- gross) total="${gross} € incl. VAT";;
- *) total="${gross} €";;
- esac
-
- printf '[div .invoice
- [h2
- %s]
- [label From:] %s [label To:] %s [label on] %s
- [label Amount:] %s
- [a href="/invoices/%s" Edit]
- ]' "$(UNSTRING "${number#number=}" |HTML)" \
- "$(UNSTRING "${sender#address=}" |sed q |HTML)" \
- "$(UNSTRING "${client#address=}" |sed q |HTML)" "$(HTML "$date")" \
- "$total" \
- "$(HTML ${i#invoices/})"
- done
+ case $taxtype in
+ nett) total="${nett} € + VAT";;
+ gross) total="${gross} € incl. VAT";;
+ *) total="${gross} €";;
+ esac
+
+ case $status in
+ status=sent|status=resent|status=paid|status=cancelled)
+ status="${status#status=}"
+ ;;
+ *) status=open;;
+ esac
+
+ printf '[div .invoice
+ [h2
+ %s]
+ [label From:] %s [label To:] %s [label on] %s
+ [label Amount:] %s
+ [a href="/invoices/%s" Edit]
+ ]' "$(UNSTRING "${number#number=}" |HTML)" \
+ "$(UNSTRING "${sender#address=}" |sed q |HTML)" \
+ "$(UNSTRING "${client#address=}" |sed q |HTML)" "$(HTML "$date")" \
+ "$total" \
+ "$(HTML ${i#invoices/})"