mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Improve tests, models and views.
This commit is contained in:
@@ -1,156 +1 @@
|
||||
{{ journals.render|raw }}
|
||||
|
||||
<table class="table table-hover table-compressed">
|
||||
<thead>
|
||||
<tr class="ignore">
|
||||
<th class="hide-buttons"> </th>
|
||||
<th class="hide-icon"> </th>
|
||||
|
||||
<th class="hide-description">{{ trans('list.description') }}</th>
|
||||
<th class="hide-balance_before" style="text-align: right;">{{ trans('list.balance_before') }}</th>
|
||||
<th class="hide-amount" style="text-align: right;">{{ trans('list.amount') }}</th>
|
||||
<th class="hide-balance_after" style="text-align: right;">{{ 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 transaction in journals %}
|
||||
<tr data-date="{{ transaction.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',transaction.journal_id) }}" class="btn btn-xs btn-default"><i class="fa fa-fw fa-pencil"></i></a>
|
||||
<a href="{{ route('transactions.delete',transaction.journal_id) }}" class="btn btn-xs btn-danger"><i class="fa fa-fw fa-trash-o"></i></a>
|
||||
</div>
|
||||
</td>
|
||||
<td class="hide-icon">{{ transaction|transactionIcon }}</td>
|
||||
|
||||
<td class="hide-description">
|
||||
<a href="{{ route('transactions.show',transaction.journal_id) }}">
|
||||
{% if transaction.transaction_description|length > 0 %}
|
||||
{{ transaction.transaction_description }} ({{ transaction.description }})
|
||||
{% else %}
|
||||
{{ transaction.description }}
|
||||
{% endif %}
|
||||
</a>
|
||||
</td>
|
||||
<td class="hide-balance_before" style="text-align: right;">
|
||||
{{ formatAmountByCurrency(transaction.transactionCurrency, transaction.before) }}</td>
|
||||
<td class="hide-amount" style="text-align: right;">
|
||||
{{ transaction|transactionAmount }}
|
||||
</td>
|
||||
<td class="hide-balance_after" style="text-align: right;">{{ formatAmountByCurrency(transaction.transactionCurrency, transaction.after) }}</td>
|
||||
|
||||
<td class="hide-date">{{ transaction.date.formatLocalized(monthAndDayFormat) }}</td>
|
||||
<td class="hide-book_date">
|
||||
{% if transaction.transactionJournal.hasMeta('book_date') %}
|
||||
{{ journalGetMetaDate(transaction.transactionJournal, 'book_date').formatLocalized(monthAndDayFormat) }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="hide-process_date">
|
||||
{% if transaction.transactionJournal.hasMeta('process_date') %}
|
||||
{{ journalGetMetaDate(transaction.transactionJournal, 'process_date').formatLocalized(monthAndDayFormat) }}
|
||||
{% endif %}
|
||||
|
||||
</td>
|
||||
<td class="hide-interest_date">
|
||||
{% if transaction.transactionJournal.hasMeta('interest_date') %}
|
||||
{{ journalGetMetaDate(transaction.transactionJournal, 'interest_date').formatLocalized(monthAndDayFormat) }}
|
||||
{% endif %}
|
||||
|
||||
</td>
|
||||
|
||||
{# new optional fields (3x) #}
|
||||
<td class="hide-due_date">
|
||||
{% if transaction.transactionJournal.hasMeta('due_date') %}
|
||||
{{ journalGetMetaDate(transaction.transactionJournal, 'due_date').formatLocalized(monthAndDayFormat) }}
|
||||
{% endif %}
|
||||
|
||||
</td>
|
||||
<td class="hide-payment_date">
|
||||
{% if transaction.transactionJournal.hasMeta('payment_date') %}
|
||||
{{ journalGetMetaDate(transaction.transactionJournal, 'payment_date').formatLocalized(monthAndDayFormat) }}
|
||||
{% endif %}
|
||||
|
||||
</td>
|
||||
<td class="hide-invoice_date">
|
||||
{% if transaction.transactionJournal.hasMeta('invoice_date') %}
|
||||
{{ journalGetMetaDate(transaction.transactionJournal, 'invoice_date').formatLocalized(monthAndDayFormat) }}
|
||||
{% endif %}
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="hide-from">
|
||||
{{ transaction|transactionSourceAccount }}
|
||||
</td>
|
||||
<td class="hide-to">
|
||||
{{ transaction|transactionDestinationAccount }}
|
||||
</td>
|
||||
|
||||
<td class="hide-budget">
|
||||
{{ transaction|transactionBudgets }}
|
||||
</td>
|
||||
<td class="hide-category">
|
||||
{{ transaction|transactionCategories }}
|
||||
</td>
|
||||
{% if transaction.bill_id %}
|
||||
<td class="hide-bill">
|
||||
<i class="fa fa-fw fa-rotate-right" title="{{ trans('list.bill') }}"></i> 
|
||||
<a href="{{ route('bills.show',transaction.bill_id) }}">{{ transaction.bill_name }}</a>
|
||||
</td>
|
||||
{% else %}
|
||||
<td class="hide-bill"> </td>
|
||||
{% endif %}
|
||||
|
||||
{# new optional fields (2x) #}
|
||||
<td class="hide-internal_reference">
|
||||
|
||||
{% if transaction.transactionJournal.hasMeta('internal_reference') %}
|
||||
{{ journalGetMetaField(transaction.transactionJournal,'internal_reference') }}
|
||||
{% endif %}
|
||||
|
||||
</td>
|
||||
<td class="hide-notes">
|
||||
{% if transaction.transactionJournal.notes.count == 1 %}
|
||||
{{ transaction.transactionJournal.notes.first.text }}
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
<td class="hide-create_date">
|
||||
{{ transaction.transactionJournal.created_at.formatLocalized(dateTimeFormat) }}
|
||||
</td>
|
||||
|
||||
<td class="hide-update_date">
|
||||
{{ transaction.transactionJournal.updated_at.formatLocalized(dateTimeFormat) }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{{ journals.render|raw }}
|
||||
<h1 style="color:red;">REPLACE ME</h1>
|
Reference in New Issue
Block a user