Files
firefly-iii/resources/views/bills/show.twig

184 lines
8.9 KiB
Twig
Raw Normal View History

2016-11-06 08:11:43 +01:00
{% extends "./layout/default" %}
2015-06-19 20:59:14 +02:00
{% block breadcrumbs %}
{{ Breadcrumbs.render(Route.getCurrentRoute.getName, bill) }}
2015-06-19 20:59:14 +02:00
{% endblock %}
{% block content %}
2015-06-22 17:55:37 +02:00
<div class="row">
<div class="col-lg-6 col-sm-12 col-md-12">
2017-07-22 22:56:21 +02:00
<div class="box" id="billInfo">
2015-06-22 17:55:37 +02:00
<div class="box-header with-border">
2018-02-06 19:49:53 +01:00
<h3 class="box-title">{{ object.data.name }}</h3>
2015-05-02 12:51:02 +02:00
2015-06-22 17:55:37 +02:00
<div class="box-tools pull-right">
<div class="btn-group">
<button class="btn btn-box-tool dropdown-toggle" data-toggle="dropdown"><i class="fa fa-ellipsis-v"></i></button>
<ul class="dropdown-menu" role="menu">
2018-02-06 19:49:53 +01:00
<li><a href="{{ route('bills.edit',object.data.id) }}"><i class="fa fa-fw fa-pencil"></i> {{ 'edit'|_ }}</a></li>
<li><a href="{{ route('bills.delete',object.data.id) }}"><i class="fa fa-fw fa-trash-o"></i> {{ 'delete'|_ }}</a></li>
2015-06-22 17:55:37 +02:00
</ul>
</div>
2015-05-02 12:51:02 +02:00
</div>
2015-06-22 17:55:37 +02:00
</div>
<div class="box-body">
2017-11-25 20:54:42 +01:00
<table class="table table-striped">
2015-06-22 17:55:37 +02:00
<tr>
<td colspan="2">
2018-08-12 10:06:20 +02:00
{{ trans('firefly.match_between_amounts', {low: formatAmountByCurrency(object.data.currency,object.data.amount_min), high: formatAmountByCurrency(object.data.currency,object.data.amount_max) })|raw }}
2016-04-20 17:10:35 +02:00
{{ 'repeats'|_ }}
2018-02-06 19:49:53 +01:00
{{ trans('firefly.repeat_freq_' ~object.data.repeat_freq) }}.
2015-06-22 17:55:37 +02:00
</td>
</tr>
2018-05-04 06:00:16 +02:00
2017-07-21 04:35:57 +02:00
<tr>
2018-05-04 06:00:16 +02:00
<td style="width:50%;">{{ 'bill_is_active'|_ }}</td>
2017-07-21 04:35:57 +02:00
<td>
2018-02-06 19:49:53 +01:00
{% if object.data.active %}
2017-07-21 04:35:57 +02:00
<i class="fa fa-check fa-fw" title="{{ 'active'|_ }}"></i> {{ 'yes'|_ }}
{% else %}
<i class="fa fa-times fa-fw" title="{{ 'inactive'|_ }}"></i> {{ 'no'|_ }}
{% endif %}
</td>
</tr>
2015-06-22 17:55:37 +02:00
<tr>
2016-04-20 17:10:35 +02:00
<td>{{ 'next_expected_match'|_ }}</td>
2015-06-22 17:55:37 +02:00
<td>
2018-02-06 19:49:53 +01:00
{% if object.data.next_expected_match|length > 0 %}
2018-04-14 09:59:04 +02:00
{{ formatDate(object.data.next_expected_match, monthAndDayFormat) }}
{% else %}
{{ 'unknown'|_ }}
2015-06-22 17:55:37 +02:00
{% endif %}
2015-05-02 12:51:02 +02:00
</td>
2015-06-22 17:55:37 +02:00
</tr>
2016-07-05 08:57:45 +02:00
<tr>
<td>{{ trans('firefly.average_bill_amount_year', {year: year}) }}</td>
2018-08-12 10:06:20 +02:00
<td>{{ formatAmountByCurrency(object.data.currency,yearAverage) }}</td>
2016-07-05 08:57:45 +02:00
</tr>
<tr>
<td>{{ 'average_bill_amount_overall'|_ }}</td>
2018-08-12 10:06:20 +02:00
<td>{{ formatAmountByCurrency(object.data.currency, overallAverage) }}</td>
2016-07-05 08:57:45 +02:00
</tr>
2015-06-22 17:55:37 +02:00
</table>
</div>
2018-05-04 06:00:16 +02:00
<div class="box-footer">
<div class="btn-group">
<a class="btn btn-default" href="{{ route('bills.edit', [object.data.id]) }}">{{ 'edit'|_ }}</a>
2018-06-23 19:56:04 +02:00
<a class="btn btn-danger" href="{{ route('bills.delete', [object.data.id]) }}">{{ 'delete'|_ }}</a>
2018-05-04 06:00:16 +02:00
</div>
</div>
2015-05-02 12:51:02 +02:00
</div>
</div>
2015-06-22 17:55:37 +02:00
<div class="col-lg-6 col-sm-12 col-md-12">
2018-04-14 09:59:04 +02:00
<div class="box">
2015-06-22 17:55:37 +02:00
<div class="box-header with-border">
2018-04-14 09:59:04 +02:00
<h3 class="box-title">{{ 'bill_related_rules'|_ }}</h3>
2015-06-22 17:55:37 +02:00
</div>
2018-04-14 09:59:04 +02:00
<div class="box-body">
{% if rules.count > 0 %}
<ul>
{% for rule in rules %}
<li><a href="{{ route('rules.edit', [rule.id]) }}">{{ rule.title }}</a>
{% if not rule.active %}({{ 'list_inactive_rule'|_|lower }}){% endif %}
</li>
2018-04-14 09:59:04 +02:00
{% endfor %}
</ul>
2017-11-25 20:54:42 +01:00
{% endif %}
</div>
<div class="box-footer">
2018-09-14 11:14:20 +02:00
<a id="billButtons" href="{{ route('bills.rescan',object.data.id) }}" class="btn btn-default">{{ 'rescan_old'|_ }}</a>
2015-06-22 17:55:37 +02:00
</div>
2015-05-02 12:51:02 +02:00
</div>
2018-09-27 17:46:28 +02:00
{% if object.data.notes %}
2018-05-04 06:00:16 +02:00
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'notes'|_ }}</h3>
</div>
<div class="box-body table-responsive">
2018-09-27 17:46:28 +02:00
{{ object.data.notes|markdown }}
2018-05-04 06:00:16 +02:00
</div>
</div>
{% endif %}
2018-02-06 19:49:53 +01:00
{% if object.data.attachments_count > 0 %}
2017-11-25 20:54:42 +01:00
<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">
2018-10-17 05:31:51 +02:00
{% for att in object.data.attachments.data %}
2017-11-25 20:54:42 +01:00
<tr>
<td>
<div class="btn-group btn-group-xs">
2018-10-17 05:31:51 +02:00
<a href="{{ route('attachments.edit', att.id) }}" class="btn btn-default"><i class="fa fa-pencil"></i></a>
<a href="{{ route('attachments.delete', att.id) }}" class="btn btn-danger"><i class="fa fa-trash"></i></a>
<a href="{{ route('attachments.view', att.id) }}" class="btn btn-default"><i class="fa fa-download"></i></a>
2017-11-25 20:54:42 +01:00
</div>
</td>
<td>
2018-10-17 05:31:51 +02:00
<i class="fa {{ att.mime|mimeIcon }}"></i>
<a href="{{ route('attachments.download', att.id) }}" title="{{ att.filename }}">
{% if att.title %}
{{ att.title }}
2017-11-25 20:54:42 +01:00
{% else %}
2018-10-17 05:31:51 +02:00
{{ att.filename }}
2017-11-25 20:54:42 +01:00
{% endif %}
</a>
2018-10-17 05:31:51 +02:00
({{ att.size|filesize }})
{% if att.description %}
2017-11-25 20:54:42 +01:00
<br/>
2018-10-17 05:31:51 +02:00
<em>{{ att.description }}</em>
2017-11-25 20:54:42 +01:00
{% endif %}
</td>
</tr>
{% endfor %}
</table>
</div>
</div>
{% endif %}
2015-05-02 12:51:02 +02:00
</div>
</div>
2015-06-22 17:55:37 +02:00
<div class="row">
<div class="col-lg-12 col-sm-12 col-md-12">
2017-07-22 22:56:21 +02:00
<div class="box" id="billChart">
2015-06-22 17:55:37 +02:00
<div class="box-header with-border">
2016-04-20 17:10:35 +02:00
<h3 class="box-title">{{ 'chart'|_ }}</h3>
2015-06-22 17:55:37 +02:00
</div>
<div class="box-body">
2017-04-29 08:56:08 +02:00
<canvas id="bill-overview" style="width:100%;height:400px;" height="400" width="100%"></canvas>
2015-06-22 17:55:37 +02:00
</div>
2015-05-02 12:51:02 +02:00
</div>
</div>
</div>
2015-06-22 17:55:37 +02:00
<div class="row">
<div class="col-lg-12 col-sm-12 col-md-12">
<div class="box">
<div class="box-header with-border">
2016-04-21 10:23:19 +02:00
<h3 class="box-title">{{ 'connected_journals'|_ }}</h3>
2015-06-22 17:55:37 +02:00
</div>
2016-11-08 20:35:30 +01:00
<div class="box-body">
2018-08-11 19:22:28 +02:00
{% include 'list.transactions' with {showCategories: true, showBudgets: true} %}
2015-06-22 17:55:37 +02:00
</div>
2015-05-02 12:51:02 +02:00
</div>
</div>
</div>
{% endblock %}
{% block scripts %}
2015-06-22 17:55:37 +02:00
<script type="text/javascript">
2018-08-12 10:06:20 +02:00
var billCurrencySymbol = "{{ object.data.currency.symbol }}";
2018-02-06 19:49:53 +01:00
var billUri = '{{ route('chart.bill.single', [object.data.id]) }}';
2015-06-22 17:55:37 +02:00
</script>
<script type="text/javascript" src="js/lib/Chart.bundle.min.js?v={{ FF_VERSION }}"></script>
<script type="text/javascript" src="js/ff/charts.defaults.js?v={{ FF_VERSION }}"></script>
<script type="text/javascript" src="js/ff/charts.js?v={{ FF_VERSION }}"></script>
<script type="text/javascript" src="js/ff/bills/show.js?v={{ FF_VERSION }}"></script>
<script type="text/javascript" src="js/ff/transactions/list.js?v={{ FF_VERSION }}"></script>
{% endblock %}