show posting dates in debug output

This commit is contained in:
Simon Michael 2014-05-06 21:35:38 -07:00
parent d1a3516c70
commit 88f18adbc4
2 changed files with 3 additions and 2 deletions

View File

@ -81,9 +81,10 @@ posting = nullposting
post :: AccountName -> Amount -> Posting
post acct amt = posting {paccount=acct, pamount=mixed amt}
-- XXX once rendered user output, but just for debugging now; clean up
showPosting :: Posting -> String
showPosting p@Posting{paccount=a,pamount=amt,ptype=t} =
unlines $ [concatTopPadded [showaccountname a ++ " ", showamount amt, showComment (pcomment p)]]
unlines $ [concatTopPadded [show (postingDate p) ++ " ", showaccountname a ++ " ", showamount amt, showComment (pcomment p)]]
where
ledger3ishlayout = False
acctnamewidth = if ledger3ishlayout then 25 else 22

View File

@ -122,7 +122,7 @@ tests_showTransactionUnelided = [
]
]
-- XXX overlaps showPosting
-- cf showPosting
showTransaction' :: Bool -> Transaction -> String
showTransaction' elide t =
unlines $ [descriptionline]