@foreach($bills as $objectGroupOrder => $objectGroup)
{{ $objectGroup['object_group_title'] }}
@if(count($objectGroup['bills']) > 0) @foreach($objectGroup['bills'] as $entry) {{-- paidDates = 0 (bill not paid in period) pay_dates = 0 (bill not expected to be paid in this period) bill is active. --}} @if(0 === count($entry['paid_dates']) && 0 === count($entry['pay_dates']) && $entry['active']) @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(0 === count($entry['paid_dates']) && count($entry['pay_dates']) > 0 && $entry['active']) @if($entry['next_expected_match_diff'] === __('firefly.not_expected_period')) {{-- terrible code, you should sue me for this. --}} @else @endif @endif {{-- paid_dates >= 0 (bill is paid X times). Don't care about pay_dates. --}} @if(count($entry['paid_dates']) > 0 && $entry['active']) @endif {{-- bill is not active --}} @if(!$entry['active']) @endif @endforeach @foreach($sums[$objectGroupOrder] as $sum) @if('0' !== $sum['avg']) @endif @if('0' !== $sum['total_left_to_pay']) @endif @if('0' !== $sum['per_period']) @endif @endforeach @endif
{{ __('list.name') }} {{ trans('list.matchingAmount') }}
@if(!$entry['active']) @endif {{ $entry['name'] }} {{-- count attachments --}} @if(count($entry['attachments']) > 0) @endif ~ {!! format_amount_by_symbol(($entry['amount_max'] + $entry['amount_min'])/2, $entry['currency_symbol'], $entry['currency_decimal_places']) !!} @if('0' !== $entry['pc_amount_max'] && null !== $entry['pc_amount_max']) (~ {!! format_amount_by_symbol(($entry['pc_amount_max'] + $entry['pc_amount_min'])/2, $primaryCurrency->symbol, $primaryCurrency->decimal_places) }}) @endif
{{ __('firefly.sum') }} ({{ $sum['currency_name'] }}) ({{ __('firefly.active_exp_bills_only') }}) {!! format_amount_by_symbol($sum['avg'], $sum['currency_symbol'], $sum['currency_decimal_places']) !!}
{{ __('firefly.sum') }} ({{ $sum['currency_name'] }}) ({{ __('firefly.left_to_pay_active_bills') }}) {!! format_amount_by_symbol($sum['total_left_to_pay'], $sum['currency_symbol'], $sum['currency_decimal_places']) !!}
{{ __('firefly.per_period_sum_' . $sum['period']) }} ({{ $sum['currency_name'] }}) ({{ __('firefly.active_bills_only') }}) {!! format_amount_by_symbol($sum['per_period'], $sum['currency_symbol'], $sum['currency_decimal_places']) !!}
@endforeach @if(count($totals) > 0)
Totals
@foreach($totals as $sum) @if('0' !== $sum['avg']) @endif @if('0' !== $sum['per_period']) @endif @endforeach
{{ __('firefly.sum') }} ({{ $sum['currency_name'] }}) ({{ __('firefly.active_exp_bills_only_total') }}) {!! format_amount_by_symbol($sum['avg'], $sum['currency_symbol'], $sum['currency_decimal_places']) !!}
{{ __('firefly.per_period_sum_' . $sum['period']) }} ({{ $sum['currency_name'] }}) ({{ __('firefly.active_bills_only_total') }}) {!! format_amount_by_symbol($sum['per_period'], $sum['currency_symbol'], $sum['currency_decimal_places']) !!}
@endif