cf: more restrictive regexp (#584)

This commit is contained in:
Simon Michael 2017-08-27 08:26:47 -07:00
parent deaf9cfbef
commit b246d0e990
5 changed files with 162 additions and 163 deletions

View File

@ -293,9 +293,9 @@ journalEquityAccountQuery _ = Acct "^equity(:|$)"
-- | A query for Cash (-equivalent) accounts in this journal (ie,
-- accounts which appear on the cashflow statement.) This is currently
-- hard-coded to be all the Asset accounts except for those containing the
-- case-insensitive regex @(receivable|A/R|fixed)@.
-- case-insensitive regex @(receivable|:A/R|:fixed)@.
journalCashAccountQuery :: Journal -> Query
journalCashAccountQuery j = And [journalAssetAccountQuery j, Not $ Acct "(receivable|A/R|fixed)"]
journalCashAccountQuery j = And [journalAssetAccountQuery j, Not $ Acct "(receivable|:A/R|:fixed)"]
-- Various kinds of filtering on journals. We do it differently depending
-- on the command.

View File

@ -276,8 +276,7 @@ This command displays a simple
[cashflow statement](http://en.wikipedia.org/wiki/Cash_flow_statement)
It shows the change in all "cash" (ie, liquid assets) accounts for the
period. It currently assumes that cash accounts are under a top-level
account named `asset` and do not contain `receivable` or `A/R` (plural
forms also allowed.)
account named `asset` and do not contain `receivable`, `:A/R` or `:fixed`.
```shell
$ hledger cashflow

View File

@ -1818,8 +1818,8 @@ in single\-column balance reports: use this custom line format
This command displays a simple cashflow statement It shows the change in
all "cash" (ie, liquid assets) accounts for the period.
It currently assumes that cash accounts are under a top\-level account
named \f[C]asset\f[] and do not contain \f[C]receivable\f[] or
\f[C]A/R\f[] (plural forms also allowed.)
named \f[C]asset\f[] and do not contain \f[C]receivable\f[],
\f[C]:A/R\f[] or \f[C]:fixed\f[].
.IP
.nf
\f[C]

View File

@ -1411,7 +1411,7 @@ Show a cashflow statement. Alias: cf.
This command displays a simple cashflow statement It shows the change
in all "cash" (ie, liquid assets) accounts for the period. It currently
assumes that cash accounts are under a top-level account named 'asset'
and do not contain 'receivable' or 'A/R' (plural forms also allowed.)
and do not contain 'receivable', ':A/R' or ':fixed'.
$ hledger cashflow
Cashflow Statement
@ -2144,65 +2144,65 @@ Node: balancesheet43148
Ref: #balancesheet43276
Node: cashflow45183
Ref: #cashflow45300
Node: help47168
Ref: #help47280
Node: incomestatement48354
Ref: #incomestatement48485
Node: print50377
Ref: #print50492
Node: register54248
Ref: #register54361
Node: Custom register output58857
Ref: #custom-register-output58988
Node: stats60285
Ref: #stats60391
Node: test61272
Ref: #test61359
Node: ADD-ON COMMANDS61727
Ref: #add-on-commands61839
Node: Official add-ons63126
Ref: #official-add-ons63268
Node: api63355
Ref: #api63446
Node: ui63498
Ref: #ui63599
Node: web63657
Ref: #web63748
Node: Third party add-ons63794
Ref: #third-party-add-ons63971
Node: diff64106
Ref: #diff64205
Node: iadd64304
Ref: #iadd64420
Node: interest64503
Ref: #interest64626
Node: irr64721
Ref: #irr64821
Node: Experimental add-ons64899
Ref: #experimental-add-ons65053
Node: autosync65455
Ref: #autosync65569
Node: budget65808
Ref: #budget65932
Node: chart65998
Ref: #chart66117
Node: check66188
Ref: #check66312
Node: check-dates66379
Ref: #check-dates66521
Node: check-dupes66594
Ref: #check-dupes66737
Node: equity66814
Ref: #equity66942
Node: prices67061
Ref: #prices67190
Node: print-unique67245
Ref: #print-unique67394
Node: register-match67487
Ref: #register-match67643
Node: rewrite67741
Ref: #rewrite67875
Node: tags67953
Ref: #tags68058
Node: help47151
Ref: #help47263
Node: incomestatement48337
Ref: #incomestatement48468
Node: print50360
Ref: #print50475
Node: register54231
Ref: #register54344
Node: Custom register output58840
Ref: #custom-register-output58971
Node: stats60268
Ref: #stats60374
Node: test61255
Ref: #test61342
Node: ADD-ON COMMANDS61710
Ref: #add-on-commands61822
Node: Official add-ons63109
Ref: #official-add-ons63251
Node: api63338
Ref: #api63429
Node: ui63481
Ref: #ui63582
Node: web63640
Ref: #web63731
Node: Third party add-ons63777
Ref: #third-party-add-ons63954
Node: diff64089
Ref: #diff64188
Node: iadd64287
Ref: #iadd64403
Node: interest64486
Ref: #interest64609
Node: irr64704
Ref: #irr64804
Node: Experimental add-ons64882
Ref: #experimental-add-ons65036
Node: autosync65438
Ref: #autosync65552
Node: budget65791
Ref: #budget65915
Node: chart65981
Ref: #chart66100
Node: check66171
Ref: #check66295
Node: check-dates66362
Ref: #check-dates66504
Node: check-dupes66577
Ref: #check-dupes66720
Node: equity66797
Ref: #equity66925
Node: prices67044
Ref: #prices67173
Node: print-unique67228
Ref: #print-unique67377
Node: register-match67470
Ref: #register-match67626
Node: rewrite67724
Ref: #rewrite67858
Node: tags67936
Ref: #tags68041

End Tag Table

View File

@ -1263,7 +1263,7 @@ COMMANDS
This command displays a simple cashflow statement It shows the change
in all "cash" (ie, liquid assets) accounts for the period. It cur-
rently assumes that cash accounts are under a top-level account named
asset and do not contain receivable or A/R (plural forms also allowed.)
asset and do not contain receivable, :A/R or :fixed.
$ hledger cashflow
Cashflow Statement