diff options
author | John Wiegley <johnw@newartisans.com> | 2009-03-03 15:06:15 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-03-03 15:06:15 -0400 |
commit | 4af1bfdde3118b6abc19ca87ef99d42bec58197b (patch) | |
tree | d5e55db57e8991d7dce0ecb94a275ddd48051e55 /src/filters.h | |
parent | de3bafc0d75410a86f13d63411271bf09fde3d6f (diff) | |
download | fork-ledger-4af1bfdde3118b6abc19ca87ef99d42bec58197b.tar.gz fork-ledger-4af1bfdde3118b6abc19ca87ef99d42bec58197b.tar.bz2 fork-ledger-4af1bfdde3118b6abc19ca87ef99d42bec58197b.zip |
Allow special %{} formatting sequence
Although %(amount) inserts an item's amount, it only does exactly that.
There is no special consideration like stripping of lot details, or
reduction to the base commodity, etc. For those things, and to make
sure it was display in red if negative, the canonical form would be:
%(ansify_if(justify(scrub(amount), 12, -1, true), red if amount < 0))
You can now use the special %{} form as an alternate to this:
%12{amount, red if amount < 0}
The two expand to the same underlying expression.
Diffstat (limited to 'src/filters.h')
0 files changed, 0 insertions, 0 deletions