firefly-iii/resources/views/reports/partials/journals-audit.twig
James Cole 2da087401e
Extend audit report
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-09-10 18:37:16 +02:00

137 lines
5.8 KiB
Twig

{{ journals.render|raw }}
<table class="table table-hover table-compressed">
<thead>
<tr class="ignore">
<th class="hide-buttons">&nbsp;</th>
<th class="hide-icon">&nbsp;</th>
<th class="hide-description">{{ trans('list.description') }}</th>
<th class="hide-balance_before">{{ trans('list.balance_before') }}</th>
<th class="hide-amount">{{ trans('list.amount') }}</th>
<th class="hide-balance_after">{{ trans('list.balance_after') }}</th>
<th class="hide-date">{{ trans('list.date') }}</th>
<th class="hide-book_date">{{ trans('list.book_date') }}</th>
<th class="hide-process_date">{{ trans('list.process_date') }}</th>
<th class="hide-interest_date">{{ trans('list.interest_date') }}</th>
<!-- new optional fields (3x) -->
<th class="hide-interest_date">{{ trans('list.due_date') }}</th>
<th class="hide-payment_date">{{ trans('list.payment_date') }}</th>
<th class="hide-invoice_date">{{ trans('list.invoice_date') }}</th>
<th class="hide-from">{{ trans('list.from') }}</th>
<th class="hide-to">{{ trans('list.to') }}</th>
<th class="hide-budget"><i class="fa fa-tasks fa-fw" title="{{ trans('list.budget') }}"></i></th>
<th class="hide-category"><i class="fa fa-bar-chart fa-fw" title="{{ trans('list.category') }}"></i></th>
<th class="hide-bill">{{ trans('list.bill') }}</th>
<!-- more optional fields (2x) -->
<th class="hide-internal_reference">{{ trans('list.internal_reference') }}</th>
<th class="hide-notes">{{ trans('list.notes') }}</th>
<th class="hide-create_date">{{ trans('list.create_date') }}</th>
<th class="hide-update_date">{{ trans('list.update_date') }}</th>
</tr>
</thead>
<tbody>
{% for journal in journals %}
<tr data-date="{{ journal.date.format('Y-m-d') }}" data-id="{{ journal.id }}">
<td class="hide-buttons">
<div class="btn-group btn-group-xs">
<a href="{{ route('transactions.edit',journal.id) }}" class="btn btn-xs btn-default"><i class="fa fa-fw fa-pencil"></i></a>
<a href="{{ route('transactions.delete',journal.id) }}" class="btn btn-xs btn-danger"><i class="fa fa-fw fa-trash-o"></i></a></div>
</td>
<td class="hide-icon">{{ journal|typeIcon }}</td>
<td class="hide-description"><a href="{{ route('transactions.show',journal.id) }}" title="{{ journal.description }}">{{ journal.description }}</a>
</td>
<td class="hide-balance_before">{{ journal.before|formatAmount }}</td>
<td class="hide-amount">{{ journal|formatJournal }}</td>
<td class="hide-balance_after">{{ journal.after|formatAmount }}</td>
<td class="hide-date">{{ journal.date.formatLocalized(monthAndDayFormat) }}</td>
<td class="hide-book_date">
{% if journal.hasMeta('book_date') %}
{{ journal.getMeta('book_date').formatLocalized(monthAndDayFormat) }}
{% endif %}
</td>
<td class="hide-process_date">
{% if journal.hasMeta('process_date') %}
{{ journal.getMeta('process_date').formatLocalized(monthAndDayFormat) }}
{% endif %}
</td>
<td class="hide-interest_date">
{% if journal.hasMeta('interest_date') %}
{{ journal.getMeta('interest_date').formatLocalized(monthAndDayFormat) }}
{% endif %}
</td>
<!-- new optional fields (3x) -->
<td class="hide-due_date">
{% if journal.hasMeta('due_date') %}
{{ journal.getMeta('due_date').formatLocalized(monthAndDayFormat) }}
{% endif %}
</td>
<td class="hide-payment_date">
{% if journal.hasMeta('payment_date') %}
{{ journal.getMeta('payment_date').formatLocalized(monthAndDayFormat) }}
{% endif %}
</td>
<td class="hide-invoice_date">
{% if journal.hasMeta('invoice_date') %}
{{ journal.getMeta('invoice_date').formatLocalized(monthAndDayFormat) }}
{% endif %}
</td>
<td class="hide-from">
{{ sourceAccount(journal)|raw }}
</td>
<td class="hide-to">
{{ destinationAccount(journal)|raw }}
</td>
<td class="hide-budget">
{{ journalBudgets(journal)|raw }}
</td>
<td class="hide-category">
{{ journalCategories(journal)|raw }}
</td>
{% if journal.bill_id %}
<td class="hide-bill"><i class="fa fa-fw fa-rotate-right" title="{{ trans('list.bill') }}"></i>&nbsp;<a
href="{{ route('bills.show',journal.bill_id) }}">{{ journal.bill.name }}</a></td>
{% else %}
<td class="hide-bill">&nbsp;</td>
{% endif %}
<!-- new optional fields (2x) -->
<td class="hide-internal_reference">
{% if journal.hasMeta('internal_reference') %}
{{ journal.getMeta('internal_reference') }}
{% endif %}
</td>
<td class="hide-notes">
{% if journal.hasMeta('notes') %}
{{ journal.getMeta('notes')|nl2br }}
{% endif %}
</td>
<td class="hide-create_date">
{{ journal.created_at.formatLocalized(dateTimeFormat) }}
</td>
<td class="hide-update_date">
{{ journal.updated_at.formatLocalized(dateTimeFormat) }}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{{ journals.render|raw }}