define nullentry, nullrawtxn
This commit is contained in:
parent
3a35847aa1
commit
a7b3e0d38d
@ -21,6 +21,16 @@ instance Show ModifierEntry where
|
|||||||
instance Show PeriodicEntry where
|
instance Show PeriodicEntry where
|
||||||
show e = "~ " ++ (periodexpr e) ++ "\n" ++ unlines (map show (p_transactions e))
|
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
|
Show a ledger entry, formatted for the print command. ledger 2.x's
|
||||||
standard format looks like this:
|
standard format looks like this:
|
||||||
|
|||||||
@ -15,6 +15,8 @@ import Ledger.AccountName
|
|||||||
|
|
||||||
instance Show RawTransaction where show = showRawTransaction
|
instance Show RawTransaction where show = showRawTransaction
|
||||||
|
|
||||||
|
nullrawtxn = RawTransaction "" nullamt "" RegularTransaction
|
||||||
|
|
||||||
showRawTransaction :: RawTransaction -> String
|
showRawTransaction :: RawTransaction -> String
|
||||||
showRawTransaction (RawTransaction a amt _ ttype) =
|
showRawTransaction (RawTransaction a amt _ ttype) =
|
||||||
showaccountname a ++ " " ++ (showamount amt)
|
showaccountname a ++ " " ++ (showamount amt)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user