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,141 +1 @@
|
||||
<table class="table table-striped table-condensed">
|
||||
<thead>
|
||||
<tr class="ignore">
|
||||
<th class="hidden-xs" colspan="2"> </th>
|
||||
<th>{{ trans('list.description') }}</th>
|
||||
<th style="text-align:right;">{{ trans('list.amount') }}</th>
|
||||
<th class="hidden-xs hidden-sm hidden-md">{{ trans('list.reconcile') }}</th>
|
||||
<th class="hidden-xs hidden-sm">{{ trans('list.date') }}</th>
|
||||
<th class="hidden-xs hidden-sm hidden-md">{{ trans('list.from') }}</th>
|
||||
<th class="hidden-xs hidden-sm hidden-md">{{ trans('list.to') }}</th>
|
||||
|
||||
<th class="hidden-xs"><i class="fa fa-tasks fa-fw" title="{{ trans('list.budget') }}"></i></th>
|
||||
<th class="hidden-xs"><i class="fa fa-bar-chart fa-fw" title="{{ trans('list.category') }}"></i></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{# data for previous/next markers #}
|
||||
{% set endSet = false %}
|
||||
{% set startSet = false %}
|
||||
{% for transaction in transactions %}
|
||||
{# start marker #}
|
||||
{% if transaction.date < start and startSet == false %}
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
|
||||
</td>
|
||||
<td colspan="3">
|
||||
<span class="label label-default">
|
||||
{{ trans('firefly.start_of_reconcile_period', {period: start.formatLocalized(monthAndDayFormat) }) }}
|
||||
</span>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
{% set startSet = true %}
|
||||
{% endif %}
|
||||
|
||||
{# end marker #}
|
||||
{% if transaction.date <= end and endSet == false %}
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
|
||||
</td>
|
||||
<td colspan="3">
|
||||
<span class="label label-default">
|
||||
{{ trans('firefly.end_of_reconcile_period', {period: end.formatLocalized(monthAndDayFormat) }) }}
|
||||
</span>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
{% set endSet = true %}
|
||||
{% endif %}
|
||||
|
||||
<tr data-date="{{ transaction.date.format('Y-m-d') }}" data-id="{{ transaction.journal_id }}"
|
||||
data-transaction-id="{{ transaction.id }}">
|
||||
<td class="hidden-xs">
|
||||
<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>
|
||||
</div>
|
||||
</td>
|
||||
{# icon #}
|
||||
<td class="hidden-xs">
|
||||
{{ transaction|transactionIcon }}
|
||||
</td>
|
||||
|
||||
{# description #}
|
||||
<td>
|
||||
<a href="{{ route('transactions.show',transaction.journal_id) }}">
|
||||
{{ transaction|transactionDescription }}
|
||||
</a>
|
||||
{# is a split journal #}
|
||||
{{ transaction|transactionIsSplit }}
|
||||
|
||||
{# count attachments #}
|
||||
{{ transaction|transactionHasAtt }}
|
||||
|
||||
|
||||
</td>
|
||||
<td style="text-align: right;"><span style="margin-right:5px;">{{ transaction|transactionAmount }}</span></td>
|
||||
<td>
|
||||
{% if currency.id == transaction.transaction_currency_id %}
|
||||
{% set transactionAmount = transaction.transaction_amount %}
|
||||
{% else %}
|
||||
{% set transactionAmount = transaction.transaction_foreign_amount %}
|
||||
{% endif %}
|
||||
|
||||
{% if transaction.$array[$direction][$transactionType] %}
|
||||
{{ transaction|transactionReconciled }}
|
||||
<input type="hidden" name="cleared[]" data-younger="{% if transaction.date < start %}true{% else %}false{% endif %}"
|
||||
data-inrange="{% if transaction.date >= start and transaction.date <= end %}true{% else %}false"{% endif %}"
|
||||
class="cleared" data-id="{{ transaction.id }}" value="{{ transactionAmount }}">
|
||||
{% else %}
|
||||
<input type="checkbox" name="reconciled[]"
|
||||
data-younger="{% if transaction.date < start %}true{% else %}false{% endif %}"
|
||||
data-inrange="{% if transaction.date >= start and transaction.date <= end %}true{% else %}false"{% endif %}"
|
||||
value="{{ transactionAmount }}" data-id="{{ transaction.id }}" disabled class="reconcile_checkbox">
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="hidden-sm hidden-xs">
|
||||
{{ transaction.date.formatLocalized(monthAndDayFormat) }}
|
||||
</td>
|
||||
<td class="hidden-xs hidden-sm hidden-md">
|
||||
{# all source accounts #}
|
||||
{{ transaction|transactionSourceAccount }}
|
||||
</td>
|
||||
<td class="hidden-xs hidden-sm hidden-md">
|
||||
{# all destination accounts #}
|
||||
{{ transaction|transactionDestinationAccount }}
|
||||
</td>
|
||||
<td class="hidden-xs">
|
||||
{{ transaction|transactionBudgets }}
|
||||
</td>
|
||||
<td class="hidden-xs">
|
||||
{{ transaction|transactionCategories }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
{# if the start marker has not been generated yet, do it now, at the end of the loop. #}
|
||||
{% if startSet == false %}
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
|
||||
</td>
|
||||
<td colspan="3">
|
||||
<span class="label label-default">
|
||||
{{ trans('firefly.start_of_reconcile_period', {period: start.formatLocalized(monthAndDayFormat) }) }}
|
||||
</span>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
{% set startSet = true %}
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
<h1 style="color:red;">REPLACE ME</h1>
|
Reference in New Issue
Block a user