Merge branch 'master' of github.com:simonmichael/hledger
This commit is contained in:
commit
556a7a1a01
18
MANUAL.md
18
MANUAL.md
@ -881,14 +881,16 @@ the following:
|
||||
|
||||
- `REGEX` - match account names by this regular expression
|
||||
- `acct:REGEX` - same as above
|
||||
- `amt:<N`, `amt:=N`, `amt:>N` - match postings with a single-commodity amount less than, greater than or equal to N. (Multi-commodity amounts are always matched.)
|
||||
- `code:REGEX` - match by transaction code (eg check number)
|
||||
- `desc:REGEX` - match transaction descriptions by regular expression
|
||||
- `date:PERIODEXPR` - match dates within the specified [period](#period-expressions)
|
||||
- `edate:PERIODEXPR` - as above, but match secondary dates
|
||||
- `status:1` or `status:0` - match cleared/uncleared transactions
|
||||
- `date2:PERIODEXPR` - as above, but match secondary dates
|
||||
- `tag:NAME[=REGEX]` - match by (exact, case sensitive) [tag](#tags) name, and optionally match the tag value by regular expression
|
||||
- `depth:N` - match (or display, depending on command) accounts at or above this [depth](#depth-limiting)
|
||||
- `status:1` or `status:0` - match cleared/uncleared transactions
|
||||
- `real:1` or `real:0` - match real/virtual-ness
|
||||
- `empty:1` or `empty:0` - match if amount is/is not zero
|
||||
- `amt:<N`, `amt:=N`, `amt:>N` - match postings with a single-commodity amount less than, greater than or equal to N. (Multi-commodity amounts are always matched.)
|
||||
- `not:` before any of the above negates the match
|
||||
|
||||
<!--
|
||||
@ -918,10 +920,12 @@ With the [print](#print) command, they select transactions which
|
||||
> *have no postings matching any of the negative account terms AND*
|
||||
> *match all the other terms*
|
||||
|
||||
Query expressions (mostly) work the same way on the command line and [web](#web) interfaces.
|
||||
Note that many query terms have equivalent (older) command-line flags.
|
||||
You can mix and match query arguments and flags, but note that
|
||||
[period expressions](#period-expressions) override other date queries.
|
||||
Many of the query terms above have equivalent command-line flags which predate them.
|
||||
You can mix and match query arguments and flags, just note that a
|
||||
[period expression](#period-expressions) overrides any other date terms.
|
||||
|
||||
The same query syntax should work in both the command line and [web](#web) interfaces.
|
||||
|
||||
|
||||
### Smart dates
|
||||
|
||||
|
||||
@ -72,38 +72,39 @@ searchform :: ViewData -> HtmlUrl AppRoute
|
||||
searchform VD{..} = [hamlet|
|
||||
<div#searchformdiv>
|
||||
<form#searchform.form method=GET>
|
||||
<table>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td>
|
||||
Search:
|
||||
\ #
|
||||
<td>
|
||||
<input name=q size=70 value=#{q}>
|
||||
<td width="99%">
|
||||
<input name=q value=#{q} style="width:98%;">
|
||||
<td width="1%">
|
||||
<input type=submit value="Search">
|
||||
<tr valign=top>
|
||||
<td colspan=2 style="text-align:right;">
|
||||
$if filtering
|
||||
\ #
|
||||
<span.showall>
|
||||
<a href=@{here}>clear search
|
||||
<a href=@{here}>clear
|
||||
\ #
|
||||
<a#search-help-link href="#" title="Toggle search help">help
|
||||
<tr>
|
||||
<td>
|
||||
<td>
|
||||
<td colspan=2>
|
||||
<div#search-help.help style="display:none;">
|
||||
Leave blank to see journal (all transactions), or click account links to see transactions under that account.
|
||||
<br>
|
||||
Transactions/postings may additionally be filtered by:
|
||||
<br>
|
||||
Transactions/postings may additionally be filtered by
|
||||
acct:REGEXP (target account), #
|
||||
code:REGEXP (transaction code), #
|
||||
desc:REGEXP (description), #
|
||||
date:PERIODEXP (date), #
|
||||
edate:PERIODEXP (secondary date), #
|
||||
<br>
|
||||
status:BOOL (cleared status), #
|
||||
date2:PERIODEXP (secondary date), #
|
||||
tag:TAG[=REGEX] (tag and optionally tag value), #
|
||||
depth:N (accounts at or above this depth), #
|
||||
status:*, status:!, status: (cleared status), #
|
||||
real:BOOL (real/virtual-ness), #
|
||||
empty:BOOL (posting amount = 0).
|
||||
empty:BOOL (is amount zero), #
|
||||
amt:<N, amt:=N, amt:>N (test magnitude of single-commodity amount).
|
||||
<br>
|
||||
not: to negate, enclose space-containing patterns in quotes, multiple filters are AND'ed.
|
||||
Prepend not: to negate, enclose multi-word patterns in quotes, multiple search terms are AND'ed.
|
||||
|]
|
||||
where
|
||||
filtering = not $ null q
|
||||
|
||||
@ -87,7 +87,7 @@ body { margin:0; }
|
||||
.navlinkcurrent { font-weight:bold; }
|
||||
.form { margin:0em; }
|
||||
|
||||
#searchformdiv { margin:0 0 1em 0; white-space:nowrap; }
|
||||
#searchformdiv { margin:0 0 1em 0; }
|
||||
#searchform { margin:0; }
|
||||
#searchform span { padding:4px; }
|
||||
#stopfilterlink { font-weight:bold; }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user