diff options
author | Karl Berry <karl@freefriends.org> | 2022-07-09 20:13:01 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-07-09 20:13:01 +0000 |
commit | 846bdc65a718e70cfba2eb3d87f4eb6d475b8f83 (patch) | |
tree | af361b058adc228f5a753b549a0534cb8b23f146 /Master/texmf-dist/tex/latex/qrbill | |
parent | 7d15a8100b44882a31f6be0ee275624b951d771f (diff) |
qrbill (9jul22)
git-svn-id: svn://tug.org/texlive/trunk@63855 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/qrbill')
-rw-r--r-- | Master/texmf-dist/tex/latex/qrbill/epc.qrbill-cfg.tex | 62 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/qrbill/qrbill.sty | 43 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/qrbill/swiss.qrbill-cfg.tex | 19 |
3 files changed, 111 insertions, 13 deletions
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'. |