imp: allow pivoting on 'status' also

This commit is contained in:
Simon Michael 2022-03-18 21:38:31 -10:00
parent 2ed4201e36
commit 5281c5d647
2 changed files with 2 additions and 1 deletions

View File

@ -1097,6 +1097,7 @@ postingPivot fieldortagname p = p{paccount = pivotedacct, poriginal = Just $ ori
| Just t <- ptransaction p, fieldortagname == "description" = tdescription t
| Just t <- ptransaction p, fieldortagname == "payee" = transactionPayee t
| Just t <- ptransaction p, fieldortagname == "note" = transactionNote t
| Just t <- ptransaction p, fieldortagname == "status" = T.pack . show . tstatus $ t
| Just (_, value) <- postingFindTag fieldortagname p = value
| otherwise = ""

View File

@ -1469,7 +1469,7 @@ Related:
Normally hledger sums amounts, and organizes them in a hierarchy, based on account name.
The `--pivot FIELD` option causes it to sum and organize hierarchy based on the value of some other field instead.
FIELD can be:
`code`, `description`, `payee`, `note`,
`status`, `code`, `description`, `payee`, `note`,
or the full name (case insensitive) of any [tag](#tags).
As with account names, values containing `colon:separated:parts` will be displayed hierarchically in reports.