| 
									
										
										
										
											2022-01-29 14:19:01 +01:00
										 |  |  | {% extends './layout/default' %}
 | 
					
						
							| 
									
										
										
										
											2022-01-29 14:15:34 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | {% block breadcrumbs %}
 | 
					
						
							|  |  |  |     {{ Breadcrumbs.render(Route.getCurrentRoute.getName, account, start, end) }}
 | 
					
						
							|  |  |  | {% endblock %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | {% block content %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     <div class="row">
 | 
					
						
							|  |  |  |         <div class="{% if attachments.count() == 0 %}col-lg-12 col-md-12 col-sm-12 col-xs-12{% else %}col-lg-8 col-md-6 col-sm-12 col-xs-12{% endif %}">
 | 
					
						
							|  |  |  |             <div class="box">
 | 
					
						
							|  |  |  |                 <div class="box-header with-border">
 | 
					
						
							|  |  |  |                     <h3 class="box-title">
 | 
					
						
							| 
									
										
										
										
											2024-12-25 11:59:15 +01:00
										 |  |  |                         {% if balances.balance %}
 | 
					
						
							| 
									
										
										
										
											2022-01-29 14:15:34 +01:00
										 |  |  |                         {{ trans('firefly.chart_account_in_period', { | 
					
						
							| 
									
										
										
										
											2024-12-25 11:59:15 +01:00
										 |  |  |                             balance: formatAmountBySymbol(balances.balance, currency.symbol, currency.decimal_places, true),
 | 
					
						
							| 
									
										
										
										
											2022-03-27 20:33:25 +02:00
										 |  |  |                             name: account.name|escape, start: start.isoFormat(monthAndDayFormat), end: end.isoFormat(monthAndDayFormat) })|raw }}
 | 
					
						
							| 
									
										
										
										
											2024-12-25 11:59:15 +01:00
										 |  |  |                         {% elseif balances.native_balance %}
 | 
					
						
							|  |  |  |                             {{ trans('firefly.chart_account_in_period', { | 
					
						
							|  |  |  |                                 balance: formatAmountBySymbol(balances.native_balance, defaultCurrency.symbol, defaultCurrency.decimal_places, true),
 | 
					
						
							|  |  |  |                                 name: account.name|escape, start: start.isoFormat(monthAndDayFormat), end: end.isoFormat(monthAndDayFormat) })|raw }}
 | 
					
						
							|  |  |  |                         {% endif %}
 | 
					
						
							| 
									
										
										
										
											2022-01-29 14:15:34 +01:00
										 |  |  |                     </h3>
 | 
					
						
							|  |  |  |                     <div class="box-tools pull-right">
 | 
					
						
							|  |  |  |                         <div class="btn-group">
 | 
					
						
							| 
									
										
										
										
											2023-06-04 15:16:17 +02:00
										 |  |  |                             <button class="btn btn-box-tool dropdown-toggle" data-toggle="dropdown"><span
 | 
					
						
							| 
									
										
										
										
											2023-09-05 19:34:46 +02:00
										 |  |  |                                     class="fa fa-ellipsis-v"></span></button>
 | 
					
						
							| 
									
										
										
										
											2022-01-29 14:15:34 +01:00
										 |  |  |                             <ul class="dropdown-menu" role="menu">
 | 
					
						
							| 
									
										
										
										
											2023-06-04 15:16:17 +02:00
										 |  |  |                                 <li><a href="{{ route('accounts.edit', account.id) }}"><span
 | 
					
						
							| 
									
										
										
										
											2023-09-05 19:34:46 +02:00
										 |  |  |                                             class="fa fa-pencil fa-fw"></span> {{ 'edit'|_ }}</a></li>
 | 
					
						
							| 
									
										
										
										
											2023-06-04 15:16:17 +02:00
										 |  |  |                                 <li><a href="{{ route('accounts.delete', account.id) }}"><span
 | 
					
						
							| 
									
										
										
										
											2023-09-05 19:34:46 +02:00
										 |  |  |                                             class="fa fa-trash fa-fw"></span> {{ 'delete'|_ }}</a></li>
 | 
					
						
							| 
									
										
										
										
											2024-01-10 05:34:20 +01:00
										 |  |  |                                 <li>
 | 
					
						
							|  |  |  |                                     <a href="{{ route('accounts.reconcile',account.id) }}"><span class="fa fa-fw fa-check"></span> {{ 'reconcile_this_account'|_ }}</a>
 | 
					
						
							|  |  |  |                                 </li>
 | 
					
						
							| 
									
										
										
										
											2022-01-29 14:15:34 +01:00
										 |  |  |                             </ul>
 | 
					
						
							|  |  |  |                         </div>
 | 
					
						
							|  |  |  |                     </div>
 | 
					
						
							|  |  |  |                 </div>
 | 
					
						
							|  |  |  |                 <div class="box-body">
 | 
					
						
							|  |  |  |                     <div>
 | 
					
						
							|  |  |  |                         <canvas id="overview-chart" style="width:100%;height:400px;" height="400" width="100%"></canvas>
 | 
					
						
							|  |  |  |                     </div>
 | 
					
						
							|  |  |  |                 </div>
 | 
					
						
							|  |  |  |             </div>
 | 
					
						
							|  |  |  |         </div>
 | 
					
						
							|  |  |  |         {% if attachments.count() > 0 %}
 | 
					
						
							|  |  |  |             <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
 | 
					
						
							|  |  |  |                 <div class="box">
 | 
					
						
							|  |  |  |                     <div class="box-header with-border">
 | 
					
						
							|  |  |  |                         <h3 class="box-title">
 | 
					
						
							|  |  |  |                             {{ 'attachments'|_ }}
 | 
					
						
							|  |  |  |                         </h3>
 | 
					
						
							|  |  |  |                     </div>
 | 
					
						
							|  |  |  |                     <div class="box-body no-padding">
 | 
					
						
							|  |  |  |                         {% include 'list.attachments' %}
 | 
					
						
							|  |  |  |                     </div>
 | 
					
						
							|  |  |  |                 </div>
 | 
					
						
							|  |  |  |             </div>
 | 
					
						
							|  |  |  |         {% endif %}
 | 
					
						
							|  |  |  |     </div>
 | 
					
						
							|  |  |  |     {% if not showAll and isLiability %}
 | 
					
						
							|  |  |  |         <div class="row">
 | 
					
						
							|  |  |  |             <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
 | 
					
						
							|  |  |  |                 <div class="box">
 | 
					
						
							|  |  |  |                     <div class="box-header with-border">
 | 
					
						
							|  |  |  |                         <h3 class="box-title">pay-off by date</h3>
 | 
					
						
							|  |  |  |                     </div>
 | 
					
						
							|  |  |  |                     <div class="box-body">
 | 
					
						
							|  |  |  |                         Content
 | 
					
						
							|  |  |  |                     </div>
 | 
					
						
							|  |  |  |                 </div>
 | 
					
						
							|  |  |  |             </div>
 | 
					
						
							|  |  |  |         </div>
 | 
					
						
							|  |  |  |     {% endif %}
 | 
					
						
							|  |  |  |     {% if not showAll and not isLiability %}
 | 
					
						
							|  |  |  |         <div class="row">
 | 
					
						
							|  |  |  |             <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
 | 
					
						
							|  |  |  |                 <div class="box">
 | 
					
						
							|  |  |  |                     <div class="box-header with-border">
 | 
					
						
							|  |  |  |                         <h3 class="box-title">{{ 'expenses_by_category'|_ }}</h3>
 | 
					
						
							|  |  |  |                     </div>
 | 
					
						
							|  |  |  |                     <div class="box-body">
 | 
					
						
							|  |  |  |                         <div style="width:100%;margin:0 auto;">
 | 
					
						
							|  |  |  |                             <canvas id="account-cat-out" style="width:100%;height:250px;" height="250"></canvas>
 | 
					
						
							|  |  |  |                         </div>
 | 
					
						
							|  |  |  |                     </div>
 | 
					
						
							|  |  |  |                 </div>
 | 
					
						
							|  |  |  |             </div>
 | 
					
						
							|  |  |  |             <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
 | 
					
						
							|  |  |  |                 <div class="box">
 | 
					
						
							|  |  |  |                     <div class="box-header with-border">
 | 
					
						
							|  |  |  |                         <h3 class="box-title">{{ 'expenses_by_budget'|_ }}</h3>
 | 
					
						
							|  |  |  |                     </div>
 | 
					
						
							|  |  |  |                     <div class="box-body">
 | 
					
						
							|  |  |  |                         <div style="width:100%;margin:0 auto;">
 | 
					
						
							|  |  |  |                             <canvas id="account-budget-out" style="width:100%;height:250px;" height="250"></canvas>
 | 
					
						
							|  |  |  |                         </div>
 | 
					
						
							|  |  |  |                     </div>
 | 
					
						
							|  |  |  |                 </div>
 | 
					
						
							|  |  |  |             </div>
 | 
					
						
							|  |  |  |             <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
 | 
					
						
							|  |  |  |                 <div class="box">
 | 
					
						
							|  |  |  |                     <div class="box-header with-border">
 | 
					
						
							|  |  |  |                         <h3 class="box-title">{{ 'income_by_category'|_ }}</h3>
 | 
					
						
							|  |  |  |                     </div>
 | 
					
						
							|  |  |  |                     <div class="box-body">
 | 
					
						
							|  |  |  |                         <div style="width:100%;margin:0 auto;">
 | 
					
						
							|  |  |  |                             <canvas id="account-cat-in" style="width:100%;height:250px;" height="250"></canvas>
 | 
					
						
							|  |  |  |                         </div>
 | 
					
						
							|  |  |  |                     </div>
 | 
					
						
							|  |  |  |                 </div>
 | 
					
						
							|  |  |  |             </div>
 | 
					
						
							|  |  |  |         </div>
 | 
					
						
							|  |  |  |     {% endif %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     <div class="row">
 | 
					
						
							|  |  |  |         {% if(location) %}
 | 
					
						
							| 
									
										
										
										
											2023-06-04 15:16:17 +02:00
										 |  |  |             <div class="col-lg-6">
 | 
					
						
							|  |  |  |                 <div class="box">
 | 
					
						
							|  |  |  |                     <div class="box-header with-border">
 | 
					
						
							|  |  |  |                         <h3 class="box-title">{{ 'location'|_ }}</h3>
 | 
					
						
							|  |  |  |                     </div>
 | 
					
						
							|  |  |  |                     <div class="box-body">
 | 
					
						
							|  |  |  |                         <div id="location_map" style="width:100%;height:300px;"></div>
 | 
					
						
							|  |  |  |                     </div>
 | 
					
						
							| 
									
										
										
										
											2022-01-29 14:15:34 +01:00
										 |  |  |                 </div>
 | 
					
						
							|  |  |  |             </div>
 | 
					
						
							|  |  |  |         {% endif %}
 | 
					
						
							|  |  |  |         {% if account.notes.count() == 1 %}
 | 
					
						
							|  |  |  |             <div class="col-lg-6">
 | 
					
						
							|  |  |  |                 <div class="box">
 | 
					
						
							|  |  |  |                     <div class="box-header with-border">
 | 
					
						
							|  |  |  |                         <h3 class="box-title">{{ 'notes'|_ }}</h3>
 | 
					
						
							|  |  |  |                     </div>
 | 
					
						
							|  |  |  |                     <div class="box-body">
 | 
					
						
							|  |  |  |                         {{ account.notes.first().text|markdown }}
 | 
					
						
							|  |  |  |                     </div>
 | 
					
						
							|  |  |  |                 </div>
 | 
					
						
							|  |  |  |             </div>
 | 
					
						
							|  |  |  |         {% endif %}
 | 
					
						
							|  |  |  |     </div>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     <div class="row">
 | 
					
						
							|  |  |  |         <div class="{% if periods|length > 0 %}col-lg-10 col-md-8 col-sm-12{% else %}col-lg-12 col-md-12 col-sm-12{% endif %}">
 | 
					
						
							|  |  |  |             <div class="box">
 | 
					
						
							|  |  |  |                 <div class="box-header with-border">
 | 
					
						
							| 
									
										
										
										
											2023-06-04 15:16:17 +02:00
										 |  |  |                     <h3 class="box-title">{{ 'transactions'|_ }}
 | 
					
						
							| 
									
										
										
										
											2024-12-25 11:59:15 +01:00
										 |  |  |                         {% if balances.balance %}
 | 
					
						
							|  |  |  |                         ({{ formatAmountBySymbol(balances.balance, currency.symbol, currency.decimal_places, true)|raw }})
 | 
					
						
							|  |  |  |                         {% elseif balances.native_balance %}
 | 
					
						
							|  |  |  |                             ({{ formatAmountBySymbol(balances.native_balance, defaultCurrency.symbol, defaultCurrency.decimal_places, true)|raw }})
 | 
					
						
							|  |  |  |                         {% endif %}
 | 
					
						
							|  |  |  |                     </h3>
 | 
					
						
							| 
									
										
										
										
											2022-01-29 14:15:34 +01:00
										 |  |  |                 </div>
 | 
					
						
							|  |  |  |                 <div class="box-body">
 | 
					
						
							|  |  |  |                     {% if account.accountType.type == 'Asset account' %}
 | 
					
						
							|  |  |  |                         {% set showReconcile = true %}
 | 
					
						
							|  |  |  |                     {% else %}
 | 
					
						
							|  |  |  |                         {% set showReconcile = false %}
 | 
					
						
							|  |  |  |                     {% endif %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                     {% include 'list.groups' %}
 | 
					
						
							|  |  |  |                     <p>
 | 
					
						
							|  |  |  |                         <span class="fa fa-calendar"></span>
 | 
					
						
							|  |  |  |                         {% if periods|length > 0 %}
 | 
					
						
							|  |  |  |                             <a href="{{ route('accounts.show.all', [account.id]) }}">
 | 
					
						
							|  |  |  |                                 {{ 'show_all_no_filter'|_ }}
 | 
					
						
							|  |  |  |                             </a>
 | 
					
						
							|  |  |  |                         {% else %}
 | 
					
						
							|  |  |  |                             <a href="{{ route('accounts.show', [account.id]) }}">
 | 
					
						
							|  |  |  |                                 {{ 'show_the_current_period_and_overview'|_ }}
 | 
					
						
							|  |  |  |                             </a>
 | 
					
						
							|  |  |  |                         {% endif %}
 | 
					
						
							|  |  |  |                     </p>
 | 
					
						
							|  |  |  |                 </div>
 | 
					
						
							|  |  |  |             </div>
 | 
					
						
							|  |  |  |         </div>
 | 
					
						
							|  |  |  |         {% if periods|length > 0 %}
 | 
					
						
							|  |  |  |             <div class="col-lg-2 col-md-4 col-sm-12 col-xs-12">
 | 
					
						
							|  |  |  |                 {% include 'list.periods' %}
 | 
					
						
							|  |  |  |             </div>
 | 
					
						
							|  |  |  |         {% endif %}
 | 
					
						
							|  |  |  |     </div>
 | 
					
						
							|  |  |  | {% endblock %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | {% block scripts %}
 | 
					
						
							|  |  |  |     <script type="text/javascript" nonce="{{ JS_NONCE }}">
 | 
					
						
							|  |  |  |         // location stuff
 | 
					
						
							|  |  |  |         {% if location %}
 | 
					
						
							| 
									
										
										
										
											2023-06-04 15:16:17 +02:00
										 |  |  |         var latitude = {{ location.latitude|default("52.3167") }};
 | 
					
						
							|  |  |  |         var longitude = {{ location.longitude|default("5.5500") }};
 | 
					
						
							|  |  |  |         var zoomLevel = {{ location.zoom_level|default("6") }};
 | 
					
						
							| 
									
										
										
										
											2022-01-29 14:15:34 +01:00
										 |  |  |         {% endif %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         var showAll = true;
 | 
					
						
							|  |  |  |         currencySymbol = "{{ currency.symbol }}";
 | 
					
						
							|  |  |  |         var accountID = {{ account.id }};
 | 
					
						
							| 
									
										
										
										
											2022-04-12 18:19:30 +02:00
										 |  |  |         var chartUrl = '{{ chartUrl }}';
 | 
					
						
							| 
									
										
										
										
											2022-01-29 14:15:34 +01:00
										 |  |  |         {% if not showAll %}
 | 
					
						
							|  |  |  |         showAll = false;
 | 
					
						
							| 
									
										
										
										
											2022-04-12 18:19:30 +02:00
										 |  |  |         // url's for charts:
 | 
					
						
							| 
									
										
										
										
											2022-01-29 14:15:34 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-04-12 18:19:30 +02:00
										 |  |  |         var incomeCategoryUrl = '{{ route('chart.account.income-category', [account.id, start.format('Ymd'), end.format('Ymd')]) }}';
 | 
					
						
							|  |  |  |         var expenseCategoryUrl = '{{ route('chart.account.expense-category', [account.id, start.format('Ymd'), end.format('Ymd')]) }}';
 | 
					
						
							|  |  |  |         var expenseBudgetUrl = '{{ route('chart.account.expense-budget', [account.id, start.format('Ymd'), end.format('Ymd')]) }}';
 | 
					
						
							| 
									
										
										
										
											2022-01-29 14:15:34 +01:00
										 |  |  |         var drawVerticalLine = '';
 | 
					
						
							| 
									
										
										
										
											2023-03-01 06:40:58 +01:00
										 |  |  |         var lineColor = 'red';
 | 
					
						
							|  |  |  |         var lineTextColor = '#000';
 | 
					
						
							|  |  |  |         if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
 | 
					
						
							|  |  |  |             lineColor = '#a00';
 | 
					
						
							|  |  |  |             lineTextColor = '#bec5cb';
 | 
					
						
							|  |  |  |         }
 | 
					
						
							| 
									
										
										
										
											2022-01-29 14:15:34 +01:00
										 |  |  |         {# render vertical line with text "today"  #}
 | 
					
						
							|  |  |  |         {% if start.lte(today) and end.gte(today) %}
 | 
					
						
							| 
									
										
										
										
											2022-03-27 20:33:25 +02:00
										 |  |  |         drawVerticalLine = '{{ today.isoFormat(monthAndDayFormat) }}';
 | 
					
						
							| 
									
										
										
										
											2022-01-29 14:15:34 +01:00
										 |  |  |         {% endif %}
 | 
					
						
							|  |  |  |         {% endif %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     </script>
 | 
					
						
							|  |  |  |     {% if location %}
 | 
					
						
							|  |  |  |         <script src="v1/lib/leaflet/leaflet.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
 | 
					
						
							|  |  |  |     {% endif %}
 | 
					
						
							| 
									
										
										
										
											2023-06-04 15:16:17 +02:00
										 |  |  |     <script type="text/javascript" src="v1/js/lib/Chart.bundle.min.js?v={{ FF_VERSION }}"
 | 
					
						
							|  |  |  |             nonce="{{ JS_NONCE }}"></script>
 | 
					
						
							|  |  |  |     <script type="text/javascript" src="v1/js/lib/chartjs-plugin-annotation.min.js?v={{ FF_VERSION }}"
 | 
					
						
							|  |  |  |             nonce="{{ JS_NONCE }}"></script>
 | 
					
						
							| 
									
										
										
										
											2022-01-29 14:15:34 +01:00
										 |  |  |     <script type="text/javascript" src="v1/js/ff/charts.defaults.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
 | 
					
						
							|  |  |  |     <script type="text/javascript" src="v1/js/ff/charts.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     <script src="v1/js/lib/jquery-ui.min.js?v={{ FF_VERSION }}" type="text/javascript" nonce="{{ JS_NONCE }}"></script>
 | 
					
						
							| 
									
										
										
										
											2023-06-04 15:16:17 +02:00
										 |  |  |     <script src="v1/js/lib/jquery.color-2.1.2.min.js?v={{ FF_VERSION }}" type="text/javascript"
 | 
					
						
							|  |  |  |             nonce="{{ JS_NONCE }}"></script>
 | 
					
						
							| 
									
										
										
										
											2022-01-29 14:15:34 +01:00
										 |  |  |     <script src="v1/js/ff/accounts/show.js?v={{ FF_VERSION }}" type="text/javascript" nonce="{{ JS_NONCE }}"></script>
 | 
					
						
							|  |  |  |     {# required for groups.twig #}
 | 
					
						
							|  |  |  |     <script type="text/javascript" src="v1/js/ff/list/groups.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
 | 
					
						
							|  |  |  | {% endblock %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | {% block styles %}
 | 
					
						
							|  |  |  |     {% if location %}
 | 
					
						
							| 
									
										
										
										
											2023-06-04 15:16:17 +02:00
										 |  |  |         <link rel="stylesheet" href="v1/lib/leaflet/leaflet.css?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}">
 | 
					
						
							| 
									
										
										
										
											2022-01-29 14:15:34 +01:00
										 |  |  |     {% endif %}
 | 
					
						
							|  |  |  | {% endblock %}
 |