summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/bankstatement/bankstatement.dtx
blob: 8d5a1c396a5c60734638fb6027f0573300a4ce8b (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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
% \iffalse meta-comment
% !TEX program  = pdfLaTeX
%<*internal>
\iffalse
%</internal>
%<*readme>
# README #

More and more banks allow their customers to download posting
records in various formats. By using the `bankstatement` class,
you can create bank statements - as long as a csv format is 
available! The `csv-mt940` and `csv-camt` formats - used by 
many german Sparkassen - are supported. Moreover, it supports
`csv-standard-bank-na`!

Furthermore, the following languages are supported: english,
german, namibian

You can quite easily add support for other languages or csv
formats. Simply define the order of the keys in the csv data
file and how to use them.

The terminology in this class like `BIC` (Business Identifier
Codes) or `IBAN` (International Bank Account Number) is based on
`SEPA` (Single Euro Payments Area). But you can adjust the
terminology to suit your needs.

License: **LPPL**

Changes in v0.9.2:

* use of `siunitx` to force two decimals, if csv data contains
  other formats like `16.2 -> 16.20`

* added support for Standard Bank (Namibia) and namibian

feature requests by Dr. Eberhard Lisse

* organized package in `dtx` format
%</readme>
%<*csv>
"Auftragskonto";"Buchungstag";"Valutadatum";"Buchungstext";"Verwendungszweck";"Glaeubiger ID";"Mandatsreferenz";"Kundenreferenz (End-to-End)";"Sammlerreferenz";"Lastschrift Ursprungsbetrag";"Auslagenersatz Ruecklastschrift";"Beguenstigter/Zahlungspflichtiger";"Kontonummer/IBAN";"BIC (SWIFT-Code)";"Betrag";"Waehrung";"Info"
"240408336";"30.12.14";"01.01.15";"ABSCHLUSS";"Abrechnung 30.12.2014 siehe Anlage ";"";"";"";"";"";"";"";"0240408336";"62841530";"0,00";"EUR";"Umsatz gebucht"
"240408336";"30.12.14";"01.01.15";"ENTGELTABSCHLUSS";"Entgeltabrechnung siehe Anlage ";"";"";"";"";"";"";"";"0000000000";"62841530";"-2,50";"EUR";"Umsatz gebucht"
"240408336";"18.12.14";"18.12.14";"FOLGELASTSCHRIFT";"302-4433811-1222731 Amazon.de 1045123487483681 ";"DE24ZZZ00000561652";"v:Bs73iT6BOB1wnSrLHmN7QpAe6c19";"1045684687483681";"";"";"";"AMAZON EU S.A.R.L.                                                    5 RUE PLAETIS";"DE51300308801938072015";"TUBDDEDD";"-19,90";"EUR";"Umsatz gebucht"
"240408336";"16.12.14";"16.12.14";"GUTSCHRIFT";"ebayDDR2 Speicherriegel ";"";"";"ZV0100172628619600000002";"";"";"";"Hubert Schmidt";"DE90370100500236608109";"PBNKDEFFXXX";"7,54";"EUR";"Umsatz gebucht"
"240408336";"10.12.14";"10.12.14";"ERSTLASTSCHRIFT";"1000138169 Rechnung EDEKA mobil ";"DE26ZZZ00000006194";"EDEL01063189";"1000138169";"";"";"";"Vodafone GmbH";"DE91300400000174585007";"COBADEFF300";"-9,99";"EUR";"Umsatz gebucht"
"240408336";"08.12.14";"08.12.14";"ONLINE-UEBERWEISUNG";"Ebay 141671448786 klejo2011 Bahn Extra 06 2014 DATUM 08.12.2014, 15.55 UHR1.TAN 085028 ";"";"";"";"";"";"";"Reinhold Zwack";"DE02750905000024965237";"GENODEF1S05";"-9,58";"EUR";"Umsatz gebucht"
"240408336";"02.12.14";"02.12.14";"FOLGELASTSCHRIFT";"PP.6422.PP . elefantenbaby29, Ihr Einkauf bei elefantenbaby29, Artikel-321512375783 ";"LU96ZZZ0000000000000000058";"44X2224NAC48U";"YYIJ222223N6KX7N PP.6422.PP PAYPAL";"";"";"";"PayPal Europe S.a.r.l. et Cie S.C.A";"DE88500700100175526303";"DEUTDEFFXXX";"-18,60";"EUR";"Umsatz gebucht"
"240408336";"02.12.14";"02.12.14";"EINZAHLUNG";"SB-EINZAHLUNG ErdingW2 GA 2121 / 02.12.14 18.28.520240408336 / 1812 /0 / 0 ";"";"";"";"";"";"";"";"0240408336";"62841530";"150,00";"EUR";"Umsatz gebucht"
"240408336";"01.12.14";"29.11.14";"ENTGELTABSCHLUSS";"Entgeltabrechnung siehe Anlage ";"";"";"";"";"";"";"";"0000000000";"62841530";"-2,50";"EUR";"Umsatz gebucht"
%</csv>
%<*english>
\renewcommand*\STM@JK@holdername{Account Holder}%
\renewcommand*\STM@JK@bicname{BIC}%
\renewcommand*\STM@JK@ibanname{IBAN}%
\renewcommand*\STM@JK@firstcolumnheading{\bfseries Date}%
\renewcommand*\STM@JK@secondcolumnheading{\bfseries Reference}%
\renewcommand*\STM@JK@thirdcolumnheading{\bfseries Amount (GBP)}%
\renewcommand*\STM@JK@openingbalancename{Opening Balance}%
\renewcommand*\STM@JK@closingbalancename{Closing Balance}%
\sisetup{output-decimal-marker={.}}%
%</english>
%<*german>
\renewcommand*\STM@JK@holdername{Kontoinhaber}%
\renewcommand*\STM@JK@bicname{BIC}%
\renewcommand*\STM@JK@ibanname{IBAN}%
\renewcommand*\STM@JK@firstcolumnheading{\bfseries Datum}%
\renewcommand*\STM@JK@secondcolumnheading{\bfseries Verwendungszweck}%
\renewcommand*\STM@JK@thirdcolumnheading{\bfseries Betrag (EUR)}%
\renewcommand*\STM@JK@openingbalancename{Anfangssaldo}%
\renewcommand*\STM@JK@closingbalancename{Endsaldo}%
\sisetup{output-decimal-marker={,}}%
%</german>
%<*namibian>
\renewcommand*\STM@JK@holdername{Account Holder}%
\renewcommand*\STM@JK@bicname{Branch Code}%
\renewcommand*\STM@JK@ibanname{Account Number}%
\renewcommand*\STM@JK@firstcolumnheading{\bfseries Date}%
\renewcommand*\STM@JK@secondcolumnheading{\bfseries Reference}%
\renewcommand*\STM@JK@thirdcolumnheading{\bfseries Amount (NAD)}%
\renewcommand*\STM@JK@openingbalancename{Opening Balance}%
\renewcommand*\STM@JK@closingbalancename{Closing Balance}%
\sisetup{output-decimal-marker={.}}%
%</namibian>
%<*mt940>
%
% 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 }}{\leavevmode\hphantom{(}\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}{\num{\amount}}}{\num{\amount}}%
    \DTLiflastrow{%
                   \ifthenelse{\equal{\STM@JK@closingbalance}{none}}%
                   {}%
                   {\\\midrule\\ & \STM@JK@closingbalancename & \DTLifStartsWith{\STM@JK@closingbalance}{-}{\textcolor{\STM@JK@negativecolor}{\num{\STM@JK@closingbalance}}}{\num{\STM@JK@closingbalance}}}%
                   \\\bottomrule%
                 }%
                 {\\ & & \\}%
  }%
}%
% set separator of csv file
\DTLsetseparator{;}%
% does the csv file (not) have a header row? ;-)
\renewcommand*\STM@JK@noheader{false}%
% setup siunitx; see section 5 of siunitx manual for a list of all options
% detect-all  detect all kind of font settings
% round-integer-to-decimal  round integers like decimals (12 -> 12.00)
% round-mode=places  use round mode places
% round-precision=2  set round precision to 2 places
\sisetup{detect-all,round-integer-to-decimal,round-mode=places,round-precision=2}%
%</mt940>
%<*camt>
%
% definitions for the csv-camt 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 }}{\leavevmode\hphantom{(}\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}{\num{\amount}}}{\num{\amount}}%
    \DTLiflastrow{%
                   \ifthenelse{\equal{\STM@JK@closingbalance}{none}}%
                   {}%
                   {\\\midrule\\ & \STM@JK@closingbalancename & \DTLifStartsWith{\STM@JK@closingbalance}{-}{\textcolor{\STM@JK@negativecolor}{\num{\STM@JK@closingbalance}}}{\num{\STM@JK@closingbalance}}}%
                   \\\bottomrule%
                 }%
                 {\\ & & \\}%
  }%
}%
% set separator of csv file
\DTLsetseparator{;}%
% does the csv file (not) have a header row? ;-)
\renewcommand*\STM@JK@noheader{false}%
%
% setup siunitx; see section 5 of siunitx manual for a list of all options
% detect-all  detect all kind of font settings
% round-integer-to-decimal  round integers like decimals (12 -> 12.00)
% round-mode=places  use round mode places
% round-precision=2  set round precision to 2 places
\sisetup{detect-all,round-integer-to-decimal,round-mode=places,round-precision=2}%
%</camt>
%<*stdbankna>
%
% definitions for the csv-standard-bank-na format
%
% define the order of keys in your csv file
% simply use arbitrary keys for unused fields
\renewcommand*\STM@JK@dbkeys{ValueDate,PostingDate,Reference,Narrative,Amount,Balance}%
% 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,\reference=Reference,\narrative=Narrative,\amount=Amount,\balance=Balance}%
  {%
    \parbox[t]{\widthof{ (YYYY-MM-DD) }}{\leavevmode\hphantom{(}\postingdate\\(\valuedate)} &%
    \parbox[t]{\STM@JK@referencewidth}{\raggedright%
                                       \DTLifstringeq{\reference}{}{}{\reference\\}%
                                       \DTLifstringeq{\narrative}{}{}{\narrative\\}%
                                      } &%
    \parbox[t]{\widthof{1234567.89)}}{\raggedleft\DTLifStartsWith{\amount}{-}{\textcolor{\STM@JK@negativecolor}{\num{\amount}\hphantom{)}}}{\num{\amount}\hphantom{)}}\\(\num{\balance})}
    \DTLiflastrow{%
                   \ifthenelse{\equal{\STM@JK@closingbalance}{none}}%
                   {}%
                   {\\\midrule\\ & \STM@JK@closingbalancename & \DTLifStartsWith{\STM@JK@closingbalance}{-}%
                    {\textcolor{\STM@JK@negativecolor}{\num{\STM@JK@closingbalance}}}{\num{\STM@JK@closingbalance}}}%
                   \\\bottomrule%
                 }%
                 {\\ & & \\}%
  }%
}%
% set separator of csv file
\DTLsetseparator{,}%
% does the csv file (not) have a header row? 
\renewcommand*\STM@JK@noheader{false}%
%
% setup siunitx; see section 5 of siunitx manual for a list of all options
% detect-all  detect all kind of font settings
% round-integer-to-decimal  round integers like decimals (12 -> 12.00)
% round-mode=places  use round mode places
% round-precision=2  set round precision to 2 places
\sisetup{detect-all,round-integer-to-decimal,round-mode=places,round-precision=2}%
%</stdbankna>
%<*bibfile>
@misc{bib:datatool,
 author               = {Talbot, {Nicola L.C.}},
 note                 = {\href{http://mirrors.ctan.org/macros/latex/contrib/datatool/datatool-user.pdf}{http://mirrors.ctan.org/macros/latex/contrib/datatool/datatool-user.pdf}},
 title                = {{User Manual for datatool bundle version 2.22}},
 year                 = {2014},
 }

@misc{bib:siunitx,
 author               = {Wright, Joseph},
 note                 = {\href{http://mirrors.ctan.org/macros/latex/contrib/siunitx/siunitx.pdf}{http://mirrors.ctan.org/macros/latex/contrib/siunitx/siunitx.pdf}},
 title                = {{siunitx -- A comprehensive (SI) units package}},
 year                 = {2014},
 }
 
@misc{bib:sepa,
 author               = {{wikipedia.org}},
 note                 = {\href{https://en.wikipedia.org/wiki/Single_Euro_Payments_Area}{https://en.wikipedia.org/wiki/Single\_Euro\_Payments\_Area}},
 title                = {{Single Euro Payments Area}},
 year                 = {2014},
 }
 
@misc{bib:bic,
 author               = {{wikipedia.org}},
 note                 = {\href{https://en.wikipedia.org/wiki/ISO_9362}{https://en.wikipedia.org/wiki/ISO\_9362}},
 title                = {{ISO 9362}},
 year                 = {2014},
 }
 
@misc{bib:iban,
 author               = {{wikipedia.org}},
 note                 = {\href{https://en.wikipedia.org/wiki/International_Bank_Account_Number}{https://en.wikipedia.org/wiki/International\_Bank\_Account\_Number}},
 title                = {{International Bank Account Number}},
 year                 = {2014},
 }

@misc{bib:lang,
 author               = {{Josef Kleber}},
 note                 = {\href{http://bankstatement.jklatex.de/en/2015/11/howto-support-other-languages/}{http://bankstatement.jklatex.de/en/2015/11/howto-support-other-languages/}},
 title                = {{HowTo support other languages}},
 year                 = {2015},
 }

@misc{bib:csv,
 author               = {{Josef Kleber}},
 note                 = {\href{http://bankstatement.jklatex.de/en/2015/11/howto-support-arbitrary-csv-formats-2/}{http://bankstatement.jklatex.de/en/2015/11/howto-support-arbitrary-csv-formats-2/}},
 title                = {{HowTo support arbitrary CSV formats}},
 year                 = {2015},
 }
 
%</bibfile>
%<*examplefile>
\documentclass[a4paper,10pt,bic=BYLADEM1ERD,
               iban=DE70753574230240408336,
               holder={Josef Kleber},
               language=german,logo=stmlogo,
               format=csv-camt,
               logowidth=4cm,negativecolor=red]
              {bankstatement}
\usepackage[german]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{bera}
\renewcommand\familydefault{\sfdefault}
\begin{document}
\bankstatement[title={Kontoauszug 12/2014},
               openingbalance={-12,34},
               closingbalance={82,13}]{201412.csv}
\end{document}
%</examplefile>
%<*manifest>
This work consists of the following files:

bankstatement.pdf
bankstatement.dtx
README
makefile

Files packaged in bankstatement.dtx:

bankstatement.sty
bankstatement-example.tex
manifest.txt
stmenglish.def
stmgerman.def
stmnamibian.def
csv-mt940.def
csv-camt.def
csv-standard-bank-na.def
%</manifest>
%<*internal>
\fi
\def\nameofplainTeX{plain}
\ifx\fmtname\nameofplainTeX\else
  \expandafter\begingroup
\fi
%</internal>
%<*install>
\input docstrip.tex
\keepsilent
\askforoverwritefalse
\preamble

Copyright (C) 2015 by:
Josef Kleber
<josef.kleber@gmx.de>

This file 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
2003/12/01 or later.

This work has the LPPL maintenance status "maintained".

The Current Maintainer of this work is Josef Kleber.

This work consists of all files listed in manifest.txt.

\endpreamble

\usedir{tex/latex/bankstatement}
\generate{
  \file{\jobname.cls}{\from{\jobname.dtx}{class}}
}
\generate{
  \file{stmenglish.def}{\from{\jobname.dtx}{english}}
}
\generate{
  \file{stmgerman.def}{\from{\jobname.dtx}{german}}
}
\generate{
  \file{stmnamibian.def}{\from{\jobname.dtx}{namibian}}
}
\generate{
  \file{csv-mt940.def}{\from{\jobname.dtx}{mt940}}
}
\generate{
  \file{csv-camt.def}{\from{\jobname.dtx}{camt}}
}
\generate{
  \file{csv-standard-bank-na.def}{\from{\jobname.dtx}{stdbankna}}
}
\generate{
  \file{\jobname-example}{\from{\jobname.dtx}{examplefile}}
}
%</install>
%<install>\endbatchfile
%<*internal>
\nopreamble\nopostamble
\usedir{doc/latex/bankstatement}
\generate{
  \file{README.md}{\from{\jobname.dtx}{readme}}
}
\generate{
  \file{201412.csv}{\from{\jobname.dtx}{csv}}
}
\generate{
  \file{manifest.txt}{\from{\jobname.dtx}{manifest}}
}
\generate{
  \file{\jobname.bib}{\from{\jobname.dtx}{bibfile}}
}
\ifx\fmtname\nameofplainTeX
  \expandafter\endbatchfile
\else
  \expandafter\endgroup
\fi
%</internal>
%<*driver>
\documentclass[a4paper]{ltxdoc}%
\usepackage[english]{babel}%
\usepackage[latin1]{inputenc}%
\usepackage[T1]{fontenc}%
\usepackage{textcomp}%
\usepackage{lmodern}%
\usepackage{bera}%
\usepackage{microtype}%
\usepackage{cite}%
\usepackage{marginnote}%
\usepackage[svgnames,rgb]{xcolor}%
\usepackage{listings}%
\usepackage{makeidx}
\usepackage[numbered]{hypdoc}
\usepackage{ragged2e}%
\usepackage{url}%
\usepackage[automark,nouppercase]{scrpage2}
\usepackage{tikz}
\usetikzlibrary{calc}%
% turn off idiotic tikz error in doc generation
\makeatletter
\global\let\tikz@ensure@dollar@catcode=\relax
\makeatother
\usepackage{hyperref}
\EnableCrossrefs
\CodelineIndex
\RecordChanges
\makeatletter
\setlength{\headheight}{1.1\baselineskip}%
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
            {-2.5ex\@plus -1ex \@minus -.25ex}%
            {1.25ex \@plus .25ex}%
            {\normalfont\normalsize\bfseries}}
\setcounter{secnumdepth}{5}
\setcounter{tocdepth}{5}
\hypersetup{colorlinks=true,urlcolor=NavyBlue,linkcolor=NavyBlue,citecolor=CornflowerBlue}%
\lstset{literate=%
    {Ö}{{\"O}}1
    {Ä}{{\"A}}1
    {Ü}{{\"U}}1
    {ß}{{\ss}}1
    {ü}{{\"u}}1
    {ä}{{\"a}}1
    {ö}{{\"o}}1
    {~}{{\textasciitilde}}1
}
\lstset{language=[LaTeX]TeX,numbers=left,numberstyle=\tiny, basicstyle=\ttfamily, aboveskip=\baselineskip, frame=single, backgroundcolor=\color{LightGoldenrodYellow}, keywordstyle=\color{Blue},
emph={}}
\renewcommand{\maketitle}%
{%
  \thispagestyle{empty}%
  \pagecolor{Ivory}%
  \begin{titlepage}%
    \begin{tikzpicture}[remember picture,overlay]%
      \node[yshift=-2cm] at (current page.north west)%
      {%
        \begin{tikzpicture}[remember picture, overlay]%
          \draw[fill=CornflowerBlue,color=CornflowerBlue] (0,0) rectangle%
            (\paperwidth,2cm);%
          \draw[anchor=west,yshift=-4cm,xshift=3cm,color=NavyBlue] (0,0) node%
            {\parbox{15cm}{\RaggedRight\Huge\sffamily\textbf{\@title}}};%
          \draw[anchor=west,yshift=-6cm,xshift=3cm,color=NavyBlue] (0,0) node%
            {\parbox{15cm}{\huge\sffamily\textbf{\@fileversion}}};%
          \draw[anchor=west,yshift=-9cm,xshift=3cm,color=NavyBlue] (0,0) node%
            {\parbox{15cm}{\RaggedRight\huge\sffamily\textbf{\@subtitle}}};%
          \draw[anchor=west,yshift=-18cm,xshift=3cm,color=NavyBlue] (0,0) node%
            {\parbox{15cm}{\huge\sffamily\textbf{\@date}}};%
          \draw[anchor=west,yshift=-20cm,xshift=3cm,color=NavyBlue] (0,0) node%
            {\parbox{15cm}{\Large\sffamily{\@authorline\\\textbf{\@author}}}};%
        \end{tikzpicture}%
      };%
      \node[yshift=0cm] at (current page.south west)%
      {%
        \begin{tikzpicture}[remember picture, overlay]%
          \draw[fill=NavyBlue,color=NavyBlue,yshift=6cm,xshift=2cm] (0,0) rectangle (0.2cm,19cm);%
          \draw[fill=CornflowerBlue,color=CornflowerBlue] (0,0) rectangle (\paperwidth,2cm);%
          \draw[anchor=west,yshift=1cm,xshift=3cm,color=NavyBlue] (0,0) node%
            {\parbox{15cm}{\large\sffamily{\@refline}}};%
        \end{tikzpicture}%
      };%
    \end{tikzpicture}%
  \end{titlepage}%
  \pagecolor{white}%
}%
%
\newcommand*{\@tikzhead}[1]%
{%
  \begin{tikzpicture}[remember picture,overlay]%
    \node[yshift=-2cm] at (current page.north west)%
    {%
      \begin{tikzpicture}[remember picture, overlay]%
        \draw[fill=CornflowerBlue] (0,0) rectangle (\paperwidth,2cm);%
        \draw[anchor=west,yshift=1cm,xshift=1.5cm,color=NavyBlue] (0,0) node%
          {\parbox{15cm}{\LARGE\sffamily\textbf{\@title}}};%
        \node[anchor=east,xshift=.9\paperwidth,rectangle,%
              rounded corners=15pt,inner sep=11pt,fill=NavyBlue]%
              {\color{white}\textsc{#1}};%
      \end{tikzpicture}%
    };%
  \end{tikzpicture}%
}%
\clearscrheadings%
\ihead{\@tikzhead{\headmark}}%
\cfoot{\upshape\thepage}%
\pagestyle{scrheadings}%
%
\newcommand*{\Headline}[1]{\@mkboth{#1}{#1}}%
%
\renewcommand{\headfont}{\normalfont\mdseries\scshape}
%
\gdef\@subtitle{}%
\providecommand*{\Subtitle}[1]{\gdef\@subtitle{#1}}%
\gdef\@fileversion{}%
\providecommand*{\Fileversion}[1]{\gdef\@fileversion{#1}}%
\gdef\@author{}%
\providecommand*{\Author}[1]{\gdef\@author{#1}}%
\gdef\@authorline{Package author:}%
\providecommand*{\Authorline}[1]{\gdef\@authorline{#1}}%
\gdef\@refline{}%
\providecommand*{\Refline}[1]{\gdef\@refline{#1}}%
\gdef\and{\unskip{}, }%
\newcommand\doubledash{-\kern0.5pt-}
\def\enoteformat{\rightskip\z@ \leftskip\z@ \parindent=1em\leavevmode\llap{\makeenmark}}
\def\XeLaTeX{Xe\LaTeX}%
%
\newenvironment{optionlist}
{\begin{trivlist}\setlength\leftskip{2em}}
{\end{trivlist}}
\newcommand\optitem[3]{\item [\texttt{\textbf{\textcolor{DodgerBlue}{#1}} \lbrack\textcolor{Crimson}{#2}\rbrack}] #3}
\renewcommand\tableofcontents%
{%
  %\section*{\contentsname}%
  \@mkboth{%
  \MakeUppercase\contentsname}{\MakeUppercase\contentsname}%
  \@starttoc{toc}%
}%
%
%\newcommand\env[1]{\texttt{#1}}%
\newcommand\layer[1]{\texttt{#1}\SortIndex{#1}{\texttt{#1} (PGF layer)}%
                     \SortIndex{PGF layer>#1}{\texttt{#1}}}%
\newcommand\styleoption[1]{\texttt{#1}\SortIndex{#1}{\texttt{#1} (Style option)}%
                     \SortIndex{Style option>#1}{\texttt{#1}}}%
\newcommand\envoption[1]{\texttt{#1}\SortIndex{#1}{\texttt{#1} (Puzzle option)}%
                     \SortIndex{Puzzle option>#1}{\texttt{#1}}}%
\newcommand\stylename[1]{\texttt{#1}\SortIndex{#1}{\texttt{#1} (Style file)}%
                     \SortIndex{Style file>#1}{\texttt{#1}}}%
\newcommand\package[1]{\texttt{#1}\SortIndex{#1}{\texttt{#1} (Package)}%
                     \SortIndex{Package>#1}{\texttt{#1}}}%
\newcommand*\margcs[1]{\marginnote{\hbadness=10000\RaggedLeft\scriptsize #1}}%
\def\PrintIndex{\clearpage\Headline{Index}\@input@{\jobname.ind}%
                \global\let\PrintIndex\@empty}
                \renewenvironment{theindex}
               {\if@twocolumn
                  \@restonecolfalse
                \else
                  \@restonecoltrue
                \fi
                \columnseprule \z@
                \columnsep 35\p@
\def\see##1##2{\textit{See} ##1}%
\def\seealso##1##2{\textit{See also} ##1}%
\long\def\cmd##1{\cs{\expandafter\cmd@to@cs\string##1}}%
\def\@url##1{\url@break\ttt{##1}\endgroup}%
\def\ttt{\begingroup\@sanitize\ttfamily\@ttt}%
\def\@ttt##1{##1\endgroup}%
\mathchardef\save@secnumdepth\c@secnumdepth
\c@secnumdepth\m@ne
                \phantomsection%
                \twocolumn%[\section{\indexname}]%
                \refstepcounter{section}
                \addcontentsline{toc}{section}{\protect\numberline{\thesection}Index}%
\c@secnumdepth\save@secnumdepth
                %\thispagestyle{plain}
                \parindent\z@
                \parskip\z@ \@plus .3\p@\relax
                \let\item\@idxitem}
               {\if@restonecol\onecolumn\else\clearpage\fi}
\setlength\parindent{0pt}%
\newcommand*\myref[1]{[see: \ref{#1} on page \pageref{#1}]}
\makeatother
\begin{document}
  \DocInput{\jobname.dtx}
\end{document}
%</driver>
% \fi
%
% \def\filename{bankstatement.cls}
% \def\filedate{2015/11/14}
% \def\fileversion{0.9.2}
% \hypersetup{pdfauthor={Josef Kleber},pdftitle={A LaTeX class for bank statements based on csv data},pdfsubject={Documentation for LaTeX class \filename}}%
% \lstset{language=[LaTeX]TeX,numbers=left,numberstyle=\tiny, basicstyle=\ttfamily, aboveskip=\baselineskip, frame=single, backgroundcolor=\color{LightGoldenrodYellow}, keywordstyle=\color{Blue},
% emph={bankstatement},emphstyle=\color{Tomato}, 
% emph={[2]logo,bic,iban,holder,title,language,10pt,a4paper,format,logowidth,negativecolor,openingbalance,closingbalance},emphstyle={[2]\color{OliveDrab}},
% morekeywords={bankstatement}}
% \DoNotIndex{\,,\\,\begin,\end,\begingroup,\endgroup,\csname,\def,\else,\endcsname,\equal,\expandafter,
% \fi,\gdef,\ifnum,\ifthenelse,\immediate,\MessageBreak,\NeedsTeXFormat,\newcommand,\newif,
% \PackageInfo,\PackageError,\ProcessOptionsX,\ProvidesPackage,\relax,\RequirePackage,
% \space,\errmessage,\ExecuteOptionsX,}
%
% \bibliographystyle{plain}
% \title{\filename}%
% \Subtitle{A \LaTeX{} class for bank statements based on csv data}%
% \author{Josef Kleber}
% \Fileversion{\fileversion}
% \date{\filedate}
% \Refline{\href{mailto:bankstatement@jklatex.de}{\texttt{bankstatement@jklatex.de}}\\\href{http://bankstatement.jklatex.de/}{\texttt{http://bankstatement.jklatex.de/}}}
% \maketitle
% \stepcounter{page}
% \tableofcontents
% \clearpage
% \setlength\parskip{6pt}%
%
%
%\StopEventually{^^A
% {
% \clearpage
% \raggedright
% \nocite{*}
% \bibliography{\jobname}
% }
% \clearpage
%  \PrintChanges
%  \PrintIndex
%}
%
% \Headline{Abstract}
% \begin{abstract}
% More and more banks allow their customers to download posting records in various formats.
% By using the \texttt{bankstatement} class, you can create bank statements -- as long as a csv format is available!
% At the moment, the \texttt{csv-mt940} \texttt{and csv-camt} formats -- used by many german Sparkassen -- are supported.
% Moreover, it supports \texttt{csv-standard-bank-na}!
%
% Furthermore, the following languages are supported: english, german, namibian
%
% You can quite easily add support for other languages or csv formats.
% Simply define the order of the keys in the csv data file and how to use them.
%
% The terminology in this class like BIC (Business Identifier Codes) or IBAN (International Bank Account Number) is based on SEPA (Single Euro Payments Area).
% But you can adjust the terminology to suit your needs.
% \end{abstract}
% \clearpage
% \tableofcontents
% \clearpage
% \section{Class options}
% \begin{description}
% \item[format (\texttt{csv-mt940})] specifies the csv format of your data files
% \item[language (\texttt{english})] specifies the language of your document
% \item[left (\texttt{2cm})] specifies the left margin
% \item[right (\texttt{2cm})] specifies the right margin
% \item[top (\texttt{2cm})] specifies the top margin
% \item[bottom (\texttt{2cm})] specifies the bottom margin
% \end{description}
% \section{The \texttt{bankstatement} command}
% The \cmd\bankstatement{}\marginnote{\cmd\bankstatement\\\oarg{options}\{\marg{csv file}\}} command reads in \marg{csv file} and outputs your bank statement.
% It supports the following options, which can also be used as class options with global scope:
% \begin{description}
% \item[title (\texttt{})] specifies the title of your bank statement
% \item[logo (\texttt{})] specifies the logo used in the bank statement. It may be the logo of your bank or the sports club, whose treasurer you are.
% \item[logowidth (\texttt{4cm})] defines the width of the logo
% \item[holder (\texttt{})] specifies the account holder
% \item[bic (\texttt{})] specisfies the BIC (Business Identifier Codes)
% \item[iban (\texttt{})] specifies the IBAN (International Bank Account Number) 
% \item[referencewidth (\texttt{11cm})] specifies the width of the second table column used for the reference. Depending on page size, margins and font you may need to adjust the width.
% \item[negativecolor (\texttt{red})] specifies the color used for negative amounts
% \item[sort (\texttt{PostingDate})] defines the sort key of the csv data base
% \item[openingbalance (\texttt{none})] specifies the opening balance. csv posting records do not contain an opening balance, only postings.
% \item[closingbalance (\texttt{none})] specifies the closing balance 
% \end{description}
%
% Make sure to use the same encoding in your document than in the csv file(s)!
% \section{Customization}
% You can quite easily add support for other languages\cite{bib:lang} and formats\cite{bib:csv}. Please send a copy to the maintainer of \texttt{bankstatement}.
% \subsection{Languages}
% Supported languages:
%
% \begin{itemize}
% \item \texttt{\bfseries english}
% \item \texttt{german}
% \item \texttt{namibian}
% \end{itemize}
%
% To support other languages, simply copy \texttt{stmenglish.def} to your local \TeX{} tree, rename it and translate the definitions to your language!\cite{bib:lang}
%
% \subsection{Formats}
%
% Supported formats:
%
% \begin{itemize}
% \item \texttt{\bfseries csv-mt940}
% \item \texttt{csv-camt}
% \item \texttt{csv-standard-bank-na}
% \end{itemize}
%
% To support other formats\cite{bib:csv}, simply copy \texttt{csv-mt940.def} to your local \TeX{} tree, rename it and adjust the definitions to your needs!
% That is, define the order of keys in your format and specify how to use them. Furthermore, you should specify the separator of the csv file and whether the csv file has a header row or not.
%
% \section{Example}
% \iffalse
%<*example>
% \fi
\begin{lstlisting}
\documentclass[a4paper,10pt,bic=BYLADEM1ERD,
               iban=DE70753574230240408336,
               holder={Josef Kleber},
               language=german,logo=stmlogo,
               format=csv-camt,
               logowidth=4cm,negativecolor=red]
              {bankstatement}
\usepackage[german]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{bera}
\renewcommand\familydefault{\sfdefault}
\begin{document}
\bankstatement[title={Kontoauszug 12/2014},
               openingbalance={-12,34},
               closingbalance={82,13}]{201412.csv}
\end{document}
\end{lstlisting}
% \iffalse
%</example>
% \fi
%
% \section{Implementation}
% \changes{v0.9.1}{2015/01/07}{CTAN upload}
% \changes{v0.9.2}{2015/01/24}{updated stmenglish.def}
% \changes{v0.9.2}{2015/01/24}{added stmnamibian.def}
% \changes{v0.9.2}{2015/01/24}{added csv-standard-bank-na.def}
%    \begin{macrocode}
%<*class>
%    \end{macrocode}
% First, we provide the \LaTeX\ class \package{bankstatement}.
%    \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}%
\ProvidesClass{bankstatement}[2015/11/14 class for csv based bank statements v0.9.2]%
%    \end{macrocode}
% We need the \package{xkeyval} package and the \package{xkvlxp} package to allow curly braces and a bit more
% in global class options!
%    \begin{macrocode}
\RequirePackage{xkeyval}%
\RequirePackage{xkvltxp}%
%    \end{macrocode}
% We provide a macro \cmd\STM@JK@define@key, which defines class options with global scope%
% and options for \cmd\bankstatement\ with local scope. It takes four arguments \marg{prefix},%
% \marg{package},\marg{option} and \marg{default}.
%    \begin{macrocode}
\newcommand*\STM@JK@define@key[4]%
{%
  \expandafter\gdef\csname#1@#3\endcsname{#4}%
  \define@key{#2.cls}{#3}[#4]%
  {%
    \expandafter\gdef\csname#1@#3\endcsname{##1}%
  }%
  \define@key{#2}{#3}%
  {%
    \expandafter\def\csname#1@#3\endcsname{##1}%
  }%
}%
%    \end{macrocode}
% Now, we can use this macro to define our options.
%    \begin{macrocode}
\STM@JK@define@key{STM@JK}{bankstatement}{format}{csv-mt940}%
\STM@JK@define@key{STM@JK}{bankstatement}{language}{english}%
\STM@JK@define@key{STM@JK}{bankstatement}{title}{}%
\STM@JK@define@key{STM@JK}{bankstatement}{logo}{}%
\STM@JK@define@key{STM@JK}{bankstatement}{logowidth}{4cm}%
\STM@JK@define@key{STM@JK}{bankstatement}{holder}{}%
\STM@JK@define@key{STM@JK}{bankstatement}{bic}{}%
\STM@JK@define@key{STM@JK}{bankstatement}{iban}{}%
\STM@JK@define@key{STM@JK}{bankstatement}{referencewidth}{11cm}%
\STM@JK@define@key{STM@JK}{bankstatement}{negativecolor}{red}%
\STM@JK@define@key{STM@JK}{bankstatement}{sort}{PostingDate}%
\STM@JK@define@key{STM@JK}{bankstatement}{openingbalance}{none}%
\STM@JK@define@key{STM@JK}{bankstatement}{closingbalance}{none}%
\STM@JK@define@key{STM@JK}{bankstatement}{left}{2cm}%
\STM@JK@define@key{STM@JK}{bankstatement}{right}{2cm}%
\STM@JK@define@key{STM@JK}{bankstatement}{top}{2cm}%
\STM@JK@define@key{STM@JK}{bankstatement}{bottom}{2cm}%
%    \end{macrocode}
% We execute the class options to define and set the option macros.
%    \begin{macrocode}
\DeclareOptionX*{\PassOptionsToClass{\CurrentOption}{article}}%
\ExecuteOptionsX{format,language,title,logo,logowidth,holder,bic,iban,%
                 referencewidth,negativecolor,sort,openingbalance,%
                 closingbalance,left,right,top,bottom}%
\ProcessOptionsX*\relax%
\LoadClass{article}%
%    \end{macrocode}
% We load some more needed packages.
% \changes{v0.9.2}{2015/01/24}{added siunitx package to force output of exactly two digital places}
%    \begin{macrocode}
\RequirePackage[left=\STM@JK@left,right=\STM@JK@right,top=\STM@JK@top,%
                bottom=\STM@JK@bottom]{geometry}%
\RequirePackage{longtable}%
\RequirePackage{tabularx}%
\RequirePackage{xcolor}%
\RequirePackage{graphicx}%
\RequirePackage{booktabs}%
\RequirePackage{datatool}%
\RequirePackage{calc}%
\RequirePackage{ifthen}%
\RequirePackage{siunitx}%
%    \end{macrocode}
% We define some macros, which will be redefined in language and format definition files!
%    \begin{macrocode}
\newcommand*\STM@JK@dbkeys{}%
\newcommand*\STM@JK@DTLforeach{}%
\newcommand*\STM@JK@holdername{}%
\newcommand*\STM@JK@bicname{}%
\newcommand*\STM@JK@ibanname{}%
\newcommand*\STM@JK@firstcolumnheading{}%
\newcommand*\STM@JK@secondcolumnheading{}%
\newcommand*\STM@JK@thirdcolumnheading{}%
\newcommand*\STM@JK@openingbalancename{}%
\newcommand*\STM@JK@closingbalancename{}%
%    \end{macrocode}
% We set some defaults and create a counter for unique data base names.
%    \begin{macrocode}
\newcommand*\STM@JK@headingsep{0.5cm}%
\newcommand*\STM@JK@noheader{false}%
%
\newcounter{STM@JK@count}%
%    \end{macrocode}
% We load the language and format definition files specified as class options.
%    \begin{macrocode}
\input{\STM@JK@format.def}%
\input{stm\STM@JK@language.def}%
%    \end{macrocode}
% This macro typesets a given logo at the right border. 
%    \begin{macrocode}
\newcommand*\STM@JK@includelogo%
{%
  \ifthenelse{\equal{\STM@JK@logo}{}}%
  {}%
  {\hfill\includegraphics[width=\STM@JK@logowidth]{\STM@JK@logo}}%
}%
%    \end{macrocode}
% This macro typesets the header of the bank statement.
%    \begin{macrocode}
\newcommand*\STM@JK@header%
{%
  \noindent%
  \begin{tabularx}{\textwidth}{XXr}%
    \multicolumn{3}{l}{\Huge{}\hspace{.22em}\STM@JK@title\STM@JK@includelogo}\\%
    &  &\\%
    \begin{tabular}{l}\textbf{\STM@JK@holdername}\\\STM@JK@holder\end{tabular} &%
    \begin{tabular}{l}\textbf{\STM@JK@bicname}\\\STM@JK@bic\end{tabular} &%
    \begin{tabular}{l}\textbf{\STM@JK@ibanname}\\\STM@JK@iban\end{tabular}\\%
  \end{tabularx}%
  \vspace{\STM@JK@headingsep}%
}%
%    \end{macrocode}
% \begin{macro}{\bankstatement}
% Here, we define the user command to typeset the bank statement.
%
% \cs{bankstatement}\oarg{options}\marg{csv file}
%    \begin{macrocode}
\newcommand\bankstatement[2][]%
{%
%    \end{macrocode}
% We start a group to keep the setting of options local.
% Then we step our unique counter and define a macro for the current data base name for multi command usage!
%    \begin{macrocode}
  \begingroup%
    \setkeys{bankstatement}{#1}%
    \stepcounter{STM@JK@count}%
    \xdef\STM@JK@dbname{stm\arabic{STM@JK@count}}%
%    \end{macrocode}
% Then we can load \marg{csv file} into our data base depending on the \texttt{noheader} option!
% Finally, we sort our data base depending on the data base key specified with the \texttt{sort} option!
% \changes{v0.9.2}{2015/01/24}{changed \cmd\DTLloaddb $\rightarrow$ \cmd\DTLloadrawdb}
% \changes{v0.9.2}{2015/01/24}{catch empty sort key $\rightarrow$ no sorting}
%    \begin{macrocode}
    \ifthenelse{\equal{\STM@JK@noheader}{false}}%
    {\DTLloadrawdb[keys={\STM@JK@dbkeys},noheader=false]{\STM@JK@dbname}{#2}}%
    {\DTLloadrawdb[keys={\STM@JK@dbkeys},noheader=true]{\STM@JK@dbname}{#2}}%
    \ifthenelse{\equal{\STM@JK@sort}{}}%
    {}%
    {\DTLsort{\STM@JK@sort}{\STM@JK@dbname}}%
%    \end{macrocode}
% Now we can typeset the header of the bank statement and start the \package{longtable}.
% Maybe, we still need to typeset an opening balance.
%    \begin{macrocode}
    \STM@JK@header%
    \begin{longtable}{llr}%
    \toprule%
    \STM@JK@firstcolumnheading &%
    \STM@JK@secondcolumnheading &%
    \STM@JK@thirdcolumnheading%
    \\\toprule%
    \endhead%
    \ifthenelse{\equal{\STM@JK@openingbalance}{none}}%
    {}%
    { & & \\ & \STM@JK@openingbalancename &%
      \DTLifStartsWith{\STM@JK@openingbalance}{-}%
      {\textcolor{\STM@JK@negativecolor}{\num{\STM@JK@openingbalance}}}%
      {\num{\STM@JK@openingbalance}} \\\midrule}%
%    \end{macrocode}
% Now, we can loop through our database and create a new row for each line in \marg{csv file}.
% Finally, we can end the \package{longtable}.
%    \begin{macrocode}
    \STM@JK@DTLforeach%
    \end{longtable}%
  \endgroup%
}%
%    \end{macrocode}
%  \end{macro}
% Finally, we disable the global class options \cmd\AtBeginDocument.
%    \begin{macrocode}
\AtBeginDocument{\disable@keys{bankstatement}%
                              {format,language,left,right,top,bottom}}%
%    \end{macrocode}
%    \begin{macrocode}
%</class>
%    \end{macrocode}
%\Finale