mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 02:36:28 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			259 lines
		
	
	
		
			13 KiB
		
	
	
	
		
			Twig
		
	
	
	
	
	
			
		
		
	
	
			259 lines
		
	
	
		
			13 KiB
		
	
	
	
		
			Twig
		
	
	
	
	
	
| {% extends "./layout/default" %}
 | |
| 
 | |
| {% block breadcrumbs %}
 | |
|     {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, account, moment, start, end) }}
 | |
| {% endblock %}
 | |
| 
 | |
| {% block content %}
 | |
| 
 | |
|     <div class="row">
 | |
|         <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
 | |
|             <div class="box">
 | |
|                 <div class="box-header with-border">
 | |
|                     <h3 class="box-title">{{ 'reconcile_range'|_ }}</h3>
 | |
|                 </div>
 | |
|                 <div class="box-body no-padding">
 | |
|                     <table class="table table-hover">
 | |
|                         <thead>
 | |
|                         <tr>
 | |
|                             <th colspan="2" style="width:50%;">{{ 'start_balance'|_ }}</th>
 | |
|                             <th colspan="2">{{ 'end_balance'|_ }}</th>
 | |
|                         </tr>
 | |
|                         </thead>
 | |
|                         <tbody>
 | |
|                         <tr>
 | |
|                             <td style="width:25%;">
 | |
|                                 {{ 'date'|_ }}
 | |
|                             </td>
 | |
|                             <td style="width:25%;">
 | |
|                                 {{ 'balance'|_ }}
 | |
|                             </td>
 | |
|                             <td style="width:25%;">
 | |
|                                 {{ 'date'|_ }}
 | |
|                             </td>
 | |
|                             <td style="width:25%;">
 | |
|                                 {{ 'balance'|_ }}
 | |
|                             </td>
 | |
|                         </tr>
 | |
|                         <tr>
 | |
|                             <td>
 | |
|                                 <div class="input-group">
 | |
|                                     <div class="input-group-addon">
 | |
|                                         <i class="fa fa-calendar"></i>
 | |
|                                     </div>
 | |
|                                     <input type="date" value="{{ start.format('Y-m-d') }}" name="start_date" class="form-control">
 | |
|                                 </div>
 | |
|                             </td>
 | |
|                             <td>
 | |
|                                 <div class="input-group">
 | |
|                                     <span class="input-group-addon non-selectable-currency-symbol">{{ currency.symbol }}</span>
 | |
|                                     <input type="number" value="{{ startBalance }}" name="start_balance" class="form-control">
 | |
|                                 </div>
 | |
|                             </td>
 | |
|                             <td>
 | |
|                                 <div class="input-group">
 | |
|                                     <div class="input-group-addon">
 | |
|                                         <i class="fa fa-calendar"></i>
 | |
|                                     </div>
 | |
|                                     <input type="date" value="{{ end.format('Y-m-d') }}" name="end_date" class="form-control">
 | |
|                                 </div>
 | |
|                             </td>
 | |
|                             <td>
 | |
|                                 <div class="input-group">
 | |
|                                     <span class="input-group-addon non-selectable-currency-symbol">{{ currency.symbol }}</span>
 | |
|                                     <input type="number" value="{{ endBalance }}" name="end_balance" class="form-control">
 | |
|                                 </div>
 | |
|                             </td>
 | |
|                         </tr>
 | |
|                         </tbody>
 | |
|                         <tfoot>
 | |
|                         <tr>
 | |
|                             <td colspan="3">
 | |
|                                 <div class="update_balance_instruction">
 | |
|                                     {{ 'update_balance_dates_instruction'|_ }}
 | |
|                                 </div>
 | |
|                                 <div class="select_transactions_instruction" style="display:none;">
 | |
|                                     {{ 'select_transactions_instruction'|_ }}
 | |
|                                 </div>
 | |
|                             </td>
 | |
|                             <td>
 | |
|                                 <a href="#" class="btn btn-default start_reconcile">{{ 'start_reconcile'|_ }}</a>
 | |
|                             </td>
 | |
|                         </tr>
 | |
|                         </tfoot>
 | |
|                     </table>
 | |
|                 </div>
 | |
|             </div>
 | |
|         </div>
 | |
|         <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
 | |
|             <div class="box">
 | |
|                 <div class="box-header with-border">
 | |
|                     <h3 class="box-title">{{ 'reconcile_options'|_ }}</h3>
 | |
|                 </div>
 | |
|                 <div class="box-body no-padding">
 | |
|                     <table class="table table-hover">
 | |
|                         <thead>
 | |
|                         <tr>
 | |
|                             <th style="width:50%;">{{ 'difference'|_ }}</th>
 | |
|                             <th>{{ 'actions'|_ }}</th>
 | |
|                         </tr>
 | |
|                         </thead>
 | |
|                         <tbody>
 | |
|                         <tr>
 | |
|                             <td>
 | |
|                                 <p class="lead" id="difference"></p>
 | |
|                             </td>
 | |
|                             <td>
 | |
|                                 <div class="btn-group">
 | |
|                                     <button class="btn btn-default store_reconcile" disabled><i class="fa fa-fw fa-check"></i> {{ 'store_reconcile'|_ }}</button>
 | |
|                                 </div>
 | |
|                             </td>
 | |
|                         </tr>
 | |
|                         </tbody>
 | |
|                     </table>
 | |
|                 </div>
 | |
|             </div>
 | |
|         </div>
 | |
| 
 | |
|     </div>
 | |
| 
 | |
|     <div class="row">
 | |
|         <div class="col-lg-12 col-md-12 col-sm-12">
 | |
|             <div class="box">
 | |
|                 <div class="box-header with-border">
 | |
|                     <h3 class="box-title">{{ 'transactions'|_ }}</h3>
 | |
|                 </div>
 | |
|                 <div class="box-body">
 | |
|                     <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 transaction.reconciled %}
 | |
|                                         {{ transaction|transactionReconciled }}
 | |
|                                     {% else %}
 | |
|                                         <input type="checkbox" name="reconciled[]"
 | |
|                                                data-younger="{% if transaction.date > end %}true{% else %}false{% endif %}"
 | |
|                                                value="{{ transaction.transaction_amount }}" 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 %}
 | |
|                         </tbody>
 | |
|                     </table>
 | |
|                 </div>
 | |
|             </div>
 | |
|         </div>
 | |
|     </div>
 | |
| 
 | |
| 
 | |
| 
 | |
| {% endblock %}
 | |
| 
 | |
| {% block scripts %}
 | |
|     <script type="text/javascript">
 | |
|         currencySymbol = "{{ currency.symbol }}";
 | |
|         var accountID = {{ account.id }};
 | |
|         var startBalance = {{ startBalance }};
 | |
|         var endBalance = {{ endBalance }};
 | |
|     </script>
 | |
|     <script src="js/ff/accounts/reconcile.js?v={{ FF_VERSION }}" type="text/javascript"></script>
 | |
| {% endblock %}
 |