%%
%% This is file `qrbill-letter-demo.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% qrbill.dtx  (with options: `qrbill-letter-demo.tex')
%% 
%% Copyright (C) 2020–2023 by Marei Peischl (peiTeX) <marei@peitex.de>
%% 
%% This work is a collaboration of
%%   Marei Peischl (peiTeX) and Alex Antener (foobar LLC).
%% 
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%    http://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%% 
%% This work has the LPPL maintenance status `maintained'.
%% 
%% The Current Maintainer of this work is
%%   Marei Peischl <qrbill@peitex.de>.
%% 
%% This work consists of the files
%% qrbill.dtx and qrbill.ins, qrbill-vocab.csv
%% and the derived files
%% qrbill.sty, swiss.qrbill-cfg.tex, epc.qrbill-cfg.tex,
%% qrbill-letter-demo.tex, qrbill-standalone-demo.tex,
%% and qrbill-epc-demo.tex.
%% 
%% The development repository can be found at
%% https://github.com/peitex/qrbill
%% Please use the issue tracker for feedback!
%% 
\documentclass[foldmarks=b]{scrletter}
\usepackage[
  frame=top,
  sep-iban=4,
  sep-reference=-5,
]{qrbill}

\DeclareNewLayer[
align=bl,
voffset=\paperheight,
hoffset=0pt,
contents={\QRbill},
width=\paperwidth,
height=105mm,
]{qrbill}

\begin{document}

\qrbillsetdata{
  creditor*={foobar LLC\\
Postfach\\
404\\
2342\\
Zurich\\
CH},
  Account=CH1280808005649899718,
  vat=123123123,% VAT number with stripped CH and periods
  debtor*={peiTeX\\
TeXnikerweg\\
78\\
23420\\
Hamburg\\
DE},
  Amount=1337.42,
  Message=Bestellung vom 27.06.2020,
  invoicenum=100-4242,
  vatdetails=0,% 0% VAT
  AV1=LX;F00BAR;2342,
}

\setkomavar{fromaddress}{\insertcreditor}

\begin{letter}{\insertdebtor}

\opening{opening}

Text

\closing{closing}

\AddLayersToPageStyle{@everystyle@}{qrbill}

\end{letter}
\end{document}
\endinput
%%
%% End of file `qrbill-letter-demo.tex'.
