summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-07-09 20:13:01 +0000
committerKarl Berry <karl@freefriends.org>2022-07-09 20:13:01 +0000
commit846bdc65a718e70cfba2eb3d87f4eb6d475b8f83 (patch)
treeaf361b058adc228f5a753b549a0534cb8b23f146 /Master/texmf-dist
parent7d15a8100b44882a31f6be0ee275624b951d771f (diff)
qrbill (9jul22)
git-svn-id: svn://tug.org/texlive/trunk@63855 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/qrbill/README.md10
-rw-r--r--Master/texmf-dist/doc/latex/qrbill/qrbill-letter-demo.pdfbin48891 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/qrbill/qrbill-letter-demo.tex8
-rw-r--r--Master/texmf-dist/doc/latex/qrbill/qrbill-standalone-demo.pdfbin34111 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/qrbill/qrbill-standalone-demo.tex8
-rw-r--r--Master/texmf-dist/doc/latex/qrbill/qrbill.pdfbin75678 -> 80077 bytes
-rw-r--r--Master/texmf-dist/source/latex/qrbill/qrbill.dtx180
-rw-r--r--Master/texmf-dist/source/latex/qrbill/qrbill.ins13
-rw-r--r--Master/texmf-dist/tex/latex/qrbill/epc.qrbill-cfg.tex62
-rw-r--r--Master/texmf-dist/tex/latex/qrbill/qrbill.sty43
-rw-r--r--Master/texmf-dist/tex/latex/qrbill/swiss.qrbill-cfg.tex19
11 files changed, 275 insertions, 68 deletions
diff --git a/Master/texmf-dist/doc/latex/qrbill/README.md b/Master/texmf-dist/doc/latex/qrbill/README.md
index d2de2374ae4..9a218919db4 100644
--- a/Master/texmf-dist/doc/latex/qrbill/README.md
+++ b/Master/texmf-dist/doc/latex/qrbill/README.md
@@ -1,10 +1,10 @@
# qrbill – create QR-bills based on the swiss payment standard
-Copyright (C) Marei Peischl (peiTeX) <marei@peitex.de>, 2020–2021
+Copyright (C) Marei Peischl (peiTeX) <marei@peitex.de>, 2020–2022
This work is part of a collaborative project of Marei Peischl (peiTeX) and Alex Antener (foobar LLC).
-qrbill 2021/05/10 v1.03
+qrbill 2022/07/02 v1.04
***************************************************************************
@@ -24,6 +24,7 @@ qrbill 2021/05/10 v1.03
The files
* qrbill.sty
* swiss.qrbill-cfg.tex
+* epc.qrbill-cfg.tex
as well as the demo files
* qrbill-standalone-demo.tex
* qrbill-letter-demo.tex
@@ -48,4 +49,7 @@ To simplify this, you can have a look at the qrbill.tds.zip, which provides an a
- Not on version number inconsistency
* v1.03 (2021-05-10)
- Update to swiss qrbill payments standard v2.2
- - Add seb-iban and sep-reference to the example files \ No newline at end of file
+ - Add seb-iban and sep-reference to the example files
+ * v1.04 (2022/07/02)
+ - add basic support for EPC QR codes
+ - add date parsing mechanism to preset the dates to values of `\today` \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/qrbill/qrbill-letter-demo.pdf b/Master/texmf-dist/doc/latex/qrbill/qrbill-letter-demo.pdf
deleted file mode 100644
index cadf7dcfb01..00000000000
--- a/Master/texmf-dist/doc/latex/qrbill/qrbill-letter-demo.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/qrbill/qrbill-letter-demo.tex b/Master/texmf-dist/doc/latex/qrbill/qrbill-letter-demo.tex
index d67df446d90..8948ed0e7e7 100644
--- a/Master/texmf-dist/doc/latex/qrbill/qrbill-letter-demo.tex
+++ b/Master/texmf-dist/doc/latex/qrbill/qrbill-letter-demo.tex
@@ -6,7 +6,7 @@
%%
%% qrbill.dtx (with options: `qrbill-letter-demo.tex')
%%
-%% Copyright (C) 2020–2021 by Marei Peischl (peiTeX) <marei@peitex.de>
+%% Copyright (C) 2020–2022 by Marei Peischl (peiTeX) <marei@peitex.de>
%%
%% This work is a collaboration of
%% Marei Peischl (peiTeX) and Alex Antener (foobar LLC).
@@ -27,8 +27,8 @@
%% This work consists of the files
%% qrbill.dtx and qrbill.ins, qrbill-vocab.csv
%% and the derived files
-%% qrbill.sty, swiss.qrbill-cfg.tex, qrbill-letter-demo.tex,
-%% qrbill-standalone-demo.tex .
+%% qrbill.sty, swiss.qrbill-cfg.tex, epc.qrbill-cfg.tex,
+%% qrbill-letter-demo.tex, qrbill-standalone-demo.tex.
%%
%% The development repository can be found at
%% https://github.com/peitex/qrbill
@@ -72,9 +72,7 @@ height=105mm,
Amount=1337.42,
Message=Bestellung vom 27.06.2020,
invoicenum=100-4242,
- invoicedate=200701,%yymmdd
vatdetails=0,% 0% VAT
- vatdate=200701,%yymmdd
AV1=LX;F00BAR;2342,
}
diff --git a/Master/texmf-dist/doc/latex/qrbill/qrbill-standalone-demo.pdf b/Master/texmf-dist/doc/latex/qrbill/qrbill-standalone-demo.pdf
deleted file mode 100644
index 6f9cac0388a..00000000000
--- a/Master/texmf-dist/doc/latex/qrbill/qrbill-standalone-demo.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/qrbill/qrbill-standalone-demo.tex b/Master/texmf-dist/doc/latex/qrbill/qrbill-standalone-demo.tex
index 055531d1d14..825a4187d20 100644
--- a/Master/texmf-dist/doc/latex/qrbill/qrbill-standalone-demo.tex
+++ b/Master/texmf-dist/doc/latex/qrbill/qrbill-standalone-demo.tex
@@ -6,7 +6,7 @@
%%
%% qrbill.dtx (with options: `qrbill-standalone-demo.tex')
%%
-%% Copyright (C) 2020–2021 by Marei Peischl (peiTeX) <marei@peitex.de>
+%% Copyright (C) 2020–2022 by Marei Peischl (peiTeX) <marei@peitex.de>
%%
%% This work is a collaboration of
%% Marei Peischl (peiTeX) and Alex Antener (foobar LLC).
@@ -27,8 +27,8 @@
%% This work consists of the files
%% qrbill.dtx and qrbill.ins, qrbill-vocab.csv
%% and the derived files
-%% qrbill.sty, swiss.qrbill-cfg.tex, qrbill-letter-demo.tex,
-%% qrbill-standalone-demo.tex .
+%% qrbill.sty, swiss.qrbill-cfg.tex, epc.qrbill-cfg.tex,
+%% qrbill-letter-demo.tex, qrbill-standalone-demo.tex.
%%
%% The development repository can be found at
%% https://github.com/peitex/qrbill
@@ -67,9 +67,7 @@
Amount=1337.42,
Message=Bestellung vom 27.06.2020,
invoicenum=100-4242,
- invoicedate=200701,%yymmdd
vatdetails=0,% 0% VAT
- vatdate=200701,%yymmdd
AV1=LX;F00BAR;2342,
]
diff --git a/Master/texmf-dist/doc/latex/qrbill/qrbill.pdf b/Master/texmf-dist/doc/latex/qrbill/qrbill.pdf
index cc5a14617db..5f9d5acd0a3 100644
--- a/Master/texmf-dist/doc/latex/qrbill/qrbill.pdf
+++ b/Master/texmf-dist/doc/latex/qrbill/qrbill.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/qrbill/qrbill.dtx b/Master/texmf-dist/source/latex/qrbill/qrbill.dtx
index 21126cf9731..e2b228f2ae4 100644
--- a/Master/texmf-dist/source/latex/qrbill/qrbill.dtx
+++ b/Master/texmf-dist/source/latex/qrbill/qrbill.dtx
@@ -2,7 +2,7 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% Copyright (C) 2020–2021 by Marei Peischl (peiTeX) <marei@peitex.de>
+% Copyright (C) 2020–2022 by Marei Peischl (peiTeX) <marei@peitex.de>
%
% This work is a collaboration of
% Marei Peischl (peiTeX) and Alex Antener (foobar LLC).
@@ -23,8 +23,8 @@
% This work consists of the files
% qrbill.dtx and qrbill.ins, qrbill-vocab.csv
% and the derived files
-% qrbill.sty, swiss.qrbill-cfg.tex, qrbill-letter-demo.tex,
-% qrbill-standalone-demo.tex .
+% qrbill.sty, swiss.qrbill-cfg.tex, epc.qrbill-cfg.tex,
+% qrbill-letter-demo.tex, qrbill-standalone-demo.tex.
%
% The development repository can be found at
% https://github.com/peitex/qrbill
@@ -54,13 +54,13 @@
% \fi
% \iffalse
%<*driver>
-\ProvidesFile{qrbill.dtx}[2021/05/10 v1.03 \ create QR-bills based on the Swiss standard]
+\ProvidesFile{qrbill.dtx}[2022/07/02 v1.04 \ create QR-bills based on the Swiss standard]
\documentclass[english, parskip=half-]{scrartcl}
\usepackage{iftex}
\ifPDFTeX
\usepackage[T1]{fontenc}
\fi
-\usepackage{doc}
+\usepackage[hyperref=false]{doc}
\usepackage[cache, langlinenos]{minted}
% Need to set the style here so that it is defined and brought in here.
% If the style is set later, then docstrip interferes with any comments in
@@ -79,10 +79,9 @@
\usepackage{babel}
\usepackage[babel]{csquotes}
-\EnableCrossrefs
\PageIndex
\RecordChanges
-\newmintinline[code]{latex}{}
+\newmintinline{latex}{}
\newcommand*\repl[1]{\meta{#1}}
\newcommand*\opt[1]{\colorbox{black!20}{\meta{#1}}}
@@ -215,7 +214,7 @@
% \end{doccode}
%
% \DescribeMacro{\QRbill}\oarg{Data Setup}
-% The macro \code{\QRbill} creates a box of 210\,mm${}\times{}$105\,mm size. It will include a qrbill as described in the design guide \cite{qrbill-design} and insert all available data.
+% The macro \latexinline{\QRbill} creates a box of 210\,mm${}\times{}$105\,mm size. It will include a qrbill as described in the design guide \cite{qrbill-design} and insert all available data.
%
% There is also an example in the appendix showing all data fields (see appendix \ref{standalone-complete} on page \pageref{standalone-complete}).
%
@@ -236,14 +235,14 @@
% \item numprint
% \end{itemize}
%
-% As a default font \enquote{Liberation Sans} will be used. This will be loaded using fontspec, which would require the use of Lua\LaTeX{} or Xe\LaTeX{} as a compiler. To have a workaround for this, see the \code{font} option on page \pageref{opt:font} for a custom font setup.
+% As a default font \enquote{Liberation Sans} will be used. This will be loaded using fontspec, which would require the use of Lua\LaTeX{} or Xe\LaTeX{} as a compiler. To have a workaround for this, see the \latexinline{font} option on page \pageref{opt:font} for a custom font setup.
%
% \section{Package options}
%
% \begin{optionlist}
%
% \item[billinginfo (true/false) (true)]
-% Activate/deactivate the automatic fill of the BillingInformation. If this is set to \code{false} one still can add data to this field using the \code{BillingInformation} key, as Described in section \ref{sec:data-setup}.
+% Activate/deactivate the automatic fill of the BillingInformation. If this is set to \latexinline{false} one still can add data to this field using the \latexinline{BillingInformation} key, as Described in section \ref{sec:data-setup}.
%
% \item[creditorprefix\\debtorprefix (String) (CR-/UD-)]
% For custom setups the predefined prefixes for the debtor and creditoraddress can be changes. The initial configuration is a requirement of the Swiss standards.
@@ -252,7 +251,7 @@
% \label{opt:font}
% The official guideline for the Swiss qrbill limits the choice of the font to the first four values of this option. The font selection and sizes currently hardcoded to fit to the size. Custom setups might be provided in the future.
%
-% In case one wants to use a custom font, you can set the option \code{font=custom}. This will disable all font setup and not prevent the fontspec package from being loaded. You can redefine the macro \code{qrbillfont} to use any font available on your system, for example:
+% In case one wants to use a custom font, you can set the option \latexinline{font=custom}. This will disable all font setup and not prevent the fontspec package from being loaded. You can redefine the macro \latexinline{qrbillfont} to use any font available on your system, for example:
% \begin{doccode}
% \usepackage{fontspec}
% % The Laconic font has to be installed
@@ -264,7 +263,7 @@
%
% \changes{v1.02}{2020/08/25}{add ibanseparator option}
% \item[ibanseparator (tokenlist) (\textbackslash,)]
-% Set the tokenlist to separate the account numbers. See option \code{sep-iban} for
+% Set the tokenlist to separate the account numbers. See option \latexinline{sep-iban} for
% further information.
%
% \item[icon (swiss-cross/filename) (<empty>)]
@@ -280,13 +279,13 @@
%
% \changes{v1.02}{2020/08/25}{add referenceseparator option}
% \item[referenceseparator (tokenlist) (\textbackslash,)]
-% Set the tokenlist to separate the reference codes. See option \code{sep-reference} for
+% Set the tokenlist to separate the reference codes. See option \latexinline{sep-reference} for
% further information.
%
% \changes{v1.02}{2020/08/25}{add sep-iban/sep-reference option}
% \item[sep-iban\\sep-reference (integer) (0)]
% Set the size of character groups to separate these. Positive values will be counted left to right. Negative ones the other way round.
-% The most variants of the Swiss QRbill use values of \code{sep-iban=4} and \code{sep-reference=-5} e.\,g.:
+% The most variants of the Swiss QRbill use values of \latexinline{sep-iban=4} and \latexinline{sep-reference=-5} e.\,g.:
%
% \ExplSyntaxOn
% \begingroup
@@ -304,11 +303,26 @@
%
% \section{Data setup}
% \label{sec:data-setup}
-% \DescribeMacro{\qrbillsetdata}
-% The data fields can be filled either using the optional argument of \code{\QRbill} or using the macro \code{\qrbillsetdata}. Section \ref{sec:data-complete} shows a list of all available fields and appendix \ref{standalone-complete} provides an example of use. For further information on the construction of the QRcode see the specification \cite{qrbill-spec}.
+% \changes{v1.04}{2022/07/02}{Add starrred variant of qrbillsetdata}
+% \DescribeMacro{\qrbillsetdata}\sarg\marg{data}
+% The data fields can be filled either using the optional argument of \latexinline{\QRbill} or using the macro \latexinline{\qrbillsetdata}. Section \ref{sec:data-complete} shows a list of all available fields and appendix \ref{standalone-complete} provides an example of use. For further information on the construction of the QRcode see the specification \cite{qrbill-spec}.
%
% To simplify the usage qrbill provides an interface to use the different types of address data and is able to create a \enquote{billing information} string as described in \cite{qrbill-spec} using the single data elements.
%
+% Version 1.04 adds a starred variant to expand the argument before setting the data. This might be usefull for using counters or other variables inside the command.
+%
+% \section{Parsing dates}
+% In version v1.04 qrbill introduced the functionality to parse dates. For the swiss data scheme the fields \latexinline{invoicedate} and \latexinline{vatdate} are prefilled with the compilation date.
+% \changes{v1.04}{2022/07/02}{Add date parsing mechanisms}
+% \DescribeMacro{\QRbillParseDate}\marg{year}\marg{month}\marg{day}
+% To be compatible with language specific setups the usage of \latexinline{\today} is not allowed directly but one can use
+% \begin{doccode}
+% \qrbillsetdata*{
+% invoicedate=\QRbillParseDate{\the\year}{\the\month}{\the\day}
+% }
+% \end{doccode}
+% By default this setting will return the ISO date (YYYY-MM-DD) but the swiss scheme is already changing this to the desired (YYMMDD) structure.
+%
% \section{Setup for the preconfigured Swiss QR-bill}
% \subsection{Preconfigured data}
% \changes{v1.03}{2021/05/07}{Update to swiss qrbill standard version 2.2}
@@ -324,18 +338,18 @@
% These fields are required to use these values for Version 2.2 of the QRbill standard. If any future changes on the standard would require changes, they can be overwritten or redefined by using a custom implementation file, similar to swiss.qrbill-cfg.tex.
%
% \changes{v1.02}{2020/08/25}{Note the version number inconsistency in the official guidelines}
-% Be aware that version 2.1 of the standard requested to use the versioncode \code{0210}.
-% With the update to version 2.2 of the standard this was changed to \code{0200}.
+% Be aware that version 2.1 of the standard requested to use the versioncode \latexinline{0210}.
+% With the update to version 2.2 of the standard this was changed to \latexinline{0200}.
% This change was caused by a discrepancy between the standard and the commong implementation.
-% Most of them continued to use the version code \code{0200} therefore SIX decided to keep this error and created a workaround with finally documenting this change in version 2.2 of the guildelines.
+% Most of them continued to use the version code \latexinline{0200} therefore SIX decided to keep this error and created a workaround with finally documenting this change in version 2.2 of the guildelines.
% \begin{quote}
%Note: In collaboration with representatives of the financial center, SIX has decided that only the version designation “0200” is permitted in master version 02. From master version 03 onwards, depiction of subversions is enabled.\\\hspace*{\fill}\cite{qrbill-spec}
% \end{quote}
% The corresponding issue and discussion concerning this especially for version 2.1 can be found at \url{https://github.com/peiTeX/qrbill/issues/3}.
%
-% Additionally the Currency has been initialized to use \enquote{CHF}. This also can be overwritten. Currently the Swiss standards only allow the values \code{CHF} or \code{EUR}.
+% Additionally the Currency has been initialized to use \enquote{CHF}. This also can be overwritten. Currently the Swiss standards only allow the values \latexinline{CHF} or \latexinline{EUR}.
% \subsection{Address data}
-% The Swiss payment standards for QR-bills require the following data for the address of creditor (Prefix \code{CR-}) and debtor (Prefix \code{UD-}):
+% The Swiss payment standards for QR-bills require the following data for the address of creditor (Prefix \latexinline{CR-}) and debtor (Prefix \latexinline{UD-}):
% \begin{center}
% \begin{tabular}{@{}>{\ttfamily}l>{\centering}p{.25\linewidth}>{\centering\arraybackslash}p{.25\linewidth}@{}}
% \toprule
@@ -348,7 +362,7 @@
% Country& \multicolumn{2}{c}{Country Code}\\\bottomrule
% \end{tabular}
% \end{center}
-% To set an address of type \enquote{K} one can use they option key \code{debtor} or \code{creditor}. Type \enquote{S} can be achieved using the starred variant (\code{debtor*}/\code{creditor*}).
+% To set an address of type \enquote{K} one can use they option key \latexinline{debtor} or \latexinline{creditor}. Type \enquote{S} can be achieved using the starred variant (\latexinline{debtor*}/\latexinline{creditor*}).
%
% \begin{minipage}{.5\linewidth}
% \begin{doccode}
@@ -390,7 +404,7 @@
% /31/180508/32/7.7/40/2:10;0:30
% \end{doccode}
% \subsection{AV-Parameters}
-% The QRcode can use 2 AV Parameters. They have to carry the Prefix of \enquote{Name AV1:}/\enquote{Name AV2:}. This will be automatically added if the keys \code{AV1}/\code{AV2} are used instead of \code{AV1-Parameters}/\code{AV2-Parameters}.
+% The QRcode can use 2 AV Parameters. They have to carry the Prefix of \enquote{Name AV1:}/\enquote{Name AV2:}. This will be automatically added if the keys \latexinline{AV1}/\latexinline{AV2} are used instead of \latexinline{AV1-Parameters}/\latexinline{AV2-Parameters}.
%
% \subsection{Remaining data elements}
% The remaining data elements should be set directly.
@@ -427,11 +441,40 @@
% \ExplSyntaxOn
% \prop_map_inline:Nn \g__qrbill_billing_info_prop {#2~(#1)\\}
% \ExplSyntaxOff
+%
+% \section{Setup for EPC QR codes}
+% EPC QR codes can be used for SEPA credit transfer (SCT).
+% They do not include any data about the debtor or tax information.
+% Therefore they may only be used with the starred variant of \latexinline{\QRbill*} or the user has to provide additional data interfaces.
+% \subsection{Preconfigured data}
+% \changes{v1.04}{2022/07/01}{Add basic support for EPC QR codes}
+% The epc qrscheme provided by this package preset the following data:
+% \begin{doccode}
+% \SetupQrBill{
+% QRType=BCD,
+% Version=002,
+% CodingType=1,% UTF-8, 2 would be ISO
+% Trailer=SCT,
+% }
+% \end{doccode}
+% These fields are required to use these values for the current version of the EPC QR code.
+%
+% \subsection{Required data}
+% The data fields required by the EPC QRcode can be set directly. A full example for an easy EPC qrcode would be
+% \begin{doccode}
+% \QRbill*[
+% BIC=BYLADEM1GLS,
+% Account=DE68430609671013251700,
+% Name=peiTeX,
+% Amount=EUR123.42,
+% Message={Invoice 2022:1337, customer 1337}
+% ]
+% \end{doccode}
% \iffalse
% \section{Implementation}
% \begin{macrocode}
\RequirePackage{expl3}
-\ProvidesExplPackage{qrbill}{2021/05/10}{1.03}{
+\ProvidesExplPackage{qrbill}{2022/07/02}{1.04}{
Template for QR-bills based on the Swiss Payment Standards
}
\RequirePackage{iftex}
@@ -538,7 +581,12 @@
\ProcessKeysOptions{qrbill}
\newcommand*{\qrbillsetup}[1]{\keys_set:nn {qrbill}{#1}}
-\newcommand*{\qrbillsetdata}[1]{\keys_set:nn {qrbill/data}{#1}}
+\NewDocumentCommand{\qrbillsetdata}{sm}{
+ \IfBooleanT {#1}
+ \exp_args:Nnx
+ \keys_set:nn
+ {qrbill/data}{#2}
+}
\tl_if_empty:NTF \g__qrbill_font_tl {
\def\qrbillfont{\normalfont}
@@ -781,11 +829,17 @@
\endgroup
}
-\newcommand{\QRbill}[1][]{
- \begingroup
- \tl_if_empty:nF {#1} {\keys_set:nn {qrbill/data} {#1}}
- \qrbill_bill_create:
- \endgroup
+\NewDocumentCommand{\QRbill}{so}{
+ \begingroup
+ \IfNoValueF{#2} {\keys_set:nn {qrbill/data} {#2}}
+ \IfBooleanTF {#1}
+ {
+ \qrcode_setup_QRcode:
+ \qrbill_parse_QRcode:V \l_qrbill_data_str
+ }{
+ \qrbill_bill_create:
+ }
+ \endgroup
}
\ior_new:N \qrbill_ior
@@ -987,6 +1041,18 @@
}
}
+\cs_set:Nn \qrbill_parse_date:nnn {
+ #1-
+ \int_compare:nNnT {#2} < {10} {0}#2-
+ \int_compare:nNnT {#3} < {10} {0}#3
+}
+
+\cs_generate_variant:Nn \qrbill_parse_date:nnn {eee}
+
+\cs_set:Npn \QRbillParseDate #1#2#3 {
+ \qrbill_parse_date:eee {#1}{#2}{#3}
+}
+
\cs_new:Nn \qrbill_insert_AV_parameters:NNn {
\clist_map_inline:nn {#3} {
\tl_if_empty:cF {l_qrbill_##1_tl}
@@ -1003,9 +1069,6 @@
%</qrbill.sty>
% \section{The file swiss.qrbill-cfg.tex as a custom qrbill scheme}
%<*swiss.qrbill-cfg.tex>
-% \end{macrocode}
-% \fi
-% \begin{macrocode}
\qrbillsetup{
creditorprefix =CR-,
debtorprefix =UD-,
@@ -1060,6 +1123,14 @@
40=conditions
}
+\ExplSyntaxOn
+\cs_set:Nn \qrbill_parse_date:nnn {
+ \str_range:nnn {#1} {3} {4}
+ \int_compare:nNnT {#2} < {10} {0}#2
+ \int_compare:nNnT {#3} < {10} {0}#3
+}
+\ExplSyntaxOff
+
\SetupQrBill{
QRType=SPC,
Version=0200,
@@ -1068,11 +1139,46 @@
Currency=CHF,
ReferenceType=NON,
}
+
+\qrbillsetdata*{
+ invoicedate=\QRbillParseDate{\the\year}{\the\month}{\the\day},
+ vatdate=\QRbillParseDate{\the\year}{\the\month}{\the\day}
+}
% \end{macrocode}
% \iffalse
% \begin{macrocode}
%</swiss.qrbill-cfg.tex>
% \end{macrocode}
+% \section{The file epc.qrbill-cfg.tex as a custom qrbill scheme}
+% This scheme supports much less variables in contrast to the swiss scheme.
+% Therefore the \latexinline{\QRbill} macro has to be used as the starred variant or additional variables have to be provided by the user.
+%<*epc.qrbill-cfg.tex>
+% \end{macrocode}
+% \fi
+% \begin{macrocode}
+\SetQrScheme{
+ QRType,
+ Version,
+ CodingType,
+ Trailer,
+ BIC,
+ Name,
+ Account,
+ Amount,
+ DTA,
+ Reference,
+ Message,
+ Note
+}
+
+\SetupQrBill{
+ QRType=BCD,
+ Version=002,
+ CodingType=1,
+ Trailer=SCT,
+}
+%</epc.qrbill-cfg.tex>
+% \end{macrocode}
% \fi
%
% \PrintChanges
@@ -1122,9 +1228,9 @@
Amount=1337.42,
Message=Bestellung vom 27.06.2020,
invoicenum=100-4242,
- invoicedate=200701,%yymmdd
+% invoicedate=200701,%yymmdd, preset to todays values
vatdetails=0,% 0% VAT
- vatdate=200701,%yymmdd
+% invoicedate=200701,%yymmdd, preset to todays values
AV1=LX;F00BAR;2342,
]
@@ -1178,9 +1284,9 @@
Amount=1337.42,
Message=Bestellung vom 27.06.2020,
invoicenum=100-4242,
- invoicedate=200701,%yymmdd
+% invoicedate=200701,%yymmdd, preset to todays values
vatdetails=0,% 0% VAT
- vatdate=200701,%yymmdd
+% vatdate=200701,%yymmdd, preset to todays values
AV1=LX;F00BAR;2342,
}
diff --git a/Master/texmf-dist/source/latex/qrbill/qrbill.ins b/Master/texmf-dist/source/latex/qrbill/qrbill.ins
index 26eec8166b4..a2c98b2ab65 100644
--- a/Master/texmf-dist/source/latex/qrbill/qrbill.ins
+++ b/Master/texmf-dist/source/latex/qrbill/qrbill.ins
@@ -1,11 +1,11 @@
\input l3docstrip
-\def\filedate{2021/05/10}
-\def\fileversion{1.03}
+\def\filedate{2022/07/02}
+\def\fileversion{1.04}
\preamble
-Copyright (C) 2020–2021 by Marei Peischl (peiTeX) <marei@peitex.de>
+Copyright (C) 2020–2022 by Marei Peischl (peiTeX) <marei@peitex.de>
This work is a collaboration of
Marei Peischl (peiTeX) and Alex Antener (foobar LLC).
@@ -26,8 +26,8 @@ The Current Maintainer of this work is
This work consists of the files
qrbill.dtx and qrbill.ins, qrbill-vocab.csv
and the derived files
-qrbill.sty, swiss.qrbill-cfg.tex, qrbill-letter-demo.tex,
- qrbill-standalone-demo.tex .
+qrbill.sty, swiss.qrbill-cfg.tex, epc.qrbill-cfg.tex,
+qrbill-letter-demo.tex, qrbill-standalone-demo.tex.
The development repository can be found at
https://github.com/peitex/qrbill
@@ -46,6 +46,9 @@ Please use the issue tracker for feedback!
\file{swiss.qrbill-cfg.tex}{
\from{qrbill.dtx}{swiss.qrbill-cfg.tex}
}
+ \file{epc.qrbill-cfg.tex}{
+ \from{qrbill.dtx}{epc.qrbill-cfg.tex}
+ }
\file{qrbill-letter-demo.tex}{
\from{qrbill.dtx}{qrbill-letter-demo.tex}
}
diff --git a/Master/texmf-dist/tex/latex/qrbill/epc.qrbill-cfg.tex b/Master/texmf-dist/tex/latex/qrbill/epc.qrbill-cfg.tex
new file mode 100644
index 00000000000..b3963a20b8c
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/qrbill/epc.qrbill-cfg.tex
@@ -0,0 +1,62 @@
+%%
+%% This is file `epc.qrbill-cfg.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% qrbill.dtx (with options: `epc.qrbill-cfg.tex')
+%%
+%% Copyright (C) 2020–2022 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.3
+%% 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.3 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.
+%%
+%% The development repository can be found at
+%% https://github.com/peitex/qrbill
+%% Please use the issue tracker for feedback!
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\SetQrScheme{
+QRType,
+Version,
+CodingType,
+Trailer,
+BIC,
+Name,
+Account,
+Amount,
+DTA,
+Reference,
+Message,
+Note
+}
+
+\SetupQrBill{
+QRType=BCD,
+Version=002,
+CodingType=1,
+Trailer=SCT,
+}
+\endinput
+%%
+%% End of file `epc.qrbill-cfg.tex'.
diff --git a/Master/texmf-dist/tex/latex/qrbill/qrbill.sty b/Master/texmf-dist/tex/latex/qrbill/qrbill.sty
index c1b047be6cc..3283b02c807 100644
--- a/Master/texmf-dist/tex/latex/qrbill/qrbill.sty
+++ b/Master/texmf-dist/tex/latex/qrbill/qrbill.sty
@@ -6,7 +6,7 @@
%%
%% qrbill.dtx (with options: `qrbill.sty,package')
%%
-%% Copyright (C) 2020–2021 by Marei Peischl (peiTeX) <marei@peitex.de>
+%% Copyright (C) 2020–2022 by Marei Peischl (peiTeX) <marei@peitex.de>
%%
%% This work is a collaboration of
%% Marei Peischl (peiTeX) and Alex Antener (foobar LLC).
@@ -27,8 +27,8 @@
%% This work consists of the files
%% qrbill.dtx and qrbill.ins, qrbill-vocab.csv
%% and the derived files
-%% qrbill.sty, swiss.qrbill-cfg.tex, qrbill-letter-demo.tex,
-%% qrbill-standalone-demo.tex .
+%% qrbill.sty, swiss.qrbill-cfg.tex, epc.qrbill-cfg.tex,
+%% qrbill-letter-demo.tex, qrbill-standalone-demo.tex.
%%
%% The development repository can be found at
%% https://github.com/peitex/qrbill
@@ -38,7 +38,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{expl3}
-\ProvidesExplPackage{qrbill}{2021/05/10}{1.03}{
+\ProvidesExplPackage{qrbill}{2022/07/02}{1.04}{
Template for QR-bills based on the Swiss Payment Standards
}
\RequirePackage{iftex}
@@ -145,7 +145,12 @@
\ProcessKeysOptions{qrbill}
\newcommand*{\qrbillsetup}[1]{\keys_set:nn {qrbill}{#1}}
-\newcommand*{\qrbillsetdata}[1]{\keys_set:nn {qrbill/data}{#1}}
+\NewDocumentCommand{\qrbillsetdata}{sm}{
+\IfBooleanT {#1}
+\exp_args:Nnx
+\keys_set:nn
+{qrbill/data}{#2}
+}
\tl_if_empty:NTF \g__qrbill_font_tl {
\def\qrbillfont{\normalfont}
@@ -387,11 +392,17 @@
\endgroup
}
-\newcommand{\QRbill}[1][]{
- \begingroup
- \tl_if_empty:nF {#1} {\keys_set:nn {qrbill/data} {#1}}
- \qrbill_bill_create:
- \endgroup
+\NewDocumentCommand{\QRbill}{so}{
+\begingroup
+\IfNoValueF{#2} {\keys_set:nn {qrbill/data} {#2}}
+\IfBooleanTF {#1}
+{
+\qrcode_setup_QRcode:
+\qrbill_parse_QRcode:V \l_qrbill_data_str
+}{
+\qrbill_bill_create:
+}
+\endgroup
}
\ior_new:N \qrbill_ior
@@ -591,6 +602,18 @@
}
}
+\cs_set:Nn \qrbill_parse_date:nnn {
+#1-
+\int_compare:nNnT {#2} < {10} {0}#2-
+\int_compare:nNnT {#3} < {10} {0}#3
+}
+
+\cs_generate_variant:Nn \qrbill_parse_date:nnn {eee}
+
+\cs_set:Npn \QRbillParseDate #1#2#3 {
+\qrbill_parse_date:eee {#1}{#2}{#3}
+}
+
\cs_new:Nn \qrbill_insert_AV_parameters:NNn {
\clist_map_inline:nn {#3} {
\tl_if_empty:cF {l_qrbill_##1_tl}
diff --git a/Master/texmf-dist/tex/latex/qrbill/swiss.qrbill-cfg.tex b/Master/texmf-dist/tex/latex/qrbill/swiss.qrbill-cfg.tex
index d4ff7747ee2..690e21df2f9 100644
--- a/Master/texmf-dist/tex/latex/qrbill/swiss.qrbill-cfg.tex
+++ b/Master/texmf-dist/tex/latex/qrbill/swiss.qrbill-cfg.tex
@@ -6,7 +6,7 @@
%%
%% qrbill.dtx (with options: `swiss.qrbill-cfg.tex')
%%
-%% Copyright (C) 2020–2021 by Marei Peischl (peiTeX) <marei@peitex.de>
+%% Copyright (C) 2020–2022 by Marei Peischl (peiTeX) <marei@peitex.de>
%%
%% This work is a collaboration of
%% Marei Peischl (peiTeX) and Alex Antener (foobar LLC).
@@ -27,8 +27,8 @@
%% This work consists of the files
%% qrbill.dtx and qrbill.ins, qrbill-vocab.csv
%% and the derived files
-%% qrbill.sty, swiss.qrbill-cfg.tex, qrbill-letter-demo.tex,
-%% qrbill-standalone-demo.tex .
+%% qrbill.sty, swiss.qrbill-cfg.tex, epc.qrbill-cfg.tex,
+%% qrbill-letter-demo.tex, qrbill-standalone-demo.tex.
%%
%% The development repository can be found at
%% https://github.com/peitex/qrbill
@@ -90,6 +90,14 @@
40=conditions
}
+\ExplSyntaxOn
+\cs_set:Nn \qrbill_parse_date:nnn {
+\str_range:nnn {#1} {3} {4}
+\int_compare:nNnT {#2} < {10} {0}#2
+\int_compare:nNnT {#3} < {10} {0}#3
+}
+\ExplSyntaxOff
+
\SetupQrBill{
QRType=SPC,
Version=0200,
@@ -98,6 +106,11 @@
Currency=CHF,
ReferenceType=NON,
}
+
+\qrbillsetdata*{
+invoicedate=\QRbillParseDate{\the\year}{\the\month}{\the\day},
+vatdate=\QRbillParseDate{\the\year}{\the\month}{\the\day}
+}
\endinput
%%
%% End of file `swiss.qrbill-cfg.tex'.