| 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
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Without arguments -- and in a posting -- it is equivalent to
"commodity(amount)". Otherwise, it returns the commodity symbol of its
argument.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
| |
Where display_account might be '(Expenses:Food)', account will always be
'Expenses:Food'. account is now used by all matching and query
operations, while display_account is used in the various report outputs
(besides balance, which never distinguished virtual accounts).
Fixes F2832452-4521-49A3-B854-F4E12CC4D82E
|
|
|
|
|
|
|
|
|
|
|
| |
Fields are now:
Date,Code,Payee,Account,Commodity,Total,State,Note
Instead of outputting amounts potentially as $1,000.00 (which was an
error anyway), the output is now: $,1000.00. This makes the commodity
available in a separate field, and removes display of thousands markers.
Also, european formatting is always off.
|
|
|
|
|
| |
account_id is the "whicheth" number for that posting within its
account. The xact_id is within its transaction.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
any() matches an expression against every post in a transaction or
account, and returns true if any of them are true. all() tests if all
are true. For example:
ledger -l 'account =~ /Expense/ & any(account =~ /MasterCard/)' reg
This reports every posting affecting an Expense account (regex match),
but only if some other posting in the same transaction affects the
MasterCard account.
Both functions also take a second boolean argument. If it is false, the
"source" posting is not considered. For example:
ledger -l 'any(/x/, false)'
This matches any posting where a *different* posting in the same
transaction contains the letter 'x'.
|
|
|
|
|
| |
There ended up being too many corner cases for the generalized formatter
to handle.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This allows for correct searching of UTF-8 encoded strings, such as
lower-case versions of Russian words to find mixed-case words.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The different namespaces are:
Function Value expression functions, which receive a "context"
Option Command-line options
Precommand Commands which are invoked before reading the journal
Command Commands which are invoked after reading the journal
Directive Directives that occur at column 0 in a data file
This greatly eases the ability for Python uses to add intercept hooks to
change how the basic Ledger module functions. An example of what should
be possible soon:
import ledger
def my_foo_handler(value):
print "--foo received:", value
ledger.add_handler(ledger.Option, "foo=", my_foo_handler)
|
|
|
|
|
|
|
|
|
| |
This is necessary because sometimes, a post from one account will get
reported as though it were in another account (this happens with
--budget, to show child account postings within their parent account).
In that case, the account needs to remember which postings have been
reported as being within it, so that it can add these amounts to its own
total in the balance report.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
The new behavior will be used in future by some pending topic branches
I'm working on.
|
| |
|
| |
|
| |
|
|
|
|
| |
At the moment, it's only useful during parsing.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
This way, if the running total is off by a penny or two due to rounding
of one or more commodities in the account, the user will see it.
This commit also reorganizes the testing code a bit, which I did after
adding the ninth test series (ConfirmTests), to validate the new
rounding code.
|
| |
|
| |
|
| |
|
|
The last commit did not contain the majority of changes because of a
slight mishap. This contains the real changeset.
|