summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgbanam Ogbuluijah <390059+igbanam@users.noreply.github.com>2024-07-06 01:32:19 +0000
committerJohn Wiegley <johnw@newartisans.com>2024-07-08 10:10:43 -0700
commit2f0bc088607650d029713e3500efacfb3b049c85 (patch)
tree6679ad5b3bbac6643bcce65a77a907ac5ba84fd7
parentbe541cbae2190545c14989c020d9d0c14b711880 (diff)
downloadfork-ledger-2f0bc088607650d029713e3500efacfb3b049c85.tar.gz
fork-ledger-2f0bc088607650d029713e3500efacfb3b049c85.tar.bz2
fork-ledger-2f0bc088607650d029713e3500efacfb3b049c85.zip
update documentation (#2)
-rw-r--r--doc/ledger3.texi26
1 files changed, 25 insertions, 1 deletions
diff --git a/doc/ledger3.texi b/doc/ledger3.texi
index 251c987a..a39687e5 100644
--- a/doc/ledger3.texi
+++ b/doc/ledger3.texi
@@ -3901,7 +3901,31 @@ Becomes:
Assets:Cash $-20.00
@end smallexample
-Keep in mind that if you are using @option{--strict} or @option{--pedantic} you will have to explicitly define an account @samp{$account} to avoid errors.
+It is possible to refer to information within the posting using a @var{VEXPR}. Note that the syntax for using a @var{VEXPR} is "%(@var{VEXPR})".
+
+@smallexample @c input:validate
+= ^Income
+ Liabilities:Tax:%(tag(/Tax/)) (20/120)
+ $account (-20/120)
+
+2024-07-04 * Sale
+ ; Tax: General
+ Assets 10 USD
+ Income:Customer A
+@end @smallexample
+
+Becomes:
+
+@smallexample @c input:validate
+2024/07/04 * Sale
+ ; Tax: General
+ Assets 10 USD
+ Income:Customer A -10 USD
+ Liabilities:Tax:General -2 USD
+ Income:Customer A 2 USD
+@end @smallexample
+
+Keep in mind that if you are using @option{--strict} or @option{--pedantic} you will have to explicitly define an account to avoid errors. When using @samp{$account}, such definition can be done thus:
@smallexample @c input:validate
account $account