@extends("admin.layouts.app")
@section("title", __("admin.invoices.title"))
@section("content")
@foreach([
"all" => __('common.form.all'),
"unpaid" => __('admin.invoices.filter_unpaid'),
{{-- Was missing: an invoice moves here when the customer files a
transfer notification, and it showed under no tab at all - an
invoice waiting for approval must be in plain sight. --}}
"payment_pending" => __('admin.invoices.filter_payment_pending'),
"paid" => __('admin.invoices.filter_paid'),
"overdue" => __('admin.invoices.filter_overdue'),
"cancelled" => __('admin.invoices.filter_cancelled'),
"draft" => __('admin.invoices.filter_draft'),
] + (\App\Support\AutoCharge::enabled()
{{-- Not a status. The invoices whose automatic card payment was sent
and whose outcome could not be established, which is where the
dashboard count links to. Offered only where the shop collects by
card: a tab for something that cannot happen is worse than no
tab. --}}
? [\App\Http\Controllers\Admin\InvoiceController::CHARGE_REVIEW_FILTER => __('admin.invoices.filter_charge_review')]
: []) as $val => $label)
@php $isActive = (request("status","unpaid") === $val); @endphp
$val]) }}"
style="display:inline-block;padding:8px 16px;font-size:13px;text-decoration:none;color:{{ $isActive ? "#1a4d80" : "#666" }};font-weight:{{ $isActive ? "700" : "400" }};border-bottom:{{ $isActive ? "3px solid #1a4d80" : "3px solid transparent" }};margin-bottom:-1px;">
{{ $label }}
@endforeach
@include('admin.partials.list-filters', ['filters' => $filters, 'action' => route('admin.invoices.index'), 'keep' => ['status' => request('status')]])