From 1a4458567c999637047e3caa007a4020ef8de680 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Mon, 20 Mar 2017 13:55:38 +0200 Subject: [PATCH] Merge Zapier and trans_choice fixes --- app/Http/Requests/InvoiceRequest.php | 6 +++++- resources/views/dashboard.blade.php | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) 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