summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/qrbill/swiss.qrbill-cfg.tex
blob: 690e21df2f9142fa46ccd0482b4c24bff67594bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
%%
%% This is file `swiss.qrbill-cfg.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% qrbill.dtx  (with options: `swiss.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!
%% 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\qrbillsetup{
        creditorprefix =CR-,
        debtorprefix =UD-,
}

\SetQrScheme{
  QRType,
  Version,
  CodingType,
  Account,
  CR-AddressType,
  CR-Name,
  CR-Address1,
  CR-Address2,
  CR-PostalCode,
  CR-City,
  CR-Country,
  UCR-AddressType,
  UCR-Name,
  UCR-Address1,
  UCR-Address2,
  UCR-ZIP,
  UCR-City,
  UCR-Country,
  Amount,
  Currency,
  UD-AddressType,
  UD-Name,
  UD-Address1,
  UD-Address2,
  UD-PostalCode,
  UD-City,
  UD-Country,
  ReferenceType,
  Reference,
  Message,
  Trailer,
  BillingInfo,
  AV1-Parameters,
  AV2-Parameters
}

\SetBillingInfoScheme{
  prefix=//S1,
  10=invoicenum,
  11=invoicedate,
  20=customerref,
  30=vat,
  31=vatdate,
  32=vatdetails,
  33=importvat,
  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,
        CodingType=1,
        Trailer=EPD,
        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'.