{!! Former::open(Utils::pluralizeEntityType($entityType) . '/bulk') ->addClass('listForm_' . $entityType) !!}
{!! Former::text('action')->id('action_' . $entityType) !!} {!! Former::text('public_id')->id('public_id_' . $entityType) !!} {!! Former::text('datatable')->value('true') !!}
@if (in_array($entityType, [ENTITY_TASK, ENTITY_EXPENSE, ENTITY_PRODUCT, ENTITY_PROJECT])) @can('create', 'invoice') {!! Button::primary(trans('texts.invoice'))->withAttributes(['class'=>'invoice', 'onclick' =>'submitForm_'.$entityType.'("invoice")'])->appendIcon(Icon::create('check')) !!} @endcan @endif {!! DropdownButton::normal(trans('texts.archive')) ->withContents($datatable->bulkActions()) ->withAttributes(['class'=>'archive']) ->split() !!}  
@if (false && $entityType == ENTITY_INVOICE && auth()->user()->account->isModuleEnabled(ENTITY_RECURRING_INVOICE)) {!! DropdownButton::normal(trans('texts.recurring')) ->withAttributes(['class'=>'recurringDropdown']) ->withContents([ ['label' => trans('texts.new_recurring_invoice'), 'url' => url('/recurring_invoices/create')], ] )->split() !!} @elseif ($entityType == ENTITY_EXPENSE) {!! DropdownButton::normal(trans('texts.recurring')) ->withAttributes(['class'=>'recurringDropdown']) ->withContents([ ['label' => trans('texts.new_recurring_expense'), 'url' => url('/recurring_expenses/create')], ] )->split() !!} {!! DropdownButton::normal(trans('texts.categories')) ->withAttributes(['class'=>'categoriesDropdown']) ->withContents([ ['label' => trans('texts.new_expense_category'), 'url' => url('/expense_categories/create')], ] )->split() !!} @elseif ($entityType == ENTITY_TASK) {!! Button::normal(trans('texts.kanban'))->asLinkTo(url('/tasks/kanban' . (! empty($clientId) ? ('/' . $clientId . (! empty($projectId) ? '/' . $projectId : '')) : '')))->appendIcon(Icon::create('th')) !!} {!! Button::normal(trans('texts.time_tracker'))->asLinkTo('javascript:openTimeTracker()')->appendIcon(Icon::create('time')) !!} @endif @if (Auth::user()->can('create', $entityType) && empty($vendorId)) {!! Button::primary(mtrans($entityType, "new_{$entityType}"))->asLinkTo(url(Utils::pluralizeEntityType($entityType) . '/create/' . (isset($clientId) ? ($clientId . (isset($projectId) ? '/' . $projectId : '')) : '')))->appendIcon(Icon::create('plus-sign')) !!} @endif
{!! Datatable::table() ->addColumn(Utils::trans($datatable->columnFields(), $datatable->entityType)) ->setUrl(url('api/' . Utils::pluralizeEntityType($entityType) . '/' . (isset($clientId) ? (isset($projectId) ? ($clientId . '/' . $projectId) : $clientId) : (isset($vendorId) ? $vendorId : '')))) ->setCustomValues('entityType', Utils::pluralizeEntityType($entityType)) ->setCustomValues('clientId', isset($clientId) && $clientId && empty($projectId)) ->setOptions('sPaginationType', 'bootstrap') ->setOptions('aaSorting', [[isset($clientId) ? ($datatable->sortCol-1) : $datatable->sortCol, 'desc']]) ->render('datatable') !!} @if ($entityType == ENTITY_PAYMENT) @include('partials/refund_payment') @endif {!! Former::close() !!}