summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/bankstatement/csv-mt940.def
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/bankstatement/csv-mt940.def')
-rw-r--r--Master/texmf-dist/tex/latex/bankstatement/csv-mt940.def33
1 files changed, 33 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/bankstatement/csv-mt940.def b/Master/texmf-dist/tex/latex/bankstatement/csv-mt940.def
new file mode 100644
index 00000000000..ce17e4b6c10
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/bankstatement/csv-mt940.def
@@ -0,0 +1,33 @@
+%
+% 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,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,\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\\}%
+ \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}% \ No newline at end of file