Move v1 views

This commit is contained in:
James Cole
2022-01-29 14:15:34 +01:00
parent a12fd4a3ae
commit 6da6a68e33
251 changed files with 17989 additions and 0 deletions

View File

@@ -0,0 +1,121 @@
<div style="padding-left:8px;">
{{ accounts.links('pagination.bootstrap-4')|raw }}
</div>
<table class="table table-responsive table-hover" id="sortable-table">
<thead>
<tr>
<th class="hidden-sm hidden-xs">&nbsp;</th>
<th>{{ trans('list.name') }}</th>
{% if objectType == 'asset' %}
<th class="hidden-sm hidden-xs hidden-md">{{ trans('list.role') }}</th>
{% endif %}
{% if objectType == 'liabilities' %}
<th>{{ trans('list.liability_type') }}</th>
<th>{{ trans('form.liability_direction') }}</th>
<th>{{ trans('list.interest') }} ({{ trans('list.interest_period') }})</th>
{% endif %}
<th class="hidden-sm hidden-xs">{{ trans('form.account_number') }}</th>
<th style="text-align: right;">{{ trans('list.currentBalance') }}</th>
{% if objectType == 'liabilities' %}
<th style="text-align: right;">
{{ trans('firefly.left_in_debt') }}
</th>
{% endif %}
<th class="hidden-sm hidden-xs">{{ trans('list.active') }}</th>
{# hide last activity to make room for other stuff #}
{% if objectType != 'liabilities' %}
<th class="hidden-sm hidden-xs hidden-md">{{ trans('list.lastActivity') }}</th>
{% endif %}
<th style="width:15%;"
class="hidden-sm hidden-xs hidden-md">{{ trans('list.balanceDiff') }}</th>
<th class="hidden-sm hidden-xs">&nbsp;</th>
</tr>
</thead>
<tbody>
{% for account in accounts %}
<tr class="sortable-object" data-id="{{ account.id }}" data-order="{{ account.order }}" data-position="{{ loop.index0 }}">
<td class="hidden-sm hidden-xs">
<span class="fa fa-fw fa-bars object-handle"></span>
</td>
<td>
<a href="{{ route('accounts.show',account.id) }}">{{ account.name }}</a>
{% if account.location %}
<span class="fa fa-fw fa-map-marker"></span>
{% endif %}
{% if account.attachments.count() > 0 %}
<span class="fa fa-fw fa-paperclip"></span>
{% endif %}
</td>
{% if objectType == "asset" %}
<td class="hidden-sm hidden-xs hidden-md">
{% for entry in account.accountmeta %}
{% if entry.name == 'account_role' %}
{{ ('account_role_'~entry.data)|_ }}
{% endif %}
{% endfor %}
</td>
{% endif %}
{% if objectType == 'liabilities' %}
<td>{{ account.accountTypeString }}</td>
<td>{{ trans('firefly.liability_direction_'~account.liability_direction~'_short') }}</td>
<td>{{ account.interest }}% ({{ account.interestPeriod|lower }})</td>
{% endif %}
<td class="hidden-sm hidden-xs">{{ account.iban }}{% if account.iban == '' %}{{ accountGetMetaField(account, 'account_number') }}{% endif %}</td>
<td style="text-align: right;">
<span style="margin-right:5px;">
{{ formatAmountByAccount(account, account.endBalance) }}
</span>
</td>
{% if objectType == 'liabilities' %}
<td style="text-align: right;">
{% if '-' != account.current_debt %}
<span class="text-info">{{ formatAmountByAccount(account, account.current_debt, false) }}</span>
{% endif %}
</td>
{% endif %}
<td class="hidden-sm hidden-xs">
{% if account.active %}
<span class="fa fa-fw fa-check"></span>
{% else %}
<span class="fa fa-fw fa-ban"></span>
{% endif %}
</td>
{# hide last activity to make room for other stuff #}
{% if objectType != 'liabilities' %}
{% if account.lastActivityDate %}
<td class="hidden-sm hidden-xs hidden-md">
<!-- {{ account.lastActivityDate }} -->
{{ account.lastActivityDate.formatLocalized(monthAndDayFormat) }}
</td>
{% else %}
<td class="hidden-sm hidden-xs hidden-md">
<em>{{ 'never'|_ }}</em>
</td>
{% endif %}
{% endif %}
<td class="hidden-sm hidden-xs hidden-md" style="text-align: right;">
<span style="margin-right:5px;">
{{ formatAmountByAccount(account, account.difference) }}
</span>
</td>
<td class="hidden-sm hidden-xs">
<div class="btn-group btn-group-xs pull-right">
<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('accounts.edit',account.id) }}"><span class="fa fa-fw fa-pencil"></span> {{ 'edit'|_ }}</a></li>
<li><a href="{{ route('accounts.delete',account.id) }}"><span class="fa fa-fw fa-trash"></span> {{ 'delete'|_ }}</a></li>
{% if objectType == 'asset' %}
<li><a href="{{ route('accounts.reconcile',account.id) }}"><span class="fa fa-fw fa-check"></span> {{ 'reconcile_this_account'|_ }}</a></li>
{% endif %}
</ul>
</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<div style="padding-left:8px;">
{{ accounts.links('pagination.bootstrap-4')|raw }}
</div>

View File

