@if (! $hideBulkAction)
@endif
@stack('stated_at_and_ended_at_th_start')
@if (! $hideStartedAt || ! $hideEndedAt)
@stack('stated_at_th_start')
@if (! $hideStartedAt)
@endif
@stack('stated_at_th_end')
@stack('ended_at_th_start')
@if (! $hideEndedAt)
{{ trans('recurring.last_issued') }}
@endif
@stack('ended_at_th_end')
@endif
@stack('stated_at_and_ended_at_th_end')
@stack('contact_name_and_category_th_start')
@if (! $hideContactName || ! $hideCategory)
@stack('contact_name_th_start')
@if (! $hideContactName)
@endif
@stack('contact_name_th_end')
@stack('category_th_start')
@if (! $hideCategory)
@endif
@stack('category_th_end')
@endif
@stack('contact_name_and_category_th_end')
@stack('status_th_start')
@if (! $hideStatus)
@stack('status_th_inside_start')
@stack('status_th_inside_end')
@endif
@stack('status_th_end')
@stack('frequency_and_duration_th_start')
@if (! $hideFrequency || ! $hideDuration)
@stack('frequency_th_start')
@if (! $hideFrequency)
{{ trans('recurring.frequency') }}
@endif
@stack('frequency_th_end')
@stack('duration_th_start')
@if (! $hideDuration)
{{ trans('recurring.duration') }}
@endif
@stack('duration_th_end')
@endif
@stack('frequency_and_duration_th_end')
@stack('amount_th_start')
@if (! $hideAmount)
@stack('amount_th_inside_start')
@stack('amount_th_inside_end')
@endif
@stack('amount_th_end')
@foreach($documents as $item)
@if (! $hideBulkAction)
@endif
@stack('stated_at_and_ended_at_td_start')
@if (! $hideStartedAt || ! $hideEndedAt)
@stack('stated_at_td_start')
@if (! $hideStartedAt)
@endif
@stack('stated_at_td_end')
@stack('ended_at_td_start')
@if (! $hideEndedAt)
@if ($item->recurring->status == 'ended')
@if ($last = $item->recurring->documents->last()?->issued_at)
{{ $last->format(company_date_format()) }}
@else
@endif
@else
@if ($last = $item->recurring->getLastRecurring())
{{ $last->format(company_date_format()) }}
@endif
@endif
@endif
@stack('ended_at_td_end')
@endif
@stack('stated_at_and_ended_at_td_end')
@stack('contact_name_and_category_td_start')
@if (! $hideContactName || ! $hideCategory)
@stack('contact_name_td_start')
@if (! $hideContactName)
{{ $item->contact_name }}
@endif
@stack('contact_name_td_end')
@stack('category_td_start')
@if (! $hideCategory)
@endif
@stack('category_td_end')
@endif
@stack('contact_name_and_category_td_end')
@stack('status_td_start')
@if (!$hideStatus)
@stack('status_td_inside_start')
@stack('status_td_inside_end')
@endif
@stack('status_td_end')
@stack('frequency_and_duration_td_start')
@if (! $hideFrequency || ! $hideDuration)
@stack('frequency_td_start')
@if (! $hideFrequency)
@if ($item->recurring->interval > 1)
{{ trans('recurring.custom') }}
@else
{{ trans('recurring.' . $item->recurring->frequency) }}
@endif
@endif
@stack('frequency_td_end')
@stack('duration_td_start')
@if (! $hideDuration)
@if ($item->recurring->limit_by == 'count')
@if ($item->recurring->limit_count == 0)
{{ trans('recurring.ends_never') }}
@else
{{ trans('recurring.ends_after', ['times' => $item->recurring->limit_count]) }}
@endif
@else
{{ trans('recurring.ends_date', ['date' => company_date($item->recurring->limit_date)]) }}
@endif
@endif
@stack('duration_td_end')
@endif
@stack('frequency_and_duration_td_end')
@stack('amount_td_start')
@if (! $hideAmount)
@stack('amount_td_inside_start')
@stack('amount_td_inside_end')
@endif
@stack('amount_td_end')
@endforeach