bal: cleanup
[ci skip]
This commit is contained in:
parent
02eb809348
commit
6c2d2c0a6a
@ -428,17 +428,11 @@ renderComponent opts (acctname, depth, total) (FormatField ljust min max field)
|
|||||||
Just m -> depth * m
|
Just m -> depth * m
|
||||||
Nothing -> depth
|
Nothing -> depth
|
||||||
AccountField -> formatString ljust min max (T.unpack acctname)
|
AccountField -> formatString ljust min max (T.unpack acctname)
|
||||||
TotalField ->
|
TotalField -> fitStringMulti min max True False $ showamt total
|
||||||
-- TODO: does not color multicommodity amounts
|
|
||||||
-- setamtcolor $ fitStringMulti min max True False $ showMixedAmountWithoutPrice total
|
|
||||||
fitStringMulti min max True False $ showamt total
|
|
||||||
_ -> ""
|
|
||||||
where
|
where
|
||||||
showamt | color_ opts = cshowMixedAmountWithoutPrice
|
showamt | color_ opts = cshowMixedAmountWithoutPrice
|
||||||
| otherwise = showMixedAmountWithoutPrice
|
| otherwise = showMixedAmountWithoutPrice
|
||||||
-- setamtcolor
|
_ -> ""
|
||||||
-- | color_ opts && isNegativeMixedAmount total == Just True = color Dull Red
|
|
||||||
-- | otherwise = id
|
|
||||||
|
|
||||||
-- | Render one StringFormat component for a balance report item.
|
-- | Render one StringFormat component for a balance report item.
|
||||||
-- This variant is for use with OneLine string formats; it squashes
|
-- This variant is for use with OneLine string formats; it squashes
|
||||||
@ -452,16 +446,11 @@ renderComponent1 opts (acctname, depth, total) (FormatField ljust min max field)
|
|||||||
-- better to indent the account name here rather than use a DepthField component
|
-- better to indent the account name here rather than use a DepthField component
|
||||||
-- so that it complies with width spec. Uses a fixed indent step size.
|
-- so that it complies with width spec. Uses a fixed indent step size.
|
||||||
indented = ((replicate (depth*2) ' ')++)
|
indented = ((replicate (depth*2) ' ')++)
|
||||||
TotalField ->
|
TotalField -> fitStringMulti min max True False $ ((intercalate ", " . map strip . lines) (showamt total))
|
||||||
-- setamtcolor $ fitStringMulti min max True False $ ((intercalate ", " . map strip . lines) (showMixedAmountWithoutPrice total))
|
|
||||||
fitStringMulti min max True False $ ((intercalate ", " . map strip . lines) (showamt total))
|
|
||||||
_ -> ""
|
|
||||||
where
|
where
|
||||||
showamt | color_ opts = cshowMixedAmountWithoutPrice
|
showamt | color_ opts = cshowMixedAmountWithoutPrice
|
||||||
| otherwise = showMixedAmountWithoutPrice
|
| otherwise = showMixedAmountWithoutPrice
|
||||||
-- setamtcolor
|
_ -> ""
|
||||||
-- | color_ opts && isNegativeMixedAmount total == Just True = color Dull Red
|
|
||||||
-- | otherwise = id
|
|
||||||
|
|
||||||
-- multi-column balance reports
|
-- multi-column balance reports
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user