@@ -0,0 +1,47 @@
<table class="table table-responsive table-hover">
{% for attachment in attachments %}
<tr>
<td style="width:120px;">
<div class="btn-group btn-group-xs">
<a href="{{ route('attachments.edit', attachment.id) }}" class="btn btn-default"><span
class="fa fa-pencil"></span></a>
<a href="{{ route('attachments.delete', attachment.id) }}" class="btn btn-danger"><span
class="fa fa-trash"></span></a>
{% if attachment.file_exists %}
<a href="{{ route('attachments.download', attachment.id) }}" class="btn btn-default"><span
class="fa fa-download"></span></a>
{% endif %}
{% if not attachment.file_exists %}
<a href="#" class="btn btn-danger"><span class="fa fa-exclamation-triangle"></span></a>
{% endif %}
</div>
</td>
<td>
{% if attachment.file_exists %}
<span class="fa {{ attachment.mime|mimeIcon }}"></span>
<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_text and '' != attachment.notes_text %}
{{ attachment.notes_text|default('')|markdown }}
{% endif %}
{% endif %}
{% if not attachment.file_exists %}
<span class="fa fa-fw fa-exclamation-triangle"></span>
{% if attachment.title %}
{{ attachment.title }}
{% else %}
{{ attachment.filename }}
{% endif %}
<br>
<span class="text-danger">{{ 'attachment_not_found'|_ }}</span>
{% endif %}
</td>
</tr>
{% endfor %}
</table>

View File

