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