]> Git — Sourcephile - comptalang.git/blob - lib/Hcompta/Model/Transaction.hs
Ajout : Format.Ledger.Read : account, amount
[comptalang.git] / lib / Hcompta / Model / Transaction.hs
1 {-# LANGUAGE DeriveDataTypeable #-}
2 {-# OPTIONS_GHC -fno-warn-orphans #-}
3 module Hcompta.Model.Transaction where
4
5 import Data.Data
6 import qualified Data.Foldable
7 import qualified Data.List
8 import qualified Data.Map
9 import Data.Typeable ()
10 import Text.Parsec.Pos (SourcePos, initialPos)
11
12 import qualified Hcompta.Model.Date as Date
13 import Hcompta.Model.Date (Date)
14 import qualified Hcompta.Model.Transaction.Posting as Posting
15 import qualified Hcompta.Model.Transaction.Tag as Tag
16 import qualified Hcompta.Model.Amount as Amount
17 import qualified Hcompta.Model.Amount.Unit as Unit
18
19 -- * The 'Transaction' type
20
21 data Transaction
22 = Transaction
23 { code :: String
24 , comment :: String
25 , date :: Date
26 , date2 :: Maybe Date
27 , description :: String
28 , postings :: Posting.By_Account
29 , preceding_comment_lines :: String
30 , sourcepos :: SourcePos
31 , status :: Bool
32 , tags :: Tag.By_Name
33 } deriving (Data, Eq, Read, Show, Typeable)
34
35 -- * Types to submodules
36
37 type Posting = Posting.Posting
38 type Tag = Tag.Tag