docs: journal: Add paragraph about exact assignments
This commit is contained in:
parent
f54adf3d10
commit
0ea49f5c5a
@ -446,6 +446,8 @@ Balance assertions don't work well across files specified with multiple
|
||||
-f options. Use include or [concatenate the
|
||||
files](/hledger.html#input-files) instead.
|
||||
|
||||
<a name="exact-assertions"></a>
|
||||
|
||||
#### Assertions and commodities
|
||||
|
||||
The asserted balance must be a simple single-commodity amount, and in
|
||||
@ -549,7 +551,7 @@ or when adjusting a balance to reality:
|
||||
``` {.journal}
|
||||
; no cash left; update balance, record any untracked spending as a generic expense
|
||||
2016/1/15
|
||||
assets:cash = $0
|
||||
assets:cash == $0
|
||||
expenses:misc
|
||||
```
|
||||
|
||||
@ -560,6 +562,12 @@ assignment). Note that using balance assignments makes your journal a
|
||||
little less explicit; to know the exact amount posted, you have to run
|
||||
hledger or do the calculations yourself, instead of just reading it.
|
||||
|
||||
Note that, just as with [exact balance assertions](#exact-assertions),
|
||||
an assignment may be performed over all commodities by using a doubled
|
||||
equals sign; any unlisted commodities are set to 0. In other words, the
|
||||
second example above not only says that no dollars remain in pocket, but
|
||||
also no Euros, no rupees, etc.
|
||||
|
||||
### Transaction prices
|
||||
|
||||
Within a transaction, you can note an amount's price in another
|
||||
|
||||
Loading…
Reference in New Issue
Block a user