diff --git a/app/Http/Requests/InvoiceRequest.php b/app/Http/Requests/InvoiceRequest.php index 9a080f2142..34365e2be2 100644 --- a/app/Http/Requests/InvoiceRequest.php +++ b/app/Http/Requests/InvoiceRequest.php @@ -17,7 +17,11 @@ class InvoiceRequest extends EntityRequest $invoice = Invoice::scope() ->whereInvoiceNumber($this->invoice_number) ->withTrashed() - ->firstOrFail(); + ->first(); + + if (! $invoice) { + abort(404); + } } // eager load the invoice items diff --git a/resources/views/dashboard.blade.php b/resources/views/dashboard.blade.php index 3ff821d9f5..1d7f5a1121 100644 --- a/resources/views/dashboard.blade.php +++ b/resources/views/dashboard.blade.php @@ -349,7 +349,11 @@ {{ trans('texts.activity') }} @if ($invoicesSent)
- {{ trans_choice('texts.invoices_sent', $invoicesSent) }} + @if (in_array(App::getLocale(), ['pl', 'cs', 'hr', 'lt'])) + + @else + {{ trans_choice('texts.invoices_sent', $invoicesSent) }} + @endif
@endif