diff --git a/app/Http/Livewire/InvoicesTable.php b/app/Http/Livewire/InvoicesTable.php index 70e73fcb90c0..db6d13bf4bef 100644 --- a/app/Http/Livewire/InvoicesTable.php +++ b/app/Http/Livewire/InvoicesTable.php @@ -5,7 +5,6 @@ namespace App\Http\Livewire; use App\Models\Invoice; use App\Utils\Traits\WithSorting; use Carbon\Carbon; -use Illuminate\Support\Facades\DB; use Livewire\Component; use Livewire\WithPagination; @@ -58,27 +57,6 @@ class InvoicesTable extends Component ->where('status_id', '<>', Invoice::STATUS_DRAFT) ->paginate($this->per_page); - if (in_array('gateway_fees', $this->status)) { - $transformed = $query - ->getCollection() - ->filter(function ($invoice) { - $invoice['line_items'] = collect($invoice->line_items) - ->filter(function ($item) { - return $item->type_id == '4' || $item->type_id == 4; - }); - - return count($invoice['line_items']); - }); - - $query = new \Illuminate\Pagination\LengthAwarePaginator( - $transformed, - $transformed->count(), - $query->perPage(), - $query->currentPage(), - ['path' => request()->url(), 'query' => ['page' => $query->currentPage()]] - ); - } - return render('components.livewire.invoices-table', [ 'invoices' => $query, ]); diff --git a/resources/views/portal/ninja2020/components/livewire/invoices-table.blade.php b/resources/views/portal/ninja2020/components/livewire/invoices-table.blade.php index 55c4634feb18..25deefa65565 100644 --- a/resources/views/portal/ninja2020/components/livewire/invoices-table.blade.php +++ b/resources/views/portal/ninja2020/components/livewire/invoices-table.blade.php @@ -22,10 +22,6 @@ -