print: fix long account name truncation, align amounts
This commit is contained in:
parent
cbe61304da
commit
550357934f
@ -78,7 +78,8 @@ showLedgerTransaction' elide effective t =
|
||||
where
|
||||
showposting p = showacct p ++ " " ++ (showamount $ pamount p) ++ (showcomment $ pcomment p)
|
||||
showpostingnoamt p = rstrip $ showacct p ++ " " ++ (showcomment $ pcomment p)
|
||||
showacct p = " " ++ showstatus p ++ (printf "%-34s" $ showAccountName (Just 34) (ptype p) (paccount p))
|
||||
showacct p = " " ++ showstatus p ++ (printf (printf "%%-%ds" w) $ showAccountName Nothing (ptype p) (paccount p))
|
||||
w = maximum $ map (length . paccount) ps
|
||||
showamount = printf "%12s" . showMixedAmount
|
||||
showcomment s = if (length s) > 0 then " ; "++s else ""
|
||||
showstatus p = if pstatus p then "* " else ""
|
||||
|
||||
Loading…
Reference in New Issue
Block a user