{% set entry_types = ['open', 'close', 'transaction', 'balance', 'note', 'document', 'pad', 'query', 'custom', 'budget'] %} {% set transaction_types = ['cleared', 'pending', 'other'] %} {% set flags_to_types = {'*': 'cleared', '!': 'pending'} %} {% set default_show_type = { 'open': 'open' in config['journal-show'], 'close': 'close' in config['journal-show'], 'transaction': 'transaction' in config['journal-show'], 'balance': 'balance' in config['journal-show'], 'note': 'note' in config['journal-show'], 'document': 'document' in config['journal-show'], 'pad': 'pad' in config['journal-show'], 'query': 'query' in config['journal-show'], 'custom': 'custom' in config['journal-show'], 'budget': 'budget' in config['journal-show'], 'cleared': 'cleared' in config['journal-show-transaction'], 'pending': 'pending' in config['journal-show-transaction'], 'other': 'other' in config['journal-show-transaction'], 'metadata': 'metadata' in config['journal-show'], 'postings': 'postings' in config['journal-show'], } %} {% if request.args.get('show', False) %} {% set _list = request.args.getlist('show') %} {% set show_type = { 'open': 'open' in _list, 'close': 'close' in _list, 'transaction': 'transaction' in _list, 'balance': 'balance' in _list, 'note': 'note' in _list, 'document': 'document' in _list, 'pad': 'pad' in _list, 'query': 'query' in _list, 'custom': 'custom' in _list, 'budget': 'budget' in _list, 'cleared': 'cleared' in _list, 'pending': 'pending' in _list, 'other': 'other' in _list, 'metadata': 'metadata' in _list, 'postings': 'postings' in _list, } %} {% else %} {% set show_type = default_show_type %} {% endif %} {% set transaction_type_buttons = { 'cleared': ('*', _('Cleared Transactions')), 'pending': ('!', _('Pending Transactions')), 'other': ('x', _('Other Transactions')), } %}
{% set context_url = url_for('context', ehash='REPLACEME') %} {% set account_url = url_for('account', name='REPLACEME') %} {% set tag_url = url_for_current(tag='REPLACEME,'+(g.filters['tag'] or '')) %} {% macro account_link(name) -%} {{ name }} {%- endmacro %} {% macro render_inventory(inv) -%} {% for pos in inv %} {{ pos.units|format_amount }}{{ _('Date') }} {{ _('F') }} {{ _('Narration/Payee') }} {{ _('Position') }} {{ _('Price') }} {{ _('Cost') }} {% if show_change_and_balance %} {{ _('Change') }} {{ _('Balance') }} {% endif %}