]> Git — Sourcephile - comptalang.git/blob - lib/Hcompta/Format/Ledger/Journal.hs
Ajout : Format.Ledger.Read : account, amount
[comptalang.git] / lib / Hcompta / Format / Ledger / Journal.hs
1 {-# LANGUAGE DeriveDataTypeable #-}
2 module Hcompta.Format.Ledger.Journal where
3
4 import Data.Data
5 import qualified Data.Map
6 import Data.Map (Map)
7 import qualified Data.Time.Clock as Time
8 import qualified Data.Time.Clock.POSIX as Time
9 import qualified Data.Time.Calendar as Time
10 import qualified Data.Time.LocalTime as Time
11 import Data.Typeable ()
12 import System.FilePath
13
14 import Hcompta.Model as Model
15 import Hcompta.Model.Amount as Amount
16
17 data Journal
18 = Journal
19 { unit_styles :: Map Amount.Unit Amount.Style
20 , file :: FilePath
21 , includes :: [Journal]
22 , final_comment_lines :: String
23 -- , historical_prices :: [Amount.Price.Historical]
24 , last_read_time :: Time.UTCTime
25 -- , transaction_periodics :: [Transaction.Periodic]
26 -- , transaction_modifiers :: [Transaction.Modifier]
27 , transactions :: [Transaction]
28 } deriving (Data, Eq, Read, Show, Typeable)
29
30 nil :: Journal
31 nil =
32 Journal
33 { unit_styles = Data.Map.empty
34 , file = ""
35 , includes = []
36 , final_comment_lines = ""
37 , last_read_time = Time.posixSecondsToUTCTime 0
38 , transactions = []
39 }