The payee directive allows for transformation of payee names during the
parsing of a Ledger file. This means you can record the payee name in
one form, but always have it reported in another form. The syntax is
(and will be):
payee PAYEE_NAME REGEXP
or
payee PAYEE_NAME
REGEXP1
REGEXP2
...
The account directive sets the account automatically based on the payee
iff the base account name is Unknown. For example, if you have a bunch
of transaction in Expenses:Unknown, you can assign accounts for several
automatically using:
account ACCOUNT_NAME PAYEE_REGEXP
or
account ACCOUNT_NAME
PAYEE_REGEXP1
PAYEE_REGEXP2
...
It lets you specify a fixed cost for a duration of a ledger file, for
example:
fixed ecu $2
2008/01/01 income
assets🏦checking 1 ecu
income:salary
end fixed
This is equivalent to:
2008/01/01 income
assets🏦checking 1 ecu {=$2}
income:salary
This allows for value expressions to be used which reference the
incoming posting, for example:
= Income:Clients:
(Liabilities:Taxes:VAT1) (floor(amount) * 1)
(Liabilities:Taxes:VAT2) 0.19
2009/07/27 * Invoice
Assets:Bank:Checking $1,190.45
Income:Clients:ACME_Inc
The automated posting for VAT1 will use the floored amount multiplied by
a factor, while the posting for VAT2 multiples the whole amount as
before.
Example of a tagged entry:
i 2009/11/01 12:00:00 Account Payee ; :Foo:
o 2009/11/01 13:00:00
Two spaces or a tab must separate account from payee, and payee from
note.
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)
There are two kinds of balance related options for a posting: a balance
assignment, where the amount of the posting is blank and so it fills it
in to make the assertion true; and plain assertions, where the amount is
not blank and an error is reported if the balance does not match the
given amount after the posting is taken into account.
The code now uses Boost's input and output facets for times and dates.
This ensures completely consistency regarding timezones and times, and
fixes the regression test that was broken while I was away coding in
London (where it was GMT-0 and I didn't notice the difference between
local and GMT).
The problem at this point is that it's recording prices in the price
database multiple times; it should only need to download a price for
each commodity once per day.
This issue is caused by having a single space at the end of a posting
that has neither an amount nor a note.
Fixes C523E23F-CFAC-4A53-B0C6-21226640E763