From 2f0bc088607650d029713e3500efacfb3b049c85 Mon Sep 17 00:00:00 2001 From: Igbanam Ogbuluijah <390059+igbanam@users.noreply.github.com> Date: Sat, 6 Jul 2024 01:32:19 +0000 Subject: update documentation (#2) --- doc/ledger3.texi | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3