Commit graph

5 commits

Author SHA1 Message Date
Brett Smith
3e21157f20 ledger_entry: Support string tests in amount expressions.
This is useful for setting amounts based on imported strings like country,
Eventbrite ticket type, etc.
2019-07-29 12:37:42 -04:00
Brett Smith
4009c626d4 ledger_entry: Improve error reporting for amount expressions.
This is going to become more important as amount expressions become more
capable.
2019-07-29 12:05:51 -04:00
Brett Smith
8755d6af67 ledger_entry: Support conditional expressions in amounts. 2019-07-04 10:15:09 -04:00
Brett Smith
db59d2fc8c hooks.ledger_entry: Look up templates dynamically.
If there's a 'ledger entry' key in the entry data, use that value as the
name of the template to load.  Thanks to this, nbpy2017 could collapse
multiple importers into one.

Otherwise, build a default template name based on the importer source, and
try to use that.

All the configuration names now end with "ledger entry" instead of starting
with "template".  This makes it clearer what they're for, in case we
support other kinds of output templates in the future.

I ended up changing the names of some of the importers so the default
template name was nice, rather than specifying template names for all of
them, to reduce the amount of name discrepancies across the codebase.
2017-12-31 18:52:30 -05:00
Brett Smith
cdec3d9aab hooks.ledger_entry: Bring in all Ledger-specific code.
This includes the old "template" module, plus the associated
template-loading code from config.
2017-12-31 17:29:14 -05:00
Renamed from tests/test_templates.py (Browse further)