| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
Thus, an expression can know if the context in which it's being
evaluated requires a string, and if so, determine it's output
accordingly. For example:
account ; returns the full name of the posting's account
account.total ; here the context is SCOPE, so account is an obj
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These can occur in many places:
; Within an automated transaction, the assert is evaluated every time
; a posting is matched, with the expression context set to the
; matching posting.
= /Food/
assert account("Expenses:Food").total >= $100
2010-06-12 Sample
Expenses:Food $100
Assets:Checking
; At file scope, the expression is evaluated with "global" scope.
assert account("Expenses:Food").total == $100
; At the top of a transction, the assertion's scope is the
; transaction. After a posting, the scope is that posting. Note
; however that account totals are only adjusted after successful
; parsing of a transaction, which means that all the assertions below
; are true, even though it appears as though the middle posting should
; affect the total immediately (which is not the case).
2010-06-12 Sample 2
assert account("Expenses:Food").total == $100
Expenses:Food $50
assert account("Expenses:Food").total == $100
Assets:Checking
assert account("Expenses:Food").total == $100
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For example, consider the following automated transaction:
= /Food/
; Next Date:: date + 10
(Expenses:Tax) 1.00
; Next Date:: date + 20
This will add a metadata field named 'Next Date' to the _matching
posting_, with a value that is 10 days later than that posting. It will
also generate a new posting for that transaction, whose amount is the
same as the matching posting. Further, it will add a 'Next Date'
metadata tag to the _generated posting_ whose value is 20 days later
than the date of the matching posting.
|
| |
|
|
|
|
|
|
| |
For example, just the word "account" returns the name of the current
posting's account, but account("Expenses:Food") returns the actual
account object, so that it's total may be accessed.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The metadata construct 'Key: Value' is now just a special case for
'Key:: "Value"'. Another after a :: in metadata setting is parsed as a
full value expression and typed as such. For example:
; Key:: $400 + $500
ledger -l 'tag("Key") < $1000'
|
|
|
|
|
|
| |
Without arguments -- and in a posting -- it is equivalent to
"commodity(amount)". Otherwise, it returns the commodity symbol of its
argument.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
This is to work around undefined behavior according to the Standard,
[lib.res.on.functions]/2:
"In particular, the effects are undefined in the following cases: [..]
- if an incomplete type (3.9) is used as a template argument when
instantiating a template component."
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
You can now establish a fixated price automatically by way of a fixated
cost. The syntax for this is:
2009/11/01 Sample
Assets 1 apple @ =$0.10
Equity
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Fixes #227 / 1C90D8AF-830E-43C2-A5B7-D382F68EBDE3
|
|
|
|
|
|
|
|
| |
This is used by reports like register and balance so that separated
commodities without spaces in them needed be surrounded by quotes. It
will still occur in most other places.
Fixes #200 / F82CF11F-BFD9-4512-A562-202B04B68051
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
With -s, -M/Y/D, -n, and a few other flags, postings get "grouped" into
meta-transactions that contain more postings than before. In all these
cases, -V use the date of the *earliest* posting in that group, which
makes little sense and caused breakages with -J. It now uses the latest
date.
Fixes #197 / 68EAF363-D0FE-4127-866E-A5AEBACB65D6
|
|
|
|
| |
This reverts commit ae8ab8106218167036ef386159450b56c328f1b9.
|
|
|
|
|
|
|
|
| |
With -X COMM, all values are computed in terms of COMM, regardless.
With -V, only secondary commodities will ever be computed, never
primaries. Further, if a secondary commodities has an associated price,
the valuation is done in terms of that price's commodity.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Fixes #188 / 53BCED29-F3B9-4E02-9A35-6C739ABB9662
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Fixes #228 / ED9388D7-E523-40EB-841B-9AE9BAA70329
|