diff --git a/rechnung.typ b/rechnung.typ index 484b3e1..b1ce112 100644 --- a/rechnung.typ +++ b/rechnung.typ @@ -1,5 +1,6 @@ #import "templates/tmpl_letter.typ": tmpl_letter #import "templates/common.typ": colors, money +#import "@preview/cades:0.3.0": qr-code #let config = yaml("rechnung.yml") #show: doc => tmpl_letter( @@ -73,4 +74,25 @@ #pad(x:1em)[ *Gesamtbetrag: #money(config.entries.map(e => e.pieces * e.price - e.sale).sum())* ] +] + +#if config.type == "invoice" [ + #v(1em) + #align(right)[ + #block( + stroke: 1pt, + inset: 1em, + radius: 1em + )[ + #qr-code("BCD\n002\n1\nSCT\n\nswablab e.V.\nDE12642624080125634005\nEUR" + str(config.entries.map(e => e.pieces * e.price - e.sale).sum()) + "\nGDDS\n\nRechnung " + str(config.invoice_no) + "\nswablab Rechnung", width: 2cm) + + #place(center+bottom, dy: 1.1em)[ + #block(width: 100%+0.75em, fill: white)[ + #text(size: 8pt)[ + Zahlen mit Code + ] + ] + ] + ] + ] ] \ No newline at end of file