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
|
%
% definitions for the csv-mt940 format
%
% define the order of keys in your csv file
% simply use arbitrary keys for unused fields
\renewcommand*\STM@JK@dbkeys{Account,PostingDate,ValueDate,Type,Reference,CreditorIdentifier,MandateReference,EndToEndReference,AAA,BBB,CCC,Recipient,IBAN,BIC,Amount,Currency,Info}%
% define usage of key values inside the used longtable
% dates & mixed information & amount
\renewcommand*\STM@JK@DTLforeach%
{%
\DTLforeach{\STM@JK@dbname}%
{\postingdate=PostingDate,\valuedate=ValueDate,\type=Type,\reference=Reference,\credid=CreditorIdentifier,\mref=MandateReference,\eref=EndToEndReference,\recipient=Recipient,\iban=IBAN,\bic=BIC,\amount=Amount,\currency=Currency}%
{%
\parbox[t]{\widthof{ DD.MM.YYYY }}{\hspace{\STM@JK@parspace}\postingdate\\(\valuedate)} &%
\parbox[t]{\STM@JK@referencewidth}{\raggedright%
\DTLifstringeq{\type}{}{}{\type\\}%
\DTLifstringeq{\bic}{}{-}{\bic{}}\DTLifstringeq{\iban}{}{}{ / \iban}\\%
\DTLifstringeq{\recipient}{}{}{\recipient\\}%
\DTLifstringeq{\credid}{}{}{CRED: \credid\\}%
\DTLifstringeq{\mref}{}{}{MREF: \mref\\}%
\DTLifstringeq{\eref}{}{}{EREF: \eref\\}%
\reference} &%
\DTLifStartsWith{\amount}{-}{\textcolor{\STM@JK@negativecolor}{\amount}}{\amount}%
\DTLiflastrow{%
\ifthenelse{\equal{\STM@JK@closingbalance}{none}}%
{}%
{\\\midrule\\ & \STM@JK@closingbalancenamename & \DTLifStartsWith{\STM@JK@closingbalance}{-}{\textcolor{\STM@JK@negativecolor}{\STM@JK@closingbalance}}{\STM@JK@closingbalance}}%
\\\bottomrule%
}%
{\\ & & \\}%
}%
}%
% set separator of csv file
\DTLsetseparator{;}%
% does the csv file (not) have a header row? ;-)
\renewcommand*\STM@JK@noheader{false}%
|