| 
									
										
										
										
											2022-01-29 14:15:34 +01:00
										 |  |  | <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"> </th>
 | 
					
						
							|  |  |  |         <th class="hidden-sm hidden-xs"> </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 %}
 | 
					
						
							| 
									
										
										
										
											2022-03-28 12:23:46 +02:00
										 |  |  |             <tbody class="bill-connected-list"
 | 
					
						
							|  |  |  |                    {% if objectGroupOrder != 0 %}data-title="{{ objectGroup.object_group_title }}"
 | 
					
						
							|  |  |  |                    {% else %}data-title=""{% endif %}>
 | 
					
						
							| 
									
										
										
										
											2022-01-29 14:15:34 +01:00
										 |  |  |             <tr>
 | 
					
						
							|  |  |  |                 <td class="hidden-sm hidden-xs"> </td>
 | 
					
						
							|  |  |  |                 <td class="hidden-sm hidden-xs"> </td>
 | 
					
						
							|  |  |  |                 <td colspan="6"><small>{{ objectGroup.object_group_title }}</small></td>
 | 
					
						
							|  |  |  |             </tr>
 | 
					
						
							|  |  |  |             {% for entry in objectGroup.bills %}
 | 
					
						
							| 
									
										
										
										
											2022-03-28 12:23:46 +02:00
										 |  |  |                 <tr class="bill-sortable" data-id="{{ entry.id }}" data-name="{{ entry.name }}"
 | 
					
						
							|  |  |  |                     data-order="{{ entry.order }}" data-position="{{ loop.index0 }}">
 | 
					
						
							| 
									
										
										
										
											2022-01-29 14:15:34 +01:00
										 |  |  |                     <td class="hidden-sm hidden-xs">
 | 
					
						
							|  |  |  |                         <span class="fa fa-fw fa-bars bill-handle"></span>
 | 
					
						
							|  |  |  |                     </td>
 | 
					
						
							|  |  |  |                     <td class="hidden-sm hidden-xs">
 | 
					
						
							| 
									
										
										
										
											2022-03-28 12:23:46 +02:00
										 |  |  |                         <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
 | 
					
						
							| 
									
										
										
										
											2022-01-29 14:15:34 +01:00
										 |  |  |                                         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) }}
 | 
					
						
							| 
									
										
										
										
											2024-12-26 09:16:17 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |                     {% if '0' != entry.native_amount_max %}
 | 
					
						
							| 
									
										
										
										
											2024-12-26 11:28:31 +01:00
										 |  |  |                     (~ {{ formatAmountBySymbol((entry.native_amount_max + entry.native_amount_min)/2, defaultCurrency.symbol, defaultCurrency.decimal_places) }})
 | 
					
						
							| 
									
										
										
										
											2024-12-26 09:16:17 +01:00
										 |  |  |                     {% endif %}
 | 
					
						
							| 
									
										
										
										
											2022-01-29 14:15:34 +01:00
										 |  |  |                 </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">
 | 
					
						
							| 
									
										
										
										
											2023-10-30 19:11:02 +01:00
										 |  |  |                             {% if entry.next_expected_match %}
 | 
					
						
							|  |  |  |                                 {{ formatDate(entry.next_expected_match, monthAndDayFormat) }}
 | 
					
						
							|  |  |  |                             {% endif %}
 | 
					
						
							| 
									
										
										
										
											2022-01-29 14:15:34 +01:00
										 |  |  |                         </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">
 | 
					
						
							| 
									
										
										
										
											2023-11-25 19:29:10 +01:00
										 |  |  |                             {{ entry.next_expected_match_diff }}
 | 
					
						
							|  |  |  |                             <!-- {{ trans('firefly.bill_expected_date', {date: entry.next_expected_match_diff }) }} -->
 | 
					
						
							| 
									
										
										
										
											2022-01-29 14:15:34 +01:00
										 |  |  |                         </td>
 | 
					
						
							|  |  |  |                         <td class="expected_in_period hidden-sm hidden-xs">
 | 
					
						
							| 
									
										
										
										
											2024-07-26 12:53:13 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-01-29 14:15:34 +01:00
										 |  |  |                             {% 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">
 | 
					
						
							| 
									
										
										
										
											2024-07-26 12:53:13 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-01-29 14:15:34 +01:00
										 |  |  |                             {% 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">
 | 
					
						
							| 
									
										
										
										
											2023-10-30 19:11:02 +01:00
										 |  |  |                             {% if entry.next_expected_match %}
 | 
					
						
							| 
									
										
										
										
											2024-07-26 12:53:13 +02:00
										 |  |  |                                     {{ formatDate(entry.next_expected_match, monthAndDayFormat) }}
 | 
					
						
							|  |  |  |                                 {% else %}
 | 
					
						
							|  |  |  |                                     <span class="text-muted">{{ entry.next_expected_match_diff }}</span>
 | 
					
						
							| 
									
										
										
										
											2023-10-30 19:11:02 +01:00
										 |  |  |                             {% endif %}
 | 
					
						
							| 
									
										
										
										
											2022-01-29 14:15:34 +01:00
										 |  |  |                         </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 %}
 | 
					
						
							| 
									
										
										
										
											2022-03-28 12:23:46 +02:00
										 |  |  |                         {% if entry.end_date %}
 | 
					
						
							|  |  |  |                             <br>
 | 
					
						
							|  |  |  |                             {% if carbonize(entry.end_date).lte(today) %}
 | 
					
						
							|  |  |  |                                 <span class="text-danger">
 | 
					
						
							|  |  |  |                                     {{ trans('firefly.bill_end_index_line', {date: carbonize(entry.end_date).isoFormat(monthAndDayFormat)  })  }}
 | 
					
						
							|  |  |  |                                     </span>
 | 
					
						
							|  |  |  |                             {% else %}
 | 
					
						
							|  |  |  |                                 {{ trans('firefly.bill_end_index_line', {date: carbonize(entry.end_date).isoFormat(monthAndDayFormat)  })  }}
 | 
					
						
							|  |  |  |                             {% endif %}
 | 
					
						
							|  |  |  |                         {% endif %}
 | 
					
						
							|  |  |  |                         {% if entry.extension_date %}
 | 
					
						
							|  |  |  |                             <br>
 | 
					
						
							|  |  |  |                             {% if carbonize(entry.extension_date).lte(today) %}
 | 
					
						
							|  |  |  |                                 <span class="text-danger">
 | 
					
						
							|  |  |  |                                     {{ trans('firefly.bill_extension_index_line', {date: carbonize(entry.extension_date).isoFormat(monthAndDayFormat)  })  }}
 | 
					
						
							|  |  |  |                                     </span>
 | 
					
						
							|  |  |  |                             {% else %}
 | 
					
						
							|  |  |  |                                 {{ trans('firefly.bill_extension_index_line', {date: carbonize(entry.extension_date).isoFormat(monthAndDayFormat)  })  }}
 | 
					
						
							|  |  |  |                             {% endif %}
 | 
					
						
							|  |  |  |                         {% endif %}
 | 
					
						
							| 
									
										
										
										
											2022-01-29 14:15:34 +01:00
										 |  |  |                     </td>
 | 
					
						
							|  |  |  |                 </tr>
 | 
					
						
							|  |  |  |             {% endfor %}
 | 
					
						
							|  |  |  |             {% for sum in sums[objectGroupOrder] %}
 | 
					
						
							|  |  |  |                 {% if '0' != sum.avg %}
 | 
					
						
							|  |  |  |                     <tr>
 | 
					
						
							|  |  |  |                         <td class="hidden-sm hidden-xs"> </td> <!-- handle -->
 | 
					
						
							|  |  |  |                         <td class="hidden-sm hidden-xs"> </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> </td> <!-- paid in period -->
 | 
					
						
							|  |  |  |                         <td class="hidden-sm hidden-xs"> </td> <!-- next expected match -->
 | 
					
						
							|  |  |  |                         <td class="hidden-sm hidden-xs"> </td><!-- repeats -->
 | 
					
						
							|  |  |  |                     </tr>
 | 
					
						
							|  |  |  |                 {% endif %}
 | 
					
						
							|  |  |  |                 {% if '0' != sum.per_period %}
 | 
					
						
							|  |  |  |                     <tr>
 | 
					
						
							|  |  |  |                         <td class="hidden-sm hidden-xs"> </td> <!-- handle -->
 | 
					
						
							|  |  |  |                         <td class="hidden-sm hidden-xs"> </td> <!-- buttons -->
 | 
					
						
							|  |  |  |                         <td colspan="2" style="text-align: right;"> <!-- title -->
 | 
					
						
							| 
									
										
										
										
											2022-03-28 12:23:46 +02:00
										 |  |  |                             <small>{{ ('per_period_sum_'~sum.period)|_ }} ({{ sum.currency_name }})
 | 
					
						
							|  |  |  |                                 ({{ 'active_bills_only'|_ }})</small>
 | 
					
						
							| 
									
										
										
										
											2022-01-29 14:15:34 +01:00
										 |  |  |                         </td>
 | 
					
						
							|  |  |  |                         <td style="text-align: right;"> <!-- amount -->
 | 
					
						
							|  |  |  |                             {{ formatAmountBySymbol(sum.per_period, sum.currency_symbol, sum.currency_decimal_places) }}
 | 
					
						
							|  |  |  |                         </td>
 | 
					
						
							|  |  |  |                         <td> </td> <!-- paid in period -->
 | 
					
						
							|  |  |  |                         <td class="hidden-sm hidden-xs"> </td> <!-- next expected match -->
 | 
					
						
							|  |  |  |                         <td class="hidden-sm hidden-xs"> </td><!-- repeats -->
 | 
					
						
							|  |  |  |                     </tr>
 | 
					
						
							|  |  |  |                 {% endif %}
 | 
					
						
							|  |  |  |             {% endfor %}
 | 
					
						
							|  |  |  |             </tbody>
 | 
					
						
							|  |  |  |         {% endif %}
 | 
					
						
							|  |  |  |     {% endfor %}
 | 
					
						
							|  |  |  |     {% if totals|length > 0 %}
 | 
					
						
							| 
									
										
										
										
											2022-03-28 12:23:46 +02:00
										 |  |  |         <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"> </td> <!-- handle -->
 | 
					
						
							|  |  |  |                     <td class="hidden-sm hidden-xs"> </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> </td> <!-- paid in period -->
 | 
					
						
							|  |  |  |                     <td class="hidden-sm hidden-xs"> </td> <!-- next expected match -->
 | 
					
						
							|  |  |  |                     <td class="hidden-sm hidden-xs"> </td><!-- repeats -->
 | 
					
						
							|  |  |  |                 </tr>
 | 
					
						
							|  |  |  |             {% endif %}
 | 
					
						
							|  |  |  |             {% if '0' != sum.per_period %}
 | 
					
						
							|  |  |  |                 <tr>
 | 
					
						
							|  |  |  |                     <td class="hidden-sm hidden-xs"> </td> <!-- handle -->
 | 
					
						
							|  |  |  |                     <td class="hidden-sm hidden-xs"> </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> </td> <!-- paid in period -->
 | 
					
						
							|  |  |  |                     <td class="hidden-sm hidden-xs"> </td> <!-- next expected match -->
 | 
					
						
							|  |  |  |                     <td class="hidden-sm hidden-xs"> </td><!-- repeats -->
 | 
					
						
							|  |  |  |                 </tr>
 | 
					
						
							|  |  |  |             {% endif %}
 | 
					
						
							|  |  |  |         {% endfor %}
 | 
					
						
							|  |  |  |         </tfoot>
 | 
					
						
							| 
									
										
										
										
											2022-01-29 14:15:34 +01:00
										 |  |  |     {% endif %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | </table>
 | 
					
						
							|  |  |  | <div style="padding-left:8px;">
 | 
					
						
							|  |  |  |     {{ paginator.links('pagination.bootstrap-4')|raw }}
 | 
					
						
							|  |  |  | </div>
 |