diff --git a/Ledger/Entry.hs b/Ledger/Entry.hs index cdd8efab0..39324d9a6 100644 --- a/Ledger/Entry.hs +++ b/Ledger/Entry.hs @@ -21,6 +21,16 @@ instance Show ModifierEntry where instance Show PeriodicEntry where show e = "~ " ++ (periodexpr e) ++ "\n" ++ unlines (map show (p_transactions e)) +nullentry = Entry { + edate="", + estatus=False, + ecode="", + edescription="", + ecomment="", + etransactions=[], + epreceding_comment_lines="" + } + {-| Show a ledger entry, formatted for the print command. ledger 2.x's standard format looks like this: diff --git a/Ledger/RawTransaction.hs b/Ledger/RawTransaction.hs index bf7d7e7a5..c797d525d 100644 --- a/Ledger/RawTransaction.hs +++ b/Ledger/RawTransaction.hs @@ -15,6 +15,8 @@ import Ledger.AccountName instance Show RawTransaction where show = showRawTransaction +nullrawtxn = RawTransaction "" nullamt "" RegularTransaction + showRawTransaction :: RawTransaction -> String showRawTransaction (RawTransaction a amt _ ttype) = showaccountname a ++ " " ++ (showamount amt)