| 
									
										
										
										
											2017-12-28 09:53:21 +01:00
										 |  |  | <div style="padding-left:8px;">
 | 
					
						
							| 
									
										
										
										
											2018-02-06 18:12:09 +01:00
										 |  |  |     {{ paginator.render|raw }}
 | 
					
						
							| 
									
										
										
										
											2017-12-28 09:53:21 +01:00
										 |  |  | </div>
 | 
					
						
							| 
									
										
										
										
											2015-06-21 11:59:35 +02:00
										 |  |  | <table class="table table-hover sortable">
 | 
					
						
							| 
									
										
										
										
											2015-05-08 17:04:24 +02:00
										 |  |  |     <thead>
 | 
					
						
							| 
									
										
										
										
											2015-05-02 12:51:02 +02:00
										 |  |  |     <tr>
 | 
					
						
							| 
									
										
										
										
											2016-03-14 17:18:28 +01:00
										 |  |  |         <th class="hidden-sm hidden-xs" data-defaultsort="disabled"> </th>
 | 
					
						
							| 
									
										
										
										
											2018-04-07 22:23:16 +02:00
										 |  |  |         <th data-defaultsign="az">{{ trans('list.name') }}</th>
 | 
					
						
							|  |  |  |         <th data-defaultsort="disabled" class="hidden-sm hidden-md hidden-xs">{{ trans('list.linked_to_rules') }}</th>
 | 
					
						
							| 
									
										
										
										
											2018-04-07 05:58:59 +02:00
										 |  |  |         <th data-defaultsign="_19" style="text-align: right;">{{ trans('list.matchingAmount') }}</th>
 | 
					
						
							| 
									
										
										
										
											2016-11-20 15:30:16 +01:00
										 |  |  |         <th data-defaultsign="month" class="hidden-sm hidden-xs">{{ trans('list.paid_current_period') }}</th>
 | 
					
						
							|  |  |  |         <th data-defaultsign="month" class="hidden-sm hidden-xs">{{ trans('list.next_expected_match') }}</th>
 | 
					
						
							|  |  |  |         <th data-defaultsign="az" class="hidden-sm hidden-xs">{{ trans('list.repeat_freq') }}</th>
 | 
					
						
							| 
									
										
										
										
											2015-06-27 08:06:24 +02:00
										 |  |  |     </tr>
 | 
					
						
							|  |  |  |     </thead>
 | 
					
						
							| 
									
										
										
										
											2015-05-08 17:04:24 +02:00
										 |  |  |     <tbody>
 | 
					
						
							| 
									
										
										
										
											2018-03-07 05:52:34 +01:00
										 |  |  |     {% set sum_min =0 %}
 | 
					
						
							|  |  |  |     {% set sum_max =0 %}
 | 
					
						
							|  |  |  |     {% set expected_total = 0 %}
 | 
					
						
							|  |  |  |     {% set count = 0 %}
 | 
					
						
							| 
									
										
										
										
											2015-05-02 12:51:02 +02:00
										 |  |  |     {% for entry in bills %}
 | 
					
						
							| 
									
										
										
										
											2018-03-07 05:52:34 +01:00
										 |  |  |         {% if entry.active %}
 | 
					
						
							|  |  |  |             {% set count = count + 1 %}
 | 
					
						
							| 
									
										
										
										
											2018-04-08 17:36:37 +02:00
										 |  |  |             {% set sum_min = sum_min + entry.amount_min %}
 | 
					
						
							|  |  |  |             {% set sum_max = sum_min + entry.amount_max %}
 | 
					
						
							| 
									
										
										
										
											2018-03-07 05:52:34 +01:00
										 |  |  |             {% set expected_total = expected_total + ((entry.amount_min + entry.amount_max) / 2) %}
 | 
					
						
							|  |  |  |         {% endif %}
 | 
					
						
							| 
									
										
										
										
											2015-06-27 08:06:24 +02:00
										 |  |  |         <tr>
 | 
					
						
							| 
									
										
										
										
											2016-03-14 17:18:28 +01:00
										 |  |  |             <td class="hidden-sm hidden-xs">
 | 
					
						
							| 
									
										
										
										
											2017-12-29 09:05:35 +01:00
										 |  |  |                 <div class="btn-group btn-group-xs edit_tr_buttons"><a href="{{ route('bills.edit',entry.id) }}" class="btn btn-default btn-xs"><i
 | 
					
						
							|  |  |  |                                 class="fa fa-fw fa-pencil"></i></a><a href="{{ route('bills.delete',entry.id) }}" class="btn btn-danger btn-xs"><i
 | 
					
						
							|  |  |  |                                 class="fa fa-fw fa-trash-o"></i></a></div>
 | 
					
						
							| 
									
										
										
										
											2015-05-08 17:00:39 +02:00
										 |  |  |             </td>
 | 
					
						
							| 
									
										
										
										
											2016-11-20 17:36:11 +01:00
										 |  |  |             <td data-value="{{ entry.name }}">
 | 
					
						
							| 
									
										
										
										
											2018-04-07 05:58:59 +02:00
										 |  |  |                 {% if not entry.active %}
 | 
					
						
							|  |  |  |                     <i class="fa fa-fw fa-ban"></i>
 | 
					
						
							|  |  |  |                 {% endif %}
 | 
					
						
							| 
									
										
										
										
											2015-06-27 08:06:24 +02:00
										 |  |  |                 <a href="{{ route('bills.show',entry.id) }}" title="{{ entry.name }}">{{ entry.name }}</a>
 | 
					
						
							| 
									
										
										
										
											2017-11-25 20:54:42 +01:00
										 |  |  |                 {# count attachments #}
 | 
					
						
							| 
									
										
										
										
											2018-02-06 18:12:09 +01:00
										 |  |  |                 {% if entry.attachments_count > 0 %}
 | 
					
						
							| 
									
										
										
										
											2017-11-25 20:54:42 +01:00
										 |  |  |                     <i class="fa fa-paperclip"></i>
 | 
					
						
							|  |  |  |                 {% endif %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-08 17:00:39 +02:00
										 |  |  |             </td>
 | 
					
						
							| 
									
										
										
										
											2018-04-14 09:59:04 +02:00
										 |  |  |             <td class="hidden-sm hidden-md hidden-xs rules">
 | 
					
						
							| 
									
										
										
										
											2018-04-08 17:36:37 +02:00
										 |  |  |                 {% 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></li>
 | 
					
						
							|  |  |  |                     {% endfor %}
 | 
					
						
							|  |  |  |                     </ul>
 | 
					
						
							|  |  |  |                 {% endif %}
 | 
					
						
							| 
									
										
										
										
											2015-05-08 17:00:39 +02:00
										 |  |  |             </td>
 | 
					
						
							| 
									
										
										
										
											2017-01-02 19:27:27 +01:00
										 |  |  |             <td data-value="{{ entry.amount_min }}" style="text-align: right;">
 | 
					
						
							| 
									
										
										
										
											2018-04-07 05:58:59 +02:00
										 |  |  |                 <span style="margin-right:5px;" title="{{ entry.amount_min|formatAmountPlain }} - {{ entry.amount_max|formatAmountPlain }}">
 | 
					
						
							|  |  |  |                     ~ {{ ((entry.amount_max+ entry.amount_min)/2)|formatAmount }}
 | 
					
						
							| 
									
										
										
										
											2017-01-02 19:27:27 +01:00
										 |  |  |                 </span>
 | 
					
						
							| 
									
										
										
										
											2015-05-08 17:00:39 +02:00
										 |  |  |             </td>
 | 
					
						
							| 
									
										
										
										
											2016-10-23 14:56:05 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-07-01 10:39:59 +02:00
										 |  |  |             {#
 | 
					
						
							|  |  |  |             paidDates = 0 (bill not paid in period)
 | 
					
						
							| 
									
										
										
										
											2018-02-06 18:12:09 +01:00
										 |  |  |             pay_dates  = 0 (bill not expected to be paid in this period)
 | 
					
						
							| 
									
										
										
										
											2017-07-01 10:39:59 +02:00
										 |  |  |             bill is active.
 | 
					
						
							|  |  |  |             #}
 | 
					
						
							| 
									
										
										
										
											2018-02-06 18:12:09 +01:00
										 |  |  |             {% if entry.paid_dates|length == 0 and entry.pay_dates|length == 0 and entry.active %}
 | 
					
						
							| 
									
										
										
										
											2017-07-22 22:56:21 +02:00
										 |  |  |                 <td class="paid_in_period text-muted" data-value="0001-00-00 00-00-00">
 | 
					
						
							| 
									
										
										
										
											2018-02-06 10:57:23 +01:00
										 |  |  |                     {{ trans('components.not_expected_period') }}
 | 
					
						
							| 
									
										
										
										
											2015-06-27 08:06:24 +02:00
										 |  |  |                 </td>
 | 
					
						
							| 
									
										
										
										
											2018-02-06 18:12:09 +01:00
										 |  |  |                 <td class="expected_in_period hidden-sm hidden-xs" data-value="{{ entry.next_expected_match }}">
 | 
					
						
							|  |  |  |                     {{ formatDate(entry.next_expected_match, monthAndDayFormat) }}
 | 
					
						
							| 
									
										
										
										
											2015-06-27 08:06:24 +02:00
										 |  |  |                 </td>
 | 
					
						
							| 
									
										
										
										
											2015-05-02 12:51:02 +02:00
										 |  |  |             {% endif %}
 | 
					
						
							| 
									
										
										
										
											2017-07-01 10:39:59 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |             {#
 | 
					
						
							| 
									
										
										
										
											2018-02-06 18:12:09 +01:00
										 |  |  |             paid_dates = 0 (bill not paid in period)
 | 
					
						
							|  |  |  |             pay_dates  > 0 (bill IS expected to be paid in this period)
 | 
					
						
							| 
									
										
										
										
											2017-07-01 10:39:59 +02:00
										 |  |  |             bill is active
 | 
					
						
							|  |  |  |             #}
 | 
					
						
							| 
									
										
										
										
											2018-02-06 18:12:09 +01:00
										 |  |  |             {% if entry.paid_dates|length == 0 and entry.pay_dates|length > 0 and entry.active %}
 | 
					
						
							| 
									
										
										
										
											2017-07-22 22:56:21 +02:00
										 |  |  |                 <td class="paid_in_period text-danger" data-value="0002-00-00 00-00-00">
 | 
					
						
							| 
									
										
										
										
											2018-02-06 10:57:23 +01:00
										 |  |  |                     {{ trans('components.not_or_not_yet') }}
 | 
					
						
							| 
									
										
										
										
											2015-06-27 08:06:24 +02:00
										 |  |  |                 </td>
 | 
					
						
							| 
									
										
										
										
											2018-02-06 18:12:09 +01:00
										 |  |  |                 <td class="expected_in_period hidden-sm hidden-xs" data-value="{{ entry.next_expected_match }}">
 | 
					
						
							|  |  |  |                     {{ formatDate(entry.next_expected_match, monthAndDayFormat) }}
 | 
					
						
							| 
									
										
										
										
											2016-10-23 14:56:05 +02:00
										 |  |  |                 </td>
 | 
					
						
							|  |  |  |             {% endif %}
 | 
					
						
							| 
									
										
										
										
											2017-07-01 10:39:59 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |             {#
 | 
					
						
							| 
									
										
										
										
											2018-02-06 18:12:09 +01:00
										 |  |  |             paid_dates >= 0 (bill is paid X times).
 | 
					
						
							|  |  |  |             Don't care about pay_dates.
 | 
					
						
							| 
									
										
										
										
											2017-07-01 10:39:59 +02:00
										 |  |  |             #}
 | 
					
						
							| 
									
										
										
										
											2018-02-06 18:12:09 +01:00
										 |  |  |             {% if entry.paid_dates|length > 0 and entry.active %}
 | 
					
						
							|  |  |  |                 <td class="paid_in_period text-success" data-value="{{ entry.paid_dates[0] }}">
 | 
					
						
							|  |  |  |                     {% for date in entry.paid_dates %}
 | 
					
						
							| 
									
										
										
										
											2018-03-07 05:52:34 +01:00
										 |  |  |                         {{ formatDate(date, monthAndDayFormat) }}<br/>
 | 
					
						
							| 
									
										
										
										
											2016-10-23 14:56:05 +02:00
										 |  |  |                     {% endfor %}
 | 
					
						
							|  |  |  |                 </td>
 | 
					
						
							| 
									
										
										
										
											2018-02-06 18:12:09 +01:00
										 |  |  |                 <td class="expected_in_period hidden-sm hidden-xs" data-value="{{ entry.next_expected_match }}">
 | 
					
						
							|  |  |  |                     {{ formatDate(entry.next_expected_match, monthAndDayFormat) }}
 | 
					
						
							| 
									
										
										
										
											2016-10-23 14:56:05 +02:00
										 |  |  |                 </td>
 | 
					
						
							|  |  |  |             {% endif %}
 | 
					
						
							| 
									
										
										
										
											2017-07-01 10:39:59 +02:00
										 |  |  |             {# bill is not active #}
 | 
					
						
							| 
									
										
										
										
											2016-10-23 14:56:05 +02:00
										 |  |  |             {% if not entry.active %}
 | 
					
						
							| 
									
										
										
										
											2017-07-22 22:56:21 +02:00
										 |  |  |                 <td class="paid_in_period text-muted" data-value="0000-00-00 00-00-00">
 | 
					
						
							| 
									
										
										
										
											2016-10-23 14:56:05 +02:00
										 |  |  |                     ~
 | 
					
						
							|  |  |  |                 </td>
 | 
					
						
							| 
									
										
										
										
											2017-07-22 22:56:21 +02:00
										 |  |  |                 <td class="expected_in_period text-muted hidden-sm hidden-xs" data-value="0">
 | 
					
						
							| 
									
										
										
										
											2016-10-23 14:56:05 +02:00
										 |  |  |                     ~
 | 
					
						
							| 
									
										
										
										
											2016-02-10 06:55:08 +01:00
										 |  |  |                 </td>
 | 
					
						
							| 
									
										
										
										
											2015-05-02 12:51:02 +02:00
										 |  |  |             {% endif %}
 | 
					
						
							| 
									
										
										
										
											2015-06-27 08:06:24 +02:00
										 |  |  |             <td class="hidden-sm hidden-xs" data-value="{{ entry.repeat_freq }}{{ entry.skip }}">
 | 
					
						
							| 
									
										
										
										
											2018-04-07 05:58:59 +02:00
										 |  |  |                 {{ ('repeat_freq_'~entry.repeat_freq)|_ }}
 | 
					
						
							| 
									
										
										
										
											2015-06-27 08:06:24 +02:00
										 |  |  |                 {% if entry.skip > 0 %}
 | 
					
						
							| 
									
										
										
										
											2017-11-03 14:53:00 +01:00
										 |  |  |                     {{ 'skips_over'|_ }} {{ entry.skip }}
 | 
					
						
							| 
									
										
										
										
											2015-06-27 08:06:24 +02:00
										 |  |  |                 {% endif %}
 | 
					
						
							|  |  |  |             </td>
 | 
					
						
							|  |  |  |         </tr>
 | 
					
						
							| 
									
										
										
										
											2015-05-02 12:51:02 +02:00
										 |  |  |     {% endfor %}
 | 
					
						
							| 
									
										
										
										
											2015-05-08 17:04:24 +02:00
										 |  |  |     </tbody>
 | 
					
						
							| 
									
										
										
										
											2018-03-07 05:52:34 +01:00
										 |  |  |     <tfoot>
 | 
					
						
							|  |  |  |     <tr>
 | 
					
						
							|  |  |  |         <td style="text-align:right;" colspan="3">{{ 'sum'|_ }} ({{ 'active_bills_only'|_ }})</td>
 | 
					
						
							|  |  |  |         <td style="text-align:right;" colspan="1">
 | 
					
						
							|  |  |  |             <span style="margin-right:5px;">
 | 
					
						
							|  |  |  |                 {{ sum_min|formatAmount }}
 | 
					
						
							|  |  |  |             </span>
 | 
					
						
							|  |  |  |         </td>
 | 
					
						
							|  |  |  |         <td style="text-align:right;" colspan="1">
 | 
					
						
							|  |  |  |             <span style="margin-right:5px;">
 | 
					
						
							|  |  |  |                 {{ sum_max|formatAmount }}
 | 
					
						
							|  |  |  |             </span>
 | 
					
						
							|  |  |  |         </td>
 | 
					
						
							|  |  |  |         <td colspan="5"> </td>
 | 
					
						
							|  |  |  |     </tr>
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-04-08 17:36:37 +02:00
										 |  |  |     {# calculate total#}
 | 
					
						
							| 
									
										
										
										
											2018-03-07 05:52:34 +01:00
										 |  |  |     {% if count > 0 %}
 | 
					
						
							|  |  |  |         {% set avg_min = (sum_min / count) %}
 | 
					
						
							|  |  |  |         {% set avg_max = (sum_max / count) %}
 | 
					
						
							|  |  |  |     {% else %}
 | 
					
						
							|  |  |  |         {% set avg_min = 0 %}
 | 
					
						
							|  |  |  |         {% set avg_max = 0 %}
 | 
					
						
							|  |  |  |     {% endif %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     <tr>
 | 
					
						
							|  |  |  |         <td style="text-align:right;" colspan="3">{{ 'average_per_bill'|_ }} ({{ 'active_bills_only'|_ }})</td>
 | 
					
						
							|  |  |  |         <td style="text-align:right;" colspan="1">
 | 
					
						
							|  |  |  |             <span style="margin-right:5px;">
 | 
					
						
							|  |  |  |                 {{ avg_min|formatAmount }}
 | 
					
						
							|  |  |  |             </span>
 | 
					
						
							|  |  |  |         </td>
 | 
					
						
							|  |  |  |         <td style="text-align:right;" colspan="1">
 | 
					
						
							|  |  |  |             <span style="margin-right:5px;">
 | 
					
						
							|  |  |  |                 {{ avg_max|formatAmount }}
 | 
					
						
							|  |  |  |             </span>
 | 
					
						
							|  |  |  |         </td>
 | 
					
						
							|  |  |  |         <td colspan="6"> </td>
 | 
					
						
							|  |  |  |     </tr>
 | 
					
						
							|  |  |  |     <tr>
 | 
					
						
							|  |  |  |         <td style="text-align:right;" colspan="3">{{ 'expected_total'|_ }} ({{ 'active_bills_only'|_ }})</td>
 | 
					
						
							|  |  |  |         <td style="text-align:right;" colspan="1">
 | 
					
						
							|  |  |  |             <span style="margin-right:5px;">
 | 
					
						
							| 
									
										
										
										
											2018-04-07 05:58:59 +02:00
										 |  |  |                 ~ {{ expected_total|formatAmount }}
 | 
					
						
							| 
									
										
										
										
											2018-03-07 05:52:34 +01:00
										 |  |  |             </span>
 | 
					
						
							|  |  |  |         </td>
 | 
					
						
							|  |  |  |         <td colspan="6"> </td>
 | 
					
						
							|  |  |  |     </tr>
 | 
					
						
							|  |  |  |     </tfoot>
 | 
					
						
							| 
									
										
										
										
											2015-05-02 12:51:02 +02:00
										 |  |  | </table>
 | 
					
						
							| 
									
										
										
										
											2017-12-28 09:53:21 +01:00
										 |  |  | <div style="padding-left:8px;">
 | 
					
						
							| 
									
										
										
										
											2018-02-06 18:12:09 +01:00
										 |  |  |     {{ paginator.render|raw }}
 | 
					
						
							| 
									
										
										
										
											2018-03-05 19:35:58 +01:00
										 |  |  | </div>
 |