{-# LANGUAGE DeriveDataTypeable #-} module Hcompta.Format.Ledger.Journal where import Data.Data import qualified Data.Map import Data.Map (Map) import qualified Data.Time.Clock as Time import qualified Data.Time.Clock.POSIX as Time import qualified Data.Time.Calendar as Time import qualified Data.Time.LocalTime as Time import Data.Typeable () import System.FilePath import Hcompta.Model as Model import Hcompta.Model.Amount as Amount data Journal = Journal { unit_styles :: Map Amount.Unit Amount.Style , file :: FilePath , includes :: [Journal] , final_comment_lines :: String -- , historical_prices :: [Amount.Price.Historical] , last_read_time :: Time.UTCTime -- , transaction_periodics :: [Transaction.Periodic] -- , transaction_modifiers :: [Transaction.Modifier] , transactions :: [Transaction] } deriving (Data, Eq, Read, Show, Typeable) nil :: Journal nil = Journal { unit_styles = Data.Map.empty , file = "" , includes = [] , final_comment_lines = "" , last_read_time = Time.posixSecondsToUTCTime 0 , transactions = [] }