;doc: Assertions and ordering: cleanups

This commit is contained in:
Simon Michael 2024-04-11 17:50:26 -10:00
parent 1829af239c
commit 350a2c0918

View File

@ -1453,34 +1453,36 @@ besides the asserted one (or at least, that their balance is 0).
``` journal ``` journal
2013/1/1 2013/1/1
a $1 usd $-1
a €1 eur €-1
b $-1 both $1
c €-1 both €1
2013/1/2 ; These assertions succeed 2013/1/2 ; These assertions succeed
a 0 = $1 usd 0 == $-1
a 0 = €1 eur 0 == €-1
b 0 == $-1 both 0 = $1
c 0 == €-1 both 0 = €1
2013/1/3 ; This assertion fails as 'a' also contains 1€ 2013/1/3 ; This total assertion fails because 'both' contains $1 and €1
a 0 == $1 both 0 == $1
``` ```
It's not yet possible to make a complete assertion about a balance that has multiple commodities. It's not yet possible to make a single total assertion about a multi-commodity balance.
One workaround is to isolate each commodity into its own subaccount: One workaround is to isolate each commodity in its own subaccount:
``` journal ``` journal
2013/1/1 2013/1/1
a:usd $1 usd $-1
a:euro €1 eur €-1
b both:usd $1
both:eur €1
2013/1/2 2013/1/2 ; These assertions succeed
a 0 == 0 usd 0 == $-1
a:usd 0 == $1 eur 0 == €-1
a:euro 0 == €1 both:usd 0 == $1
both:eur 0 == €1
``` ```
### Assertions and costs ### Assertions and costs