mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-26 13:36: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>
|
||||
@@ -35,7 +35,7 @@
|
||||
<td data-value="{{ link.source.description }}">
|
||||
<a href="{{ route('transactions.show', [link.source_id]) }}">{{ link.source.description }}</a>
|
||||
</td>
|
||||
<td>{{ link.source|journalTotalAmount }}</td>
|
||||
<td>{{ link.source|journalTXotalAmount }}</td>
|
||||
<td>{{ journalLinkTranslation('outward', linkType.outward) }}</td>
|
||||
<td data-value="{{ link.destination.description }}">
|
||||
<a href="{{ route('transactions.show', [link.destination_id]) }}">{{ link.destination.description }}</a>
|
||||
|
||||
@@ -1,70 +1 @@
|
||||
<tr class="drag" data-date="{{ transaction.date.format('Y-m-d') }}" data-id="{{ transaction.journal_id }}"
|
||||
data-transaction-id="{{ transaction.id }}"
|
||||
>
|
||||
{# input buttons #}
|
||||
<td class="hidden-xs">
|
||||
<div class="select_single" style="display:none;">
|
||||
<input name="select_all_single[]" class="select_all_single" data-transaction="{{ transaction.id }}" value="{{ transaction.journal_id }}"
|
||||
type="checkbox"/>
|
||||
</div>
|
||||
<div class="btn-group btn-group-xs edit_buttons edit_tr_buttons">{% if sorting %}<a href="#" class="handle btn btn-default btn-xs"><i
|
||||
class="fa fa-fw fa-arrows-v"></i></a>{% endif %}<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>
|
||||
|
||||
{# icon #}
|
||||
<td class="hidden-xs">
|
||||
{{ transaction|transactionIcon }}
|
||||
</td>
|
||||
|
||||
{# description #}
|
||||
<td>
|
||||
{# is reconciled? #}
|
||||
{{ transaction|transaction$array[$direction][$transactionType] }}
|
||||
|
||||
<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 class="hidden-sm hidden-xs">
|
||||
{{ transaction.date.formatLocalized(monthAndDayFormat) }}
|
||||
</td>
|
||||
|
||||
<td class="hidden-xs hidden-sm hidden-md">
|
||||
{{ transaction|transactionSourceAccount }}
|
||||
</td>
|
||||
|
||||
<td class="hidden-xs hidden-sm hidden-md">
|
||||
{{ transaction|transactionDestinationAccount }}
|
||||
</td>
|
||||
|
||||
{% if not hideBudgets %}
|
||||
<td class="hidden-xs">
|
||||
{{ transaction|transactionBudgets }}
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{% if not hideCategories %}
|
||||
<td class="hidden-xs">
|
||||
{{ transaction|transactionCategories }}
|
||||
</td>
|
||||
{% endif %}
|
||||
{% if not hideBills %}
|
||||
<td class="hidden-xs">
|
||||
{% if transaction.bill_id %}
|
||||
<a href="{{ route('bills.show',transaction.bill_id) }}">{{ transaction.bill_name }}</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
<h1 style="color:red;">REPLACE ME</h1>
|
||||
@@ -1,91 +1 @@
|
||||
<tr class="drag" data-date="{{ transaction.date.format('Y-m-d') }}" data-id="{{ transaction.journal_id }}" data-transaction-id="{{ transaction.id }}">
|
||||
|
||||
{# select buttons #}
|
||||
<td class="hidden-xs select_boxes" style="display: none;">
|
||||
|
||||
<div class="select_single" style="display:none;">
|
||||
<input name="select_all_single[]" class="select_all_single" data-transaction="{{ transaction.id }}" value="{{ transaction.journal_id }}"
|
||||
type="checkbox"/>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
{# icon #}
|
||||
<td class="hidden-xs">
|
||||
{{ transaction|transactionIcon }}
|
||||
</td>
|
||||
|
||||
{# description #}
|
||||
<td>
|
||||
{# is reconciled? #}
|
||||
{{ transaction|transactionReconciled }}
|
||||
|
||||
<a href="{{ route('transactions.show',transaction.journal_id) }}">
|
||||
{{ transaction|transactionDescription }}
|
||||
</a>
|
||||
{# is a split journal #}
|
||||
{{ transaction|transactionIsSplit }}
|
||||
|
||||
{# count attachments #}
|
||||
{{ transaction|transactionHasAtt }}
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
{# amount #}
|
||||
<td style="text-align: right;"><span style="margin-right:5px;">{{ transaction|transactionAmount }}</span></td>
|
||||
|
||||
{# date #}
|
||||
<td class="hidden-sm hidden-xs">
|
||||
{{ transaction.date.formatLocalized(monthAndDayFormat) }}
|
||||
</td>
|
||||
|
||||
{# source #}
|
||||
<td class="hidden-xs hidden-sm hidden-md">
|
||||
{{ transaction|transactionSourceAccount }}
|
||||
</td>
|
||||
{# dest #}
|
||||
<td class="hidden-xs hidden-sm hidden-md">
|
||||
{{ transaction|transactionDestinationAccount }}
|
||||
</td>
|
||||
|
||||
{# budget, if opted to show. #}
|
||||
{% if showBudgets %}
|
||||
<td class="hidden-xs">
|
||||
{{ transaction|transactionBudgets }}
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{# category, if opted to show. #}
|
||||
{% if showCategories %}
|
||||
<td class="hidden-xs">
|
||||
{{ transaction|transactionCategories }}
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{# bill, if opted to show#}
|
||||
{% if showBill %}
|
||||
<td class="hidden-xs">
|
||||
{% if transaction.bill_id %}
|
||||
<a href="{{ route('bills.show',transaction.bill_id) }}">{{ transaction.bill_name }}</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
<td class="hidden-xs">
|
||||
<div class="btn-group btn-group-xs pull-right">
|
||||
{% if sorting %}<a href="#" class="handle btn btn-default"><i class="fa fa-fw fa-arrows-v"></i></a>{% endif %}
|
||||
|
||||
<div class="btn-group btn-group-xs">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
{{ 'actions'|_ }} <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu dropdown-menu-right" role="menu">
|
||||
<li><a href="{{ route('transactions.edit',transaction.journal_id) }}"><i class="fa fa-fw fa-pencil"></i> {{ 'edit'|_ }}</a></li>
|
||||
<li><a href="{{ route('transactions.delete',transaction.journal_id) }}"><i class="fa fa-fw fa-trash"></i> {{ 'delete'|_ }}</a></li>
|
||||
<li role="separator" class="divider"></li>
|
||||
<li><a href="{{ route('transactions.clone',transaction.journal_id) }}"><i class="fa fa-copy fa-fw"></i> {{ 'clone'|_ }}</a></li>
|
||||
<li><a href="{{ route('transactions.split.edit',transaction.journal_id) }}"><i class="fa fa-unsorted fa-fw"></i> {{ 'split'|_ }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<h1 style="color:red;">REPLACE ME</h1>
|
||||
@@ -1,87 +1,4 @@
|
||||
<table class="table table-hover table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th>{{ trans('list.description') }}</th>
|
||||
<th>{{ trans('list.amount') }}</th>
|
||||
<th class="hidden-sm hidden-xs">{{ trans('list.date') }}</th>
|
||||
{% if not hideSource %}
|
||||
<th class="hidden-xs">{{ trans('list.from') }}</th>
|
||||
{% endif %}
|
||||
{% if not hideDestination %}
|
||||
<th class="hidden-xs">{{ trans('list.to') }}</th>
|
||||
{% endif %}
|
||||
{# Hide budgets? #}
|
||||
{% if not hideBudget %}
|
||||
<th class="hidden-xs"><i class="fa fa-tasks fa-fw" title="{{ trans('list.budget') }}"></i></th>
|
||||
{% endif %}
|
||||
|
||||
{# Hide categories? #}
|
||||
{% if not hideCategory %}
|
||||
<th class="hidden-xs"><i class="fa fa-bar-chart fa-fw" title="{{ trans('list.category') }}"></i></th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{# Make sum: #}
|
||||
{% set sum = 0 %}
|
||||
{% for transaction in journals %}
|
||||
{# add to sum #}
|
||||
{% set sum = (sum + transaction.transaction_amount) %}
|
||||
<tr class="drag" data-date="{{ transaction.date.format('Y-m-d') }}" data-id="{{ transaction.journal_id }}">
|
||||
<td class="hidden-xs">
|
||||
{{ transaction|transactionIcon }}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ route('transactions.show',transaction.journal_id) }}">
|
||||
{{ transaction|transactionDescription }}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ transaction|transactionAmount }}
|
||||
</td>
|
||||
<td class="hidden-sm hidden-xs">
|
||||
{{ transaction.date.formatLocalized(monthAndDayFormat) }}
|
||||
</td>
|
||||
{% if not hideSource %}
|
||||
<td class="hidden-xs">
|
||||
{{ transaction|transactionSourceAccount }}
|
||||
</td>
|
||||
{% endif %}
|
||||
{% if not hideDestination %}
|
||||
<td class="hidden-xs">
|
||||
{{ transaction|transactionDestinationAccount }}
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{# Do NOT hide the budget? #}
|
||||
{% if not hideBudget %}
|
||||
<td class="hidden-xs">
|
||||
{{ transaction|transactionBudgets }}
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{# Do NOT hide the category? #}
|
||||
{% if not hideCategory %}
|
||||
<td class="hidden-xs">
|
||||
{{ transaction|transactionCategories }}
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2" style="text-align: right;"><em>{{ 'sum'|_ }}:</em></td>
|
||||
<td>
|
||||
{% if inverseAmount %}
|
||||
{{ (sum*-1)|formatAmount }}
|
||||
{% else %}
|
||||
{{ sum|formatAmount }}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
{{ journals.render|raw }}
|
||||
{#
|
||||
TODO REPLACE ME
|
||||
#}
|
||||
<h1 style="color:red;">REPLACE ME</h1>
|
||||
@@ -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>
|
||||
@@ -3,110 +3,5 @@
|
||||
{{ trans('firefly.search_found_transactions', {count: transactions.count, time: searchTime}) }}
|
||||
</p>
|
||||
|
||||
<table class="table table-hover table-condensed">
|
||||
<thead>
|
||||
<tr class="ignore">
|
||||
{# hidden row for checkboxes #}
|
||||
<th class="hidden-xs select_boxes" style="display: none;"><input name="select_all" class="select_all" type="checkbox"/></th>
|
||||
|
||||
{# header for icon #}
|
||||
<th class="hidden-xs"></th>
|
||||
<th>{{ trans('list.description') }}</th>
|
||||
<th style="text-align:right;">{{ trans('list.amount') }}</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>
|
||||
<th class="hidden-xs"><i class="fa fa-fw fa-calendar-o" title="{{ trans('list.bill') }}"></i></th>
|
||||
{# visible row for edit/delete buttons #}
|
||||
<th class="hidden-xs no_select_boxes"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for transaction in transactions %}
|
||||
<tr data-date="{{ transaction.date.format('Y-m-d') }}" data-id="{{ transaction.journal_id }}" data-transaction-id="{{ transaction.id }}">
|
||||
{# select buttons #}
|
||||
<td class="hidden-xs select_boxes" style="display: none;">
|
||||
|
||||
<div class="select_single" style="display:none;">
|
||||
<input name="select_all_single[]" class="select_all_single" data-transaction="{{ transaction.id }}" value="{{ transaction.journal_id }}"
|
||||
type="checkbox"/>
|
||||
</div>
|
||||
</td>
|
||||
{# icon #}
|
||||
<td class="hidden-xs">
|
||||
{{ transaction|transactionIcon }}
|
||||
</td>
|
||||
|
||||
{# description #}
|
||||
<td>
|
||||
{# is reconciled? #}
|
||||
{{ transaction|transactionReconciled }}
|
||||
|
||||
<a href="{{ route('transactions.show',transaction.journal_id) }}">
|
||||
{{ transaction|transactionDescription }}
|
||||
</a>
|
||||
{# is a split journal #}
|
||||
{{ transaction|transactionIsSplit }}
|
||||
|
||||
{# count attachments #}
|
||||
{{ transaction|transactionHasAtt }}
|
||||
|
||||
</td>
|
||||
|
||||
{# amount #}
|
||||
<td style="text-align: right;"><span style="margin-right:5px;">{{ transaction|transactionAmount }}</span></td>
|
||||
|
||||
{# date #}
|
||||
<td class="hidden-sm hidden-xs">
|
||||
{{ transaction.date.formatLocalized(monthAndDayFormat) }}
|
||||
</td>
|
||||
{# source #}
|
||||
<td class="hidden-xs hidden-sm hidden-md">
|
||||
{{ transaction|transactionSourceAccount }}
|
||||
</td>
|
||||
{# dest #}
|
||||
<td class="hidden-xs hidden-sm hidden-md">
|
||||
{{ transaction|transactionDestinationAccount }}
|
||||
</td>
|
||||
|
||||
{# budget, if opted to show. #}
|
||||
<td class="hidden-xs">
|
||||
{{ transaction|transactionBudgets }}
|
||||
</td>
|
||||
|
||||
{# category, if opted to show. #}
|
||||
<td class="hidden-xs">
|
||||
{{ transaction|transactionCategories }}
|
||||
</td>
|
||||
|
||||
{# bill, if opted to show#}
|
||||
<td class="hidden-xs">
|
||||
{% if transaction.bill_id %}
|
||||
<a href="{{ route('bills.show',transaction.bill_id) }}">{{ transaction.bill_name }}</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
<td class="hidden-xs">
|
||||
<div class="btn-group btn-group-xs pull-right">
|
||||
{% if sorting %}<a href="#" class="handle btn btn-default"><i class="fa fa-fw fa-arrows-v"></i></a>{% endif %}
|
||||
|
||||
<div class="btn-group btn-group-xs">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
{{ 'actions'|_ }} <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu dropdown-menu-right" role="menu">
|
||||
<li><a href="{{ route('transactions.edit',transaction.journal_id) }}"><i class="fa fa-fw fa-pencil"></i> {{ 'edit'|_ }}</a></li>
|
||||
<li><a href="{{ route('transactions.delete',transaction.journal_id) }}"><i class="fa fa-fw fa-trash"></i> {{ 'delete'|_ }}</a></li>
|
||||
<li role="separator" class="divider"></li>
|
||||
<li><a href="{{ route('transactions.clone',transaction.journal_id) }}"><i class="fa fa-copy fa-fw"></i> {{ 'clone'|_ }}</a></li>
|
||||
<li><a href="{{ route('transactions.split.edit',transaction.journal_id) }}"><i class="fa fa-unsorted fa-fw"></i> {{ 'split'|_ }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{# TODO REPLACE ME#}
|
||||
<h1 style="color:red;">REPLACE ME</h1>
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
{{ sourceAccount(journal)|raw }}
|
||||
</td>
|
||||
<td>
|
||||
{{ destinationAccount(journal)|raw }}
|
||||
{{ destinationXAccount(journal)|raw }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
@@ -6,158 +6,328 @@
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-md-6 col-sm-12">
|
||||
<div class="box">
|
||||
<div class="col-lg-6">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'transaction_journal_information'|_ }}</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<div class="btn-group">
|
||||
<button id="transaction_menu" class="btn btn-box-tool dropdown-toggle" data-toggle="dropdown"><i class="fa fa-ellipsis-v"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="edit"><i class="fa fa-pencil fa-fw"></i> {{ 'edit'|_ }}</a></li>
|
||||
<li><a href="delete"><i class="fa fa-trash fa-fw"></i> {{ 'delete'|_ }}</a></li>
|
||||
{# convert to withdrawal #}
|
||||
{% if journal.transactionType.type != "Withdrawal" %}
|
||||
<li>
|
||||
<a href="{{ route('transactions.convert.index', ['withdrawal', journal.id]) }}">
|
||||
<i class="fa fa-exchange fa-fw"></i> {{ ('convert_'~journal.transactionType.type~'_to_withdrawal')|_ }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{# convert to deposit #}
|
||||
{% if journal.transactionType.type != "Deposit" %}
|
||||
<li>
|
||||
<a href="{{ route('transactions.convert.index', ['deposit', journal.id]) }}">
|
||||
<i class="fa fa-exchange fa-fw"></i> {{ ('convert_'~journal.transactionType.type~'_to_deposit')|_ }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{# convert to transfer#}
|
||||
{% if journal.transactionType.type != "Transfer" %}
|
||||
<li>
|
||||
<a href="{{ route('transactions.convert.index', ['transfer', journal.id]) }}">
|
||||
<i class="fa fa-exchange fa-fw"></i> {{ ('convert_'~journal.transactionType.type~'_to_transfer')|_ }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{# other options #}
|
||||
<li>
|
||||
<a href="{{ route('transactions.clone', [journal.id]) }}">
|
||||
<i class="fa fa-copy fa-fw"></i> {{ ('clone_'~journal.transactionType.type|lower)|_ }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="split">
|
||||
<i class="fa fa-unsorted fa-fw"></i> {{ ('split_this_'~what)|_ }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" data-toggle="modal" data-target="#linkJournalModal"><i
|
||||
class="fa fa-fw fa-link"></i> {{ 'link_transaction'|_ }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="box-body no-padding">
|
||||
<table class="table table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ trans('list.type') }}</td>
|
||||
<td>{{ journal.transactiontype.type|_ }}</td>
|
||||
<td>{{ first.transactiontype.type|_ }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('list.description') }}</td>
|
||||
<td>
|
||||
{% if transactions[0].reconciled %}
|
||||
<i class="fa fa-check"></i>
|
||||
{% if splits == 1 %}
|
||||
{{ first.description }}
|
||||
{% else %}
|
||||
{{ transactionGroup.title }}
|
||||
{% endif %}
|
||||
|
||||
{{ journal.description }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ 'source_accounts'|_ }}</td>
|
||||
<td>sources</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ 'destination_accounts'|_ }}</td>
|
||||
<td>desitnations</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ 'total_amount'|_ }}</td>
|
||||
<td>
|
||||
total amount and splits
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:30%;">{{ trans('list.date') }}</td>
|
||||
<td>
|
||||
date
|
||||
{{ first.date.formatLocalized(dateTimeFormat) }}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<div class="pull-right">
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-default" href="#"><i class="fa fa-pencil fa-fw"></i> {{ 'edit'|_ }}</a>
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fa fa-cog fa-fw"></i> {{ 'options'|_ }} <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
|
||||
{# convert to withdrawal #}
|
||||
{% if journal.transactionType.type != "Withdrawal" %}
|
||||
<li>
|
||||
<a href="{{ route('transactions.convert.index', ['withdrawal', journal.id]) }}">
|
||||
<i class="fa fa-exchange fa-fw"></i> {{ ('convert_'~journal.transactionType.type~'_to_withdrawal')|_ }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{# convert to deposit #}
|
||||
{% if journal.transactionType.type != "Deposit" %}
|
||||
<li>
|
||||
<a href="{{ route('transactions.convert.index', ['deposit', journal.id]) }}">
|
||||
<i class="fa fa-exchange fa-fw"></i> {{ ('convert_'~journal.transactionType.type~'_to_deposit')|_ }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{# convert to transfer#}
|
||||
{% if journal.transactionType.type != "Transfer" %}
|
||||
<li>
|
||||
<a href="{{ route('transactions.convert.index', ['transfer', journal.id]) }}">
|
||||
<i class="fa fa-exchange fa-fw"></i> {{ ('convert_'~journal.transactionType.type~'_to_transfer')|_ }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{# other options #}
|
||||
<li>
|
||||
<a href="{{ route('transactions.clone', [journal.id]) }}">
|
||||
<i class="fa fa-copy fa-fw"></i> {{ ('clone_'~journal.transactionType.type|lower)|_ }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">
|
||||
<i class="fa fa-unsorted fa-fw"></i> {{ ('split_this_'~what)|_ }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" data-toggle="modal" data-target="#linkJournalModal"><i
|
||||
class="fa fa-fw fa-link"></i> {{ 'link_transaction'|_ }}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<a href="#" class="btn btn-danger"><i class="fa fa-trash fa-fw"></i> {{ 'delete'|_ }}
|
||||
</a>
|
||||
</div>
|
||||
<div class="btn-group btn-group-xs">
|
||||
<a href="#" class="btn btn-default"><i class="fa fa-pencil"></i> {{ 'edit'|_ }}</a>
|
||||
{% if type != 'Opening balance' and type != 'Reconciliation' %}
|
||||
<a href="#" class="btn btn-default"><i class="fa fa-copy"></i> {{ 'clone'|_ }}</a>
|
||||
{% if type != 'Withdrawal' %}
|
||||
<a href="#" class="btn btn-default"><i class="fa fa-exchange"></i> {{ 'convert_to_withdrawal'|_ }}</a>
|
||||
{% endif %}
|
||||
{% if type != 'Deposit' %}
|
||||
<a href="#" class="btn btn-default"><i class="fa fa-exchange"></i> {{ 'convert_to_deposit'|_ }}</a>
|
||||
{% endif %}
|
||||
{% if type != 'Transfer' %}
|
||||
<a href="#" class="btn btn-default"><i class="fa fa-exchange"></i> {{ 'convert_to_transfer'|_ }}</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<a href="#" class="btn btn-danger"><i class="fa fa-trash"></i> {{ 'delete'|_ }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'transaction_journal_meta'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body no-padding">
|
||||
<table class="table table-hover">
|
||||
<tbody>
|
||||
{% if type != 'Withdrawal' or splits == 1 %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ 'source_accounts'|_ }}
|
||||
</td>
|
||||
<td>
|
||||
{% for journal in groupArray.transactions %}
|
||||
<a href="{{ route('accounts.show',journal.source_id) }}"
|
||||
title="{{ journal.source_iban|default(journal.source_name) }}">
|
||||
{{ journal.source_name }}
|
||||
</a>
|
||||
{% if loop.index0 != groupArray.transactions|length -1 %}, {% endif %}
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
||||
{% if type != 'Deposit' or splits == 1 %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ 'destination_accounts'|_ }}
|
||||
|
||||
</td>
|
||||
<td>
|
||||
{% for journal in groupArray.transactions %}
|
||||
<a href="{{ route('accounts.show',journal.source_id) }}"
|
||||
title="{{ journal.destination_iban|default(journal.destination_name) }}">
|
||||
{{ journal.destination_name }}
|
||||
</a>
|
||||
{% if loop.index0 != groupArray.transactions|length -1 %}, {% endif %}
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr>
|
||||
<td style="width:30%;">{{ 'total_amount'|_ }}</td>
|
||||
<td>
|
||||
{% for amount in amounts %}
|
||||
{% if type == 'Withdrawal' %}
|
||||
{{ formatAmountBySymbol(amount.amount*-1,amount.symbol, amount.decimal_places) }}
|
||||
{% elseif type == 'Transfer' %}
|
||||
<span class="text-info">
|
||||
{{ formatAmountBySymbol(amount.amount,amount.symbol, amount.decimal_places, false) }}
|
||||
</span>
|
||||
{% else %}
|
||||
{{ formatAmountBySymbol(amount.amount,amount.symbol, amount.decimal_places) }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
</div>
|
||||
{% if splits > 1 %}
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h3>{{ 'splits'|_ }}</h3>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% set boxSize=12 %}
|
||||
{% if(splits == 2) %}
|
||||
{% set boxSize=6 %}
|
||||
{% endif %}
|
||||
{% if (splits > 2) %}
|
||||
{% set boxSize = 4 %}
|
||||
{% endif %}
|
||||
<div class="row">
|
||||
{% for index,journal in groupArray.transactions %}
|
||||
<div class="col-lg-{{ boxSize }}">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">
|
||||
{{ journal.description }}
|
||||
{% if journal.reconciled %}
|
||||
<i class="fa fa-check"></i>
|
||||
{% endif %}
|
||||
{% if splits > 1 %}
|
||||
<small>
|
||||
{{ index+1 }} / {{ splits }}
|
||||
</small>
|
||||
{% endif %}
|
||||
</h3>
|
||||
</div>
|
||||
<div class="box-body no-padding">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<a href="{{ route('accounts.show', journal.source_id) }}"
|
||||
title="{{ journal.source_iban|default(journal.source_name) }}">{{ journal.source_name }}</a> →
|
||||
{% if type == 'Withdrawal' %}
|
||||
{{ formatAmountBySymbol(journal.amount*-1, journal.currency_symbol, journal.currency_decimal_places) }}
|
||||
{% elseif type == 'Transfer' %}
|
||||
<span class="text-info">
|
||||
{{ formatAmountBySymbol(journal.amount, journal.currency_symbol, journal.currency_decimal_places, false) }}
|
||||
</span>
|
||||
{% else %}
|
||||
{{ formatAmountBySymbol(journal.amount, journal.currency_symbol, journal.currency_decimal_places) }}
|
||||
{% endif %}
|
||||
→
|
||||
<a href="{{ route('accounts.show', journal.destination_id) }}"
|
||||
title="{{ journal.destination_iban|default(journal.destination_name) }}">{{ journal.destination_name }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% if null != journal.category_id %}
|
||||
<tr>
|
||||
<td style="width:30%;">{{ 'category'|_ }}</td>
|
||||
<td><a href="{{ route('categories.show', [journal.category_id]) }}">{{ journal.category_name }}</a></td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if null != journal.budget_id and type == 'Withdrawal' %}
|
||||
<tr>
|
||||
<td>{{ 'budget'|_ }}</td>
|
||||
<td><a href="{{ route('budgets.show', [journal.budget_id]) }}">{{ journal.budget_name }}</a></td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if null != journal.bill_id and type == 'Withdrawal' %}
|
||||
<tr>
|
||||
<td>{{ 'bill'|_ }}</td>
|
||||
<td><a href="{{ route('bills.show', [journal.bill_id]) }}">{{ journal.bill_name }}</a></td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<!-- other fields -->
|
||||
{% for dateField in ['interest_date','book_date','process_date','due_date','payment_date','invoice_date'] %}
|
||||
{% if journalHasMeta(journal.transaction_journal_id, dateField) %}
|
||||
<tr>
|
||||
<td>{{ trans('list.'~dateField) }}</td>
|
||||
<td>{{ journalGetMetaDate(journal.transaction_journal_id, dateField).formatLocalized(monthAndDayFormat) }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% for metaField in ['external_id','bunq_payment_id','internal_reference','sepa_batch_id','sepa_ct_id','sepa_ct_op','sepa_db','sepa_country','sepa_cc','sepa_ep','sepa_ci'] %}
|
||||
{% if journalHasMeta(journal.transaction_journal_id, metaField) %}
|
||||
<tr>
|
||||
<td>{{ trans('list.'~metaField) }}</td>
|
||||
<td>{{ journalGetMetaField(journal.transaction_journal_id, metaField) }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if null != journal.notes and '' != journal.notes %}
|
||||
<tr>
|
||||
<td>{{ trans('list.notes') }}</td>
|
||||
<td class="markdown">{{ journal.notes|markdown }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if journal.tags|length > 0 %}
|
||||
<tr>
|
||||
<td>{{ 'tags'|_ }}</td>
|
||||
<td>
|
||||
{% for tag in journal.tags %}
|
||||
<h4 style="display: inline;"><a class="label label-success" href="{{ route('tags.show', tag) }}">
|
||||
<i class="fa fa-fw fa-tag"></i>
|
||||
{{ tag }}</a>
|
||||
</h4>
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if links[journal.transaction_journal_id]|length > 0 %}
|
||||
{% for link in links[journal.transaction_journal_id] %}
|
||||
<tr>
|
||||
<td colspan="2">{{ link.link }} "<a href="{{ route('transactions.show', link.group) }}" title="{{ link.description }}">{{ link.description }}</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h3>But wait, there's more!</h3>
|
||||
Transaction links, piggy bank events and attachments.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<!-- attachments -->
|
||||
{% if attachments|length > 0 %}
|
||||
<div class="col-lg-6">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'attachments'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body table-responsive no-padding">
|
||||
<table class="table table-hover">
|
||||
{% for attachment in attachments %}
|
||||
<tr>
|
||||
<td>
|
||||
<div class="btn-group btn-group-xs">
|
||||
<a href="{{ route('attachments.edit', attachment.id) }}" class="btn btn-default"><i class="fa fa-pencil"></i></a>
|
||||
<a href="{{ route('attachments.delete', attachment.id) }}" class="btn btn-danger"><i class="fa fa-trash"></i></a>
|
||||
{% if attachment.file_exists %}
|
||||
<a href="{{ route('attachments.download', attachment.id) }}" class="btn btn-default"><i
|
||||
class="fa fa-download"></i></a>
|
||||
{% endif %}
|
||||
{% if not attachment.file_exists %}
|
||||
<a href="#" class="btn btn-danger"><i class="fa fa-exclamation-triangle"></i></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
{% if attachment.file_exists %}
|
||||
<i class="fa {{ attachment.mime|mimeIcon }}"></i>
|
||||
<a href="{{ route('attachments.view', attachment.id) }}" title="{{ attachment.filename }}">
|
||||
{% if attachment.title %}
|
||||
{{ attachment.title }}
|
||||
{% else %}
|
||||
{{ attachment.filename }}
|
||||
{% endif %}
|
||||
</a>
|
||||
({{ attachment.size|filesize }})
|
||||
{% if null != attachment.notes and '' != attachment.notes %}
|
||||
{{ attachment.notes|markdown }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if not attachment.file_exists %}
|
||||
<i class="fa fa-fw fa-exclamation-triangle"></i>
|
||||
{% if attachment.title %}
|
||||
{{ attachment.title }}
|
||||
{% else %}
|
||||
{{ attachment.filename }}
|
||||
{% endif %}
|
||||
<br>
|
||||
<span class="text-danger">{{ 'attachment_not_found'|_ }}</span>
|
||||
{% endif %}
|
||||
{% if splits > 1 %}
|
||||
<small><em><br/>{{ trans('firefly.att_part_of_journal',{journal: attachment.journal_title}) }}
|
||||
</em></small>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<!-- link -->
|
||||
<div class="col-lg-4">
|
||||
|
||||
</div>
|
||||
|
||||
<!-- events -->
|
||||
<div class="col-lg-4">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
{% endblock %}
|
||||
|
||||
{#
|
||||
|
||||
|
||||
{% if journal.piggyBankEvents|length > 0 %}
|
||||
<div class="box">
|
||||
@@ -172,71 +342,7 @@
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-12">
|
||||
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'transaction_journal_meta'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body table-responsive no-padding">
|
||||
<table class="table table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ 'categories'|_ }}</td>
|
||||
<td>categoris</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ 'budgets'|_ }}</td>
|
||||
<td>budgets</td>
|
||||
</tr>
|
||||
|
||||
{# all date meta values #}
|
||||
{% for dateField in ['interest_date','book_date','process_date','due_date','payment_date','invoice_date'] %}
|
||||
{#
|
||||
{% if journalHasMeta(journal, dateField) %}
|
||||
<tr>
|
||||
<td>{{ trans('list.'~dateField) }}</td>
|
||||
<td>{{ journalGetMetaDate(journal,dateField).formatLocalized(monthAndDayFormat) }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
#}
|
||||
{% endfor %}
|
||||
{# all other meta values #}
|
||||
{% for metaField in ['external_id','bunq_payment_id','internal_reference','sepa_batch_id','sepa_ct_id','sepa_ct_op','sepa_db','sepa_country','sepa_cc','sepa_ep','sepa_ci'] %}
|
||||
{#
|
||||
{% if journalHasMeta(journal, metaField) %}
|
||||
<tr>
|
||||
<td>{{ trans('list.'~metaField) }}</td>
|
||||
<td>{{ journalGetMetaField(journal, metaField) }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
#}
|
||||
{% endfor %}
|
||||
{% if journal.notes.count == 1 %}
|
||||
<tr>
|
||||
<td>{{ trans('list.notes') }}</td>
|
||||
<td class="markdown">{{ journal.notes.first.text|markdown }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
||||
{% if journal.bill_id %}
|
||||
<tr>
|
||||
<td>{{ 'bill'|_ }}</td>
|
||||
<td><a href="{{ route('bills.show', journal.bill_id) }}">{{ journal.bill.name }}</a></td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if journal.tags|length > 0 %}
|
||||
<tr>
|
||||
<td>{{ 'tags'|_ }}</td>
|
||||
<td>
|
||||
{% for tag in journal.tags %}
|
||||
|
||||
<h4 style="display: inline;"><a class="label label-success" href="{{ route('tags.show',tag) }}">
|
||||
<i class="fa fa-fw fa-tag"></i>
|
||||
{{ tag.tag }}</a>
|
||||
</h4>
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -294,7 +400,6 @@
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{# show links: #}
|
||||
{% if links.count > 0 %}
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
@@ -364,7 +469,6 @@
|
||||
{% set maxIdentifier = ((transactions|length) / 2) -1 %}
|
||||
{% for x in 0..maxIdentifier %}
|
||||
<tr>
|
||||
{# loop each transaction in the array.#}
|
||||
{% for transaction in transactions %}
|
||||
{% if
|
||||
((transaction.type == 'Withdrawal') and transaction.identifier == x and transaction.amount < 0)
|
||||
@@ -393,7 +497,7 @@
|
||||
|
||||
</td>
|
||||
<td>
|
||||
{{ transaction|transactionArrayAmount }}
|
||||
{{ transaction|transactionXArrayAmount }}
|
||||
</td>
|
||||
<td class="hidden-md hidden-xs">
|
||||
{% if transaction.budget_id %}
|
||||
@@ -419,7 +523,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# link journal modal:#}
|
||||
<div class="modal fade" tabindex="-1" role="dialog" id="linkJournalModal">
|
||||
<form action="{{ route('transactions.link.store', [journal.id]) }}" method="post" class="form-horizontal">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
||||
@@ -468,12 +571,4 @@
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script type="text/javascript">
|
||||
var autoCompleteUri = "{{ route('json.journals-with-id',[journal.id]) }}";
|
||||
</script>
|
||||
<script type="text/javascript" src="v1/js/lib/typeahead/typeahead.bundle.min.js?v={{ FF_VERSION }}"></script>
|
||||
<script type="text/javascript" src="v1/js/ff/transactions/show.js?v={{ FF_VERSION }}"></script>
|
||||
{% endblock %}
|
||||
#}
|
||||
|
||||
Reference in New Issue
Block a user