@@ -0,0 +1,210 @@
<div style="padding-left:8px;">
{{ paginator.links('pagination.bootstrap-4')|raw }}
</div>
<table class="table table-responsive table-hover" id="bill-sortable">
<thead>
<tr>
<th class="hidden-sm hidden-xs">&nbsp;</th>
<th class="hidden-sm hidden-xs">&nbsp;</th>
<th>{{ trans('list.name') }}</th>
<th class="hidden-sm hidden-md hidden-xs">{{ trans('list.linked_to_rules') }}</th>
<th style="text-align: right;">{{ trans('list.matchingAmount') }}</th>
<th class="hidden-sm hidden-xs">{{ trans('list.paid_current_period') }}</th>
<th class="hidden-sm hidden-xs">{{ trans('list.next_expected_match') }}</th>
<th class="hidden-sm hidden-xs">{{ trans('list.repeat_freq') }}</th>
</tr>
</thead>
{% for objectGroupOrder, objectGroup in bills %}
{% if objectGroup.bills|length > 0 %}
<tbody class="bill-connected-list" {% if objectGroupOrder != 0 %}data-title="{{ objectGroup.object_group_title }}" {% else %}data-title=""{% endif %}>
<tr>
<td class="hidden-sm hidden-xs">&nbsp;</td>
<td class="hidden-sm hidden-xs">&nbsp;</td>
<td colspan="6"><small>{{ objectGroup.object_group_title }}</small></td>
</tr>
{% for entry in objectGroup.bills %}
<tr class="bill-sortable" data-id="{{ entry.id }}" data-name="{{ entry.name }}" data-order="{{ entry.order }}" data-position="{{ loop.index0 }}">
<td class="hidden-sm hidden-xs">
<span class="fa fa-fw fa-bars bill-handle"></span>
</td>
<td class="hidden-sm hidden-xs">
<div class="btn-group btn-group-xs edit_tr_buttons"><a href="{{ route('bills.edit',entry.id) }}" class="btn btn-default btn-xs"><span
class="fa fa-fw fa-pencil"></span></a><a href="{{ route('bills.delete',entry.id) }}" class="btn btn-danger btn-xs"><span
class="fa fa-fw fa-trash-o"></span></a></div>
</td>
<td>
{% if not entry.active %}
<span class="fa fa-fw fa-ban"></span>
{% endif %}
<a href="{{ route('bills.show',entry.id) }}" title="{{ entry.name }}">{{ entry.name }}</a>
{# count attachments #}
{% if entry.attachments.count() > 0 %}
<span class="fa fa-paperclip"></span>
{% endif %}
</td>
<td class="hidden-sm hidden-md hidden-xs rules">
{% if entry.rules|length > 0 %}
<ul class="list-unstyled">
{% for rule in entry.rules %}
<li>
<a href="{{ route('rules.edit', [rule.id]) }}">
{{ rule.title }}
</a>
{% if not rule.active %}({{ 'list_inactive_rule'|_|lower }}){% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
</td>
<td style="text-align: right;">
<span style="margin-right:5px;"
title="{{ formatAmountBySymbol(entry.amount_min, entry.currency_symbol, entry.currency_decimal_places, false)|escape }} -- {{ formatAmountBySymbol(entry.amount_max, entry.currency_symbol, entry.currency_decimal_places, false)|escape }}"
>
~ {{ formatAmountBySymbol((entry.amount_max + entry.amount_min)/2, entry.currency_symbol, entry.currency_decimal_places) }}
</span>
</td>
{#
paidDates = 0 (bill not paid in period)
pay_dates = 0 (bill not expected to be paid in this period)
bill is active.
#}
{% if entry.paid_dates|length == 0 and entry.pay_dates|length == 0 and entry.active %}
<td class="paid_in_period text-muted">
{{ trans('firefly.not_expected_period') }}
</td>
<td class="expected_in_period hidden-sm hidden-xs">
{{ formatDate(entry.next_expected_match, monthAndDayFormat) }}
</td>
{% endif %}
{#
paid_dates = 0 (bill not paid in period)
pay_dates > 0 (bill IS expected to be paid in this period)
bill is active
first pay date is in the past.
#}
{% if entry.paid_dates|length == 0 and entry.pay_dates|length > 0 and entry.active %}
<td class="paid_in_period text-warning">
{{ trans('firefly.bill_expected_date', {date: entry.next_expected_match_diff }) }}
</td>
<td class="expected_in_period hidden-sm hidden-xs">
{% for date in entry.pay_dates %}
{{ formatDate(date, monthAndDayFormat) }}<br>
{% endfor %}
</td>
{% endif %}
{#
paid_dates >= 0 (bill is paid X times).
Don't care about pay_dates.
#}
{% if entry.paid_dates|length > 0 and entry.active %}
<td class="paid_in_period text-success">
{% for currentPaid in entry.paid_dates %}
<a href="{{ route('transactions.show',currentPaid.transaction_group_id) }}">
{{ formatDate(currentPaid.date, monthAndDayFormat) }}
</a>
<br/>
{% endfor %}
</td>
<td class="expected_in_period hidden-sm hidden-xs">
{{ formatDate(entry.next_expected_match, monthAndDayFormat) }}
</td>
{% endif %}
{# bill is not active #}
{% if not entry.active %}
<td class="paid_in_period text-muted">
~
</td>
<td class="expected_in_period text-muted hidden-sm hidden-xs">~</td>
{% endif %}
<td class="hidden-sm hidden-xs">
{{ ('repeat_freq_'~entry.repeat_freq)|_ }}
{% if entry.skip > 0 %}
{{ 'skips_over'|_ }} {{ entry.skip }}
{% endif %}
</td>
</tr>
{% endfor %}
{% for sum in sums[objectGroupOrder] %}
{% if '0' != sum.avg %}
<tr>
<td class="hidden-sm hidden-xs">&nbsp;</td> <!-- handle -->
<td class="hidden-sm hidden-xs">&nbsp;</td> <!-- buttons -->
<td colspan="2" style="text-align: right;"> <!-- title -->
<small>{{ 'sum'|_ }} ({{ sum.currency_name }}) ({{ 'active_exp_bills_only'|_ }})</small>
</td>
<td style="text-align: right;"> <!-- amount -->
{{ formatAmountBySymbol(sum.avg, sum.currency_symbol, sum.currency_decimal_places) }}
</td>
<td>&nbsp;</td> <!-- paid in period -->
<td class="hidden-sm hidden-xs">&nbsp;</td> <!-- next expected match -->
<td class="hidden-sm hidden-xs">&nbsp;</td><!-- repeats -->
</tr>
{% endif %}
{% if '0' != sum.per_period %}
<tr>
<td class="hidden-sm hidden-xs">&nbsp;</td> <!-- handle -->
<td class="hidden-sm hidden-xs">&nbsp;</td> <!-- buttons -->
<td colspan="2" style="text-align: right;"> <!-- title -->
<small>{{ ('per_period_sum_'~sum.period)|_ }} ({{ sum.currency_name }}) ({{ 'active_bills_only'|_ }})</small>
</td>
<td style="text-align: right;"> <!-- amount -->
{{ formatAmountBySymbol(sum.per_period, sum.currency_symbol, sum.currency_decimal_places) }}
</td>
<td>&nbsp;</td> <!-- paid in period -->
<td class="hidden-sm hidden-xs">&nbsp;</td> <!-- next expected match -->
<td class="hidden-sm hidden-xs">&nbsp;</td><!-- repeats -->
</tr>
{% endif %}
{% endfor %}
</tbody>
{% endif %}
{% endfor %}
{% if totals|length > 0 %}
<tfoot>
<tr>
<td colspan="8" style="border-top:1px #777 solid;"></td>
</tr>
{% for sum in totals %}
{% if '0' != sum.avg %}
<tr>
<td class="hidden-sm hidden-xs">&nbsp;</td> <!-- handle -->
<td class="hidden-sm hidden-xs">&nbsp;</td> <!-- buttons -->
<td colspan="2" style="text-align: right;"> <!-- title -->
<small>{{ 'sum'|_ }} ({{ sum.currency_name }}) ({{ 'active_exp_bills_only_total'|_ }})</small>
</td>
<td style="text-align: right;"> <!-- amount -->
{{ formatAmountBySymbol(sum.avg, sum.currency_symbol, sum.currency_decimal_places) }}
</td>
<td>&nbsp;</td> <!-- paid in period -->
<td class="hidden-sm hidden-xs">&nbsp;</td> <!-- next expected match -->
<td class="hidden-sm hidden-xs">&nbsp;</td><!-- repeats -->
</tr>
{% endif %}
{% if '0' != sum.per_period %}
<tr>
<td class="hidden-sm hidden-xs">&nbsp;</td> <!-- handle -->
<td class="hidden-sm hidden-xs">&nbsp;</td> <!-- buttons -->
<td colspan="2" style="text-align: right;"> <!-- title -->
<small>{{ ('per_period_sum_'~sum.period)|_ }} ({{ sum.currency_name }}) ({{ 'active_bills_only_total'|_ }})</small>
</td>
<td style="text-align: right;"> <!-- amount -->
{{ formatAmountBySymbol(sum.per_period, sum.currency_symbol, sum.currency_decimal_places) }}
</td>
<td>&nbsp;</td> <!-- paid in period -->
<td class="hidden-sm hidden-xs">&nbsp;</td> <!-- next expected match -->
<td class="hidden-sm hidden-xs">&nbsp;</td><!-- repeats -->
</tr>
{% endif %}
{% endfor %}
</tfoot>
{% endif %}
</table>
<div style="padding-left:8px;">
{{ paginator.links('pagination.bootstrap-4')|raw }}
</div>

View File

@@ -0,0 +1,47 @@
<div style="padding-left:8px;">
{{ categories.links('pagination.bootstrap-4')|raw }}
</div>
<table class="table table-hover sortable">
<thead>
<tr>
<th data-defaultsort="disabled">&nbsp;</th>
<th data-defaultsign="az">{{ trans('list.name') }}</th>
<th data-defaultsign="month" class="hidden-sm hidden-xs">{{ trans('list.lastActivity') }}</th>
</tr>
</thead>
<tbody>
<tr>
<td>&nbsp;</td>
<td><a href="{{ route('categories.no-category') }}"><em>{{ 'without_category'|_ }}</em></a></td>
<td class="hidden-sm hidden-xs">&nbsp;</td>
</tr>
{% for category in categories %}
<tr>
<td>
<div class="btn-group btn-group-xs">
<a href="{{ route('categories.edit', category.id) }}" class="btn btn-default btn-xs"><span class="fa fa-fw fa-pencil"></span></a>
<a href="{{ route('categories.delete', category.id) }}" class="btn btn-danger btn-xs"><span class="fa fa-fw fa-trash-o"></span></a>
</div>
</td>
<td data-value="{{ category.name }}">
<a href="{{ route('categories.show', category.id) }}" title="{{ category.name }}">{{ category.name }}</a>
{% if category.attachments.count() > 0 %}
<span class="fa fa-fw fa-paperclip"></span>
{% endif %}
</td>
{% if category.lastActivity %}
<td class="hidden-sm hidden-xs" data-value="{{ category.lastActivity.format('Y-m-d H-i-s') }}">
{{ category.lastActivity.formatLocalized(monthAndDayFormat) }}
</td>
{% else %}
<td class="hidden-sm hidden-xs" data-value="0000-00-00 00-00-00">
<em>{{ 'never'|_ }}</em>
</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
<div style="padding-left:8px;">
{{ categories.links('pagination.bootstrap-4')|raw }}
</div>

View File

@@ -0,0 +1,65 @@
<div class="list-group">
{% for transaction in transactions %}
<a class="list-group-item" href="{{ route('transactions.show', [transaction.transaction_group_id]) }}">
{% if transaction.transaction_group_title %}
{{ transaction.transaction_group_title }}:
{% endif %}
{{ transaction.description }}
<span class="pull-right small">
{% if transaction.transaction_type_type == 'Deposit' %}
{{ formatAmountBySymbol(transaction.amount*-1, transaction.currency_symbol, transaction.currency_decimal_places) }}
{% if null != transaction.foreign_amount %}
({{ formatAmountBySymbol(transaction.foreign_amount*-1, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places) }})
{% endif %}
{% elseif transaction.transaction_type_type == 'Transfer' %}
<span class="text-info">
{# transfer away: #}
{% if transaction.source_account_id == account.id %}
{{ formatAmountBySymbol(transaction.amount, transaction.currency_symbol, transaction.currency_decimal_places, false) }}
{% if null != transaction.foreign_amount %}
({{ formatAmountBySymbol(transaction.foreign_amount, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places, false) }})
{% endif %}
{% else %}
{{ formatAmountBySymbol(transaction.amount*-1, transaction.currency_symbol, transaction.currency_decimal_places, false) }}
{% if null != transaction.foreign_amount %}
({{ formatAmountBySymbol(transaction.foreign_amount*-1, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places, false) }})
{% endif %}
{% endif %}
{# transfer to #}
</span>
{% elseif transaction.transaction_type_type == 'Opening balance' %}
{% if transaction.source_account_type == 'Initial balance account' %}
{{ formatAmountBySymbol(transaction.amount*-1, transaction.currency_symbol, transaction.currency_decimal_places) }}
{% if null != transaction.foreign_amount %}
({{ formatAmountBySymbol(transaction.foreign_amount*-1, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places) }})
{% endif %}
{% else %}
{{ formatAmountBySymbol(transaction.amount, transaction.currency_symbol, transaction.currency_decimal_places) }}
{% if null != transaction.foreign_amount %}
({{ formatAmountBySymbol(transaction.foreign_amount, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places) }})
{% endif %}
{% endif %}
{% elseif transaction.transaction_type_type == 'Reconciliation' %}
{% if transaction.source_account_type == 'Reconciliation account' %}
{{ formatAmountBySymbol(transaction.amount*-1, transaction.currency_symbol, transaction.currency_decimal_places) }}
{% if null != transaction.foreign_amount %}
({{ formatAmountBySymbol(transaction.foreign_amount*-1, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places) }})
{% endif %}
{% else %}
{{ formatAmountBySymbol(transaction.amount, transaction.currency_symbol, transaction.currency_decimal_places) }}
{% if null != transaction.foreign_amount %}
({{ formatAmountBySymbol(transaction.foreign_amount, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places) }})
{% endif %}
{% endif %}
{% else %}
{{ formatAmountBySymbol(transaction.amount, transaction.currency_symbol, transaction.currency_decimal_places) }}
{% if null != transaction.foreign_amount %}
({{ formatAmountBySymbol(transaction.foreign_amount, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places) }})
{% endif %}
{% endif %}
</span>
</a>
{% endfor %}
</div>

View File

@@ -0,0 +1,314 @@
<table class="table table-condensed table-hover table-responsive table-sortable">
<thead>
<tr>
{% if showCategory or showBudget %}
<td colspan="7" class="no-margin-pagination">{{ groups.links('pagination.bootstrap-4')|raw }}</td>
{% else %}
<td colspan="6" class="no-margin-pagination">{{ groups.links('pagination.bootstrap-4')|raw }}</td>
{% endif %}
<td colspan="1" class="hidden-xs">
<!-- Single button -->
<div class="btn-group btn-group-xs action-menu pull-right" style="display: none;">
<button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
{{ 'actions'|_ }} <span class="caret"></span>
</button>
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="#" class="mass-edit"><span class="fa fa-fw fa-pencil"></span>
<span class="txt">{{ 'mass_edit'|_ }}</span></a></li>
<li><a href="#" class="bulk-edit"><span class="fa fa-fw fa-pencil-square-o"></span>
<span class="txt">{{ 'bulk_edit'|_ }}</span></a></li>
<li><a href="#" class="mass-delete"><span class="fa fa-fw fa-trash"></span>
<span class="txt">{{ 'mass_delete'|_ }}</span></a></li>
</ul>
</div>
</td>
<td colspan="1" class="hidden-xs">
<div class="pull-right">
<input id="list_ALL" value="1" name="select-all" type="checkbox" class="select-all form-check-inline"/>
</div>
</td>
</tr>
<tr>
<th class="hidden-xs">&nbsp;</th>
<th>{{ trans('list.description') }}</th>
<th>{{ trans('list.amount') }}</th>
<th class="hidden-xs">{{ trans('list.date') }}</th>
<th>{{ trans('list.source_account') }}</th>
<th>{{ trans('list.destination_account') }}</th>
{% if showCategory %}
<th class="hidden-xs">{{ trans('list.category') }}</th>
{% endif %}
{% if showBudget %}
<th class="hidden-xs">{{ trans('list.budget') }}</th>
{% endif %}
<th class="hidden-xs">&nbsp;</th><!-- actions -->
<th class="hidden-xs">&nbsp;</th><!-- checkbox -->
</tr>
</thead>
<tbody>
{% for group in groups %}
{% if group.count > 1 %}
<tr style="border-top:1px #aaa solid;" class="unsortable">
<td colspan="2" style="border-top:1px #aaa solid;">
<small><strong>
<a href="{{ route('transactions.show', [group.id]) }}"
title="{{ group.title }}">{{ group.title }}</a>
</strong></small>
</td>
<td colspan="2" style="border-top:1px #aaa solid;">
{% for sum in group.sums %}
{% if group.transaction_type == 'Deposit' %}
{{ formatAmountBySymbol(sum.amount*-1, sum.currency_symbol, sum.currency_decimal_places) }}{% if loop.index != group.sums|length %},{% endif %}
{% elseif group.transaction_type == 'Transfer' %}
<span class="text-info">
{{ formatAmountBySymbol(sum.amount*-1, sum.currency_symbol, sum.currency_decimal_places, false) }}{% if loop.index != group.sums|length %},{% endif %}X
</span>
{% else %}
{{ formatAmountBySymbol(sum.amount, sum.currency_symbol, sum.currency_decimal_places) }}{% if loop.index != group.sums|length %},{% endif %}
{% endif %}
{% endfor %}
</td>
<!-- column to span accounts + extra fields -->
{% if showCategory or showBudget %}
<td style="border-top:1px #aaa solid;" colspan="3">&nbsp;</td>
{% else %}
<td style="border-top:1px #aaa solid;" colspan="2">&nbsp;</td>
{% endif %}
<td style="border-top:1px #aaa solid;" class="hidden-xs">
<div class="btn-group btn-group-xs pull-right">
<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', [group.id]) }}"><span
class="fa fa-fw fa-pencil"></span> {{ 'edit'|_ }}</a></li>
<li><a href="{{ route('transactions.delete', [group.id]) }}"><span
class="fa fa-fw fa-trash"></span> {{ 'delete'|_ }}</a></li>
<li><a href="#" data-id="{{ group.id }}" class="clone-transaction"><span
class="fa fa-copy fa-fw"></span> {{ 'clone'|_ }}</a></li>
</ul>
</div>
</td>
<td style="border-top:1px #aaa solid;" class="hidden-xs">&nbsp;</td>
</tr>
{% endif %}
{% for index, transaction in group.transactions %}
{% set style="" %}
{% if group.transactions|length == loop.index and group.count > 1 %}
{% set style="border-bottom:1px #aaa solid;" %}
{% endif %}
<tr data-date="{{ transaction.date.format('Y-m-d') }}" data-count="{{ group.count }}" data-id="{{ group.id }}">
<td style=" {{ style|raw }}" class="hidden-xs">
{% if transaction.transaction_type_type == 'Withdrawal' %}
<span class="object-handle fa fa-long-arrow-left fa-fw" title="{{ trans('firefly.Withdrawal') }}"></span>
{% endif %}
{% if transaction.transaction_type_type == 'Deposit' %}
<span class="object-handle fa fa-long-arrow-right fa-fw" title="{{ trans('firefly.Deposit') }}"></span>
{% endif %}
{% if transaction.transaction_type_type == 'Transfer' %}
<span class="object-handle fa fa-exchange fa-fw" title="{{ trans('firefly.Transfer') }}"></span>
{% endif %}
{% if transaction.transaction_type_type == 'Reconciliation' %}
<span class="object-handle fa-fw fa fa-calculator" title="{{ trans('firefly.reconciliation_transaction') }}"></span>
{% endif %}
{% if transaction.transaction_type_type == 'Opening balance' %}
<span class="object-handle fa-fw fa fa-star-o" title="{{ trans('firefly.Opening balance') }}"></span>
{% endif %}
{% if transaction.transaction_type_type == 'Liability credit' %}
<span class="object-handle fa-fw fa fa-star-o" title="{{ trans('firefly.Liability credit') }}"></span>
{% endif %}
</td>
<td style=" {{ style|raw }}">
{% if transaction.reconciled %}
<span class="fa fa-check"></span>
{% endif %}
{% if transaction.attachments|length > 0 %}
<span class="fa fa-paperclip"></span>
{% endif %}
{% if group.count == 1 %}
<a href="{{ route('transactions.show', [group.id]) }}" title="{{ transaction.description }}">
{% endif %}
{{ transaction.description }}
{% if group.count == 1 %}
</a>
{% endif %}
</td>
<td style=" {{ style|raw }}">
{# deposit #}
{% if transaction.transaction_type_type == 'Deposit' %}
{{ formatAmountBySymbol(transaction.amount*-1, transaction.currency_symbol, transaction.currency_decimal_places) }}
{% if null != transaction.foreign_amount %}
({{ formatAmountBySymbol(transaction.foreign_amount*-1, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places) }})
{% endif %}
{# transfer #}
{% elseif transaction.transaction_type_type == 'Transfer' %}
<span class="text-info">
{{ formatAmountBySymbol(transaction.amount*-1, transaction.currency_symbol, transaction.currency_decimal_places, false) }}
{% if null != transaction.foreign_amount %}
({{ formatAmountBySymbol(transaction.foreign_amount*-1, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places, false) }})
{% endif %}
</span>
{# opening balance #}
{% elseif transaction.transaction_type_type == 'Opening balance' %}
{% if transaction.source_account_type == 'Initial balance account' %}
{{ formatAmountBySymbol(transaction.amount*-1, transaction.currency_symbol, transaction.currency_decimal_places) }}
{% if null != transaction.foreign_amount %}
({{ formatAmountBySymbol(transaction.foreign_amount*-1, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places) }})
{% endif %}
{% else %}
{{ formatAmountBySymbol(transaction.amount, transaction.currency_symbol, transaction.currency_decimal_places) }}
{% if null != transaction.foreign_amount %}
({{ formatAmountBySymbol(transaction.foreign_amount, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places) }})
{% endif %}
{% endif %}
{# reconciliation #}
{% elseif transaction.transaction_type_type == 'Reconciliation' %}
{% if transaction.source_account_type == 'Reconciliation account' %}
{{ formatAmountBySymbol(transaction.amount*-1, transaction.currency_symbol, transaction.currency_decimal_places) }}
{% if null != transaction.foreign_amount %}
({{ formatAmountBySymbol(transaction.foreign_amount*-1, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places) }})
{% endif %}
{% else %}
{{ formatAmountBySymbol(transaction.amount, transaction.currency_symbol, transaction.currency_decimal_places) }}
{% if null != transaction.foreign_amount %}
({{ formatAmountBySymbol(transaction.foreign_amount, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places) }})
{% endif %}
{% endif %}
{# liability credit #}
{% elseif transaction.transaction_type_type == 'Liability credit' %}
{% if transaction.source_account_type == 'Liability credit' %}
{{ formatAmountBySymbol(transaction.amount, transaction.currency_symbol, transaction.currency_decimal_places) }}
{% if null != transaction.foreign_amount %}
({{ formatAmountBySymbol(transaction.foreign_amount, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places) }})
{% endif %}
{% else %}
{{ formatAmountBySymbol(transaction.amount*-1, transaction.currency_symbol, transaction.currency_decimal_places) }}
{% if null != transaction.foreign_amount %}
({{ formatAmountBySymbol(transaction.foreign_amount*-1, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places) }})
{% endif %}
{% endif %}
{# THE REST #}
{% else %}
{{ formatAmountBySymbol(transaction.amount, transaction.currency_symbol, transaction.currency_decimal_places) }}
{% if null != transaction.foreign_amount %}
({{ formatAmountBySymbol(transaction.foreign_amount, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places) }})
{% endif %}
{% endif %}
</td>
<td style=" {{ style|raw }}" class="hidden-xs">
{{ transaction.date.formatLocalized(monthAndDayFormat) }}
</td>
<td style=" {{ style|raw }}">
{% if 'Cash account' == transaction.source_account_type %}
<span class="text-success">({{ 'cash'|_ }})</span>
{% else %}
<a href="{{ route('accounts.show', [transaction.source_account_id|default(1)]) }}"
title="{{ transaction.source_account_iban|default(transaction.source_account_name) }}">{{ transaction.source_account_name }}</a>
{% endif %}
</td>
<td style=" {{ style|raw }}">
{% if 'Cash account' == transaction.destination_account_type %}
<span class="text-success">({{ 'cash'|_ }})</span>
{% else %}
<a href="{{ route('accounts.show', [transaction.destination_account_id|default(1)]) }}"
title="{{ transaction.destination_account_iban|default(transaction.destination_account_name) }}">{{ transaction.destination_account_name }}</a>
{% endif %}
</td>
{% if showCategory %}
<td style=" {{ style|raw }}" class="hidden-xs">
{% if transaction.category_id %}
<a href="{{ route('categories.show', [transaction.category_id]) }}"
title="{{ transaction.category_name }}">{{ transaction.category_name }}</a>
{% endif %}
</td>
{% endif %}
{% if showBudget %}
<td style=" {{ style|raw }}" class="hidden-xs">
{% if transaction.budget_id %}
<a href="{{ route('budgets.show', [transaction.budget_id]) }}"
title="{{ transaction.budget_name }}">{{ transaction.budget_name }}</a>
{% endif %}
</td>
{% endif %}
{% if group.count == 1 %}
<td style=" {{ style|raw }};" class="hidden-xs">
<div class="btn-group btn-group-xs pull-right">
<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', [group.id]) }}"><span
class="fa fa-fw fa-pencil"></span> {{ 'edit'|_ }}</a></li>
<li><a href="{{ route('transactions.delete', [group.id]) }}"><span
class="fa fa-fw fa-trash"></span> {{ 'delete'|_ }}</a></li>
<li><a href="#" data-id="{{ group.id }}" class="clone-transaction"><span
class="fa fa-copy fa-fw"></span> {{ 'clone'|_ }}</a></li>
<li>
<a href="{{ route('rules.create-from-journal', [transaction.transaction_journal_id]) }}"><span
class="fa fa-fw fa-random"></span> {{ 'create_rule_from_transaction'|_ }}
</a></li>
</ul>
</div>
</td>
{% endif %}
{% if group.count != 1 %}
<td style=" {{ style|raw }};" class="hidden-xs">
&nbsp;
</td>
{% endif %}
<td style="{{ style|raw }}" class="hidden-xs">
<div class="pull-right">
<input id="list_{{ transaction.transaction_journal_id }}"
value="{{ transaction.transaction_journal_id }}"
name="journals[{{ transaction.transaction_journal_id }}]"
type="checkbox" class="mass-select form-check-inline"
data-value="{{ transaction.transaction_journal_id }}"/>
</div>
</td>
</tr>
{% endfor %}
{% endfor %}
</tbody>
<tfoot>
<tr>
<td colspan="8">
<div class="pull-right">
<!-- Single button -->
<div class="btn-group action-menu btn-group-xs pull-right" style="display:none;">
<button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
{{ 'actions'|_ }} <span class="caret"></span>
</button>
<ul class="dropdown-menu btn-group-xs dropdown-menu-right">
<li><a href="#" class="mass-edit"><span class="fa fa-fw fa-pencil"></span>
<span>{{ 'mass_edit'|_ }}</span></a></li>
<li><a href="#" class="bulk-edit"><span class="fa fa-fw fa-pencil-square-o"></span>
<span>{{ 'bulk_edit'|_ }}</span></a></li>
<li><a href="#" class="mass-delete"><span class="fa fa-fw fa-trash"></span>
<span>{{ 'mass_delete'|_ }}</span></a></li>
</ul>
</div>
</div>
</td>
</tr>
<tr>
{% if showCategory or showBudget %}
<td colspan="9" class="no-margin-pagination">{{ groups.links('pagination.bootstrap-4')|raw }}</td>
{% else %}
<td colspan="8" class="no-margin-pagination">{{ groups.links('pagination.bootstrap-4')|raw }}</td>
{% endif %}
</tr>
</tfoot>
</table>
<script type="text/javascript" nonce="{{ JS_NONCE }}">
var cloneGroupUrl = '{{ route('transactions.clone') }}';
</script>

View File

@@ -0,0 +1,12 @@
<div class="list-group">
{% for group in groups %}
{% for transaction in group.transactions %}
<a class="list-group-item" href="{{ route('transactions.show', [transaction.transaction_group_id]) }}">
{{ transaction.description }}
<span class="pull-right small">
X
</span>
</a>
{% endfor %}
{% endfor %}
</div>

View File

@@ -0,0 +1,84 @@
{% for period in periods %}
<div class="box box-default">
<div class="box-header with-border">
<h3 class="box-title"><a href="{{ period.route }}">{{ period.title }}</a>
</h3>
</div>
<div class="box-body no-padding">
<table class="table table-hover">
{% if period.total_transactions > 0 %}
<tr>
<td style="width:33%;">{{ 'transactions'|_ }}</td>
<td style="text-align: right;">{{ period.total_transactions }}</td>
</tr>
{% endif %}
{% for entry in period.spent %}
{% if entry.amount != 0 %}
<tr>
<td style="width:33%;">{{ 'spent'|_ }}</td>
<td style="text-align: right;">
<span title="{{ entry.count }}">
{{ formatAmountBySymbol(entry.amount, entry.currency_symbol, entry.currency_decimal_places) }}
</span>
</td>
</tr>
{% endif %}
{% endfor %}
{% for entry in period.earned %}
{% if entry.amount != 0 %}
<tr>
<td style="width:33%;">{{ 'earned'|_ }}</td>
<td style="text-align: right;">
<span title="{{ entry.count }}">
{{ formatAmountBySymbol(entry.amount*-1, entry.currency_symbol, entry.currency_decimal_places) }}
</span>
</td>
</tr>
{% endif %}
{% endfor %}
{% for entry in period.transferred %}
{% if entry.amount != 0 %}
<tr>
<td style="width:33%;">{{ 'transferred'|_ }}</td>
<td style="text-align: right;">
<span title="{{ entry.count }}">
{{ formatAmountBySymbol(entry.amount*-1, entry.currency_symbol, entry.currency_decimal_places) }}
</span>
</td>
</tr>
{% endif %}
{% endfor %}
{% for entry in period.transferred_away %}
{% if entry.amount != 0 %}
<tr>
<td style="width:33%;">{{ 'transferred_away'|_ }}</td>
<td style="text-align: right;">
<span title="{{ entry.count }}">
{{ formatAmountBySymbol(entry.amount*-1, entry.currency_symbol, entry.currency_decimal_places) }}
</span>
</td>
</tr>
{% endif %}
{% endfor %}
{% for entry in period.transferred_in %}
{% if entry.amount != 0 %}
<tr>
<td style="width:33%;">{{ 'transferred_in'|_ }}</td>
<td style="text-align: right;">
<span title="{{ entry.count }}">
{{ formatAmountBySymbol(entry.amount*-1, entry.currency_symbol, entry.currency_decimal_places) }}
</span>
</td>
</tr>
{% endif %}
{% endfor %}
</table>
</div>
</div>
{% endfor %}

View File

@@ -0,0 +1,35 @@
<table class="table table-hover table-responsive">
<tr>
{% if showPiggyBank %}
<th>{{ trans('list.piggy_bank') }}</th>
{% endif %}
<th>{{ trans('list.date') }}</th>
<th>{{ trans('list.amount') }}</th>
</tr>
{% for event in events %}
<tr>
{% if showPiggyBank %}
<td>
<a href="{{ route('piggy-banks.show',event.piggyBank.id) }}">{{ event.piggyBank.name }}</a>
</td>
{% endif %}
<td>
{% if event.transaction_journal_id %}
<a href="{{ route('transactions.show',event.transactionJournal.transaction_group_id) }}"
title="{{ event.transactionJournal.description }}">{{ event.date.formatLocalized(monthAndDayFormat) }}</a>
{% else %}
{{ event.date.formatLocalized(monthAndDayFormat) }}
{% endif %}
</td>
<td style="text-align: right;">
{% if event.amount < 0 %}
<span class="text-danger">{{ trans('firefly.removed_amount', {amount: formatAmountByAccount(event.piggyBank.account, event.amount, false)})|raw }}</span>
{% else %}
<span class="text-success">{{ trans('firefly.added_amount', {amount: formatAmountByAccount(event.piggyBank.account, event.amount, false)})|raw }}</span>
{% endif %}
</td>
</tr>
{% endfor %}
</table>

View File

@@ -0,0 +1,131 @@
<table class="table table-hover table-condensed" id="piggy-sortable">
<thead>
<tr>
<th colspan="2">&nbsp;</th>
<th>{{ 'piggy_bank'|_ }}</th>
<th style="text-align: right;">{{ 'saved_so_far'|_ }}</th>
<th colspan="3" class="hidden-sm hidden-xs">&nbsp;</th>
<th style="text-align: right;" class="hidden-sm hidden-xs">{{ 'target_amount'|_ }}</th>
<th style="text-align: right;" class="hidden-sm hidden-xs">{{ 'left_to_save'|_ }}</th>
<th style="text-align: right;" class="hidden-sm hidden-xs">{{ 'suggested_savings_per_month'|_ }}</th>
</tr>
</thead>
{% for objectGroupOrder, objectGroup in piggyBanks %}
{% if objectGroup.piggy_banks|length > 0 %}
<tbody class="piggy-connected-list" {% if objectGroupOrder != 0 %}data-title="{{ objectGroup.object_group_title }}"{% else %}data-title=""{% endif %}>
<tr>
<td colspan="2">&nbsp;</td>
<td colspan="8"><small>{{ objectGroup.object_group_title }}</small></td>
</tr>
{% for piggy in objectGroup.piggy_banks %}
<tr class="piggy-sortable" data-id="{{ piggy.id }}" data-name="{{ piggy.name }}" data-order="{{ piggy.order }}" data-position="{{ loop.index0 }}">
<td class="visible-xs visible-sm hidden-md hidden-lg">
&nbsp;
</td>
<td class="visible-xs visible-sm hidden-md hidden-lg">
<div class="btn-group btn-group-xs">
<a href="{{ route('piggy-banks.remove-money-mobile', piggy.id) }}" class="btn btn-default btn-xs"><span class="fa fa-minus"></span></a>
<a href="{{ route('piggy-banks.add-money-mobile', piggy.id) }}" class="btn btn-default btn-xs"><span class="fa fa-plus"></span></a>
</div>
</td>
<td style="width:60px;" class="hidden-sm hidden-xs">
<span class="fa fa-fw fa-bars piggy-handle"></span>
<span class="loadSpin"></span>
</td>
<td style="width:100px;" class="hidden-sm hidden-xs">
<div class="btn-group btn-group-xs">
<a href="{{ route('piggy-banks.edit', piggy.id) }}" class="btn btn-default btn-xs"><span class="fa fa-pencil fa-fw"></span></a>
<a href="{{ route('piggy-banks.delete', piggy.id) }}" class="btn btn-danger btn-xs"><span class="fa fa-trash fa-fw"></span></a>
</div>
</td>
<td>
<a href="{{ route('piggy-banks.show', piggy.id) }}" title="{{ piggy.account_name }}">{{ piggy.name }}</a>
{% if piggy.attachments.count() > 0 %}
<span class="fa fa-fw fa-paperclip"></span>
{% endif %}
</td>
<td style="text-align: right;" class="piggySaved">
<span title="Saved so far"
style="text-align:right;">{{ formatAmountBySymbol(piggy.current_amount,piggy.currency_symbol,piggy.currency_decimal_places) }}</span>
</td>
<td class="hidden-sm hidden-xs" style="text-align:right;width:40px;">
{% if piggy.current_amount > 0 %}
<a href="{{ route('piggy-banks.remove-money', piggy.id) }}" class="btn btn-default btn-xs removeMoney" data-id="{{ piggy.id }}">
<span data-id="{{ piggy.id }}" class="fa fa-minus"></span></a>
{% endif %}
</td>
<td class="hidden-sm hidden-xs piggyBar">
<div class="progress progress" style="margin-bottom:0;">
<div
{% if piggy.percentage == 100 %}
class="progress-bar progress-bar-success"
{% elseif piggy.percentage == 0 %}
class="progress-bar progress-bar-warning"
{% else %}
class="progress-bar progress-bar-info"
{% endif %}
role="progressbar" aria-valuenow="{{ piggy.percentage }}" aria-valuemin="0" aria-valuemax="100"
style="min-width: 30px;width: {{ piggy.percentage }}%;">
{{ piggy.percentage }}%
</div>
</div>
</td>
<td class="hidden-sm hidden-xs" style="width:40px;">
{% if piggy.left_to_save > 0 %}
<a href="{{ route('piggy-banks.add-money', piggy.id) }}" class="btn btn-default btn-xs addMoney" data-id="{{ piggy.id }}">
<span data-id="{{ piggy.id }}" class="fa fa-plus"></span></a>
{% endif %}
</td>
<td class="hidden-sm hidden-xs" style="text-align:right;">
<span title="{{ 'target_amount'|_ }}">{{ formatAmountBySymbol(piggy.target_amount,piggy.currency_symbol,piggy.currency_decimal_places) }}</span>
</td>
<td class="hidden-sm hidden-xs" style="text-align:right;">
{% if piggy.left_to_save > 0 %}
<span title="{{ 'left_to_save'|_ }}">{{ formatAmountBySymbol(piggy.left_to_save,piggy.currency_symbol,piggy.currency_decimal_places) }}</span>
{% endif %}
</td>
<td class="hidden-sm hidden-xs" style="text-align:right;">
{% if piggy.target_date %}
{{ formatAmountBySymbol(piggy.save_per_month, piggy.currency_symbol, piggy.currency_decimal_places) }}
{% endif %}
</td>
</tr>
{% endfor %}
<tr>
<td class="visible-xs visible-sm hidden-md hidden-lg">&nbsp;</td>
<td class="visible-xs visible-sm hidden-md hidden-lg">&nbsp;</td>
<td class="hidden-sm hidden-xs">&nbsp;</td> {# handle #}
<td class="hidden-sm hidden-xs">&nbsp;</td> {# buttons #}
<td>&nbsp;</td>
<td style="text-align: right;">
{% for sum in objectGroup.sums %}
{{ formatAmountBySymbol(sum.saved, sum.currency_symbol, sum.currency_decimal_places) }}<br />
{% endfor %}
</td>
<td class="hidden-sm hidden-xs">&nbsp;</td> {# remove money #}
<td class="hidden-sm hidden-xs">&nbsp;</td> {# progress#}
<td class="hidden-sm hidden-xs">&nbsp;</td> {# add money #}
<td class="hidden-sm hidden-xs" style="text-align: right;">
{% for sum in objectGroup.sums %}
{{ formatAmountBySymbol(sum.target, sum.currency_symbol, sum.currency_decimal_places) }}<br />
{% endfor %}
</td>
<td class="hidden-sm hidden-xs" style="text-align: right;">
{% for sum in objectGroup.sums %}
{{ formatAmountBySymbol(sum.left_to_save, sum.currency_symbol, sum.currency_decimal_places) }}<br />
{% endfor %}
</td>
<td class="hidden-sm hidden-xs" style="text-align: right;">
{% for sum in objectGroup.sums %}
{{ formatAmountBySymbol(sum.save_per_month, sum.currency_symbol, sum.currency_decimal_places) }}<br />
{% endfor %}
</td>
</tr>
</tbody>
{% endif %}
{% endfor %}
</table>