imp:accounts: --types shows a tag only when type is known
This commit is contained in:
parent
18f5c8aa24
commit
d9bc45b523
@ -124,9 +124,10 @@ accounts opts@CliOpts{rawopts_=rawopts, reportspec_=ReportSpec{_rsQuery=query,_r
|
|||||||
where
|
where
|
||||||
indent = T.replicate (2 * (max 0 (accountNameLevel a - drop_ ropts) - 1)) " "
|
indent = T.replicate (2 * (max 0 (accountNameLevel a - drop_ ropts) - 1)) " "
|
||||||
droppedName = accountNameDrop (drop_ ropts) a
|
droppedName = accountNameDrop (drop_ ropts) a
|
||||||
showType a
|
showType a =
|
||||||
| types = pad a <> " ; type: " <> maybe "" (T.pack . show) (journalAccountType j a)
|
case (types, journalAccountType j a) of
|
||||||
| otherwise = ""
|
(True, Just t) -> pad a <> " ; type: " <> T.pack (show t)
|
||||||
|
_ -> ""
|
||||||
showAcctDeclOrder a
|
showAcctDeclOrder a
|
||||||
| positions =
|
| positions =
|
||||||
(if types then "," else pad a <> " ;") <>
|
(if types then "," else pad a <> " ;") <>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user