bgmax-0.1.0.0: Parse BgMax-files

Copyright(c) Petter Bergman
LicenseBSD3
Maintainerjon.petter.bergman@gmail.com
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell98

Finance.BgMax.TK

Description

This module contain data definitions for the different types of Posts or "Transaction Codes" that may occur in a BgMax file, as well as auxiliary data types.

The datatypes should map in a straightforward way to the documentation from Bankgirocentralen.

Synopsis

Documentation

data TestMark Source

Testmark

Constructors

T

Test file

P

Production file

Instances

data Currency Source

BankGirot currently only supports EUR and SEK

Constructors

EUR 
SEK 

Instances

data Reference Source

Reference. The references correspond to the reference codes defined in the BgMax documentation.

Constructors

Ref0

No reference.

Ref1

No reference.

Ref2 Integer

Reference is correct OCR-no.

Ref3 ByteString

One or more references.

Ref4 ByteString

One reference.

Ref5 ByteString

Incorrect reference.

Ref Int ByteString

Reserved for future use.

Instances

data DepositType Source

Deposit type. Deposit type according to bank agreement.

Constructors

K 
D 
S 

Instances

data Transaction Source

Transaction type reused in TK 20,21,22,23.

Constructors

Transaction 

Fields

senderBG :: Integer
 
reference :: Reference
 
ammount :: Integer
 
paymentChannel :: Int

See the BGC documentation for the meaning of payment channel code.

bcgNo :: Integer
 
imageMark :: Int

See the BGC documentation for the meaning of the image mark.

Instances

data TK01_t Source

Start post.

Instances

data TK05_t Source

Opening post.

Instances

data TK20_t Source

Payment post.

Constructors

TK20_t 

Fields

payment :: Transaction
 

Instances

data TK21_t Source

Deduction post.

Constructors

TK21_t 

Fields

deduction :: Transaction
 
deductionCode :: Int

See the BGC documentation for the meaning of the deduction code.

Instances

data TK22_t Source

Extra reference post.

Constructors

TK22_t 

Instances

data TK23_t Source

Extra reference post (negative ammount).

Constructors

TK23_t 

Instances

data TK25_t Source

Information post.

Constructors

TK25_t 

Instances

data TK26_t Source

Name post.

Constructors

TK26_t 

Instances

data TK27_t Source

Address 1 post.

Constructors

TK27_t 

Instances

data TK28_t Source

Address 2 post.

Instances

data TK29_t Source

Organisation-number post.

Constructors

TK29_t 

Fields

orgNo :: Integer
 

Instances

data TK70_t Source

End post

Instances

data Post Source

Sum type for posts.

Constructors

TK01 TK01_t 
TK05 TK05_t 
TK20 TK20_t 
TK21 TK21_t 
TK22 TK22_t 
TK23 TK23_t 
TK25 TK25_t 
TK26 TK26_t 
TK27 TK27_t 
TK28 TK28_t 
TK29 TK29_t 
TK15 TK15_t 
TK70 TK70_t 
TK Int

The BGC documentation states that implementations should ignore posts they don't understand, they will be instead be recorded using this constructor.

Instances