2022-06-01 10:15:55 +03:00
|
|
|
<x-table>
|
|
|
|
<x-table.thead>
|
2022-08-08 11:39:29 +03:00
|
|
|
<x-table.tr>
|
2022-06-01 10:15:55 +03:00
|
|
|
@if (! $hideBulkAction)
|
2022-08-09 14:56:14 +03:00
|
|
|
<x-table.th class="{{ $classBulkAction }}" hidden-mobile override="class">
|
2022-06-01 10:15:55 +03:00
|
|
|
<x-index.bulkaction.all />
|
|
|
|
</x-table.th>
|
|
|
|
@endif
|
|
|
|
|
|
|
|
<x-table.th class="w-4/12 sm:w-3/12">
|
|
|
|
<x-slot name="first">
|
|
|
|
<x-sortablelink column="recurring.started_at" title="{{ trans('general.start_date') }}" />
|
|
|
|
</x-slot>
|
|
|
|
<x-slot name="second">
|
|
|
|
{{ trans('recurring.last_issued') }}
|
|
|
|
</x-slot>
|
|
|
|
</x-table.th>
|
|
|
|
|
2022-08-09 14:56:14 +03:00
|
|
|
<x-table.th class="w-2/12 ltr:pr-6 rtl:pl-6 py-3 ltr:text-left rtl:text-right text-xs font-medium text-black tracking-wider" hidden-mobile>
|
2023-01-04 16:04:00 +03:00
|
|
|
<x-slot name="first">
|
|
|
|
<x-sortablelink column="contact_name" title="{{ trans_choice($textContactName, 1) }}" />
|
|
|
|
</x-slot>
|
|
|
|
<x-slot name="second">
|
|
|
|
<x-sortablelink column="category.name" title="{{ trans_choice('general.categories', 1) }}" />
|
|
|
|
</x-slot>
|
2022-06-01 10:15:55 +03:00
|
|
|
</x-table.th>
|
|
|
|
|
|
|
|
<x-table.th class="w-4/12 sm:w-3/12">
|
|
|
|
<x-sortablelink column="recurring.status" title="{{ trans_choice('general.statuses', 1) }}" />
|
|
|
|
</x-table.th>
|
|
|
|
|
2022-08-09 14:56:14 +03:00
|
|
|
<x-table.th class="w-2/12" hidden-mobile>
|
2022-06-01 10:15:55 +03:00
|
|
|
<x-slot name="first">
|
|
|
|
{{ trans('recurring.frequency') }}
|
|
|
|
</x-slot>
|
|
|
|
<x-slot name="second">
|
|
|
|
{{ trans('recurring.duration') }}
|
|
|
|
</x-slot>
|
|
|
|
</x-table.th>
|
|
|
|
|
2022-09-09 10:50:49 +03:00
|
|
|
<x-table.th class="w-4/12 sm:w-2/12" kind="amount">
|
2022-06-01 10:15:55 +03:00
|
|
|
<x-sortablelink column="amount" title="{{ trans('general.amount') }}" />
|
|
|
|
</x-table.th>
|
|
|
|
</x-table.tr>
|
|
|
|
</x-table.thead>
|
|
|
|
|
|
|
|
<x-table.tbody>
|
|
|
|
@foreach($documents as $item)
|
2022-06-02 14:09:25 +03:00
|
|
|
<x-table.tr href="{{ route($showRoute, $item->id) }}">
|
2022-06-01 10:15:55 +03:00
|
|
|
@if (! $hideBulkAction)
|
2022-09-09 10:50:49 +03:00
|
|
|
<x-table.td class="ltr:pr-6 rtl:pl-6" hidden-mobile override="class">
|
2022-06-01 10:15:55 +03:00
|
|
|
<x-index.bulkaction.single id="{{ $item->id }}" name="{{ $item->contact->name }}" />
|
|
|
|
</x-table.td>
|
|
|
|
@endif
|
|
|
|
|
|
|
|
<x-table.td class="w-4/12 sm:w-3/12">
|
2022-09-09 10:50:49 +03:00
|
|
|
<x-slot name="first" class="font-bold">
|
2022-06-01 10:15:55 +03:00
|
|
|
<x-date date="{{ $item->recurring->started_at }}" />
|
|
|
|
</x-slot>
|
|
|
|
<x-slot name="second">
|
2023-08-29 10:14:22 +03:00
|
|
|
@if ($item->recurring->status == 'ended')
|
|
|
|
@if ($last = $item->recurring->documents->last()?->issued_at)
|
|
|
|
{{ $last->format(company_date_format()) }}
|
|
|
|
@else
|
2023-08-29 10:43:10 +03:00
|
|
|
<x-empty-data />
|
2023-08-29 10:14:22 +03:00
|
|
|
@endif
|
|
|
|
@else
|
|
|
|
@if ($last = $item->recurring->getLastRecurring())
|
|
|
|
{{ $last->format(company_date_format()) }}
|
|
|
|
@endif
|
2022-06-01 10:15:55 +03:00
|
|
|
@endif
|
|
|
|
</x-slot>
|
|
|
|
</x-table.td>
|
|
|
|
|
2022-08-09 14:56:14 +03:00
|
|
|
<x-table.td class="w-2/12" hidden-mobile>
|
2023-01-04 16:04:00 +03:00
|
|
|
<x-slot name="first">
|
|
|
|
{{ $item->contact_name }}
|
|
|
|
</x-slot>
|
|
|
|
<x-slot name="second">
|
|
|
|
<div class="flex items-center">
|
|
|
|
<x-index.category :model="$item->category" />
|
|
|
|
</div>
|
|
|
|
</x-slot>
|
2022-06-01 10:15:55 +03:00
|
|
|
</x-table.td>
|
|
|
|
|
|
|
|
<x-table.td class="w-4/12 sm:w-3/12">
|
|
|
|
<x-index.status status="{{ $item->recurring->status }}" background-color="bg-{{ $item->recurring_status_label }}" text-color="text-text-{{ $item->recurring_status_label }}" />
|
|
|
|
</x-table.td>
|
|
|
|
|
2022-08-09 14:56:14 +03:00
|
|
|
<x-table.td class="w-2/12" hidden-mobile>
|
2022-06-01 10:15:55 +03:00
|
|
|
<x-slot name="first">
|
2023-08-28 15:40:55 +03:00
|
|
|
@if ($item->recurring->interval > 1)
|
|
|
|
<x-tooltip
|
|
|
|
id="tooltip-frequency-{{ $item->recurring->id }}"
|
|
|
|
placement="top"
|
|
|
|
message="{{ trans('recurring.custom_frequency_desc', [
|
|
|
|
'interval' => $item->recurring->interval,
|
|
|
|
'frequency' => str()->lower(trans('recurring.' . str_replace(['daily', 'ly'], ['days', 's'], $item->recurring->frequency)))
|
|
|
|
]) }}"
|
|
|
|
>
|
|
|
|
{{ trans('recurring.custom') }}
|
|
|
|
</x-tooltip>
|
|
|
|
@else
|
|
|
|
{{ trans('recurring.' . $item->recurring->frequency) }}
|
|
|
|
@endif
|
2022-06-01 10:15:55 +03:00
|
|
|
</x-slot>
|
|
|
|
<x-slot name="second">
|
|
|
|
@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
|
|
|
|
</x-slot>
|
|
|
|
</x-table.td>
|
|
|
|
|
2022-09-09 10:50:49 +03:00
|
|
|
<x-table.td class="w-4/12 sm:w-2/12" kind="amount">
|
2023-07-11 12:17:01 +03:00
|
|
|
<x-money :amount="$item->amount" :currency="$item->currency_code" />
|
2022-06-01 10:15:55 +03:00
|
|
|
</x-table.td>
|
|
|
|
|
|
|
|
<x-table.td kind="action">
|
|
|
|
<x-table.actions :model="$item" />
|
|
|
|
</x-table.td>
|
|
|
|
</x-table.tr>
|
|
|
|
@endforeach
|
|
|
|
</x-table.tbody>
|
|
|
|
</x-table>
|
|
|
|
|
|
|
|
<x-pagination :items="$documents" />
|